Skip to main content

originator_agree

Function originator_agree 

Source
pub fn originator_agree(
    suite: SecuritySuite,
    ephemeral_private: &[u8],
    recipient_static_public: &[u8],
    algorithm_id: &[u8],
    party_u_info: &[u8],
    party_v_info: &[u8],
) -> Result<(Vec<u8>, Vec<u8>), AgreementError>
Expand description

The originator side of a One-Pass Diffie-Hellman agreed-key exchange (C(1e, 1s), IEC 62056-5-3 Annex C.2).

The originator holds an ephemeral key pair and the recipient’s static public key. It returns the derived AES session key and its ephemeral public key (FE2OS(x) ‖ FE2OS(y)), which the caller embeds as the key-ciphered-data of an agreed-key general-ciphering APDU so the recipient can derive the same key. party_u_info / party_v_info are the KDF system-titles and must match on both sides.