RSA BSAFE Crypto-C

Cryptographic Components for C

Search

KI_RSAPublicBER

Parses and creates an ASN.1 KI encoded with the X.509 standard of SubjectPublicKeyInfo. Call B_SetKeyInfo() to initialize a key object from the encoded KI that includes the modulus and public exponent. Call B_GetKeyInfo() with this KI to create an encoded KI from a key object created using KI_RSAPublic, KI_RSAPublicBER, KI_PKCS_RSAPrivate or KI_PKCS_RSAPrivateBER.

This KI is similar to KI_RSAPublic except that it uses the ASN.1 BER format.

The OID for RSA PKCS #1 encryption, excluding the tag and length Bytes, in decimal, is 42, 134, 72, 134, 247, 13, 1, 1, 1.

info Format

B_SetKeyInfo() A pointer to ITEM structure that provides the address and length of the BER-encoding. The encoding is converted to DER before it is copied to the key object.
B_SetKeyInfo() returns BE_WRONG_KEY_INFO if the public KI specifies a public key for an algorithm other than the RSA algorithm.
Note that B_SetKeyInfo() accepts an encoding that contains an OID for rsa as well as rsaEncryption.
B_GetKeyInfo() A pointer to ITEM structure that provides the address and length of the DER-encoding.
B_GetKeyInfo() returns an encoding that contains the OID for rsaEncryption as opposed to rsa.


Copyright (c) 1999-2005 RSA Security Inc. All rights reserved. 068-001001-6210-001-000 - 6.2.1