Transfer of valuable information between a secure module and another module5949880Abstract The present invention relates to system, apparatus and method for communicating valuable data from a portable module to another module via an electronic device. More specifically, the disclosed system, apparatus and method are useful for enabling a user to fill a portable module with a cash equivalent and to spend the cash equivalent at a variety of locations. The disclosed system incorporates an encryption/decryption method. Claims What is claimed is: Description CROSS REFERENCE TO OTHER APPLICATIONS
______________________________________
RSA Modulus Clock Offset
RSA Exponent Random SALT
Transaction Script Configuration Data
Transaction Counter Input Data
Money Register Output Data
Destructor
______________________________________
Within each transaction group 40 the secure module 108 will initially accept certain commands which have an irreversible effect. Once any of these irreversible commands are executed in a transaction group 40, they remain in effect until the end of the module's useful life or until the transaction group 40, to which it applies, is deleted from the secure module 108. In addition, there are certain commands which have an irreversible effect until the end of the module's life or until a master erase command is issued to erase the entire contents of the secure module 108. These commands will be discussed further below. These commands are essential to give the Service Provider the necessary control over the operations that can be performed by the End User. Examples of some of the irreversible commands are:
______________________________________
Privatize Object Lock Object
Lock Transaction Group
Lock Micro-In-A-Can .TM.
______________________________________
Since much of the module's utility centers on its ability to keep a secret, the Privatize command is a very important irreversible command. Once the secure module 108, as a whole, is locked, the remaining NVRAM memory 24 is allocated for a circular buffer for holding an audit trail of previous transactions. Each of the transactions are identified by the number of the transaction group, the number of objects 42 within the specified group, and the date/time stamp. The fundamental concept implemented by the firmware is that the Service Provider can store transaction scripts 44 in a transaction group 40 to perform only those operations among objects that he wishes the End User to be able to perform. The Service Provider can also store and privatize RSA key or keys (encryption keys) that allow the secure module 108 to "sign" transactions on behalf of the Service Provider, thereby guaranteeing their authenticity. By privatizing and/or locking one or more objects 42 in the transaction group 40, the Service Provider maintains control over what the secure module 108 is allowed to do on his behalf. The End User cannot add new transaction scripts 44 and is therefore limited to the operations on objects 42 that can be performed with the transaction scripts 44 programmed by the Service Provider. II. Usage Models of the Secure Module 108 and Portable Module 102 This section presents practical applications of the system 100. Each of these applications is described in enough detail to make it clear why the secure module 108 and portable module 102 are important to the system application. A. Transferring Units of Exchange Out of a Portable Module 102 This section describes an example of how a portable module 102 and a secure module 108 operate in conjunction with the microprocessor based device 104 so that units of exchange can be securely transferred out of the portable module 102 and deposited into the secure module 108 and/or potentially communicated to at least one of the cash acceptor 110, ATM 112, credit card reader 114, or the phone line 116. Referring to FIG. 4, initially the portable module 102 contains its ID number, a count within its transaction counter and an encrypted data packet stored in memory. Encrypted within the data packet is the portable modules ID number, the portable modules transaction count number, and the amount of value (the monetary value) of the portable module at the present time X1. The user of the portable module touches, or somehow puts the portable module 102 into communication with the microprocessor based device 104. For explanation purposes, suppose the portable module 102 is being used as a token used to pay for a train fare. Thus, the microprocessor based device 104 could be, in this case, a turn style that allows the user to enter a train platform. The cost of entering the train platform is known by the microprocessor based device 104. The microprocessor based device 104 reads the portable module's serial number, transaction count, and the encrypted data packet X2. This data could be referred to as a first data. The microprocessor device 104 then provides the first data along with a first value, being the amount of value to be debited from the portable token (the train fare), to the secure module 108 X3. The secure module 108 decrypts the encrypted data found in the first data using a public key X4. Next, the secure module 108 makes a few comparisons to make sure that the data received is good data and not counterfeit. The secure module 108 compares the serial number received in the first data with the decrypted serial number X5. If the two serial numbers match then the secure module 108 compares the transaction count received in the first data with the decrypted transaction count X6. If the two transaction counts match then the secure module is comfortable that the data received is not counterfeit data. It is understood that the comparisons can be done in any order. Furthermore, there may have been a time stamp sent from the portable module 102. The time stamp may indicate a variety of things. One thing could be an indication of whether the portable module is still valid or the time stamp may further enable the secure module to decide if the data is or is not counterfeit. Assuming all the data passed to the secure module 108 is determined to be valid data, the secure module 108 subtracts the first value, the train fare, from the monetary value of the portable module 102 X7. The decrypted transaction count is then incremented. A register within the secure module 108 is increased by the amount of the first value, the train fare, so that the secure module can keep an accounting of the amount of "money" it has collected X8. The secure module 108 creates a data packet, a second data, which comprises at least the portable module's serial number, the incremented transaction count, and the reduced monetary value of the portable module 102. The second data packet is then encrypted by the secure module 108 using a private key X9. The microprocessor based device 104 receives the encrypted second data packet, passes the encrypted second data packet to the portable module 102 X10, and opens the turn style to let the module's user onto the train platform. The portable module 102 receives the encrypted second data packet and stores it in memory X11. The portable module also increments its transaction count indicating that another transaction has occurred X12. Thus, the above description indicates how valuable information can be transferred between a portable insecure module 102 and a secure module 108 wherein there is a conservation of value. That is, no value is gained or lost. Value that was in the portable module 102 was decreased by the same amount value was added to the secure module 108. In the example provided, the decrease and increase in value was equal to a train fare. Such an increment or decrement can also be equal to an amount provided by an ATM, credit card transaction, cash acceptor, etc. It is also understood that the insecure portable is module 102 could be another secure module similar to the secure module in the system, but programed to act like a portable module 102. B. Transferring Units of Exchange Into the Portable Module 102 In this example, for simplicity, suppose the portable module does not have any monetary value and the user of the portable module wishes to "fill it up" with value. Suppose the user wishes to take cash out of an ATM machine and instead of pocketing the cash, the user wishes to put the cash value into the portable module 102. Referring to FIG. 5, the portable module 102 contains its ID number, a transaction count and an encrypted data packet containing the portable module's ID number, transaction count and the monetary value of the portable module 102 Y1. The microprocessor based device 104, which in this example could be part of the ATM machine 112, receives the information contained in the portable module 102 when a communication is initiated between the portable module 102 and the microprocessor based device 104 Y2. The microprocessor based device 104 passes the module's serial number, transaction count, and encrypted data packet as a first data packet to the secure module 108. The microprocessor based device also passes the amount of amount of monetary value to add to the portable module 102, as indicated by the ATM 112, to the secure module 108 Y3. The secure module 108 decrypts the encrypted data passed to it using a public key Y4. The secure module 108 then makes a few comparisons to make sure that the data it has just received is valid and not counterfeit. The secure module 108 compares the serial number (ID number) received in the first data packet with the serial number (ID number) found in the decrypted data Y5. The secure module 108 also compares the transaction count passed the first data packet with the transaction count found in the decrypted data Y6. If the serial numbers and transaction counters match, then the secure module decides that the data received is valid and the secure module adds the monetary value, indicated by the ATM to the monetary value of the decrypted data Y7. The decrypted transaction count is incremented Y8. A register within the secure module may be decremented by the same amount that the monetary value of the decrypted data was increased Y8. The secure module 108 creates a second data packet, that contains the portable module's ID number, the incremented transaction counter and the increased monetary value. The second data packet is then encrypted using a private key Y10. The microprocessor based device 104 reads the encrypted second data packet and sends it to the portable module 102 Y11. The portable module receives the encrypted second data packet and stores it in memory Y12. The portable module also advances its transaction counter Y13. The result being that the portable module now has the value of the cash withdrawn from the ATM 112. Furthermore, a record of the transaction may have been recorded and kept in the secure module, as well as by the bank that operates the ATM 112. Exemplary Firmware Definitions for Use With the Secure Module Object The most primitive data structure accepted by and operated on by the secure modules firmware. A list of valid objects and their definitions is provided in the next section. Group A self-contained collection of objects. An object's scope is restricted to the group of which it is a member. Group ID A number preferably between 0 and 255 representing a specific group. Object ID A number preferably between 0 and 255 representing a specific object within a specific group. Object Type Preferably a 1-byte type specifier that describes a specific object. PIN An alphanumeric Personal Identification number that is preferably eight bytes in length. Common PIN The PIN that controls access to shared resources such as the audit trail. It is also used to control the host's ability to create and delete groups. Group PIN The PIN that controls access to operations specific to objects within a group. Audit Trail A record of transactions occurring after the secure module has been locked. Locked Object An object which has been locked by executing the lock object command. Once an object is locked it is not directly readable. Private Object An object which has been privatized by executing the privatize object command. Once an object is private, it is not directly readable or writable. Locked Group A group which has been locked using the locked group command. After a group has been locked it will not allow object creation. Composite Object A combination of several objects. The individual objects inherit the attributes of the composite object. Exemplary Object Definitions RSA Modulus A large integer preferably of at most 1024 bits in length. It is the product of 2 large prime numbers that are each about half the number of bits in length of the desired modulus size. The RSA modulus is used in the following equations for encrypting and decrypting a message M: Encryption: C=M.sup.e (mod N) (1) Decryption: M=C.sup.d (mod N) (2) where C is the cyphertext, d and e are the RSA exponents (see below), and N is the RSA modulus. RSA Exponent Both e and d (shown in equations 1 and 2 above) are RSA exponents. They are typically large numbers but are smaller than the modulus (N). RSA exponents can be either private or public. When RSA exponents are created in the secure module, they may be declared as either. Once created an exponent may be changed from a public exponent to a private exponent. After an exponent has been made private, however, it will remain private until the transaction group 40 to which it belongs is destroyed. Transaction Script A transaction script is a series of instructions to be carried out by the secure module. When invoked the secure module firmware interprets the instructions in the script and places the results in the output data object (see below). The actual script is simply a list of objects. The order in which the objects are listed specifies the operations to be performed on the objects. transaction scripts 44 preferably may be as long as 128 bytes. Transaction Counter The transaction counter object is preferably 4 bytes in length and is usually initialized to zero when it is created. Every time a transaction script, which references this object, is invoked, the transaction counter increments by 1. Once a transaction counter has been locked it is read only and provides an irreversible counter. Money Register The money register object is preferably 4 bytes in length and may be used to represent money or some other form of credit. Once this object has been created, it must be locked to prevent a user from tampering with its value. Once locked the value of this object can be altered only by invoking a transaction script. A typical transaction group 40 which performs monetary transactions might have one script for withdrawals from the money register and one for deposits to the money register. Clock Offset This object is preferably a 4 byte number which contains the difference between the reading of the secure module's real-time clock and some convenient time (e.g., 12:00 a.m., Jan. 1, 1970). The true time can then be obtained from the secure module by adding the value of the clock offset to the real-time clock. SALT A SALT object is preferably 20 bytes in length and should be initialized with random data when it is created. When a host transmits a generate random SALT command, the secure module combines the previous SALT with the secure module's random number (produced preferably by randomly occurring power-ups) to generate a new random SALT. If the SALT object has not been privatized it may subsequently be read by issuing a read object command. Configuration Data This is a user defined structure with preferably a maximum length of 128 bytes. This object is typically used to store configuration information specific to its transaction group 40. For example, the configuration data object may be used to specify the format of the money register object (i.e., the type of currency it represents). Since this object has no pre-defined structure, it may never be used by a transaction object. Input Data An input data object is simply an input buffer with preferably a maximum length of 128 bytes. A transaction group may have multiple input objects. The host uses input data objects to store data to be processed by transaction scripts 44. Output Data The output data object is used by transaction scripts as an output buffer. This object is automatically created when the transaction group is created. It is preferably 512 bytes in length and inherits password protection from its group. Random Fill When the script interpreter encounters this type of object it automatically pads the current message so that its length is 1 bit smaller than the length of the preceding modulus. A handle to this object is automatically created when the transaction group is created. It is a private object and may not be read using the read object command. Working Register This object is used by the script interpreter as working space and may be used in a transaction script. A handle to this object is automatically created when the transaction group is created. It is a private object and may not be read using the read object command. ROM Data This object is automatically created when the transaction group is created. It is a locked object and may not be altered using the write object command. This object is 8 bytes and length and its contents are identical to the 8 by ROM data of the Micro-In-A-Can.TM.. Preferred Secure Module Firmware Command Set
______________________________________
Set Common PIN(01H)
______________________________________
Transmit (to secure module)
01H, old PIN, new PIN, PIN option byte
Receive data
CSB (command status byte) = 0 if successful,
appropriate error code otherwise
Output length = 0
Output Data = 0
______________________________________
Notes: The PIN option byte may be the bitwise-or of any of the following values:
______________________________________
PIN.sub.-- TO.sub.-- ERASE
00000001b (require PIN for
Master Erase)
PIN.sub.-- TO.sub.-- CREATE
00000010b (require PIN for
group creation).
______________________________________
Initially the secure module has a PIN (Personal Identification Number) of 0 (Null) and an option byte of 0. Once a PIN has been established it can only be changed by providing the old PIN or by a Master Erase. However, if the PIN.sub.-- TO.sub.-- ERASE bit is set in the option byte, the PIN can only be changed through the set common PIN command. Possible error codes for the set common PIN command:
______________________________________
ERR.sub.-- BAD.sub.-- COMMON.sub.-- PIN
(Common PIN match
failed)
ERR.sub.-- BAD.sub.-- PIN.sub.-- LENGTH
(New PIN length
> 8 bytes)
ERR.sub.-- BAD.sub.-- OPTION.sub.-- BYTE
(Unrecognizable option
byte)
______________________________________
For all commands described in this section, data received by the host will be in the form of a return packet. A return packet has the following structure:
______________________________________
Command status byte
(0 if command successful,
error code otherwise, 1 byte)
Output data length
(Command output length, 2
bytes)
Output data (Command output, length
specified above).
______________________________________
Notes: If the LSB (least significant bit) of the PIN option is clear (i.e. PIN not required for Master Erase) then a 0 is transmitted for the Common PIN value. In general this text will always assume a PIN is required. If no PIN has been established a 0 should be transmitted as the PIN. This is true of the common PIN and group PINS (see below). If the PIN was correct the firmware deletes all groups (see below) and all objects within the groups. The common PIN and common PIN option byte are both reset to zero. After everything has been erased the secure module transmits the return packet. The CSB is as described above. The output data length and output data fields are both set to 0.
______________________________________
Create Group (03H)
______________________________________
Transmit data
03H, Common PIN, Group name, Group PIN
Receive data
CSB = 0 if command successful, appropriate
error code otherwise
Output length = 1 if successful, 0 otherwise
Output data = Group ID if successful, 0
otherwise
______________________________________
Notes: The maximum group name length is 16 bytes and the maximum PIN length is eight bytes. If the PIN.sub.-- TO.sub.-- CREATE bit is set in the common PIN option byte and the PIN transmitted does not match the common PIN the secure module will set the OSC to ERR.sub.-- BAD.sub.-- COMMON.sub.-- PIN. Possible error return codes for the create group command:
______________________________________
ERR.sub.-- BAD.sub.-- COMMON.sub.-- PIN
(Incorrect common PIN)
ERR.sub.-- BAD.sub.-- NAME.sub.-- LENGTH
(If group name length > 16
bytes)
ERR BAD.sub.-- PIN.sub.-- LENGTH
(If group PIN length
> 8 bytes)
ERR.sub.-- MIAC.sub.-- LOCKED
(The secure module has
been locked)
ERR.sub.-- INSUFFICIENT.sub.-- RAM
(Not enough memory for
new group)
______________________________________
Notes: The Group PIN only restricts access to objects within the group specified by the group ID transmitted in the command packet. Possible error codes for the set group PIN command:
______________________________________
ERR.sub.-- BAD.sub.-- GROUP.sub.-- PIN
(Group PIN match
failed)
ERR.sub.-- BAD.sub.-- PIN.sub.-- LENGTH
(New group PIN length
> 8 bytes)
______________________________________
Notes: If the Create Object command is successful the secure module firmware returns the object's ID within the group specified by the Group ID. If the PIN supplied by the host was incorrect or the group has been locked by the Lock Group command (described below) the secure module returns an error code in the CSB. An object creation will also fail if the object is invalid for any reason. For example, if the object being created is an RSA modulus (type 0) and it is greater than 1024 bits in length. transaction script creation will succeed if it obeys all transaction scripts rules. Possible error return codes for the create object command:
______________________________________
ERR.sub.-- BAD.sub.-- GROUP.sub.-- PIN
(Incorrect group PIN)
ERR.sub.-- GROUP.sub.-- LOCKED
(The group has been
locked)
ERR.sub.-- MIAC.sub.-- LOCKED
(The secure module has
been locked)
ERR.sub.-- INVALID.sub.-- TYPE
(The object type
specified is invalid)
ERR.sub.-- BAD.sub.-- SIZE
(The objects length
was invalid)
ERR.sub.-- INSUFFICIENT.sub.-- RAM
(Not enough memory for
new object)
Object types: RSA modulus 0
RSA exponent 1
Money register 2
Transaction counter
3
Transaction script
4
Clock offset 5
Random SALT 6
Configuration object
7
Input data object
8
Output data object
9
Object Attributes:
Locked 00000001b
Privatized 00000010b
______________________________________
Objects may also be locked and privatized after creation by using the Lock Object and Privatize Object commands described below.
______________________________________
Lock Object (06H)
______________________________________
Transmit data
06H, Group ID, Group PIN, Object ID
Receive data
CSB = 0 if command successful, appropriate
error code otherwise
Output length = 0
Output data = 0
______________________________________
Notes: If the Group ID, Group PIN and Object ID are all correct, the secure module will lock the specified object. Locking an object is an irreversible operation. Possible error return codes for the lock object command:
______________________________________
ERR.sub.-- BAD.sub.-- GROUP.sub.-- PIN
(Incorrect group PIN)
ERR.sub.-- GROUP.sub.-- LOCKED
(The group has already
been locked)
ERR.sub.-- MIAC.sub.-- LOCKED
(The secure module has
been locked)
ERR.sub.-- BAD.sub.-- GROUP.sub.-- ID
(Specified group does
not exist)
ERR.sub.-- BAD.sub.-- OBJECT.sub.-- ID
(Specified object does
not exist)
______________________________________
Notes: If the Group ID, Group PIN and Object ID were valid the object will be privatized. Privatized objects share all the properties of locked objects but are not readable. Privatized objects are only modifiable through transaction scripts. Note that locking a privatized object is legal, but has no meaning since object privatization is a stronger operation than object locking. Privatizing an object is an irreversible operation. Possible error return codes for the privatize object command:
______________________________________
ERR.sub.-- BAD.sub.-- GROUP.sub.-- PIN
(Incorrect group PIN)
ERR.sub.-- GROUP.sub.-- LOCKED
(The group has already
been locked)
ERR.sub.-- MIAC.sub.-- LOCKED
(The secure module has
been locked)
ERR.sub.-- BAD.sub.-- GROUP.sub.-- ID
(Specified group does
not exist)
ERR.sub.-- BAD.sub.-- OBJECT.sub.-- ID
(Specified object does
not exist)
______________________________________
Notes: If the Group ID, Group PIN and Object ID were valid the object will be made destructable. If an object is destructable it becomes unusable by a transaction script after the groups destructor becomes active. If no destructor object exists within the transaction group the destructible object attribute bit has no affect. Making an object destructable is an irreversible operation. Possible error return codes for the make object destructable command:
______________________________________
ERR.sub.-- BAD.sub.-- GROUP.sub.-- PIN
(Incorrect group PIN)
ERR.sub.-- GROUP.sub.-- LOCKED
(The group has already
been locked)
ERR.sub.-- MIAC.sub.-- LOCKED
(The secure module has
been locked)
ERR.sub.-- BAD.sub.-- GROUP.sub.-- ID
(Specified group does
not exist)
ERR.sub.-- BAD.sub.-- OBJECT.sub.-- ID
(Specified object does
not exist)
______________________________________
Notes: If the host supplied Common PIN is correct and the secure module has not previously been locked, the command will succeed. When the secure module is locked it will not accept any new groups or objects. This implies that all groups are automatically locked. The RAM not used by the system or by groups will be used for an audit trail. There is no audit trail until the secure module has successfully been locked| An audit trail record is six bytes long and has the following structure: Group ID.vertline.Object ID.vertline.Date/Time stamp. Once an audit trail has been established, a record of the form shown above will be stored in the first available size byte location every time a transaction script is executed. Note that since the secure module must be locked before the audit trail begins, neither the group ID nor any object ID is subject to change. This will always allow an application processing the audit trail to uniquely identify the transaction script that was executed. Once the audit trail has consumed all of its available memory, it will store new transaction records over the oldest transaction records. Possible error codes for the lock secure module command:
______________________________________
ERR.sub.-- BAD.sub.-- COMMON.sub.-- PIN
(Supplied common PIN
was incorrect)
ERR.sub.-- MIAC.sub.-- LOCKED
(Secure module was
already locked)
______________________________________
Notes: If the group PIN provided is correct the secure module BIOS will not allow further object creation within the specified group. Since groups are completely self-contained entities they may be deleted by executing the Delete Group command (described below). Possible error return codes for the lock group command:
______________________________________
ERR.sub.-- BAD.sub.-- GROUP.sub.-- PIN
(Incorrect group PIN)
ERR.sub.-- GROUP.sub.-- LOCKED
(The group has already
been locked)
ERR.sub.-- MIAC.sub.-- LOCKED
(The secure module has
been locked)
ERR.sub.-- BAD.sub.-- GROUP.sub.-- ID
(Specified group does
not exist)
______________________________________
Notes: The time estimate returned by the secure module is in sixteenths of a second. If an error code was returned in the CSB, the time estimate will be 0. Possible error return codes for the execution transaction script command:
______________________________________
ERR.sub.-- BAD.sub.-- GROUP.sub.-- PIN
(Incorrect group PIN)
ERR.sub.-- BAD.sub.-- GROUP.sub.-- ID
(Specified group does
not exist)
ERR.sub.-- BAD.sub.-- OBJECT.sub.-- ID
(Script object did not
exist in group)
______________________________________
Notes: If the Group ID, Group PIN and Object ID were correct, the secure module checks the attribute byte of the specified object. If the object has not been privatized the secure module will transmit the object data to the host. If the Group PIN was invalid or the object has been privatized the secure module will return a 0 in the output length, and data fields of the return packet. Possible error codes for the read object command:
______________________________________
ERR.sub.-- BAD.sub.-- GROUP.sub.-- PIN
(Incorrect group PIN)
ERR.sub.-- BAD.sub.-- GROUP.sub.-- ID
(Specified group does
not exist)
ERR.sub.-- BAD.sub.-- OBJECT.sub.-- ID
(Object did not exist
in group)
ERR.sub.-- OBJECT.sub.-- PRIVATIZED
(Object has been
privatized)
______________________________________
Notes: If the Group ID, Group PIN and Object ID were correct, the secure module checks the attribute byte of the specified object. If the object has not been locked or privatized the secure module will clear the objects previous size and data and replace it with the new object data. Note that the object type and attribute byte are not affected. Possible error codes for the write object command:
______________________________________
ERR.sub.-- BAD.sub.-- GROUP.sub.-- PIN
(Incorrect group PIN)
ERR.sub.-- BAD.sub.-- GROUP.sub.-- ID
(Specified group does
not exist)
ERR.sub.-- BAD.sub.-- OBJECT ID
(Object did not exist
in group)
ERR.sub.-- BAD.sub.-- OBJECT.sub.-- SIZE
(Illegal object size
specified)
ERR.sub.-- OBJECT.sub.-- LOCKED
(Object has been
locked)
ERR.sub.-- OBJECT.sub.-- PRIVATIZED
(Object has been
privatized)
______________________________________
Notes: The group name length is a maximum of 16 bytes. All byte values are legal in a group name.
______________________________________
Delete Group (0FH)
______________________________________
Transmit data
0FH, Group ID, Group PIN
Receive data
CSB = 0 if successful, appropriate error code
otherwise
Output length = 0
Output data = 0
______________________________________
Notes: If the group PIN and group ID are correct the secure module will delete the specified group. Deleting a group causes the automatic destruction of all objects within the group. If the secure module has been locked the Delete Group command will fail. Possible error codes for the delete group command:
______________________________________
ERR.sub.-- BAD.sub.-- CROUP.sub.-- PIN
(Incorrect group PIN)
ERR.sub.-- BAD.sub.-- GROUP.sub.-- ID
(Specified group does
not exist)
ERR.sub.-- MIAC.sub.-- LOCKED
(Secure module has
been locked)
______________________________________
Notes: This operation requires no PIN and never fails. The status structure is defined as follows:
______________________________________
Last command executed (1 byte)
Last command status (1 byte)
Time command received (4 bytes)
______________________________________
Notes: This operation requires no PIN and never fails. The configuration structure is defined as follows:
______________________________________
Number of groups (1 byte)
Flag byte (see below) (1 byte)
Audit trail size/Free RAM
(2 bytes)
______________________________________
The flag byte is the bitwise-or of any of the following values:
______________________________________
00000001b (Secure module is locked)
00000010b (Common PIN required for access)
______________________________________
Notes: If the transmitted Common PIN is valid and the secure module has been locked, it returns audit trail configuration information as follows:
______________________________________
Number of used transaction records
(2 bytes)
Number of free transaction records
(2 bytes)
A boolean specifying whether or
(1 byte)
not the audit trail rolled
since previous read command
______________________________________
Possible error codes for the read audit trail info command:
______________________________________
ERR.sub.-- BAD.sub.-- COMMON.sub.-- PIN
(Common PIN was
incorrect)
ERR.sub.-- MIAC.sub.-- NOT.sub.-- LOCKED
(Secure module is not
locked)
______________________________________
Notes: If the transmitted common PIN is valid and the secure module has been locked, it will transfer all new transaction records to the host. Possible error codes for the read audit trail command:
______________________________________
ERR.sub.-- BAD.sub.-- COMMON.sub.-- PIN
(Common PIN was
incorrect).
ERR.sub.-- MIAC.sub.-- NOT.sub.-- LOCKED
secure module is not locked
______________________________________
Notes: This command is identical to the read audit trail command, except that only records involving the group ID specified in the transmit data are returned to the host. This allows transaction groups to record track their own activities without seeing other groups records. Possible error codes for the read group audit trail command:
______________________________________
ERR.sub.-- BAD.sub.-- GROUP.sub.-- ID
(Group ID does not
exist)
ERR.sub.-- PAD.sub.-- GROUP.sub.-- PIN
(Common PIN was
incorrect)
ERR MIAC.sub.-- NOT.sub.-- LOCKED
(The secure module is
not locked)
______________________________________
Notes: This value is not adjusted with a clock offset. This command is normally used by a service provider to compute a clock offset during transaction group creation.
______________________________________
Read Real Time Clock Adjusted (16H)
______________________________________
Transmit data
16H, Group ID, Group PIN, ID of offset object
Receive data
CSB = 0 if successful, appropriate error code
otherwise
Output length = 4 if successful, 0 otherwise
Output data = Real time clock + clock offset ID
______________________________________
Notes: This command succeeds if the group ID and group PIN are valid, and the object ID is the ID of a clock offset. The secure module adds the clock offset to the current value of the 4 most significant bytes of the RTC and returns that value in the output data field. Note that a transaction script may be written to perform the same task and put the result in the output data object. Possible error codes for the real time clock adjusted command:
______________________________________
ERR.sub.-- BAD.sub.-- GROUP.sub.-- PIN
(Incorrect group PIN)
ERR.sub.-- BAD.sub.-- GROUP.sub.-- ID
(Specified group does
not exist)
ERR.sub.-- BAD OBJECT.sub.-- TYPE
(Object ID is not a
clock offset)
______________________________________
Notes: This command provides a good source of cryptographically useful random numbers. Possible error codes for the get random data command are:
______________________________________
ERR.sub.-- BAD.sub.-- SIZE
(Requested number of bytes
> 128)
______________________________________
Notes: This command returns the firmware version ID as a Pascal type string (length+data).
______________________________________
Get Free RAM (19H)
______________________________________
Transmit data
19H
Receive data
CSB = 0
Output length = 2
Output data = 2 byte value containing the
amount of free RAM
______________________________________
Notes: If the secure module has been locked the output data bytes will both be 0 indicating that all memory not used by transaction groups has been reserved for the audit trail.
______________________________________
Change Group Name (1AH)
______________________________________
Transmit data
1AH, Group ID, Group PIN, New Group name
Receive data
CSB = 0 if successful or an appropriate error
code otherwise
Output 1ength = 0
Output data = 0
______________________________________
Notes: If the group ID specified exists in the secure module and the PIN supplied is correct, the transaction group name is replaced by the new group name supplied by the host. If a group ID of 0 is supplied the PIN transmitted must be the common PIN. If it is correct, the secure module name is replaced by the new name supplied by the host. Possible error codes for the change group name command:
______________________________________
ERR.sub.-- BAD.sub.-- GROUP.sub.-- PIN
(Incorrect group PIN)
ERR.sub.-- BAD.sub.-- GRQUP.sub.-- ID
(Specified group does
not exist)
ERR.sub.-- BAD NAME.sub.-- LENGTH
(New group name > 16 bytes)
______________________________________
ERROR CODE DEFINITIONS ERR.sub.-- BAD.sub.-- COMMAND (80H) This error code occurs when the secure module firmware does not recognize the command just transmitted by the host. ERR.sub.-- BAD.sub.-- COMMON.sub.-- PIN (81H) This error code will be returned when a command requires a common PIN and the PIN supplied does not match the secure module's common PIN. Initially the common PIN is set to 0. ERR.sub.-- BAD.sub.-- GROUP.sub.-- PIN (82H) Transaction groups may have their own PIN, FIG. 6. If this PIN has been set (by a set group PIN command) it must be supplied to access any of the objects within the group. If the Group PIN supplied does not match the actual group PIN, the secure module will return the ERR.sub.-- BAD.sub.-- GROUP.sub.-- PIN error code. ERR.sub.-- BAD.sub.-- PIN.sub.-- LENGTH (83H) There are 2 commands which can change PIN values. The set group PIN and the set common PIN commands. Both of these require the new PIN as well as the old PIN. The ERR.sub.-- BAD.sub.-- PIN.sub.-- LENGTH error code will be returned if the old PIN supplied was correct, but the new PIN was greater than 8 characters in length. ERR.sub.-- BAD.sub.-- OPTION.sub.-- BYTE (84H) The option byte only applies to the common PIN. When the set common PIN command is executed the last byte the host supplies is the option byte (described in command section). If this byte is unrecognizable to the secure module, it will return the ERR.sub.-- BAD.sub.-- OPTION.sub.-- BYTE error code. ERR.sub.-- BAD.sub.-- NAME.sub.-- LENGTH (85H) When the create transaction group command is executed, one of the data structures supplied by the host is the group's name. The group name may not exceed 16 characters in length. If the name supplied is longer than 16 characters, the ERR.sub.-- BAD.sub.-- NAME.sub.-- LENGTH error code is returned. ERR.sub.-- INSUFFICIENT.sub.-- RAM (86H) The create transaction group and create object commands return this error code when there is not enough heap available in the secure module. ERR.sub.-- MIAC.sub.-- LOCKED (87H) When the secure module has been locked, no groups or objects can be created or destroyed. Any attempts to create or delete objects will generate an ERR.sub.-- MIAC.sub.-- LOCKED error code. ERR.sub.-- MIAC.sub.-- NOT.sub.-- LOCKED (88H) If the secure module has not been locked there is no audit trail. If one of the audit trail commands is executed this error code will be returned. ERR.sub.-- GROUP.sub.-- LOCKED (89H) Once a transaction group has been locked object creation within that group is not possible. Also the objects attributes and types are frozen. Any attempt to create objects or modify their attribute or type bytes will generate an ERR.sub.-- GROUP.sub.-- LOCKED error code. ERR.sub.-- BAD.sub.-- OBJECT.sub.-- TYPE (8AH) When the host sends a create object command to the secure module, one of the parameters it supplies is an object type (see command section). If the object type is not recognized by the firmware it will return an ERR.sub.-- BAD.sub.-- OBJECT.sub.-- TYPE error code. ERR.sub.-- BAD.sub.-- OBJECT.sub.-- ATTR (8BH) When the host sends a create object command to the secure module, one of the parameters it supplies is an object attribute byte (see command section). If the object attribute byte is not recognized by the firmware it will return an ERR.sub.-- BAD.sub.-- OBJECT.sub.-- ATTR error code. ERR.sub.-- BAD.sub.-- SIZE (8CH) An ERR.sub.-- BAD.sub.-- SIZE error code is normally generated when creating or writing an object. It will only occur when the object data supplied by the host has an invalid length. ERR.sub.-- BAD.sub.-- GROUP.sub.-- ID (8DH) All commands that operate at the transaction group level require the group ID to be supplied in the command packet. If the group ID specified does not exist in the secure module it will generate an ERR.sub.-- BAD.sub.-- GROUP.sub.-- ID error code. ERR.sub.-- BAD.sub.-- OBJECT.sub.-- ID (8EH) All commands that operate at the object level require the object ID to be supplied in the command packet. If the object ID specified does not exist within the specific transaction group (also specified in the command packet) the secure module will generate an ERR.sub.-- BAD.sub.-- OBJECT.sub.-- ID error code. ERR.sub.-- INSUFFICIENT.sub.-- FUNDS (8FH) If a script object that executes financial transactions is invoked and the value of the money register is less than the withdrawal amount requested an ERR.sub.-- INSUFFICIENT.sub.-- FUNDS error code will be returned. ERR.sub.-- OBJECT.sub.-- LOCKED (90H) Locked objects are read only. If a write object command is attempted and it specifies the object ID of a locked object the secure module will return an ERR.sub.-- OBJECT.sub.-- LOCKED error code. ERR.sub.-- OBJECT.sub.-- PRIVATE (91H) Private objects are not directly readable or writable. If a read object command or a write object command is attempted, and it specifies the object ID of a private object, the secure module will return an ERR.sub.-- OBJECT.sub.-- PRIVATE error code. ERR.sub.-- OBJECT.sub.-- DESTRUCTED (92H) If an object is destructible and the transaction group's destructor is active the object may not be used by a script. If a script is invoked which uses an object which has been destructed, an ERR.sub.-- OBJECT.sub.-- DESTRUCTED error code will be returned by the secure module. The exemplary embodiment of the present invention is preferably placed within a durable stainless steel, token-like can. It is understood that an exemplary secure module can be placed in virtually any articulatable item. Examples of articulatable items include credit cards, rings, watches, wallets, purses, necklaces, jewelry, ID badges, pens, clipboards, etc. The secure module 108 preferably is a single chip "trusted computer". By the word "trusted" it is meant that the computer is extremely secure from tampering by unwarranted means. The secure module incorporates a numeric coprocessor optimized for math intensive encryption. The BIOS is preferably immune to alteration and specifically designed for very secure transactions. Each secure module can have a random "seed" generator with the ability to create a private/public key set. The private key never leaves the secure module and is only known by the secure module. Furthermore, discovery of the private key is prevented by active self-destruction upon wrongful entry into the secure module. The secure module can be bound to the user by a personal identification number (PIN). When transactions are performed by the secure module 108 certificates of authentication are created by either or both the secure module and a system the secure module communicates with. The certificate can contain a variety of information. In particular, the certificate may contain: 1) who is the secure module user via a unique registration number and a certified public key. 2) when the transaction took place via a true-time stamping of the transaction. 3) where the transaction took place via a registered secure module interface site identification. 4) security information via uniquely serialized transactions and digital sign on message digests. 5) secure module status indicated as valid, lost, or expired. Although a preferred embodiment of the method and apparatus of the present invention has been illustrated in the accompanying Drawings and described in the foregoing Detailed Description, it will be understood that the invention is not limited to the embodiment disclosed, but is capable of numerous rearrangements, modifications and substitutions without departing from the spirit of the invention as set forth and defined by the following claims.
|
Same subclass Same class Consider this |
||||||||||
