Kdf.ForCms Method
Generate a key-encryption key (KEK) for ECDH key exchange in a CMS EnvelopedData object.
Syntax
[C#]
public static byte[] ForCms(
byte[] zz,
Kdf.KeyWrapAlg keyWrapAlg,
Kdf.KdfAlg kdfAlg = Kdf.KdfAlg.X963,
Kdf.HashAlg hashAlg = Kdf.HashAlg.Sha1,
byte[] ukm = null
)
[VB]
Public Shared Function ForCms (
zz As Byte(),
keyWrapAlg As Kdf.KeyWrapAlg,
Optional kdfAlg As Kdf.KdfAlg = Kdf.KdfAlg.X963,
Optional hashAlg As Kdf.HashAlg = Kdf.HashAlg.Sha1,
Optional ukm As Byte() = Nothing
) As Byte()
Parameters
- zz Byte
- Input key material/shared secret value (denoted variously as ZZ/Z/K/IKM)
- keyWrapAlg Kdf.KeyWrapAlg
- Key wrap algorithm (required, cannot be Default)
- kdfAlg Kdf.KdfAlg (Optional)
- Key derivation function to use.
- hashAlg Kdf.HashAlg (Optional)
- Hash algorithm to use with the key derivation function (default is SHA-1)
- ukm Byte (Optional)
- Optional user key material (ukm)
Return Value
Byte
Output key material (KEK).
Remarks
This is a specialist function using the key definition algorithms described in [RFC5753] and [RFC8418]
when used for key agreement with ECDH in a CMS EnvelopedData object.
The key-encryption key is derived using the ECC-CMS-SharedInfo type, described in section 7.2 of [RFC5753].
See Also
VB6/C equivalent: KDF_ForCms
[Contents] [Index]