Skip to content

Commit

Permalink
Merge branch 'main' into caw/add-p256-and-hpke
Browse files Browse the repository at this point in the history
  • Loading branch information
chris-wood authored Dec 2, 2024
2 parents 9e2c2bf + 0c6ecfa commit 911981f
Show file tree
Hide file tree
Showing 2 changed files with 342 additions and 193 deletions.
87 changes: 34 additions & 53 deletions Composite-MLKEM-2024.asn
Original file line number Diff line number Diff line change
Expand Up @@ -20,25 +20,6 @@ KEM-ALGORITHM
{ iso(1) identified-organization(3) dod(6) internet(1)
security(5) mechanisms(5) pkix(7) id-mod(0)
id-mod-kemAlgorithmInformation-2023(109) }

SubjectPublicKeyInfo
FROM PKIX1Explicit-2009
{ iso(1) identified-organization(3) dod(6) internet(1)
security(5) mechanisms(5) pkix(7) id-mod(0)
id-mod-pkix1-explicit-02(51) }

OneAsymmetricKey
FROM AsymmetricKeyPackageModuleV1
{ iso(1) member-body(2) us(840) rsadsi(113549) pkcs(1)
pkcs-9(9) smime(16) modules(0)
id-mod-asymmetricKeyPkgV1(50) }

RSAPublicKey, ECPoint
FROM PKIXAlgs-2009
{ iso(1) identified-organization(3) dod(6)
internet(1) security(5) mechanisms(5) pkix(7) id-mod(0)
id-mod-pkix1-algorithms2008-02(56) }

;


Expand All @@ -50,42 +31,42 @@ RSAPublicKey, ECPoint
der OBJECT IDENTIFIER ::=
{joint-iso-itu-t asn1(1) ber-derived(2) distinguished-encoding(1)}


-- Just for testing, to be assigned by IANA
id-raw-key OBJECT IDENTIFIER ::= {
joint-iso-itu-t(2) country(16) us(840) organization(1)
entrust(114027) algorithm(80) composite(8) raw(999) 1 }

--
-- Composite KEM basic structures
--

CompositeKEMPublicKey ::= SEQUENCE SIZE (2) OF BIT STRING
-- When a CompositeKEMPublicKey is used with an RSA public key, the BIT STRING itself is generated
-- by the concatenation of a raw ML-KEM key according to {{I-D.ietf-lamps-kyber-certificates}} and
-- an RSAPublicKey (which is a DER encoded RSAPublicKey).

-- When a CompositeKEMPublicKey is used with an EC public key, the BIT STRING itself is generated
-- by the concatenation of a raw ML-KEM key according to {{I-D.ietf-lamps-kyber-certificates}} and
-- an ECDHPublicKey (which is a DER encoded ECPoint).

-- When a CompositeKEMPublicKey is used with an Edwards public key, the BIT STRING itself is generated
-- by the concatenation of a raw ML-KEM key according to {{I-D.ietf-lamps-kyber-certificates}} and
-- a raw Edwards public key according to [RFC8410].

CompositeKEMPublicKeyOs ::= OCTET STRING (CONTAINING
CompositeKEMPublicKey ENCODED BY der)
CompositeKEMPublicKey ::= BIT STRING

CompositeKEMPublicKeyBs ::= BIT STRING (CONTAINING
CompositeKEMPublicKey ENCODED BY der)
-- When a CompositeKEMPrivateKey is used with an RSA private key, the BIT STRING itself is generated
-- by the concatenation of a raw ML-KEM key according to {{I-D.ietf-lamps-kyber-certificates}} and
-- an RSAPrivateKey (which is a DER encoded RSAPrivateKey).

CompositeKEMPrivateKey ::= SEQUENCE SIZE (2) OF OCTET STRING
-- When a CompositeKEMPrivateKey is used with an EC private key, the BIT STRING itself is generated
-- by the concatenation of a raw ML-KEM key according to {{I-D.ietf-lamps-kyber-certificates}} and
-- an ECDHPrivateKey (which is a DER encoded ECPoint).

CompositeCiphertextValue ::= SEQUENCE SIZE (2) OF OCTET STRING
-- When a CompositeKEMPrivateKey is used with an Edwards private key, the BIT STRING itself is generated
-- by the concatenation of a raw ML-KEM key according to {{I-D.ietf-lamps-kyber-certificates}} and
-- a raw Edwards private key according to [RFC8410].

RsaCompositeKemPublicKey ::= SEQUENCE {
firstPublicKey BIT STRING (ENCODED BY id-raw-key),
secondPublicKey BIT STRING (CONTAINING RSAPublicKey)
}
CompositeKEMPrivateKey ::= OCTET STRING

EcCompositeKemPublicKey ::= SEQUENCE {
firstPublicKey BIT STRING (ENCODED BY id-raw-key),
secondPublicKey BIT STRING (CONTAINING ECPoint)
}
-- Composite Ciphertext Value is just an OCTET STRING and is a concatenation of the component ciphertext
-- values.

