@Immutable
public interface HpkeAead
HPKE RFC is available at https://www.rfc-editor.org/rfc/rfc9180.html.
| Modifier and Type | Method and Description |
|---|---|
byte[] |
getAeadId()
Returns the HPKE AEAD algorithm identifier for the underlying AEAD implementation.
|
int |
getKeyLength()
Returns key length (in bytes) for this algorithm (i.e., parameter 'Nk' in HPKE RFC).
|
int |
getNonceLength()
Returns nonce length (in bytes) for this algorithm (i.e., parameter 'Nn' in HPKE RFC).
|
byte[] |
open(byte[] key,
byte[] nonce,
byte[] ciphertext,
byte[] associatedData)
Performs authenticated decryption of
ciphertext and associatedData using key and nonce according to the HPKE AEAD specification. |
byte[] |
seal(byte[] key,
byte[] nonce,
byte[] plaintext,
byte[] associatedData)
Performs authenticated encryption of
plaintext and associatedData using key and nonce according to the HPKE AEAD specification. |
byte[] seal(byte[] key,
byte[] nonce,
byte[] plaintext,
byte[] associatedData)
throws GeneralSecurityException
plaintext and associatedData using key and nonce according to the HPKE AEAD specification.
More details available at https://www.rfc-editor.org/rfc/rfc9180.html#name-encryption-and-decryption.
GeneralSecurityExceptionbyte[] open(byte[] key,
byte[] nonce,
byte[] ciphertext,
byte[] associatedData)
throws GeneralSecurityException
ciphertext and associatedData using key and nonce according to the HPKE AEAD specification.
More details available at https://www.rfc-editor.org/rfc/rfc9180.html#name-encryption-and-decryption.
GeneralSecurityExceptionbyte[] getAeadId()
throws GeneralSecurityException
More details at https://www.rfc-editor.org/rfc/rfc9180.html#name-authenticated-encryption-wi.
GeneralSecurityExceptionint getKeyLength()
int getNonceLength()