[Format v2] Consider using HPKE (RFC9180) #211
Labels
documentation
Improvements or additions to documentation
enhancement
New feature or request
refactoring
Code refactoring
Milestone
Context
In order to encrypt for a recipient public key (Public Key Encryption, PKE) using elliptic curve encryption (ECC), MLA uses an ECIES-like scheme.
As stated in 1:
Some standards based on this scheme are ANSI X9.63 (ECIES), IEEE 1363a, ISO/IEC 18033-2, and SECG SEC 1.
But, to quote 2:
To provide a version which is modern, simple and without the aforementioned shortcoming, HPKE (Hybrid PKE) has been proposed as of RFC91803.
This scheme is used in TLS and implemented in other cryptographic library such as OpenSSL or WolfSSL.
Proposed integration to MLA
Several aspects can be considered:
Shared secret derivation in ECC
The public key derivation for the ECC could be based on this RFC.
In particular:
Auth
mode (AuthEncap
andAuthDecap
) is not relevant for MLA (at least for now), as we don't have private key for the creator, only public keys for recipients. In other words, only themode_base
is targetedIntegration with the AEAD scheme
MLA targets several recipient, so HPKE can't be applied directly.
Instead, a two layer encryption could be use (a bit like 4):
HPKE specification introduces reusability: the secret produced can be either used with asecret export (section 5.3) or a Key schedule (5.2).
As a result, we can either:
Hybrid PQC encryption
The format v2 targets the use of Hybrid PQC encryption (#195).
Extension to the ML-KEM (such as 5, with the difference that we target FIPS-203 1024 instead of 768, or 6 defining ML-KEM-1024 as algorithm 0x0080) can be considered. To the author knowledge, there is no standard for now for hybrid PQC in HPKE, but it is likely that one might emerge.
Expected benefits
DeriveKeyPair
(section 7.1.3) can be used to provide deterministic key, such as seed derivation inmlar
Footnotes
A comparison of the standardized versions of ECIES, 2010 ↩
https://blog.cloudflare.com/hybrid-public-key-encryption ↩
https://datatracker.ietf.org/doc/rfc9180/ ↩ ↩2
https://www.ietf.org/archive/id/draft-ietf-cose-hpke-07.html#name-multiple-recipients-two-lay ↩
https://datatracker.ietf.org/doc/draft-reddy-cose-jose-pqc-hybrid-hpke/ ↩
https://www.ietf.org/archive/id/draft-connolly-cfrg-hpke-mlkem-00.html ↩
https://eprint.iacr.org/2020/1499.pdf ↩
https://blog.cloudflare.com/using-hpke-to-encrypt-request-payloads/ ↩
The text was updated successfully, but these errors were encountered: