TrustCore SDK NanoCert API reference  version 7.0
CMSOriginatorPublicKey Struct Reference

Union that identifies a recipient for whom a transient key is wanted. More...

Data Fields

ASN1_ITEMPTR pAlgoOID
 
ASN1_ITEMPTR pAlgoParameters
 
ASN1_ITEMPTR pPublicKey
 

Detailed Description

This structure serves as a member in a union in the CMSRecipientId structure.

The CMSOriginatorPublicKey is defined as follows:

    typedef struct CMSOriginatorPublicKey
    {
        ASN1_ITEMPTR pAlgoOID;  // AlgorithmIdentifier: algorithm OID
        ASN1_ITEMPTR pAlgoParameters; // AlgorithmIdentifier: parameters ANY
        ASN1_ITEMPTR pPublicKey; // BIT STRING
    } CMSOriginatorPublicKey;

The contained ASN1_ITEMPTR members provide offset and buffer size information for information within the CStream, which was passed to the CMS_GetPrivateKey() callback function.

The information provided by these members are an algorithm ID, any parameters associated with that algorithm, and the public key.

The CMSOriginatorPublicKey structure reflects the layout of the OriginatorPublicKey component of the KeyAgreeRecipientInfo ASN.1 object:

      KeyAgreeRecipientInfo ::= SEQUENCE {
        version CMSVersion,  – always set to 3
        originator [0] EXPLICIT OriginatorIdentifierOrKey,
        ukm [1] EXPLICIT UserKeyingMaterial OPTIONAL,
        keyEncryptionAlgorithm KeyEncryptionAlgorithmIdentifier,
        recipientEncryptedKeys RecipientEncryptedKeys }
      OriginatorIdentifierOrKey ::= CHOICE {
        issuerAndSerialNumber IssuerAndSerialNumber,
        subjectKeyIdentifier [0] SubjectKeyIdentifier,
        originatorKey [1] OriginatorPublicKey }
      OriginatorPublicKey ::= SEQUENCE {
        algorithm AlgorithmIdentifier,
        publicKey BIT STRING }

The documentation for this struct was generated from the following file: