Reference Guide
48 Chapter 5: Cryptographic API Changes
RSA BSAFE Crypto-C Micro Edition 3.x to 4.1.4 Migration Guide
Asymmetric Key Operations
Cryptographic Objects
Creation of cryptographic objects for asymmetric key encryption now expects one of
four sub-identifiers to be specified to identify the type of operations to be performed. In
Crypto-C ME 3.x, the sub-identifier was made up of the options
R_CR_SUB_PUBLIC,
R_CR_SUB_PRIVATE, R_CR_SUB_ENCRYPT, and R_CR_SUB_DECRYPT, which
caused confusion and ambiguity in some situations.
The following table lists the sub-identifiers that should now be used.
The sub-identifiers for Crypto-C ME 4.1.4 were macros in 3.x, so do not require
changing if they were used.
Crypto-C ME 4.1.4 returns an error if all four of the deprecated sub-identifiers are
supplied to
R_CR_new().
Key Object and Key Data Information Identifiers
New private key object and data, and public key data information identifiers are
available. In Crypto-C ME 3.x,
R_CR_INFO_ID_PRIVATE_KEY and
R_CR_INFO_ID_PUBLIC_KEY were used for both the key object and the key data.
These identifiers are now deprecated.
The following table lists the information identifiers that should be used with
Crypto-C ME 4.1.4.
Table 8 Asymmetric Key Encryption Sub-identifiers for Crypto-C ME 3.x and
Crypto-C ME 4.1.4
Crypto-C ME 3.x Crypto-C ME 4.1.4
R_CR_SUB_PUBLIC|R_CR_SUB_ENCRYPT R_CR_SUB_PUB_ENC
R_CR_SUB_PRIVATE|R_CR_SUB_DECRYPT R_CR_SUB_PRIV_DEC
R_CR_SUB_PUBLIC|R_CR_SUB_DECRYPT R_CR_SUB_PUB_DEC
R_CR_SUB_PRIVATE|R_CR_SUB_ENCRYPT R_CR_SUB_PRIV_ENC
Table 9 Asymmetric Key Object and Key Data Information Identifiers for
Crypto-C ME 3.1 and Crypto-C ME 4.1.4
Crypto-C ME 3.x Crypto-C ME 4.1.4
R_CR_INFO_ID_PRIVATE_KEY R_CR_INFO_ID_PRIVATE_PKEY
R_CR_INFO_ID_PRIVATE_KEY_DATA
R_CR_INFO_ID_PUBLIC_KEY R_CR_INFO_ID_PUBLIC_KEY_DATA