Skip to content

Conversation

@larabr
Copy link

@larabr larabr commented Jan 17, 2025

Implements Draft 6 (https://datatracker.ietf.org/doc/draft-ietf-openpgp-pqc/06/).

NB: this implementation of SLH-DSA signing is currently too slow to be usable (10+ seconds).
This PR is intended as a proof-of-concept to generate and verify test-vectors across implementations.

twiss and others added 14 commits February 5, 2025 14:13
To enable stored messages to be protected using symmetric key encryption and validated
using message authentication codes, this set of changes adds support for storing
symmetric key material as Secret Key Packets, symmetric key encrypted session keys as
Public Key Encrypted Session Key Packets, and MAC tags as Signature Packets.

Co-authored-by: Konstantinos Andrikopoulos <kandrikopoulos@proton.ch>
Co-authored-by: Daniel Huigens <d.huigens@protonmail.com>
Update implementation to reflect spec changes to KDF params (v2 -> v255) and
new forwarding-related key flag (0x40).
…rypt autoforwarded messages (#8)

These subkeys must not have the standard encryption flags (EtEr) set,
as they are not supposed to be used for direct messages.

Also:
- preserve 'forwarded communication' key flag when reformatting
- fix bug allowing to decrypt forwarded messages by setting
`config.allowInsecureDecryptionWithSigningKeys` instead of
`config.allowForwardedMessages`
- add TS definition for `config.allowForwardedMessages`
…llocation (#14)

Also, make `ARGON2_WASM_MEMORY_THRESHOLD_RELOAD`
a static class property, to be able to change its value.
To ensure compatibility with older mobile clients, which may not
support verifying SHA3 message signatures
)

SEIPDv2 is a more secure and faster choice, but it is
not necessarily compatible with other libs and our mobile apps.

Co-authored-by: Daniel Huigens <d.huigens@protonmail.com>
Much faster than tweetnacl, and no constant-timeness required.

We are not using v2 for now, despite being smaller, because it relies on
bigint literals, and it requires polyfilling the WebCrypto lib
manually in Node < 19.
Implements Draft 6 with custom KEM combiner
(https://datatracker.ietf.org/doc/draft-ietf-openpgp-pqc/06/)

Co-authored-by: Daniel Huigens <d.huigens@protonmail.com>
Implements Draft 6
(https://datatracker.ietf.org/doc/draft-ietf-openpgp-pqc/06/).

Also, chunk ML-KEM and ML-DSA together in lightweight bundle.
Noble-curves had to be updated to v1.7.0 to ensure the same
version of noble-hashes is used as noble-post-quantum,
making it possible to reuse the sha3 code/chunk across libs.
…SA WebCrypto operations

Fallback to JS code instead of throwing.
Which also drops ECDH-KEM CCA-conversion.
This variant is yet to be adopted under draft 7, hence official test
vectors aren't available for now.

See openpgp-pqc/draft-openpgp-pqc#161 .
Implements Draft 6
(https://datatracker.ietf.org/doc/draft-ietf-openpgp-pqc/06/).

NB: signing is currently too slow to be usable (10+ seconds).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants