diff --git a/hpke/hpke.py b/hpke/hpke.py index 443f452..ad50e00 100644 --- a/hpke/hpke.py +++ b/hpke/hpke.py @@ -204,6 +204,13 @@ class DHKEM_P256_HKDF_SHA256(_DHKEMWeierstrass): ID = 0x0010 +class DHKEM_P384_HKDF_SHA384(_DHKEMWeierstrass): + CURVE = ec.SECP384R1() + KDF = HKDF_SHA384 + NSECRET = 48 + ID = 0x0011 + + class DHKEM_P521_HKDF_SHA512(_DHKEMWeierstrass): CURVE = ec.SECP521R1() KDF = HKDF_SHA512 @@ -591,6 +598,16 @@ class Suite__DHKEM_P256_HKDF_SHA256__HKDF_SHA512__AES_128_GCM(_Suite): AEAD = _AES_128_GCM +class Suite__DHKEM_P384_HKDF_SHA384__HKDF_SHA384__AES_256_GCM(_Suite): + """ + This is DHKEM(P-384, HKDF-SHA384), HKDF-SHA384, AES-256-GCM + """ + + KEM = DHKEM_P384_HKDF_SHA384 + KDF = HKDF_SHA384 + AEAD = _AES_256_GCM + + class Suite__DHKEM_P521_HKDF_SHA512__HKDF_SHA512__AES_256_GCM(_Suite): """ This is DHKEM(P-521, HKDF-SHA512), HKDF-SHA512, AES-256-GCM diff --git a/tests/test_pairwise.py b/tests/test_pairwise.py index 81b8cd2..150e6db 100644 --- a/tests/test_pairwise.py +++ b/tests/test_pairwise.py @@ -10,6 +10,7 @@ hpke.Suite__DHKEM_P256_HKDF_SHA256__HKDF_SHA256__AES_128_GCM, hpke.Suite__DHKEM_P256_HKDF_SHA256__HKDF_SHA256__AES_256_GCM, hpke.Suite__DHKEM_P256_HKDF_SHA256__HKDF_SHA512__AES_128_GCM, + hpke.Suite__DHKEM_P384_HKDF_SHA384__HKDF_SHA384__AES_256_GCM, hpke.Suite__DHKEM_P521_HKDF_SHA512__HKDF_SHA512__AES_256_GCM, hpke.Suite__DHKEM_P256_HKDF_SHA256__HKDF_SHA256__ChaCha20Poly1305, ]