Encap an ML-KEM-768 encapsulation key for DLMS key agreement.
Encap an ML-KEM-768 encapsulation key to obtain a shared AES-256-GCM key with the DLMS server.
Internally, the shared secret resulting from the encapsulated key goes through a key derivation
function with other_info to obtain the traffic secret key.
@param[in] encap_key The buffer to the encapsulation key. Must have size 1184.
@param[in] other_info
noting that AlgorithmID should be AES-256-GCM / 2.16.756.5.8.3.1 / 60 85 74 05 08 03 01.
See 9.2.3.4.6.5 Key Derivation Function in DLMS UA 1000-2 Ed.11 V1.0 for full details.
Endparblock
@param[out] ciphertext An allocated buffer for the ciphertext. Must have size 1088.
@param[out] context An allocated buffer for the shared secret key context.
Brief
Encap an ML-KEM-768 encapsulation key for DLMS key agreement.
Encap an ML-KEM-768 encapsulation key to obtain a shared AES-256-GCM key with the DLMS server. Internally, the shared secret resulting from the encapsulated key goes through a key derivation function with
other_infoto obtain the traffic secret key.@param[in] encap_key The buffer to the encapsulation key. Must have size 1184. @param[in] other_info
Parblock
The buffer constructed as:
AlgorithmID || PartyUInfo || PartyVInfo {||SuppPubInfo}{||SuppPrivInfo}noting that AlgorithmID should be AES-256-GCM / 2.16.756.5.8.3.1 / 60 85 74 05 08 03 01.
See 9.2.3.4.6.5 Key Derivation Function in DLMS UA 1000-2 Ed.11 V1.0 for full details.
Endparblock
@param[out] ciphertext An allocated buffer for the ciphertext. Must have size 1088. @param[out] context An allocated buffer for the shared secret key context.
Throws
if any argument has invalid size.
Throws
if
contextis too small.