From 291d9e9936b4051977b30e75914f585102b27c27 Mon Sep 17 00:00:00 2001 From: Filip Skokan Date: Wed, 10 Feb 2021 12:22:52 +0100 Subject: [PATCH] crypto: check ed/x webcrypto key import algorithm names PR-URL: https://github.com/nodejs/node/pull/37305 Reviewed-By: James M Snell --- doc/api/webcrypto.md | 4 +- lib/internal/crypto/ec.js | 54 ++++++++++++++++--- test/parallel/test-webcrypto-ed25519-ed448.js | 54 ++++++++++++++++++- test/parallel/test-webcrypto-x25519-x448.js | 27 ++++++++-- 4 files changed, 125 insertions(+), 14 deletions(-) diff --git a/doc/api/webcrypto.md b/doc/api/webcrypto.md index 79bf1c75c5152f..e3ed1405355ad5 100644 --- a/doc/api/webcrypto.md +++ b/doc/api/webcrypto.md @@ -1697,8 +1697,8 @@ added: v15.8.0 * Type: {boolean} -The `public` parameter is used to specify that the key is to be interpreted -as a public key. +The `public` parameter is used to specify that the `'raw'` format key is to be +interpreted as a public key. **Default:** `false`. ### `NODE-SCRYPT` Algorithm