From 0dc712efb62b0483439d5fb8f26eec50b9cd3798 Mon Sep 17 00:00:00 2001 From: Daniel Huigens Date: Sun, 5 Nov 2023 11:23:36 +0100 Subject: [PATCH] Add PQC key generation --- src/key/helper.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/key/helper.js b/src/key/helper.js index 9c185d3b0..e86a44249 100644 --- a/src/key/helper.js +++ b/src/key/helper.js @@ -334,6 +334,13 @@ export function sanitizeKeyOptions(options, subkeyDefaults = {}) { } switch (options.type) { + case 'pqc': + if (options.sign) { + options.algorithm = enums.publicKey.pqc_mldsa_ed25519; + } else { + options.algorithm = enums.publicKey.pqc_mlkem_x25519; + } + break; case 'ecc': // NB: this case also handles legacy eddsa and x25519 keys, based on `options.curve` try { options.curve = enums.write(enums.curve, options.curve);