CryptoSys PKI Pro Manual

hpkeLabeledExpand

Compute the output of the LabeledExpand function as defined in RFC9180.

Syntax

[VBA]
Public Function hpkeLabeledExpand ( _
    nBytes As Long, _
    lpPrk() As Byte, _
    szLabel As String, _
    lpInfo() As Byte, _
    szCurveName As String, _
    Optional nOptions As Long = 0 _
) As Byte()

Parameters

nBytes
Required number of bytes (L) of output keying material.
lpPrk
Pseudorandom key.
szLabel
Label string.
lpInfo
Byte string info.
szCurveName
Name of ECDH curve used in scheme. Specify one of:
 "P-256" | "P-384" | "P-521" | "X25519" | "X448"
nOptions
Use to specify the AEAD encryption algorithm used in the scheme (if applicable). Specify either: Zero (0) to indicate that the KDF is being used inside a KEM algorithm or, if used in the remainder of HPKE, one of:
PKI_AEAD_AES_128_GCM
PKI_AEAD_AES_256_GCM
PKI_AEAD_CHACHA20_POLY1305

Return Value

Byte(): L bytes of output keying material.

Remarks

The ECDH curve group used in the scheme must be specified, which automatically fixes the KDF and associated HMAC algorithm to be used.
[PREV: hpkeDerivePrivateKey...]   [Contents]   [Index]   
   [NEXT: hpkeLabeledExtract...]

Copyright © 2004-24 D.I. Management Services Pty Ltd. All rights reserved. Generated 2024-09-23T07:52:09Z.