Package org.conscrypt
Class HpkeSuite
- java.lang.Object
-
- org.conscrypt.HpkeSuite
-
public final class HpkeSuite extends java.lang.ObjectHolds the KEM, KDF, and AEAD that are used and supported byHpkeContextRecipientandHpkeContextSenderdefined on RFC 9180.Some of the constants are defined in IANA HPKE.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classHpkeSuite.AEADAEAD ciphers.static classHpkeSuite.KDFKey Derivation Functions (KDFs)static classHpkeSuite.KEMKey Encapsulation Mechanisms (KEMs)
-
Field Summary
Fields Modifier and Type Field Description static intAEAD_AES_128_GCMAEAD: 0x0001 AES-128-GCMstatic intAEAD_AES_256_GCMAEAD: 0x0002 AES-256-GCMstatic intAEAD_CHACHA20POLY1305AEAD: 0x0003 ChaCha20Poly1305static intKDF_HKDF_SHA256KDF: 0x0001 HKDF-SHA256static intKEM_DHKEM_X25519_HKDF_SHA256KEM: 0x0020 DHKEM(X25519, HKDF-SHA256)static intKEM_MLKEM_1024KEM: 0x0042 ML-KEM-1024static intKEM_MLKEM_768KEM: 0x0041 ML-KEM-768static intKEM_XWINGKEM: 0x647a X-Wingprivate HpkeSuite.AEADmAeadprivate HpkeSuite.KDFmKdfprivate HpkeSuite.KEMmKem
-
Constructor Summary
Constructors Constructor Description HpkeSuite(int kem, int kdf, int aead)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description HpkeSuite.AEADconvertAead(int aead)Deprecated.HpkeSuite.KDFconvertKdf(int kdf)Deprecated.HpkeSuite.KEMconvertKem(int kem)Deprecated.HpkeSuite.AEADgetAead()AEAD configured while creating an instance ofHpkeSuiteHpkeSuite.KDFgetKdf()KDF configured while creating an instance ofHpkeSuiteHpkeSuite.KEMgetKem()KEM configured while creating an instance ofHpkeSuitejava.lang.Stringname()
-
-
-
Field Detail
-
KEM_DHKEM_X25519_HKDF_SHA256
public static final int KEM_DHKEM_X25519_HKDF_SHA256
KEM: 0x0020 DHKEM(X25519, HKDF-SHA256)- See Also:
- Constant Field Values
-
KEM_MLKEM_768
public static final int KEM_MLKEM_768
KEM: 0x0041 ML-KEM-768- See Also:
- Constant Field Values
-
KEM_MLKEM_1024
public static final int KEM_MLKEM_1024
KEM: 0x0042 ML-KEM-1024- See Also:
- Constant Field Values
-
KEM_XWING
public static final int KEM_XWING
KEM: 0x647a X-Wing- See Also:
- Constant Field Values
-
KDF_HKDF_SHA256
public static final int KDF_HKDF_SHA256
KDF: 0x0001 HKDF-SHA256- See Also:
- Constant Field Values
-
AEAD_AES_128_GCM
public static final int AEAD_AES_128_GCM
AEAD: 0x0001 AES-128-GCM- See Also:
- Constant Field Values
-
AEAD_AES_256_GCM
public static final int AEAD_AES_256_GCM
AEAD: 0x0002 AES-256-GCM- See Also:
- Constant Field Values
-
AEAD_CHACHA20POLY1305
public static final int AEAD_CHACHA20POLY1305
AEAD: 0x0003 ChaCha20Poly1305- See Also:
- Constant Field Values
-
mKem
private final HpkeSuite.KEM mKem
-
mKdf
private final HpkeSuite.KDF mKdf
-
mAead
private final HpkeSuite.AEAD mAead
-
-
Method Detail
-
name
public java.lang.String name()
-
getKem
public HpkeSuite.KEM getKem()
KEM configured while creating an instance ofHpkeSuite- Returns:
- kem
-
getKdf
public HpkeSuite.KDF getKdf()
KDF configured while creating an instance ofHpkeSuite- Returns:
- kdf
-
getAead
public HpkeSuite.AEAD getAead()
AEAD configured while creating an instance ofHpkeSuite- Returns:
- aead
-
convertKem
@Deprecated public HpkeSuite.KEM convertKem(int kem)
Deprecated.Converts the KEM value into itsHpkeSuite.KEMrepresentation.- Parameters:
kem- value- Returns:
HpkeSuite.KEMrepresentation.
-
convertKdf
@Deprecated public HpkeSuite.KDF convertKdf(int kdf)
Deprecated.Converts the KDF value into itsHpkeSuite.KDFrepresentation.- Parameters:
kdf- value- Returns:
HpkeSuite.KDFrepresentation.
-
convertAead
@Deprecated public HpkeSuite.AEAD convertAead(int aead)
Deprecated.Converts the AEAD value into itsHpkeSuite.AEADrepresentation.- Parameters:
aead- value- Returns:
HpkeSuite.AEADrepresentation.
-
-