RSA BSAFE Crypto-C

Cryptographic Components for C

Search

AI_DHKeyAgreeBER

Allows developers to parse and create ASN.1 AIs such as those used in PKCS #7 and other protocols. Call B_SetAlgorithmInfo() to initialize an algorithm object from the encoded AI that includes the prime modulus, base, and private value length. Alternatively, call B_GetAlgorithmInfo() with this AI to create an encoded AI from an algorithm object created using AI_DHKeyAgree or AI_DHKeyAgreeBER.

This AI type is similar to AI_DHKeyAgree except that it uses the ASN.1 BER format.

The OID for this algorithm, excluding the tag and length Bytes, in decimal, is 42, 134, 72, 134, 247, 13, 1, 3, 1.

info Format

B_SetAlgorithmInfo() A pointer to ITEM that gives the address and length of the BER-encoded algorithm identifier. The encoding is converted to DER before it is copied to the algorithm object. B_SetAlgorithmInfo() returns BE_WRONG_ALGORITHM_INFO if the AI specifies an algorithm other than Diffie-Hellman.
B_GetAlgorithmInfo() A pointer to ITEM that gives the address and length of the DER-encoded AI.

AI_DHKeyAgreeBER Information

Functions to use B_KeyAgreeInit(), B_KeyAgreePhase1(), B_KeyAgreePhase2(), B_SetAlgorithmState() and B_GetAlgorithmState(). Pass an initialized random algorithm to B_KeyAgreePhase1().
AMs to include AM_DH_KEY_AGREE.
Compatible representation AI_DHKeyAgree.
Output considerations The size of the output of B_KeyAgreePhase1() (the public value) will be the same size as the prime. The size of the output of B_KeyAgreePhase2() (the agreed-upon secret) will also be the same size as the prime.


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