@Immutable
public interface HpkeKdf
HPKE RFC is available at https://www.rfc-editor.org/rfc/rfc9180.html.
| Modifier and Type | Method and Description |
|---|---|
byte[] |
extractAndExpand(byte[] salt,
byte[] ikm,
String ikmLabel,
byte[] info,
String infoLabel,
byte[] suiteId,
int length)
Combines
labeledExtract(byte[], byte[], String, byte[]) and labeledExpand(byte[], byte[], String, byte[], int) into a single method. |
byte[] |
getKdfId()
Returns the HPKE KDF algorithm identifier for the underlying KDF implementation.
|
byte[] |
labeledExpand(byte[] prk,
byte[] info,
String infoLabel,
byte[] suiteId,
int length)
Expands pseudorandom key
prk into length pseudorandom bytes using info
along with the HPKE-specific values infoLabel and suiteId to facilitate domain
separation and context binding. |
byte[] |
labeledExtract(byte[] salt,
byte[] ikm,
String ikmLabel,
byte[] suiteId)
Extracts pseudorandom key from
salt and ikm using the HPKE-specific values
ikmLabel and suiteId to facilitate domain separation and context binding. |
byte[] labeledExtract(byte[] salt,
byte[] ikm,
String ikmLabel,
byte[] suiteId)
throws GeneralSecurityException
salt and ikm using the HPKE-specific values
ikmLabel and suiteId to facilitate domain separation and context binding.
More details available at https://www.rfc-editor.org/rfc/rfc9180.html#section-4-9.
salt - optional (possibly non-secret) random valueikm - input keying materialikmLabel - label prepended to ikmsuiteId - HPKE cipher suite identifier prepended to { ikmLabel || ikm }GeneralSecurityExceptionbyte[] labeledExpand(byte[] prk,
byte[] info,
String infoLabel,
byte[] suiteId,
int length)
throws GeneralSecurityException
prk into length pseudorandom bytes using info
along with the HPKE-specific values infoLabel and suiteId to facilitate domain
separation and context binding.
More details available at https://www.rfc-editor.org/rfc/rfc9180.html#section-4-10.
prk - pseudorandom keyinfo - optional context and application-specific informationinfoLabel - label prepended to infosuiteId - HPKE cipher suite identifier prepended to { infoLabel || info }length - desired length (in bytes) of pseudorandom outputlength pseudorandom bytes of output keying materialGeneralSecurityExceptionbyte[] extractAndExpand(byte[] salt,
byte[] ikm,
String ikmLabel,
byte[] info,
String infoLabel,
byte[] suiteId,
int length)
throws GeneralSecurityException
labeledExtract(byte[], byte[], String, byte[]) and labeledExpand(byte[], byte[], String, byte[], int) into a single method.
More details available at https://www.rfc-editor.org/rfc/rfc9180.html#section-4.1-3.
salt - optional (possibly non-secret) random valueikm - input keying materialikmLabel - label prepended to ikminfo - optional context and application-specific informationinfoLabel - label prepended to infosuiteId - HPKE cipher suite identifier prepended to { ikmLabel || ikm }
and { infoLabel || info }length - desired length (in bytes) of pseudorandom outputlength pseudorandom bytes of output keying materialGeneralSecurityExceptionbyte[] getKdfId()
throws GeneralSecurityException
More details at https://www.rfc-editor.org/rfc/rfc9180.html#name-key-derivation-functions-kd.
GeneralSecurityException