EdCompositeKemPublicKey ::= SEQUENCE {
firstPublicKey BIT STRING (ENCODED BY id-raw-key),
secondPublicKey BIT STRING (ENCODED BY id-raw-key)
}
CompositeCiphertextValue ::= OCTET STRING

--
-- Information Object Classes
Expand Down Expand Up @@ -125,7 +106,7 @@ id-MLKEM768-RSA2048 OBJECT IDENTIFIER ::= {
pk-MLKEM768-RSA2048 PUBLIC-KEY ::=
pk-CompositeKEM {
id-MLKEM768-RSA2048,
RsaCompositeKemPublicKey }
CompositeKEMPublicKey }

kema-MLKEM768-RSA2048 KEM-ALGORITHM ::=
kema-CompositeKEM{
Expand All @@ -142,7 +123,7 @@ id-MLKEM768-RSA3072 OBJECT IDENTIFIER ::= {
pk-MLKEM768-RSA3072 PUBLIC-KEY ::=
pk-CompositeKEM {
id-MLKEM768-RSA3072,
RsaCompositeKemPublicKey }
CompositeKEMPublicKey }

kema-MLKEM768-RSA3072 KEM-ALGORITHM ::=
kema-CompositeKEM{
Expand All @@ -159,7 +140,7 @@ id-MLKEM768-RSA4096 OBJECT IDENTIFIER ::= {
pk-MLKEM768-RSA4096 PUBLIC-KEY ::=
pk-CompositeKEM {
id-MLKEM768-RSA4096,
RsaCompositeKemPublicKey }
CompositeKEMPublicKey }

kema-MLKEM768-RSA4096 KEM-ALGORITHM ::=
kema-CompositeKEM{
Expand All @@ -175,7 +156,7 @@ id-MLKEM768-ECDH-P384 OBJECT IDENTIFIER ::= {
pk-MLKEM768-ECDH-P384 PUBLIC-KEY ::=
pk-CompositeKEM {
id-MLKEM768-ECDH-P384,
EcCompositeKemPublicKey }
CompositeKEMPublicKey }

kema-MLKEM768-ECDH-P384 KEM-ALGORITHM ::=
kema-CompositeKEM{
Expand All @@ -191,7 +172,7 @@ id-MLKEM768-ECDH-brainpoolP256r1 OBJECT IDENTIFIER ::= {
pk-MLKEM768-ECDH-brainpoolP256r1 PUBLIC-KEY ::=
pk-CompositeKEM {
id-MLKEM768-ECDH-brainpoolP256r1,
EcCompositeKemPublicKey }
CompositeKEMPublicKey }

kema-MLKEM768-ECDH-brainpoolP256r1 KEM-ALGORITHM ::=
kema-CompositeKEM{
Expand All @@ -207,7 +188,7 @@ id-MLKEM768-X25519 OBJECT IDENTIFIER ::= {
pk-MLKEM768-X25519 PUBLIC-KEY ::=
pk-CompositeKEM {
id-MLKEM768-X25519,
EdCompositeKemPublicKey }
CompositeKEMPublicKey }

kema-MLKEM768-X25519 KEM-ALGORITHM ::=
kema-CompositeKEM{
Expand All @@ -224,7 +205,7 @@ id-MLKEM1024-ECDH-P384 OBJECT IDENTIFIER ::= {
pk-MLKEM1024-ECDH-P384 PUBLIC-KEY ::=
pk-CompositeKEM {
id-MLKEM1024-ECDH-P384,
EcCompositeKemPublicKey }
CompositeKEMPublicKey }

kema-MLKEM1024-ECDH-P384 KEM-ALGORITHM ::=
kema-CompositeKEM{
Expand All @@ -240,7 +221,7 @@ id-MLKEM1024-ECDH-brainpoolP384r1 OBJECT IDENTIFIER ::= {
pk-MLKEM1024-ECDH-brainpoolP384r1 PUBLIC-KEY ::=
pk-CompositeKEM{
id-MLKEM1024-ECDH-brainpoolP384r1,
EcCompositeKemPublicKey }
CompositeKEMPublicKey }

kema-MLKEM1024-ECDH-brainpoolP384r1 KEM-ALGORITHM ::=
kema-CompositeKEM{
Expand All @@ -256,7 +237,7 @@ id-MLKEM1024-X448 OBJECT IDENTIFIER ::= {
pk-MLKEM1024-X448 PUBLIC-KEY ::=
pk-CompositeKEM {
id-MLKEM1024-X448,
EdCompositeKemPublicKey }
CompositeKEMPublicKey }

kema-MLKEM1024-X448 KEM-ALGORITHM ::=
kema-CompositeKEM{
Expand Down
Loading

0 comments on commit 911981f

Please sign in to comment.