Chapter 3 Key Info Types 257
KI_DSAPrivateBER
KI_DSAPrivateBER
Purpose:
This KI is similar to KI_DSAPrivate except that it uses the ASN.1 BER format. This KI
allows you to parse and create an ASN.1 key info type encoded with the PKCS #8
standard. You call B_SetKeyInfo to initialize a key object from the encoded key info
type that includes the private component, prime, subprime, and base. You call
B_GetKeyInfo with this KI to create an encoded key info type from a key object that
was created using KI_DSAPrivate or KI_DSAPrivateBER. The OID for DSA keys,
excluding the tag and length bytes, in decimal, is “43, 14, 3, 2, 12”. Also see
KI_DSAPrivate and KI_DSAPrivateX957BER.
Type of information this allows you to use:
the encoding of a DSA private key that is encoded as a PKCS #8 PrivateKeyInfo type
and that contains an RSA Security Inc. DSAPrivateKey type. Note that this encoding
contains all of the information specified by KI_DSAPrivate.
Format of info supplied to B_SetKeyInfo:
pointer to an ITEM structure that gives 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 PrivateKeyInfo specifies a private key for an
algorithm other than DSA.
Format of info returned by B_GetKeyInfo:
pointer to an ITEM structure that gives the address and length of the DER encoding.
Can get this info type if key object already has:
KI_DSAPrivate, KI_DSAPrivateBER, or KI_DSAPrivateX957BER.