Auditing method and system for an on-line value-bearing item printing system6868406Abstract An on-line value bearing item (VBI) printing system that includes one or more cryptographic modules and a central database is disclosed. The cryptographic modules are capable of implementing the USPS Information Based Indicia Program Postal Security Device Performance Criteria and other required VBI standards. The modules encipher the information stored in the central database for all of the on-line VBI system customers and are capable of preventing access to the database by unauthorized users. Additionally, each cryptographic module is capable of providing audit support functions that enable secure logging of all sensitive actions. Claims What is claimed is: Description FIELD OF THE INVENTION
Modular Exponentiation R = A(.sup.Bp, .sup.Bq) mod(N.sub.p, N.sub.q)
With CRT (chinese
remainder theorem)
Modular exponentiation R = A.sup.B mod N
Modular multiplication R = (A * B)mod N
Modular addition R = (A + B) mod N
Addition R = (A + B)
Subtraction R = (A - B)
2's complement R = .about.A + 1
Signature R = A.sup.B mod N; if(2R > = N) R = N - R
Verify R = A.sup.B mod N; if(R mod 16! = 6)
R = N - R
The RSA engine is a 2048-bit engine with the following registers:
Operand Length
Register (bits) Contents
A 2048 Data
B 2048 Exponent
B.sub.p 1088 CRT Mod Expo. only
B.sub.q 1024 CRT Mod Expo. only
N 2048 Module
N.sub.q 1088 CRT Mod Expo. only
N.sub.p 1024 CRT Mod Expo. only
U 1088 Multiplicative
(CRT only) inverse for CRT
R 2048 Results
Registers B.sub.1 B.sub.p1 B.sub.q1 N.sub.1 N.sub.p1 N.sub.q and U are
write only from the ISA port of the UltraCypher module.
Register R (results) is read only from the ISA port of the UltraCypher
module Chinese Remainder (CRT) Operands
A = data
B.sub.p = the largest of two odd primes so N = N .sub.p *N.sub.q
B.sub.q = the smallest of two odd primes so N = N .sub.p *N.sub.q
N = B mod(N.sub.p - 1)
N.sub.q = B mod(N.sub.q - 1)
U = Multiplicative inverse: N .sub.q.sup.1 mod N.sub.p
Exponentiation performance can be enhanced by enabling the built-in Chinese Remainder Theorem (CRT) algorithm. In this embodiment, there are ten 16-bit Control, Setup, and Status registers which are written and read via the ISA bus. Some are read only and some are write only from outside of the module. These registers control the data paths and various engines inside of the module and provide information as to the status of the engines and FIFO's. A 64-bit shift register is provided for the collecting of Random data bits generated from outside the module. The external 1-bit input (usually a random noise source) is sampled and loaded into bit-0 of the shift register. The sampling rate is controlled from control register bits which are loaded via the ISA bus. The collected data bits are shifted after each new sampling of data. When the shift register is full of new data an interrupt is generated and the shift register contents may be read from the ISA data port. A 128.times.32-bit Input FIFO and a similar Output FIFO is provided in the module to buffer a PCI Add-on bus.
INPUT FIFO INPUT FIFO OUTPUT FIFO OUTPUT FIFO
Inputs Outputs Inputs Outputs
PCI add-on bus DES engine DES engine PCI add-on bus
ISA bus SHA-1 engine ISA bus ISA bus
OUTPUT FIFO INPUT FIFO
ISA bus
A multipurpose 16-bit data interface supports an ISA 16-bit cycles. Addressing of the module's internal registers is via the ISA address bus. The PCI Add-on bus is capable of supporting PCI bus master. There are also 8 IRQ interrupt outputs, reset, other control lines, clock I/O. The cryptographic module of the present invention may be embodied in a single-chip module, a multi-chip embedded module, a multi-chip standalone module, embedded in software running on a computer such as a personal computer, or the like. The on-line VBI system is based on a client/server architecture. Generally, in a system based on client/server architecture the server system delivers information to the client system. That is, the client system requests the services of a generally larger computer. In one embodiment, the client is a local personal computer and the server is a more powerful group of computers that house the information. The connection from the client to the server is made via a Local Area Network, a phone line or a TCP/IP based WAN on the Internet. A primary reason to set up a client/server network is to allow many clients access to the same applications and files stored on the server system. In one embodiment, Postage servers 109 include a string of servers connected to the Internet, for example, through a T1 line, protected by a firewall. The firewall permits a client to communicate with a server system, only if the information packet transmitted by the client system complies with a security policy set by the server system. The firewall not only protects the system from unauthorized users on the Internet, it also separates the Public Network (PUBNET) from the Private Network (PRVNET) This ensures that packets from the Internet will not go to any location but the PUBNET. The string of servers form the different subsystems of the on-line postal system. The services provided by the different subsystems of the on-line postage system are designed to allow flexibility and expansion and reduce specific hardware dependency. The Database subsystem is comprised of multiple databases. FIG. 4 illustrates an overview of the on-line VBI system which includes the database subsystems. Database 411 includes the Affiliate DBMS and the Source IDs DBMS. The Affiliate DBMS manages affiliate information (e.g., affiliate's name, phone number, and affiliate's Website information) that is stored on the Affiliate Database. Using the data from this database, marketing and business reports are generated. The Source IDs Database contains information about the incoming links to the vendor's Website (e.g., partners' information, what services the vendor offers, what marketing program is associated with the incoming links, and co-branding information). Using the data from this database, marketing and business reports are generated. The Online Store Database 412 contains commerce product information, working orders, billing information, password reset table, and other marketing related information. Website database 410 keeps track of user accesses to the vendor website. This database keeps track of user who access the vendor website, users who are downloading information and programs, and the links from which users access the vendor website. After storing these data on the Website Database 410, software tools are used to generate the following information: Web Site Status Web Site Reports Form Results Download Successes Signup, Downloads, and Demographic Graphs Web Server Statistics (Analog) Web Server Statistics (Web Analyzer) Offline database 409 manages the VBI (e.g., postal) data except meter information, postal transactions data, financial transactions data (e.g., credit card purchases, free postage issued, bill credits, and bill debits), customer marketing information, commerce product information, meter license information, meter resets, meter history, and meter movement information. Consolidation Server 413 acts as a repository for data, centralizing data for easy transportation outside the vault 400. The Consolidation Server hosts both file and database services, allowing both dumps of activity logs and reports as well as a consolidation point for all database data. The Offline Reporting Engine MineShare Server 415 performs extraction transformation from the holding database that received transaction data from the Consolidated Database (Commerce database 406, Membership database 408, and Postal Database 407). Also, the Offline Reporting Engine MineShare Server handles some administrative tasks. Transaction data in the holding database contains the transaction information about meter licensing information, meter reset information, postage purchase transactions, and credit card transactions. After performing extraction transformation, business logic data are stored on Offline Database 409. Transaction reports are generated using the data on the Offline Database. Transaction reports contain marketing and business information. The Data Warehouse database 414 includes all customer information, financial transactions, and aggregated information for marketing queries (e.g., how many customers have purchased postage). In one embodiment, commerce Database 406 includes a Payment Database, an E-mail Database, and a Stamp Mart Database. The E-mail DBMS manages access to the contents of e-mail that were sent out to everyone by vendor servers. The Stamp Mart database handles order form processing. The E-commerce Server 404 provides e-commerce related services on a user/group permission basis. It provides commerce-related services such as payment processing, pricing plan support and billing as well as customer care functionality and LDAP membership personalization services. A Credit Card Service is invoked by the E-commerce Server 404 to authorize and capture funds from the customer's credit card account and to transfer them to the vendor's merchant bank. A Billing Service is used to provide bills through e-mail to customers based on selected billing plans An ACH service runs automatically at a configurable time. It retrieves all pending ACH requests and batches them to be sent to bank for postage purchases (i.e. money destined for the USPS), or Chase for fee payments which is destined for the vendor account. The E-commerce DBMS 406 manages access to the vendor specific Payment, Credit Card, and Email Databases. A Membership DBMS manages access to the LDAP membership directory database 408 that hosts specific customer information and customer membership data. A Postal DBMS manages access to the Postal Database 407 where USPS specific data such as meter and licensing information are stored. A Postal Server 401 provides secure services to the Client, including client authentication, postage purchase, and indicia generation. The Postal Server requires cryptographic modules to perform all functions that involve client authentication, postage purchase, and indicia generation. Postal Transaction Server 403 provides business logic for postal functions such as device authorization and postage purchase/register manipulation. The Postal Transaction Server requires the cryptographic modules to perform all functions. There are four Client Support Servers. Address Matching Server (AMS) 417 verifies the correct address specified by a user. When the user enters a delivery address or a return address using the Client Software, the user does not need the address matching database on the user's local machine to verify the accuracy of the address. The Client software connects to the vendor's server and uses the central address database obtained from the USPS to verify the accuracy of the address. If the address is incorrect, the client software provides the user with a prioritized list of addresses to match the correct address. These choices are ranked in a user definable order. This information is represented using a plain text format. The Client Support Servers 417 provides the following services: a Pricing Plan service, an Auto Update service, and a Printer Config service. The Pricing Plan Service provides information on pricing plans and payment methods available to the user. It also provides what credit cards are supported and whether ACH is supported. This information is represented preferably using a plain text format. The Auto Update Service verifies whether the user is running the latest Client Software. If there is newer Client Software, the Auto Update Server downloads the new patches to the user computer. The Client Support Database has tables for the client software update information. This information is represented using a plain text format. Before the user tries to print postage, the user sends his or her printer driver information over the Internet in plain text. The Printer Config Service looks up the printer driver information in the Printer Driver Database to determine whether the printer driver is supported or not. When the user tries to configure the printer, the user prints a test envelope to test whether the postage printing is working properly or not. This testing envelope information is sent over the Internet in plain text and is stored in the Client Support Database. MeterGen server 422 makes calls into the cryptographic module to create sufficient meters to ensure that the vendor can meet customer acquisition demands. SMTP Server 418 communicates with other SMTP servers, and it is used to forward e-mail to users. Gatekeeper Server works as a proxy server by handling the security and authentication validation for the smart card users to access customer and administration information that reside in the vault. The Proxy Server 423 uses the Netscape.TM. Enterprise SSL library to provide a secure connection to the vault 400. Audit File Server 419 acts as a repository for module transaction logs. The Audit logs are cryptographically protected. The Audit File Server verifies the audit logs that are digitally signed. The audit logs are verified in real time as they are being created. Postal Server writes audit logs to a shared hard drive on the Audit File Server. After these logs are verified, the Audit File Server preferably moves them from the shared hard drive to a storage device that is not shared by any of the vendor servers. Provider Server provides reporting and external communication functionality including the following services. CMLS Service forwards license applications and it processes responses from CMLS. The CMLS Service uses cryptographic functions provided by the Stamps.com Crypt library to decrypt the user's SSN/Tax ID/Employee ID. CMRS Service reports meter movement and resetting to the USPS Computerized Meter Resetting infrastructure. ACH Service is responsible for submitting ACH postage purchase requests to the USPS lockbox account at the bank. The CMLS Service uses cryptographic functions to decrypt the user's ACH account number. After decrypting ACH account information, the ACH is encrypted using the vendor's script library. Then, the encrypted ACH file is e-mailed to the Commerce Group by the SMTP server. When the Commerce Group receives this encrypted e-mail, the vendor's Decrypt utility application is used to decrypt the ACH e-mail. After verifying the ACH information, the Commerce Group sends the ACH information through an encrypted device first and then uses a modem to upload the ACH information to a proper bank. The Certificate Authority issues certificates for all IBIP meters. The certificates are basically used to provide authentication for indicia produced by their respective meters. The following are exemplary steps describing the certificate authorization process: MeterGen asks the module to create a meter package, The module returns a package and the meter's public key, MeterGen creates a certificate request with the public key, signs the request with a USPS-issued smartcard, and submits the request to the USPS Certificate Authority, The Certificate Authority verifies the request came from the vendor then, it creates a new certificate and returns it to MeterGen, MeterGen verifies the certificate using the USPS Certificate Authority's certificate (e.g., to ensure it wasn't forged) and stores the certificate information in the package. The package is now ready to be associated with a customer. The Postal Server subsystem 401 controls client and remote administration access to server functionality, authenticates clients and allows clients to establish a secure connection to the on-line postage system. The Postal Server subsystem also manages access to USPS specific data such as PSD information and a user's license information. The Postal Server subsystem queries the Postal portion of the Database subsystem for the necessary information to complete the task. The query travels through the firewall to the Postal portion of the Database subsystem. The Postal Server subsystem is the subsystem in the Public Network that has access to the Database subsystem. In one embodiment of the present invention, Postal Server 401 is a standalone server process that provides secure connections to both the clients and the server administration utilities, providing both client authentication and connection management functionality to the system. Postal Server 401 also houses postal-specific services that require high levels of security, such as purchasing postage or printing indicia. Postal Server 401 is comprised of at least one server, and the number of servers increases when more clients need to be authenticated, are purchasing postage or are printing postage indicia. The growth in the number of servers of the Postal Server will not impact the performance of the system since the system design allows for scalability. The Postal Server is designed in such a way that all of the business logic is processed in the servers and not in the database. By locating the transaction processing in the servers, increases in the number of transactions can be easily handled by adding additional servers. Also, since each transaction is stateless (the application does not remember the specific hardware device the last transaction utilized), multiple machines can be added to each subsystem in order to handle increased loads. In one embodiment, load balancing hardware and software techniques are used to distribute traffic among the multiple servers. Typically, the security requirements of an online VBI system entail protections of two basic types: Logical and Physical, or both. Logical protections employ cryptographic techniques involving encryption algorithms and authentication processes. Physical security measures are required to prevent undetected tamper and to protect stored critical data from unauthorized access, modification or destruction. The PSD functionality and data are to be protected by the cryptographic modules. For the embodiment that includes printing postage, system functional requirements are based on the IBIP specifications. The PSD is preferably located at a central location (for example, the Internet server) and may service multiple clients. The PSD's functions include client authorization (assignment of a "meter" to a client), postage register arithmetic operations, creation and printing of a valid postage, messages between the provider infrastructure and PSD, and the like. The following functional security objectives are achieved by the cryptographic module according to one aspect of the present invention: preventing unauthorized and undetected modification of data, including the unauthorized modification, substitution, insertion, and deletion of postage related data and cryptographically critical security parameters; preventing the unauthorized disclosure of the non-public contents of the postage meter, including plaintext cryptographic keys and other critical security parameters; ensuring the proper operation of cryptographic security and postage related meter functions; detecting errors in the operation of security mechanisms and to prevent the compromise of meter data and critical cryptographic security parameters as a result of those errors; providing indications of the operational state of the postage meter; and employing generally accepted security methods for the protection of the meter and cryptographic module, and their contents. The cryptographic module is capable of supporting authorized roles and the corresponding services that can be performed within those roles. Since the module can support multiple concurrent operators, the module internally maintains the separation of the roles and services performed by each operator. Furthermore, a cryptographic module is used to employ access control mechanisms to authenticate an operator accessing the module (either directly or indirectly via a computer process acting on his or her behalf) and to verify that the operator is authorized to assume the desired role and to perform the desired services within that role. In one embodiment, the roles supported by the module includes the following roles: Security Officer role initiates key management functions, including import, export, activation and de-activation of keys. Key Custodian role takes possession of (encrypted) shares of keys during key export and enter them during key import. Administrator role manages the user access control database. Auditor role manages (views, saves, archives, and deletes) audit logs. Provider role transmits signed messages to the PSD's for postage refilling and other provider functions. User role performs the expected IBIP postal meter operations. Certificate Authority role allows the PSD's public key certificate to be loaded and verified. Access to the first four of the above listed roles is preferably obtained by logging on from a computer connected to the cryptographic module. Software applications on the computer and in the module first establish a secure communications channel (a session). A session master key is established using a NIST approved protocol, for example, anonymous unauthenticated Diffe-Hellman key exchange. The Diffe-Hellman system parameters, p and q, are embedded in the software of the module and the associated computer. Because the Diffe-Hellman protocol is vulnerable to certain attacks, preferably, the computer and the module are isolated from the LAN whenever a secure session is required. The master key is then used to derive transaction keys (for MACing and encrypting) that are changed after each message is transmitted. Once the secure session with the module is established, the entities logging on can input their names and passphrases to provide identity based authentication for the selected role. During the initializing state of the module, access control data for the entity that will assume the administrator role is entered in a module access control database. This allows the administrator to log on and enter access control data for all other entities who will require access to the module. The confidentiality requirement in FIPS 140-1 mandates encryption of all sensitive security parameters, including passwords. The cryptographic module of the present invention establishes the session and its security services first, and then transmits the password over the encrypted (and authenticated) channel. The user passphrase as typed on the keyboard is hashed by the host machine and the module only has knowledge of the hash value. In the remainder of this document, the hashed passphrase as used to get access to the module is called the password. Preferably, there is no operational requirement to have more than one user logged on at the same time, or to have users with more than one role. This is desirable because of separation of duties. In one embodiment, for each action that is requested, the access control makes it clear which user requested it, and what his role(s) is (are). This holds irrespective of whether the request is granted or denied. This would be difficult to achieve if more than one user is logged on at the same time. Certain roles have disjoint sets of authorized commands. For example, an Auditor is not authorized to perform any operational or key management related commands. While it is possible to check that a user does not possess certain roles are well as verifying that he does possess another role (e.g., verify that the user is not an Administrator, and is a Security Officer), this would complicate the code and the design. A more elegant and foolproof method is to disallow users to hold multiple roles. If one physical user ever has to have more than one role, an easy solution is to provide multiple accounts for this user, one account for each role. In one embodiment, for each user, the following user profile data is maintained inside the module, in permanent storage: Username (User ID, UID) User Role (Role ID, RID) Password (hashed passphrase) Logon failure count Logon failure limit Logon time-out limit Account expiration Password expiration Password period (the period for which password validity is granted when changing it). The following functions are provided for access management: Initialization of the access control database. Begin Admin (transition to Administrative state). End Admin (transition back to Operational state). Creation of an account. Deletion of an account. Modification of an account. Viewing the access control database. This command lists all users and their roles, account expiration, last access, but (of course) not the user passwords. Logon. Logoff. Query Current User Role. Query Current User ID. Change password. Set the internal module clock. Get Status. The initialization of the access control database creates the minimal set of users required by the module. This set includes one Administrator, one Security Officer and at least two Key Custodians. This command is the first command in Initializing state, as all other commands require one of these users. Creation, deletion and modification of an account and access control database and setting the internal module clock are restricted to users with Administrator role, in Administrative state only. Administrative state is entered by the Start Admin command, issued by a Security Officer in Operational state. All sensitive Administrative commands are collected in Administrative state and require Administrator user role. This separation of roles ensures dual control. Secondly, the transition to Administrative state will ensure that no operational commands can be issued by the Administrator (separation of duties). Finally, Administrative state can only be reached from Operational state, ensuring that initialization of the module has been completed successfully before any administrative command can be issued. The End Admin command causes the module to transition back to Operational state. Preferably, the cryptographic module only allows one session to be established at a time. After authenticating to select a role, the entity can then issue any command that is available to that role. Preferably, meter users are authenticated on a command-by-command basis. During the user registration process, a DES MAC key, generated by the client cryptographic software, is transmitted to the module and is stored in the client's PSD package. Each command from a user that requests PSD services is DES MAC'ed with his personal DES MAC key which allows the module to authenticate the user. Many clients can be simultaneously connected to the transaction server and the module(s) will respond to their requests for service as each request is received from a client. The provider is authenticated on a command-by-command basis. Provider messages are signed using DSA. The signature is verified using the public key which is loaded into the module when it is initialized for postal operation. The certificate authority role is authenticated by using the Certificate Authority ("CA") certificate to verify the signature on the PSD's public key certificate. In one embodiment, the module implements identity based authentication for all roles which meets the requirements of FIPS 140-1, level 3, in the area of roles and services. In one embodiment of the present invention, the cryptographic module is implemented within an IBM 4758 cryptographic Coprocessor to securely print VBIs. The IBM 4758 to provides a set of cryptographic hardware and software within a protective enclosure that could be customized through additional software development. The IBM 4758 specification is described in "Building a High-Performance, Programmable Secure Coprocessor," S. W. Smith and S. Weingart, IBM T. J. Watson Research Center, Feb. 17, 1998; and "IBM 4758 Cryptographic Coprocessor Specification," available on IBM's website (www.IBM.com), the contents of which are hereby incorporated by reference herein. The module's software is divided into four separately controlled layers. Software layers zero and one allow the module to initialize itself after power up, run self-tests, and include functions to cryptographically authenticate software loaded into layers two and three. The 4758 module, including the software of layer zero and one, has received a Security Level 4 certificate from NIST. In this embodiment, the present invention is implemented by developing a new and proprietary crypto service and postal application software for installation in layer three. FIPS 140-1 cryptographic security requirements are graded into four levels of increasing security and assurance. At the transaction server, SSL cryptographic functions may be implemented with software at security level 1, or may employ a cryptographic module to achieve a greater level of security. For the cryptographic module of the present invention, security level 3 requirements are specified for each of the applicable FIPS 140-1 security areas, except Physical Security, which is specified as level 4. The following are brief descriptions of level 3 and level 4 security principles. Level 3 provides for identity-based authentication, which is stronger than the role-based authentication used in level 2. The module need to authenticate the identity of an operator and verify that the identified operator is authorized to assume a specific role and perform a corresponding set of services. Level 3 also provides stronger requirements for entering and outputting critical security parameters. The data ports used for critical security parameters need to be physically separated or logically distinct from other data ports. Furthermore, the parameters need to either be entered into or output from the module in encrypted form, in which case they may travel through enclosing or intervening systems, or be directly entered into or output from the module (without passing through enclosing or intervening systems) using split knowledge procedures. Level 3 allows software cryptography in multi-user, timeshared systems when a trusted operating system is employed along with a trusted path for the entry and output of critical security parameters. A trusted operating system with a trusted path would have the capability to protect cryptographic software and critical security parameters from other untrusted software that may run on the system. Such a system could prevent plaintext from being mixed with ciphertext, and it could prevent the unintentional transmission of plaintext keys. Security level 4 provides the highest level of security. Level 4 physical security provides an envelope of protection around the cryptographic module. Whereas, the tamper detection circuits of lower level modules may be bypassed, the intent of level 4 protection is to detect a penetration of the device from any direction. For example, if one attempts to cut through the enclosure of the cryptographic module, the attempt is detected and all critical security parameters are preferably zeroized. Level 4 devices are particularly useful for operation in a physically unprotected environment where an intruder could possibly tamper with the device. Level 4 also protects a module against a compromise of its security due to environmental conditions or fluctuations outside of the module's normal operating ranges for voltage and temperature. Intentional excursions beyond the normal operating ranges could be used to thwart a module's defense during an attack. A module is required to either include special environmental protection features designed to detect fluctuations or to undergo rigorous environmental failure testing that provides a reasonable assurance that the module will not be affected by fluctuations outside of the normal operating range in a manner that can compromise the security of the module. The cryptographic modules are capable of being used in a multi-node server based environment. When the transaction server receives a request that requires module services, it gathers all data required to perform the service and inputs it to a module as part of a module command. Depending on the service requested, the module may generate outputs such as a message to the provider infrastructure, a message to the client, or an updated PSD package to be stored by the database server. The transaction server acts on these module outputs to continue the transaction sequence by relaying messages to the provider, the client, or the database. Although the server directs the system's operation, the modules and other cryptographic elements of the system maintain the integrity of data flowing through the system without relying on the server's software. Each of the cryptographic modules of the present invention is capable of performing Key management, whether the module implements a secret key (symmetric) algorithm or a public key (asymmetric) algorithm. Secret keys and private keys are protected from unauthorized disclosure, modification or substitution. Public keys are protected against unauthorized modification or substitution. Detailed key management requirements are defined in FIPS 140-1, the contents of which is incorporated by reference herein. Cryptographic key management is typically concerned with the entire life cycle of the cryptographic keys employed within a cryptographic-based security system, including their generation, distribution, entry, use, storage, archiving and destruction. FIPS 140-1 allows key generation for a cryptographic module to be done either inside the module or outside the module and then loaded into the module. Because the postage server uses many identical modules to perform the PSD functions, certain keys are generated and distributed to the other identical modules. All keys are generated using FIPS approved key generation algorithms, for example the following FIPS approved Standards, the contents of which are hereby incorporated by reference herein. FIPS PUB 46-2: Data Encryption Standard (DES) FIPS PUB 46-3: Requirements for 3DES FIPS PUB 112: Password Usage FIPS PUB180-1: Secure Hash Standard (SHA-1) FIPS PUB 186: Digital Signature Standard ANSI X9.52-1998 Triple Data Encryption Algorithm Modes of Operation PKCS#1: RSA (1024 bits) PKCS#3: Anonymous Diffie-Hellman. Each module provides key management support for keys that are used for user data protection. The module is used for the management of a large number of postage meters. Presumably, this number may be too large for (permanent) storage inside the modules. Therefore, all data pertaining to postage meters is stored external to the modules. This necessitates security mechanisms guarded by the module to maintain authenticity and confidentiality of this meter data. In addition, load balancing requires the sharing of the load between multiple modules. Finally, it is not feasible to predict which module will be processing a certain meter. This leads to the following features: Each module supports confidentiality (encryption) and authentication of user data sets when stored outside the module. These keys used for this are called the Master Encryption Key (MEK) and the Master Authentication Key (MAK), respectively. Each module supports encryption and authentication of the key token format: DES (sccDES_Key_t), DSA (sccDSAKeyToken_t) and RSA (sccRSAKeyToken_t), and preferably also generic support for arbitrary-length key data buffers. Each module supports generation of Master Keys (MEK and MAK) using the module's hardware-based RNG. Encryption meets FIPS 46-3 requirements for 3DES. Each module provides a backup strategy for Master Keys that maintains security with guaranteed availability under all reasonable circumstances. Each module supports activation and de-activation of Master Keys. Each module supports rollover from one Master Key Set (MEK and MAK) to another set. This implies support for two Master Key Sets, a active one, and a dormant one. In addition, each module provides translation of data protected under one of these sets to protection under the other set. Each module supports deletion of a (dormant) MKS. This is required in case of compromise of an MKS. Decryption of the data set and verification of its authenticity by another module different than the one that created the encrypted data set is also possible. This implies the requirement of sharing (cloning) of the decryption and authentication keys between modules. Export of a Master Key Set (MKS) to another module. Import of an MKS from another module. Export and Import of an MKS is encrypted and authenticated. Import and export is under dual control; at least 3 users should be involved. The module that exports an MKS determines whether this MKS is exportable from the importing module. A MKS is generated in the master module The master module can export an MKS to other modules, in shares, each encrypted under the destination module's Transport Public Key. This process requires prior export of the Transport Public Key from the destination module by a Key Custodian, and provision of that key to the master as an input parameter to the Export Share command. The generation of the Transport Key Pair is done in Initializing state; this command transitions to Importing Shares state. The export of the Transport Public Key is done in Operational or Importing Shares state; the actual import of the MKS is preferably done in Importing Shares state. The Transport Private Key is a retained key; it can not be exported outside the module it was generated in. This ensures that export of an MKS always is destined for one well-determined module. Generation of a Transport Key Pair only in Initializing state ensures that a module has only one Transport Key Pair in its lifetime; a Reset is required to return to Initializing state. Moreover, transition from Initializing to Importing Shares state upon generation of the Transport Key means that any module should have an MKS when in Operational state. A MKS can be exported as an exportable MKS or as a retained MKS. This is a property of the exported key itself; the destination module respects this distinction. An exportable MKS can be exported in the same way as the master exports its internally generated key. A retained key cannot be exported (attempted export of a retained MKS will fail). This architecture allows for limitation of the number of modules with an exportable MKS. Unless all of these modules have to be reset, one can always create additional modules with the same MKS. At the same time, there can be fairly tight control over the (few) modules with an exportable MKS. In case all exportable copies of an MKS are lost (all modules containing an exportable copy are reset or lost) one can still continue processing with any modules that are still operational. Next, one can create a new MKS (possibly in a new master) and export that to all operational modules. These modules then can roll over to the new key. Subsequently, one can add new modules with this new MKS, like before. Preferably, all operational modules can be brought back to operational state with the proper MKS as long as at least one exportable copy of this MKS exists. If all exportable copies are lost, one could just continue operating with any remaining operational copies, generate a new MKS in the master (possibly a new module) and roll over to that new MKS in the operational modules. Subsequently, one can create new modules with that MKS, just like before. This implies that no special backup procedures are required; the cloning procedures and the fact that all exportable copies of an MKS act as each other's backup copy are sufficient to maintain availability under all circumstances that can reasonably expected to occur. To maximize the probability that at least one exportable copy of the MKS is always available, an additional MKS backup copy can be created by reserving a separate (non-operational) module for its storage. To avoid existence of an operational module without attendance, the import of the MKS is preferably only done when the backup copy is needed. Preferably, the export is done in an n-out-of-m- secret sharing scheme (Shamir). In the descriptions below for losing keys, the backup shares together with the backup module are considered to constitute an exportable MKS. Note that the backup module use requires prior import of n of the m shares. If no exportable copies of the MKS are lost, no capabilities are lost, just operational capacity (bandwidth). This allows a quick return to full capacity in case a module is lost (see below), as well as increase of capacity, since the MKS can be exported to a new module. The recovery procedure is repeated for each of the modules that have lost the MKS. For a new module or if the transport key is also lost: reset (or replace) the operational module and generate a new Transport Key Pair in Initializing state; export the Transport Public Key from the destination module; export encrypted shares of the MKS (for this Transport Public Key) from the source module; import the encrypted MKS to the destination module; activate the MKS in the destination module. If some (but not all) exportable copies of the MKS are lost, the remaining copies can still export, therefore, no capabilities are lost. (Some capacity may be lost) This allows a quick return to full capacity by restoring the MKS in all modules that lost it (or in their replacement). If the only remaining exportable MKS is the backup copy, first import n of the backup shares into the backup module. This module now is a normal module with an exportable MKS, so the remainder of the procedure is the same as described above. In this case, all operational modules can continue operating with the current MKS. The only capability lost in this case is export of the MKS, and therefore the addition of new modules. The Recovery procedure is as follow: Reset (or replace) the master; Generate a new MKS in Initializing state; For each module that is still operational: Import this module's Transport Public Key; Export the new MKS from the new master, encrypted under this Transport Public Key. If the destination module contains a retained copy of the old MKS, the exported MKS should be a retained copy, else it may be an exportable MKS; Import the new MKS into the operational module; Translate the protection of all data from the old MKS to the new MKS; Activate the new MKS in each of the operational modules. This returns the system to a state equivalent to that before loss of all exportable copies of the MKS. In particular, new capacity can now be added again. However, during this recovery, the system has a reduced capacity (only modules that are still operational are running). All keys involved in session key management (ephemeral DH keys, session master keys and transaction keys) are maintained by session management (described below). Local keys are used for encryption of sensitive data stored in persistent memory, to avoid exposure in case of tampering. One mechanism chosen for this is the PPD read/write mechanism for the memory (sccSavePPD and sccGetPPD) where the encryption keys are stored in NVM (which is cleared on tamper). The key management is internal to the module. Key management services related to cloning and management of the MKS include: The Key Management Services module interface function Generate MKS Generate Transport Public Key (TPK) Export Transport Public Key Create MKS Shares Export MKS Share Leave Exporting Shares state Start Importing MKS (transition to Importing Shares state) Import MKS Share Combine MKS Shares Activate MKS (deactivates old MKS, if any, and activates a new one) Delete the dormant MKS Encryption and/or MAC Translation (decrypt and verify MAC under old MKS; compute MAC and re-encrypt under new MKS) Usage of the MKS include: Compute MAC and Encrypt Decrypt and verify MAC Compute MAC Verify MAC The following two keys are generated by a module when the start initialization command is executed. These keys are not shared with other modules. ASK, audit signing key. This is a 1024-bit DSA key used to sign entries in an audit log. Audit Verification Public Key. This key is output from the module and will be used to authenticate the audit record log. The following two keys are generated by a Master cryptographic module when the MKS command is executed. MEK, the master encrypting key. This is a triple-DES key used by the module to encrypt all external key tokens for keys that are generated by the modules. MAK, the master authentication key. This is preferably an 8-byte key used to generate a DES MAC for key tokens encrypted by the MEK. The following two keys are generated by the modules that are not Masters when the generated transport key command is executed. V_TPK, Transport Private Key. This is an RSA key used by a non-master module to decrypt the imported MKS key. U_TPK, Transport Public Key. This is an RSA key used by a master module to encrypt an MKS key that will be distributed to another module. The module's system software (CP/Q++) generates the following key during CP/Q++initialization. PPD key. This is a DESkey generated by the CP/Q++ and used to encrypt keys that are stored in the module's flash memory. The key is not accessible outside the system software. The module generates the following keys for use during secure sessions with the host computer. Session Master Keys. This is a set of two keys, generated for a given secure session, used to derive session transaction keys. One key is for authentication (DES MAC computation) and the other for security (Triple-DES encryption). The keys are destroyed at the conclusion of the secure session. Session Transaction Keys. These keys are used for a single transaction during a secure session. They are derived by a one-way function of the Session Master Keys combined with a transaction counter. The following five keys are generated by a module when the initialize crypto-card command is executed. VDSK_ipost, the DSA private key used by the modules to sign challenges during client registration. The key is output in a key token for distribution to other modules. UDSK_ipost, the DSA public key that is imbedded in the client application software and is used to authenticate challenges signed by the module during client registration. The key is output from the module after generation. VRSK_ipost, the RSA private key used by the modules to decrypt client secrets transmitted to the modules during client registration. The key is output in a key token for distribution to other modules. URSK_ipost, the RSA public key that is imbedded in the client application software and is used to encrypt client secrets transmitted to the module during client registration. The key is output from the module after generation. MK_chkpt, the DES MAC key used to authenticate a checkpoint database record when it is returned to a module from the database. This key is derived from VDSK_ipost by hashing it using SHA-1 each time that VDSK_ipost is imported by the module. The following keys are generated by a module at the time that a PSD package, the database record containing a postage meter's data, is created. V_psd, the DSA private key used to sign indicia created by this VBI meter. This key is stored in the meter's PSD package as a key token, encrypted by the MEK. U_psd, the DSA public key used to authenticate the signature on indicia created by this VBI meter. This key is output from the module to the provider after generation. Mk_psd, the DES MAC key used to authenticate a PSD package when it is returned to a module from the database. This key is derived from V_psd by hashing it using SHA-1 each time that V_psd is imported by the module. EDEK_psd, the 3DES key-encrypting-key used to encrypt the client secrets transmitted to the module during client registration. This key is stored in the client's PSD package as a key token, encrypted by the MEK. FIPS 140-1 allows key distribution to be performed by manual methods, automated methods, or a combination of automated and manual methods. Keys are input to a module when required to initialize the module and to initialize the PSD packages of each meter. These key transfers are not considered key distribution. Also, FIPS 140-1 allows key entry and output procedures to differ depending upon the key distribution technique employed. The cryptographic module does not implement manual key entry. All secret or private keys are input to or output from the module electronically and are encrypted. The system of the present invention utilizes a plurality of cryptographic modules that need to work in concert. This entails creating a shared secret for all the modules. In one embodiment, key entry is required to initialize a new clone module for service at the service provider's facility. Preferably, only one module functions as a master module. The master module generate a Master Key Set (MKS). The exporting of the shares of the MKS keys requires dual control. The Security Officer should first issue a create MKS shares command to specify the number of shares to be created and to authorize the export of the shares. In one embodiment, the module uses a Pseudo-Random Number Generator (PNRG) to generate the MKS, which contains two distinct keys: 1. Master Encryption Key (MEK): A 3DES key used to encrypt keys when stored outside the module. 2. Master Authentication Key (MAK): This is a key used to compute the DES MAC for signing keys when stored outside of the module. The MKS is stored in a non-volatile memory (NVM) within the module. When the required number of shares are input to a module, a Key Management Officer can then enter an export share command to export one of the MKS shares. Input as part of the export share command is the transport public key of the new module being cloned. This public key is used to encrypt each key share before it is exported and stored on a storage medium such as a floppy disk, a CDROM, or the like. After the last share is exported, the Master module returns to the operational state and will no longer output key shares. For the modules that are not masters, the Security Officer uses the generate transport key command to request the module to generate the transport key pair. This command also establishes that the module is not a master module. The transport public key is output for use by a Key Management Officer when exporting MKS key shares from a Master module. To input MKS shares to a module, the Security Officer must send the start importing shares command to the destination module. Key Management Officers can then enter their shares from their floppy disks, CDROMs, or the like until all have been entered. The destination module uses its transport private key to decrypt the key shares. The process is completed when the Security Officer sends the combine shares command. The MKS is used to generate external key tokens by MACing the key with the MAK and Triple-DES encrypting it with the MEK. After a new module has been loaded with the MKS, the Security Officer can use the initialize crypto-card command to export key tokens from the module or to load it with key tokens generated by another module. In one embodiment for secure printing of postage values, the following four keys are input to a module using the initialize crypto-card command. VDSK_ipost, the DSA private key used by modules to sign challenges during client registration. VRSK_ipost, the RSA private key used by modules to decrypt client secrets transmitted to the module during client registration. U_ca, the USPS Certificate Authority's X.509 certificate. UDSK_auth, the DSA public key used to authenticate signatures on messages from the provider infrastructure. At the time of customer registration, the key URSK_ipost, embedded in the client computer cryptographic software is used to encrypt client secrets before transmitting them to the module. These secrets include: HMK, the client's MACing key. The key is used to generate a DES MAC for mutual authentication of messages between the client and the module. PW, the hash of the customer's passphrase. The hash of the passphrase is used to authenticate the customer to the module if the client's copy of HMK is lost. The module uses the private key VRSK-ipost to decrypt these client secrets before storing them as an encrypted key token in the meter's PSD package. Within the module, the permanently stored secret keys are stored in designated NVM locations that serve to adequately identify their function. Secret and private keys that are stored outside the module as part of a PSD package are contained in key tokens. Key tokens are data structures that identify the keys and include other information relevant to the keys. The key tokens are authenticated by the MAK and encrypted by the MEK. When these keys are inside the module they are stored in designated locations in volatile memory. The cryptographic module of the present invention provides the capability to zeroize all plaintext cryptographic keys and other unprotected critical security parameters within the module. For example, the IBM 4758 stores all plain text keys and other SRDI's in BBRAM (NVM). Zeroization of all BBRAM contents occurs if the module's tamper detection envelope senses intrusion. A system user can also destroy these SRID's by disconnecting the external batteries that provide backup power to the module. These features allow the 4758 to meet FIPS 140-1 requirements. FIPS 140-1 allows for a cryptographic module to output encrypted keys for archiving purposes. In one embodiment, each module implements key archiving mechanisms. A state machine determines the availability of module commands in conjunction with the roles that a user takes up. In other words, the state and the current user role together provide sufficient information to decide whether an action is allowed or not. Most commands require authentication for transport from the host to the module. Therefore, an active session is derived requirement for execution of these commands. This requirement is explicitly verified by these commands, however. Invalid data may lead to failure of execution. However, verification of validity is considered the first step in execution. The decision to start execution depends on the state and the user role alone; validity of input data does not play a role in that decision. The complete module state or the state of any module application may be composed of the module state as described in this document, complemented with other state information maintained by other libraries. Exemplary states are described below. Uninitialized state. This is the initial, state that the module is in immediately after loading the code and booting. No security related data has been loaded. The only available command is the Start Initializing command. Initializing state is the state that the module is in during the initialization process. In this state, the access control database is initialized and the MKS is generated or its import is initiated. The module exits this state when an MKS is generated (next state: operational) or when a Transport Key Pair is generated (next state: importing shares). Operational state. In this state, all normal operational commands can be executed. Depending on the user role(s) these can be administrative (change password), postage meter related, session management or auditing commands. In addition, certain key management commands (activation of a new MKS and deletion of a dormant MKS) are available. Finally, special commands transition to other states (administrative, exporting shares, importing shares) for special restricted commands. Administrative state. This state includes all access control maintenance commands, such as adding, deleting, viewing and modifying user accounts. The module enters this state from Operational state when a Security Officer issues the Begin Admin command in operational state. It remains in this state until the Security Officer issues the End Admin command (next state: operational). Exporting Shares state. This state allows the Key Custodians to export shares of the MKS. The module enters this state from operational state when a Security Officer issues the Create MKS Shares command. It remains in this state until all shares have been exported (via the Export MKS Share command) or the Abort Export command is issued (in both cases, the next state is operational). If the Abort Export command is issued before all shares are exported, the exported shares may be useless. Importing Shares state. This state accepts the import of shares of the MKS. The module enters this state from operational state when a Security Officer issues a Start Importing MKS command. It remains in this state until a Combine Shares command is issued (next state: operational if an MKS exists after completion, else error). Error state The coprocessor enters this state on (fatal) errors. Depending on the severity of the error, it should be cleared by rebooting, or the coprocessor should be reset (next state: uninitialized). Only audit entry creation and session commands are possible in this state. FIG. 6 illustrates an exemplary finite state machine. The logon and logoff functions, session management commands, access control queries, and audit entry creation are available in all states except uninitialized and error. Within any thread in the module, it is not possible to interrupt processing, and to resume processing at another instruction than where it was interrupted. The only exception to this rule is rebooting. Rebooting interrupts processing, and starta at a given fixed location in the application. In one embodiment, two variables hold the current state information: Current State and Persistent State. The latter is stored in NVM. This allows for atomic state transitions and for retaining state information across rebooting. Atomic state transitions can be implemented by first updating Current State, then performing all required actions, and finally updating Persistent State. If the module is rebooted during this sequence, the old state is retaine in Persistent State. Thus, if Persistent State has been updated, one is assured that the full transaction has been executed. In addition, it can be used to retain Error state information as required. Before executing any function, the module verifies whether a reboot has occurred by checking a boot detection flag in the NVM. A reboot clears NVM, thus also clearing this flag. Therefore, the first call to the module after a boot will find this flag cleared. After performing any required initialization, the flag can be set. Initialization includes the following boot detection. When the reboot flag is found set, no action is taken. When the reboot flag is found cleared, the value of the Persistent State variable is examined, and the following is done. If it is Error: a fatal error has occurred, and Current State is set to Error. If it is Initializing: Persistent and Current State are set to Error, as this is a fatal error. If it is Importing Shares, and if there is no active MKS, Persistent and Current State are set to Error, as this is a fatal error. (If the module contains a valid active MKS, both Current State and Persistent State are set to Operational, see below.) If it is Exporting Shares: Current State is set to Error, as this is a non-fatal error. If it is Uninitialized: no successful initialization has been performed and Current State is set to Uninitialized. If it is Importing Shares, and if the module contains a valid active MKS, both Current State and Persistent State are set to Operational. Else: both Current State and Persistent State are set to Operational. Unless specified otherwise, all state transitions mentioned in this document are performed by first updating Current State, and then updating Persistent State. Atomic actions are enclosed within such a state transition. The module is in Uninitialized state immediately after loading all software and booting. In the Uninitialized state, no commands can be accepted, except the "Start Initialization" command. This command erases all non-volatile memory. This erases all data and keys present in the module, in particular the Master Keys and the access control database; set the internal module clock; creates the Audit Signing Key; creates the first audit entry, capturing this event; and transitions to the Initializing state. Preferably, the only way to return to Uninitialized state is to reset the module. This together with the fact that initialization always erases all data, ensures no data survives a reset. The Uninitialized state serves as a shield to make sure no transitions to Initializing state are possible from other states without losing all data and keys. The Initializing state contains those commands that are to be executed once in the lifetime of a module. The only way to enter Initializing state is by issuing the "Start Initialization" command from the Uninitialized state. This ensures that upon entry to the Initializing state, no data or keys are retained. Here, the module is in an entirely clean state. In Initializing state, the following actions/commands are allowed: Get Status Initialize Access control database Logon Logoff Query Current User Role Query Current User ID All Session Management commands Audit entry creation Generate Master Key Set Generate Transport Key Pair. The last two commands represent the only means to establish a Master Key Set (MKS) in a module. A module can either generate a Master Key Set (MKS) itself, or it can import one and encrypt it under its own Transport Public Key (TPK). These two commands perform the generation respectively and prepare the import (by generating the import encryption key pair). In summary, the Initializing state serves to initialize the module and the sharing of the MKS. These initializations are one-time activities; the former mainly because there is no need to repeat it; the latter because it is not allowed to happen repeatedly. All normal, operational commands are executed in Operational state. That is, Operational state contains commands implementing all actions not related to initialization of a module, the maintenance of the access control database, or key management (with the exception of key usage). The following are examples of commands in Operational state associated with different functions. Access Control Begin Admin (transition to Administrative state). Logon Logoff Query Current User Role Query Current User ID View Access control database Change password Set clock Get Status Session Management Open Session Close Session Compute Session MAC Verify Session MAC Session Encrypt Session Decrypt Key Management Key management related to cloning and management of the MKS: Export Transport Public Key Start Importing MKS (transition to Importing Shares state) Create MKS Shares (transition to Exporting Shares state) Generate MKS Activate MKS (deactivates old MKS, if any, and activates a new one) Delete dormant MKS Usage of the MKS: Global Encrypt and MAC Global Decrypt and MAC Compute MAC Verify MAC MKS Rollover: Encryption and MAC Translation (decrypt and verify MAC under old MKS; compute MAC and re-encrypt under new MKS) Audit Support Audit Entry creation Audit Key Creation Export of the Audit Verification Key All administrative commands supporting access control are executed in Administrative state. That is, Administrative state contains commands implementing: Creation of an account Deletion of an account Modification of an account Viewing the access control database. This command lists all users and their roles, account expiration, last access, but not the user passwords. End Admin (transition back to Operational state). Logon Logoff Query Current User Role Query Current User ID Set clock Get Status All session management commands Audit entry creation. Preferably, all these commands (except session key usage) are audited. As shown in FIG. 6, Administrative state is entered by the Start Admin command, issued by a Security Officer. The administrative commands in Administrative state require Administrator user role. This separation of roles ensures dual control. Secondly, the transition to administrative state will ensure that no operational commands can be issued by the Administrator (separation of duties). The Exporting Shares state exports encrypted shares of a Master Key Set. When the last share in a secret sharing scheme is exported, the module transitions to operational state. All these commands are audited. (Audit entry creation.) Only an exportable MKS can be exported this way (i.e., internally generated or imported as exportable; by default an imported MKS is a retained key). The export is initiated by a Security Officer issuing the Create MKS Shares command in Operational state. This command changes state to Exporting Shares. The actual export of the encrypted shares is done through the Export Share command, issued by a Key Custodian. Encryption of the shares is under the Transport Public Key. This key is provided by the Key Custodian as an input parameter to the Export Shares command. Rebooting while in Exporting Shares state may be a fatal error. The following commands are available in the Exporting Shares state. Logon Logoff Query Current User Role Query Current User ID Export Share Abort Export Get Status All Session Management commands Audit entry creation. In the Importing Shares state, a module imports encrypted shares of an MKS. The encryption is done under the Transport Key. Importing shares state is entered by Issuing the Start Importing MKS command. The actual import is performed by repeating the Import Share command as required. Combination of the shares to a MKS transitions to Operational state is also possible. All these commands are audited. (Audit entry creation. The following commands are available in the Importing Shares state. Logon Logoff Query Current User Role Query Current User ID Export Transport Public Key Import Share Combine Shares Get Status All Session Management commands Audit entry creation. In Error state, no cryptographic operations may be performed. Thus, the only commands available in the Error state are Get Status, Access Control Queries. A reset erases all NVM and changes to Uninitialized state. Fatal errors set both Persistent State and Current State to Error. This ensures that rebooting will not clear the error. Therefore, the only way to clear fatal errors is a Reset command, or by a complete re-initialization of the module by other means (both methods change state to Uninitialized). Non-fatal errors only set Current State to Error; the Persistent State is not modified. A subsequent reboot clears the error, unless a boot error occurs. All Module command requests in Error state, with the exception of Get Status, return an error and do not output any data. Error states are preferably non-fatal, with the following exceptions (i.e. these only set Current State to Error): failure in Audit Entry Creation which doesn't breaks the audit chain; and detection of Exporting Shares state during boot-up. Throughout the lifecycle of a module, its software keeps track of the module's present operational state and allows only the operations that are allowed for these module states. Each PSD package also contains information to define its present operational state. When the module is loaded with a PSD's package, module software will only perform operations that are allowed for the present state of that PSD. The following paragraphs describe the states of the module and the PSD package throughout their operating life. When the module is first operated after its software is loaded, it starts in the uninitialized state. Preferably, the only command that it will accept is the start initialization command and the start initialization command will only be executed if the module is in the uninitialized state. During this phase of life, the Module is not considered to be a crypto module and no authentication is required to issue this command. The start initialization command first erases all non-volatile memory to destroy any cryptographic keys or access account database entries that may persist from previous use of the module. When memory erasure is completed, the module transitions to the initializing state. The Initialized state includes commands that can be executed only once in the life of the module. Because this state can only be entered from the uninitialized state, an existing module cannot be modified by using these commands. Within this state the access account database is initialized. If a master module is being created, the master key set (MKS) is generated and the operational state is entered. If the module is not a master, the transport key pair is generated and the Importing shares state is entered. Preferably, the module Exporting Shares state can only be entered from the Operational state. Once the master module generates the MKS it can export it to another module. In one embodiment, this is accomplished by using an n of m Shamir secret sharing technique, as follows: 1. A target (clone) module is initialized, following the steps described above. 2. The Security Officer logs on to the newly initialized target Module and issues a command to generate a transport key pair (TPK). The TPK is a RSA public key used for transporting an MKS previously generated by the master module. The private portion of the TPK is retained in the new module and can never be exported from the module that generated it. This control ensures that MKS export is always destined for one well-determined target module. The public portion of the TPK is saved on to a floppy disk, a CDROM, or the like. 3. The public portion of the TPK is saved onto a storage medium such as a floppy, CDROM, or the like and physically carried over to the machine housing the master module. The Security Officer logs on to the master module and issues the create MKS shares command. The create MKS shares command accepts two arguments: (1) the number of shares to be created (n, one share per key custodian) and (2) the threshold number of shares required to recombine the shares. A successful create MKS command results in n number of shares, where n is greater than or equal to 2. 4. A Key Custodian logs in and initiates the export MKS shares command on the master Module and chooses whether the exported key pair should be an exportable or retained key pair for the destination module. An exportable key pair permits the destination module to export key shares in the same manner as the original master module. With a retained key pair, the new cloned module cannot export key shares to other cryptographic modules. The export MKS shares command validates the current key custodian and then encrypts an MKS share with the TPK. The TPK-encrypted share is saved to a floppy, a CDROM, or the like. This procedure is repeated for each key custodian specified in step 3, above. The module Importing Shares State can be entered from the Initializing state (to load the MKS for the first time) or from the Operational state (to load a replacement MKS). The following describe in more detail the importation of the MKS key shares for generation of the master key set in a module. Once the master Module encrypts the MKS shares and saves them to floppies, the shares can be imported into the target module. 1. The Security Officer logs into the target module and initiates the start importing MKS shares command. 2. The first Key Custodian inserts their MKS share floppy or CDROM, logs in, and issues the import MKS share command. The target module reads in the first share. This procedure is repeated for each Key Custodian. When the final Key Custodian has finished entering the key share, the Security Officer logs in and issues the combine MKS shares command. The combine MKS shares command causes the target module to unencrypt each share and combine them to create the MKS. The shares are destroyed following this procedure. The MKS is stored in the NVM as described above. Once in the Operational state, the module is capable of completing its remaining initialization steps. The security officer sends an initialize crypto-card command to load all other required module shared keys (These are described in the Key Management section). The administrator can enter the access control data for all other personnel that require authenticated role access to the module. When the module is initialized, it does not become a PSD until PSD packages are created. A PSD package is created using the initialize PSD command. This creates a data structure that contains the PSD package data elements. One data element is the present state of the PSD. The module will only allow the PSD to perform operations that are allowed for its present state. When the initialize PSD process is completed, the PSD state changes to the raw state. In one embodiment, the PSD package for each meter user contains all data needed to restore the meter's PSD to its last known state when it is next loaded into a module. This includes the items that the IBIP Performance Criteria specifies to be stored inside the PSD, information required to return the PSD to a valid state when the record is reloaded from the database, and data needed for record security and administrative purposes. In this embodiment, the PSD package includes the following items: Ascending and descending registers Device ID Indicia key certificate serial number Licensing ZIP code Key token for the indicia signing key The user secrets, (the client DES MAC key and the SHA-1 hash of the client's passphrase). Key token for EDEK_psd, the key for encrypting user secrets Data needed to maintain operating continuity includes: Date and time of the last PSD transaction The last challenge received from the client The operational state of the PSD (leased, withdrawn, etc.) Expiration dates for keys The passphrase repetition list (eliminates reuse of recent passphrases) The IBIP Performance Criteria specifies that the PSD should store the public key certificate for the USPS CA. Because all meters require this information, it serves no purpose to repeat this data in each PSD package. Instead, the certificate for the USPS CA public key is stored in the memory of all the modules. The following describes the PSD package states. Raw state. As a result of initialization the meter serial number is assigned, the postal registers are set to zero, the PSD keys are generated, and all other initializing steps are performed. The provider receives the PSD public key and device ID needed to obtain the PSD's public key certificate. Preferably, the only command that can be executed while in the raw state is the authorize PSD command. Unleased state. The authorize PSD command loads the PSD public key certificate and changes the PSD state from raw to the unleased state. Preferably, the only command that can be executed while in the unleased state is the configure PSD command. Assigned state. The configure PSD command assigns the PSD to a customer, allows entry of the customer shared secrets, and places the PSD in the assigned state. When the customer's postal license is issued, the authorize customer command enters the customer's originating zip code and places the PSD in the leased state. Leased state. Once in the leased state the PSD is ready for the customer to use. The meter can begin printing indicia once the first postage value download had been completed. Password Reset state. This is a temporary state to allow a lost password to be replaced. Withdrawn state. The user's account has been closed or suspended. This state is entered from the leased state or pwreset state by executing the create refund indicium command. The PSD package remains in the database where it can be accessed by the server but after entering the withdrawn state the Module will no longer execute any PSD command when loaded with this PSD package. The PSD packages are stored outside the modules when not being used and the module is able to detect when record storage problems have occurred. In one embodiment, a Redundant Array of Independent Disks (RAID) and a database server are used together to provide reliable operation of the database. Multiple copies of each record are maintained and a locking system is used to prevent more than one postal server from simultaneously accessing one meter's PSD package. If a partial failure of the RAID occurs, the system transparently switches to backup records. In one embodiment, the cryptographic modules store up to five transactions in a respective internal register. The number of transactions compared in the verification process system may be set by the system administrator. A verification process compares a predetermined number of last transactions. The database subsystem stores a table that preferably includes the module(s) present in the Postal Server subsystem, the module serial numbers, the time of the last transaction the module processed, the date of the last transaction the module processed and the value of the last transaction the cryptographic module processed. Other values related to a transaction and a module can also be saved for verification purposes. An example of the module table, where the Postal Server subsystem has four modules, is illustrated below.
Crypto- Cryptographic Trans- Trans- Trans-
graphic module action action action
module Serial. # Time Date Value
1 34576590 11:53 PM 08/06/99 $0.33
2 34582152 07:30 AM 08/05/99 $7.55
3 34593104 03:00 PM 08/02/99 $3.45
4 34593992 11:22 AM 08/03/99 $5.78
When a cryptographic module loads a new PSD out of the Database subsystem (performing a transaction), the module's register, containing the last transaction's time, date and value, is verified against that module's entry in the Database subsystem's module table. The time, date or value for each transaction stored in each module should match the corresponding values for the respective module stored in the database for the verification process to be successfully completed. Cryptographic modules do not load new PSD transactions unless the verification process has been successfully completed. If any of the compared values is found to be different, preferably the whole system shuts down until authorized personnel can investigate the situation. In one embodiment, the threshold in the system is adjustable so that the system may be set to shut down if one, two or more modules fail the verification process. With the success of the authorization state, the client software not only trusts the cryptographic module, but also shares a common HMK with the cryptographic module, which it uses to sign and challenge each successive message. FIG. 5 is an exemplary embodiment illustrating client software and cryptographic module (PSD) communication during the operational state. Client software 503 sends a new challenge message to cryptographic module 502, as shown by 501. The cryptographic module responds by signing the challenge with the shared HMK and then sends this ciphertext back to the client software, along with its own challenge, as shown by 504. Client software 503 compares the ciphertext of the challenge it originally sent to the cryptographic module, and also signs the message received from the cryptographic module. If the signatures compare, the client software trusts the cryptographic module for this transaction. Client software 503 uses the cryptographic module challenge message to authenticate itself to cryptographic module 502. Client software 503 now sends the signed challenge that cryptographic module 502 had sent, with the addition of the client software local record of the user's AR and DR, as shown by 505. The client software also sends a cleartext of the challenge and the transaction message, as shown by 506. Next, the client software sends a Hash Message Authentication Code (HMAC) for all of the data sent in 505 and 506, using shared HMK, as shown by 507. HMAC is a digital signature created using a hash algorithm with an arbitrary message and the secret key (HMK). The client software sends the original arbitrary message and the HMAC to Postal Server via the network. HMK, as the HMAC Key, stays in the client software 503. The cryptographic module 502 already has a copy of HMK because it was sent over to Postal Server during the user registration process. In another embodiment, Data Encryption Standard Message Authentication Code (DES MAC) is used instead of HMAC. In one embodiment, the checkpoint concept operates in the following manner. Each module retains in its memory records relating to the three most recent transactions that modified a PSD package. For example, these records include the following data items: PSD meter ID Transaction type Transaction amount PSD AR value PSD DR value Module serial number Date/time stamp (for record replay detection) Module total amount reset Module total amount printed Module total amount refunded The record of the most recent transaction is also output to the database and is protected from modification by a DES MAC generated using the key HMK_chkpt. When a PSD transaction is to be performed, the checkpoint record from the database is input along with the PSD package for the meter. Preferably, all IBIP commands to the modules are handled by the function sdx_dispatch. Within dispatch, the checkpoint record from the database is compared with the most recent checkpoint record stored in the module memory. If they match, it is highly likely that no switchover of the database (resulting in lost records) has occurred. The module then trusts that the PSD package is up to date and allows the IBIP command to be executed. When the IBIP command is completed, the checkpoint record is updated and output to the server for database storage along with the updated PSD package. In the case of create indicium commands, the server first confirms that the updated records have been stored on the database before the indicium is transmitted to the client for printing. (Server transaction logs keep a record of all messages sent to clients.) In the case of the provider commanding postage value download or create refund indicium, the server reports an error if the database fails to correctly store the updated checkpoint record and PSD package. If the comparison of internal and external checkpoint records does not match, the module will not execute the IBIP command and an error code is returned to the server. The server then sends a command called "Auto-Recover module Checkpoint" to the module. This command allows a controlled rollback to an older checkpoint if the external checkpoint record matches either of the two older checkpoint records stored in the module internal memory. The module updates its internal records using data from the accepted checkpoint and outputs audit log records to document the more recent PSD transactions that are to be discarded (transactions more recent than the accepted checkpoint). If none of the module's internal checkpoint records match the record input from the database, auto-recovery fails and an error is returned to the server. This module is now effectively inhibited from processing PSD packages and operator intervention, using the disaster recovery process, is needed to return it to operation. In summary, the checkpoint validation and auto-recovery processes allows the module to verify that the database providing records is up to date and to automatically resynchronize the module with the database if possible. An Audit Log Verification protects PSD Package Replay. Use of a DES MEC to authenticate a PSD package ensures that the record originated from a module with knowledge of the client's package DES MAC key. The DES MAC verifies that the data within the record has not been modified since the DES MAC was generated. But because the DES MAC cannot ensure that the record is the most recent update of the client's data, other safeguards need to be used to prevent or detect substitution of a record created at an earlier time. The module addresses this problem by creating a cryptographically protected audit log entry each time a PSD package is modified by a module. The command scaaeCreateAuditEntry is used to create the audit record. An Audit Log Verification protects PSD Package Replay. Use of a DES MEC to authenticate a PSD package ensures that the record originated from a module with knowledge of the client's package DES MAC key. The DES MAC verifies that the data within the record has not been modified since the DES MAC was generated. But because the DES MAC cannot ensure that the record is the most recent update of the client's data, other safeguards need to be used to prevent or detect substitution of a record created at an earlier time. The module addresses this problem by creating a cryptographically protected audit log entry each time a PSD package is modified by a module. The command scaaeCreateAuditEntry is used to create the audit record. The initialize cryptocard or update cryptocard commands perform the initializations. Limits are set for the minimum and maximum value of indicium that can be printed. The USPS certificate authority public key certificate is loaded. The provider public key is loaded. Private keys used during new customer registration are loaded. These commands are issued by the Security Officer. The initialize PSD command assigns the device ID, set the postal registers to zero and generates the PSD public keys. This command is not authenticated but can only be executed once in the life of a PSD. The authorize PSD command loads the PSD's public key certificate. The PSD's certificate is authenticated by the CA certificate, and the device ID and public key from the certificate are verified to match those contained in the PSD package. The configure PSD command enters the new customer's customer ID and receives the encrypted secrets from the customer. The module decrypts the secrets using VRSK_ipost. Preferably, this command is not authenticated but the response returned to the customer is DES MAC'ed by the module with the CDSK_client key just received. The customer PC software verifies this DES MAC to ensure that the module has received the CDSK_client key correctly. The authorize customer command enters the originating zip code after the server receives the meter license and then the maximum descending register limit is set. This command is authenticated as a provider role command from the provider's signature using the key UDSK_auth. As described above, the cryptographic modules use roles and services to control access to the module and to specify which services (commands) are available to the user. Services of concern are those that access security parameters or postal financial data protected by the module. Each module supports many roles. In one embodiment, access control is accomplished as follows. Authentication may be accomplished by using a secure session. For example, the roles of Security Officer, Key Custodian, Administrator, and Auditor are authenticated after a secure session between the user's PC and the module has been established. When the user issues an scasmopenSession command, application software on the user's PC and corresponding software in the module perform the session opening process. An anonymous Diffie-Hellman key generation protocol is used to establish a set of session keys (triple DES keys for encryption and MAC' ing) that are used during the session. The session keys are not used directly but instead unique keys, derived from the session keys, are used for each successive message. Once a secure session is established, the user sends the scaacLogon command containing the user ID and user password. The module uses its access account database to verify the user data received and to select the role that this user is allowed to enter. The user can now send the module any command allowable for the selected role. In one embodiment, the module design limits each user to a single role and will only allow one user to be logged on at a time. Session management provides security services to the communications between the host and the module. Session management will establish a secure channel between the host application and the module application. This channel provides authentication and optional confidentiality for the data exchanged through it. In particular, all command requests and responses, except those for opening a session, are protected by a MAC. This provides authentication to the command. The host and module can verify that it is their counterpart that issued the command because no other entity can generate the MAC. Optionally, the command data can also be encrypted. This provides confidentiality to the channel. All commands from the host are initiated by a user that is authorized to execute this command on the module. That is, all host-initiated commands require an active user with an appropriate role (authorized to issue the given command). Except for Default role, this implies that a user (with that role) should be currently logged on. For all users with roles other than Default, the session management is closely tied to user logon. A session should be established before the logon and it lasts while the user is logged on. The session can be terminated after the user logs off. Logon fails if no session is established; session termination fails if a user is still logged on. Similarly, any module command that requires session security (encryption or a MAC) is aborted if this mechanism is not used. An active session is instantiated by active session master keys. These keys are exchanged between host and module application at session set-up, and they are destroyed at session termination. All data transmitted between the host and the module within a certain session is protected | ||||||
