|
|
SA#06: Access control defects in PKCS#11 keysAs a function of internal QA testing, nCipher has identified that, under certain unusual circumstances, keys created by the nCipher PKCS#11 library, which should be secure, may be exportable from the hardware security module in plaintext or equivalent, or have other defects in their access control. This advisory also available as PGP-signed plaintext. December 2002SummaryAs a function of internal QA testing, nCipher has identified that, under certain unusual circumstances, keys created by the nCipher PKCS#11 library, which should be secure, may be exportable from the hardware security module in plaintext or equivalent, or have other defects in their access control. nCipher believes that only a very small number of installations may be affected. Whether a key is affected depends on the application, the version of the nCipher PKCS#11 library in use, and the system configuration. nCipher is providing tools, in an accompanying patch kit, that allows customers to check their current access controls, in order to affirm that their keys are not vulnerable in unexpected ways. The detailed advice below allows a customer to first determine if their particular circumstances expose them to this problem, and if the customer concludes a vulnerability exists, explains how this can be eliminated. Issue Description1. ProblemnCipher modules can be used from a number of industry standard APIs. Among these, nCipher supplies a cryptographic library that is compatible with the RSA Laboratories PKCS#11 Cryptographic Token Interface Standard (Cryptoki). The nCipher PKCS#11 library translates calls from the PKCS#11 Standard API to underlying nCore primitives. The interpretation of PKCS#11 calls and attributes from the standard, and the mapping to the underlying nCore API, is extremely complex. nCipher is issuing this advisory in response to implementation errors found in the nCipher PKCS#11 library. However, differences in interpretation of the PKCS#11 standard between nCipher and application vendors, and potentially, errors in applications, can also cause keys to have incorrect or unexpectedly weak protection. 2. ImpactIf a key is improperly secured then in the worst case, an attacker who can issue commands to any module in the same Security World, and can obtain a copy of current or old host-side Security World data, can obtain the key plaintext from the module. This may apply to existing keys, or to newly-generated keys. 3. Who May Be AffectedAll installations which use the nCipher PKCS#11 library are potentially affected. Installations that do not use the nCipher PKCS#11 implementation are NOT affected. You are NOT affected in the following situations:
If you cannot rule out the possibility that you may be affected, 4. Obtaining the Patch KitYou can obtain copies of this advisory, and supporting documentation, from the nCipher updates site: http://www.ncipher.com/support/advisories/ We regret that due to export control regulations, we are unable to make the patch kit available on the web site. Please contact nCipher support who will advise you on obtaining the patch kit, either via Internet download or on CDROM. The patch kit is available for the following platforms:
Customers using other platforms should contact nCipher support. 5. Contents of the Patch KitThe patch kit contains:
6. nCipher SupportnCipher customers who require support or further information regarding this problem should contact support@ncipher.com. nCipher support can also be reached by telephone: Customers in the USA or Canada: Customers in all other countries outside of the USA and Canada can call the USA number in the event that they receive the advisory outside of UK support hours (09:00 - 17:30 GMT). How to tell if you are affectedIf you have existing keys and have not ruled out the possibility that you may be vulnerable, perform the steps below for those keys. Before proceeding you must follow the earlier guidance on obtaining the patch kit, and install this in accordance with the enclosed `read-me.txt' installation instructions. If you are generating new keys, and have not ruled out the possibility that they may be generated vulnerable, perform the steps below after generating the key(s) but before putting them into service. For example, with an SSL webserver, perform the test below after generating the key but before sending your certificate request to your certificate authority.
If any of the key(s) specified are not fully protected by the module security mechanisms, nfkmverify will report extensive Note that, as stated above, the existence of keys not protected by the hardware security mechanisms does not in itself necessarily indicate that your system is vulnerable; it may be that the unprotected keys are ephemeral SSL webserver session keys or other keys whose security against attacks from the local host is not important to the overall system security. You must determine whether the extractable key(s) are important. nCipher recommends that you either assume that all the affected key(s) are important and attempt to make them secure, or urgently contact nCipher support for advice. Remedy1. Available RemediesA. New keysAfter generating any new keys with the nCipher PKCS#11 library, perform the checks above to determine if they are vulnerable. If you have just generated keys which, after checking as detailed above, cannot be determined to be secure, contact nCipher Support. nCipher Support will advise a configuration change or workaround to allow the generation of keys that are not vulnerable. nCipher Support will advise you to discard any vulnerable keys, or confirm that the reports from nfkmverify do not indicate a vulnerability. B. Existing keysIf you have existing keys which have been determined to be vulnerable, there are three courses of remedial action available. If you are affected by the problems you should follow one as
If you can reliably inform all other reliers and counter parties that your existing key is compromised, you should choose 1. However, in many applications (for example, in SSL as used for HTTPS) this is not possible. Otherwise, you should choose 2 if you can conveniently generate and distribute a new key, including obtaining any necessary certificates on the existing key. If you are not able to prevent reliers using the existing key, The protection status of non-recoverable keys cannot be changed; if your Security World has recovery disabled, you must choose 1 or 2. 2. Revoking and Generating a New KeySee `Available remedies', above, regarding the choice of the
3. Generating a New Key and Making the Old Key UnusableSee `Available remedies', above, regarding the choice of the
4. Securing the Existing KeySee `Available remedies', above, regarding the choice of the
Detailed Instructions for Remedial ActionsnCipher recommends that you contact nCipher Support if remedial action may be required, as the operations involved can be very complex. Consult the previous section to determine which remedial actions are required, and in which order they should be performed. 1. Erasing a Module
2. Generating a New Key, SecurelyIf you choose to generate a new key as part of your remedy, or as part of a new installation, you must ensure that it will not be affected by the original problem. A version of the nCipher PKCS#11 library which has the original problems corrected is in preparation. However, at present nCipher recommends avoiding the use of module-protected keys with the PKCS#11 library. Cardset-protected keys are less likely to be affected by the problems. In any case, after you have generated a new key, or transferred an existing key, you should check that the problem has not recurred, by using nfkmverify as described below. If you find you are unable to generate a key whose security can be established using nfkmverify, contact nCipher Support, who will advise on a configuration change or workaround, if necessary, or - if appropriate - confirm for you that the reports from nfkmverify are harmless and do not indicate a vulnerability. 3. Making a Key Secure, Regardless of its Previous VulnerabilityThis advisory's supporting patch kit includes a tool which will make any PKCS#11 object stored by the nCipher PKCS#11 library secure, regardless of the security wishes of the application, and regardless of any previous security status. To use this tool, run the command: ckfixsecure will, if successful, report the key's security status Notes:
4. Transferring a Key to Another Security WorldThis advisory's supporting patch kit contains the utilities `mk-reprogram' and `key-xfer-im', and documentation on their use in `kmigrate.txt'. These utilities can be used to transfer keys between security worlds without the key material leaving the module. Transferring a key to another Security World requires the use of the Administrator Cards to authorise the override of the existing security arrangements. Note that you should not insert your Administrator Cards, nor enter their passphrases, into a module not attached to a fully trusted host - nCipher recommends the use of a host not attached to a network. Note also that keys in non-recoverable security worlds, or non-recoverable keys in recoverable worlds, do not allow even the Administrator Cardset to override their security arrangements, and cannot be transferred. The use of the transfer utilities is complex and difficult. nCipher recommends that customers who need to do this consult nCipher Support. If you choose to go ahead without consulting nCipher support, note that fixing keys related to this advisory requires the use of the Background1. PKCS#11, and the `sensitive' and `extractable' FlagsIn PKCS#11 terminology, a key may be `sensitive' (meaning it cannot be exported in plain text); it may also be `non-extractable' (meaning it cannot be exported in ciphertext form either). These options are specified by the PKCS#11 object attributes CKA_SENSITIVE and CKA_EXTRACTABLE. However, for keys which are sensitive but extractable, the PKCS#11 Standard does not provide any restrictions on which keys can be used as key transport keys (`wrapping keys') when the target key is extracted in encrypted form, so that any extractable key is not significantly more secure: an attacker who wishes to obtain the key can simply ask for it to be provided encrypted using the attacker's own key. The facility for applications to generate and export insecure keys (that is, keys which are not protected by the module's security mechanisms) is a feature of the PKCS#11 standard which is important for many applications, for example for use as session keys, or for bulk key generation. Therefore, whether a key is sensitive, or non-extractable, may be specified by the application; alternatively, the application may leave the sensitivity and extractability unspecified, in which case the PKCS#11 implementation may choose a default. The PKCS#11 standard specifies some circumstances in which combinations of extractability and/or sensitivity are mandatory or forbidden, and also specifies the default for some situations. In other circumstances the permissibility and/or defaults are unspecified by the standard and the PKCS#11 implementation provider must choose defaults. The PKCS#11 standard also distinguishes between `Private' and `Public' objects: Private objects require the application to `log in' by supplying a passphrase before they are used. This corresponds to the CKA_PRIVATE attribute. 2. Security World, Module and Cardset ProtectionnCipher's key management modules (nForce/nShield) are generally used with nCipher's suite of utilities for managing a `Security World'. A Security World is a collection of cryptographic keys, smart cards, modules and associated data stored on host computers. A Security World is designed to prevent unauthorized access to application keys while maintaining scalability and key availability. The core Security World secrets are protected by Administrator Cards written by the initialization software and kept safe by the user. Application keys can either be made available to any nCipher module appropriately programmed with the user's Administrator Cards (Module Protected keys) or they can be protected by further smart cards known as Operator Cards that provide an additional layer of security. 3. nCipher's PKCS#11 LibraryThe nCipher PKCS#11 library presents two kinds of `slots' to applications: `accelerator slots' which correspond to an individual module or to the system, and `cardset slots' which correspond to a module cardreader or to an Operator Card Set. nCipher's PKCS#11 library protects sensitive, non-extractable PKCS#11 objects, including keys, as follows:
Non-sensitive, or extractable, objects are not protected by the module's security mechanisms, as discussed above and as required by the PKCS#11 standard. [1] Note that `Private' and `Public' here refer to the PKCS#11 CKA_PRIVATE attribute, which is not related to whether the key is a secret key, private key, or public key, and is related only in a complex way to its security properties, as discussed above. [2] Private objects here include objects created by using the CKNFAST_FAKE_ACCELERATOR_LOGIN feature to force the creation of Public objects by applications which insist on calling C_Login and will only attempt to create Private objects. This feature is typically used to allow certain applications, including iPlanet, to create and use module-protected keys. Status of this advisory, and release scheduleThis advisory is being released early to nCipher customers and partners, so that remedial action can be taken as soon as possible. This period of limited private disclosure will last for two weeks. If you receive this advisory during the period of limited disclosure please treat this advisory as confidential. In order to ensure that any remaining customers are informed, nCipher intends to publish this advisory on 16th December 2002. nCipher will supply this advisory and the supporting patch kit with all shipments of affected products until the contents of the patch kit and associated changes have been incorporated into updated versions of these products. Further informationGeneral information about nCipher products: nCipher Developer's Guide and nCipher Developer's Reference If you would like to receive future security advisories from nCipher please subscribe to the low volume nCipher security-announce mailing list by sending a message with the single word 'subscribe' in the body to security-announce-request@ncipher.com.
© nCipher Corporation Ltd. 2002 All trademarks acknowledged. $Id: advisory6.txt,v 1.38 2002/11/29 09:40:21 mknight Exp $ |
nCipher protects critical enterprise data for many of the world's most security-conscious organizations
by being an industry leader in cryptography and data security, data encryption, enterprise pki,
digital signature software, timestamp, and other data protection solutions.