Skip to content

Composite PQC PGP (IETF OpenPGP-PQC) in the web app#1

Open
0c-coder wants to merge 3 commits into
openpgp-hardware-pathfrom
openpgp-hardware-path-pqc
Open

Composite PQC PGP (IETF OpenPGP-PQC) in the web app#1
0c-coder wants to merge 3 commits into
openpgp-hardware-pathfrom
openpgp-hardware-path-pqc

Conversation

@0c-coder

@0c-coder 0c-coder commented Jul 8, 2026

Copy link
Copy Markdown
Owner

Ships the composite openpgp.js v6 (draft-ietf-openpgp-pqc) bundle plus onlykey-openpgp-pqc.js delegation glue for composite keys loaded on the device (firmware feature/pqc-pgp-slots).

  • Sign pqc_mldsa_ed25519 (107): signer hook returns {eccSignature(64), mldsaSignature(3309)}.
  • Decrypt pqc_mlkem_x25519 (105): ecdh (X25519) + mlkemDecaps hooks; openpgp.js does the KMAC256("OpenPGPCompositeKDFv1") combine + AES key-unwrap.
  • Wire framing matches okpqc.cpp: OKSIGN [selector]+digest, OKDECRYPT dispatched by input size.

IETF OpenPGP-PQC format (interoperates with Sequoia / openpgp.js, not GnuPG LibrePGP). Untested end-to-end — validate against a flashed device.

onlykey added 3 commits July 8, 2026 16:10
Upgrade the bundled openpgp.js to the composite PQC build (v6 + draft-ietf-openpgp-pqc)
and add onlykey-openpgp-pqc.js delegation glue for keys loaded on the device
(firmware feature/pqc-pgp-slots, KEYTYPE_PQC_PGP=7):
 - sign pqc_mldsa_ed25519 (107): signer hook -> {eccSignature(64), mldsaSignature(3309)}
 - decrypt pqc_mlkem_x25519 (105): ecdh (X25519) + mlkemDecaps hooks; openpgp.js does
   the KMAC256(OpenPGPCompositeKDFv1) combine + AES key-unwrap.
Wire framing matches okpqc.cpp (OKSIGN [selector]+digest, OKDECRYPT by size).
IETF format (not GnuPG LibrePGP). Untested end-to-end.
…Key blob

node gen-composite-key.js openpgp.js "Name <email>" -> composite-pubkey.asc +
composite-blob.hex (load via: onlykey-cli setpqc RSA1 composite-blob.hex).
Extracts the four seeds (Ed25519, ML-DSA, X25519, ML-KEM) from a generated
composite key into the fixed 160-byte slot layout.
Add KB_ONLYKEY.pqc_sign_ecc / pqc_sign_pqc / pqc_x25519 / pqc_mlkem device
callbacks over u2fSignBuffer (OKSIGN [selector]+digest; OKDECRYPT by size) and
KB_ONLYKEY.registerPQCHooks(openpgp, slot) to bind them to onlykey-openpgp-pqc.js.
slotid() honors pqcMode -> RSA slot. RSA-slot addressing + PIN framing are
best-effort (mirror auth_sign_ecc); confirm on hardware.
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.

2 participants