Skip to content
Permalink
Browse files
[GCrypt] Add support for P-521 EC curves
https://bugs.webkit.org/show_bug.cgi?id=175199

Reviewed by Jiewen Tan.

Source/WebCore:

Add support for 521-bit elliptic curves in the libgcrypt-based
implementation of WebCrypto API.

In the CryptoAlgorithmECDH implementation, the bit-size of the key is now
rounded up to the next byte boundary and passed to the helper
gcryptDerive() function. There the size in bytes is used to zero-pad the
derived key data. This is done to properly handle derivation results for
the P-521 curves, where the leading zero bit could get clipped, resulting
in a derived key that is only 65 byes in length when it is expected to be
66 bytes. Further cleanups are done in gcryptDerive() to use the mpiData()
function where possible.

In the CryptoAlgorithmECDSA implementation, the bit-size of the key is
again rounded up to the nearest byte boundary before being passed to the
helper gcryptSign() and gcryptVerify() functions. This again properly
enforces the requirement of 66 bytes to handle P-521 elliptic curves.

In the CryptoKeyEC implementation, NamedCurve::P521 cases in helper
functions operating on NamedCurve values are now implemented to return
appropriate values. platformSupportedCurve() now returns true for the
NamedCurve::P521 value. Zero-padding of the private key data is used
wherever it is necessary to avoid clipping any leading zero bit in the
P-521 EC key.

No new tests -- affected tests have their baselines updated.

* crypto/gcrypt/CryptoAlgorithmECDHGCrypt.cpp:
(WebCore::gcryptDerive):
(WebCore::CryptoAlgorithmECDH::platformDeriveBits):
* crypto/gcrypt/CryptoAlgorithmECDSAGCrypt.cpp:
(WebCore::CryptoAlgorithmECDSA::platformSign):
(WebCore::CryptoAlgorithmECDSA::platformVerify):
* crypto/gcrypt/CryptoKeyECGCrypt.cpp:
(WebCore::curveName):
(WebCore::curveIdentifier):
(WebCore::curveSize):
(WebCore::curveUncompressedFieldElementSize):
(WebCore::CryptoKeyEC::platformSupportedCurve):
(WebCore::curveForIdentifier):
(WebCore::CryptoKeyEC::platformImportPkcs8):
(WebCore::CryptoKeyEC::platformAddFieldElements const):
(WebCore::CryptoKeyEC::platformExportPkcs8 const):

LayoutTests:

Add or update Web Crypto test baselines for the GTK+ and WPE ports
to reflect the added EC P-521 support.

* platform/gtk/crypto/subtle/ec-generate-key-malformed-parameters-expected.txt: Added.
* platform/gtk/crypto/subtle/ecdh-derive-bits-length-limits-expected.txt: Added.
* platform/gtk/crypto/subtle/ecdh-import-spki-key-ecdh-identifier-expected.txt: Added.
* platform/gtk/imported/w3c/web-platform-tests/WebCryptoAPI/derive_bits_keys/ecdh_bits.worker-expected.txt: Added.
* platform/gtk/imported/w3c/web-platform-tests/WebCryptoAPI/derive_bits_keys/ecdh_keys.worker-expected.txt: Added.
* platform/gtk/imported/w3c/web-platform-tests/WebCryptoAPI/derive_bits_keys/test_ecdh_bits.https-expected.txt: Added.
* platform/gtk/imported/w3c/web-platform-tests/WebCryptoAPI/derive_bits_keys/test_ecdh_keys.https-expected.txt: Added.
* platform/gtk/imported/w3c/web-platform-tests/WebCryptoAPI/generateKey/failures.worker-expected.txt:
* platform/gtk/imported/w3c/web-platform-tests/WebCryptoAPI/generateKey/failures_ECDH.worker-expected.txt: Added.
* platform/gtk/imported/w3c/web-platform-tests/WebCryptoAPI/generateKey/failures_ECDSA.worker-expected.txt: Added.
* platform/gtk/imported/w3c/web-platform-tests/WebCryptoAPI/generateKey/successes.worker-expected.txt:
* platform/gtk/imported/w3c/web-platform-tests/WebCryptoAPI/generateKey/successes_ECDH.worker-expected.txt: Added.
* platform/gtk/imported/w3c/web-platform-tests/WebCryptoAPI/generateKey/successes_ECDSA.worker-expected.txt: Added.
* platform/gtk/imported/w3c/web-platform-tests/WebCryptoAPI/generateKey/test_failures.https-expected.txt:
* platform/gtk/imported/w3c/web-platform-tests/WebCryptoAPI/generateKey/test_failures_ECDH.https-expected.txt: Added.
* platform/gtk/imported/w3c/web-platform-tests/WebCryptoAPI/generateKey/test_failures_ECDSA.https-expected.txt: Added.
* platform/gtk/imported/w3c/web-platform-tests/WebCryptoAPI/generateKey/test_successes_ECDH.https-expected.txt: Added.
* platform/gtk/imported/w3c/web-platform-tests/WebCryptoAPI/generateKey/test_successes_ECDSA.https-expected.txt: Added.
* platform/gtk/imported/w3c/web-platform-tests/WebCryptoAPI/import_export/ec_importKey.worker-expected.txt: Added.
* platform/gtk/imported/w3c/web-platform-tests/WebCryptoAPI/import_export/test_ec_importKey.https-expected.txt: Added.
* platform/gtk/imported/w3c/web-platform-tests/WebCryptoAPI/sign_verify/ecdsa.worker-expected.txt: Added.
* platform/gtk/imported/w3c/web-platform-tests/WebCryptoAPI/sign_verify/test_ecdsa.https-expected.txt: Added.
* platform/wpe/crypto/subtle/ec-generate-key-malformed-parameters-expected.txt: Added.
* platform/wpe/crypto/subtle/ecdh-derive-bits-length-limits-expected.txt: Added.
* platform/wpe/crypto/subtle/ecdh-import-spki-key-ecdh-identifier-expected.txt: Added.
* platform/wpe/imported/w3c/web-platform-tests/WebCryptoAPI/derive_bits_keys/ecdh_bits.worker-expected.txt: Added.
* platform/wpe/imported/w3c/web-platform-tests/WebCryptoAPI/derive_bits_keys/ecdh_keys.worker-expected.txt: Added.
* platform/wpe/imported/w3c/web-platform-tests/WebCryptoAPI/derive_bits_keys/test_ecdh_bits.https-expected.txt: Added.
* platform/wpe/imported/w3c/web-platform-tests/WebCryptoAPI/derive_bits_keys/test_ecdh_keys.https-expected.txt: Added.
* platform/wpe/imported/w3c/web-platform-tests/WebCryptoAPI/generateKey/failures.worker-expected.txt:
* platform/wpe/imported/w3c/web-platform-tests/WebCryptoAPI/generateKey/failures_ECDH.worker-expected.txt: Added.
* platform/wpe/imported/w3c/web-platform-tests/WebCryptoAPI/generateKey/failures_ECDSA.worker-expected.txt: Added.
* platform/wpe/imported/w3c/web-platform-tests/WebCryptoAPI/generateKey/successes.worker-expected.txt:
* platform/wpe/imported/w3c/web-platform-tests/WebCryptoAPI/generateKey/successes_ECDH.worker-expected.txt: Added.
* platform/wpe/imported/w3c/web-platform-tests/WebCryptoAPI/generateKey/successes_ECDSA.worker-expected.txt: Added.
* platform/wpe/imported/w3c/web-platform-tests/WebCryptoAPI/generateKey/test_failures.https-expected.txt:
* platform/wpe/imported/w3c/web-platform-tests/WebCryptoAPI/generateKey/test_failures_ECDH.https-expected.txt: Added.
* platform/wpe/imported/w3c/web-platform-tests/WebCryptoAPI/generateKey/test_failures_ECDSA.https-expected.txt: Added.
* platform/wpe/imported/w3c/web-platform-tests/WebCryptoAPI/generateKey/test_successes_ECDH.https-expected.txt: Added.
* platform/wpe/imported/w3c/web-platform-tests/WebCryptoAPI/generateKey/test_successes_ECDSA.https-expected.txt: Added.
* platform/wpe/imported/w3c/web-platform-tests/WebCryptoAPI/import_export/ec_importKey.worker-expected.txt: Added.
* platform/wpe/imported/w3c/web-platform-tests/WebCryptoAPI/import_export/test_ec_importKey.https-expected.txt: Added.
* platform/wpe/imported/w3c/web-platform-tests/WebCryptoAPI/sign_verify/ecdsa.worker-expected.txt: Added.
* platform/wpe/imported/w3c/web-platform-tests/WebCryptoAPI/sign_verify/test_ecdsa.https-expected.txt: Added.


Canonical link: https://commits.webkit.org/195138@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@224173 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
zdobersek committed Oct 30, 2017
1 parent 2d01d03 commit 8b62f501f17b2b72ee7e7a1ca7c780116988a520
Showing 49 changed files with 5,709 additions and 136 deletions.
@@ -1,3 +1,58 @@
2017-10-30 Zan Dobersek <zdobersek@igalia.com>

[GCrypt] Add support for P-521 EC curves
https://bugs.webkit.org/show_bug.cgi?id=175199

Reviewed by Jiewen Tan.

Add or update Web Crypto test baselines for the GTK+ and WPE ports
to reflect the added EC P-521 support.

* platform/gtk/crypto/subtle/ec-generate-key-malformed-parameters-expected.txt: Added.
* platform/gtk/crypto/subtle/ecdh-derive-bits-length-limits-expected.txt: Added.
* platform/gtk/crypto/subtle/ecdh-import-spki-key-ecdh-identifier-expected.txt: Added.
* platform/gtk/imported/w3c/web-platform-tests/WebCryptoAPI/derive_bits_keys/ecdh_bits.worker-expected.txt: Added.
* platform/gtk/imported/w3c/web-platform-tests/WebCryptoAPI/derive_bits_keys/ecdh_keys.worker-expected.txt: Added.
* platform/gtk/imported/w3c/web-platform-tests/WebCryptoAPI/derive_bits_keys/test_ecdh_bits.https-expected.txt: Added.
* platform/gtk/imported/w3c/web-platform-tests/WebCryptoAPI/derive_bits_keys/test_ecdh_keys.https-expected.txt: Added.
* platform/gtk/imported/w3c/web-platform-tests/WebCryptoAPI/generateKey/failures.worker-expected.txt:
* platform/gtk/imported/w3c/web-platform-tests/WebCryptoAPI/generateKey/failures_ECDH.worker-expected.txt: Added.
* platform/gtk/imported/w3c/web-platform-tests/WebCryptoAPI/generateKey/failures_ECDSA.worker-expected.txt: Added.
* platform/gtk/imported/w3c/web-platform-tests/WebCryptoAPI/generateKey/successes.worker-expected.txt:
* platform/gtk/imported/w3c/web-platform-tests/WebCryptoAPI/generateKey/successes_ECDH.worker-expected.txt: Added.
* platform/gtk/imported/w3c/web-platform-tests/WebCryptoAPI/generateKey/successes_ECDSA.worker-expected.txt: Added.
* platform/gtk/imported/w3c/web-platform-tests/WebCryptoAPI/generateKey/test_failures.https-expected.txt:
* platform/gtk/imported/w3c/web-platform-tests/WebCryptoAPI/generateKey/test_failures_ECDH.https-expected.txt: Added.
* platform/gtk/imported/w3c/web-platform-tests/WebCryptoAPI/generateKey/test_failures_ECDSA.https-expected.txt: Added.
* platform/gtk/imported/w3c/web-platform-tests/WebCryptoAPI/generateKey/test_successes_ECDH.https-expected.txt: Added.
* platform/gtk/imported/w3c/web-platform-tests/WebCryptoAPI/generateKey/test_successes_ECDSA.https-expected.txt: Added.
* platform/gtk/imported/w3c/web-platform-tests/WebCryptoAPI/import_export/ec_importKey.worker-expected.txt: Added.
* platform/gtk/imported/w3c/web-platform-tests/WebCryptoAPI/import_export/test_ec_importKey.https-expected.txt: Added.
* platform/gtk/imported/w3c/web-platform-tests/WebCryptoAPI/sign_verify/ecdsa.worker-expected.txt: Added.
* platform/gtk/imported/w3c/web-platform-tests/WebCryptoAPI/sign_verify/test_ecdsa.https-expected.txt: Added.
* platform/wpe/crypto/subtle/ec-generate-key-malformed-parameters-expected.txt: Added.
* platform/wpe/crypto/subtle/ecdh-derive-bits-length-limits-expected.txt: Added.
* platform/wpe/crypto/subtle/ecdh-import-spki-key-ecdh-identifier-expected.txt: Added.
* platform/wpe/imported/w3c/web-platform-tests/WebCryptoAPI/derive_bits_keys/ecdh_bits.worker-expected.txt: Added.
* platform/wpe/imported/w3c/web-platform-tests/WebCryptoAPI/derive_bits_keys/ecdh_keys.worker-expected.txt: Added.
* platform/wpe/imported/w3c/web-platform-tests/WebCryptoAPI/derive_bits_keys/test_ecdh_bits.https-expected.txt: Added.
* platform/wpe/imported/w3c/web-platform-tests/WebCryptoAPI/derive_bits_keys/test_ecdh_keys.https-expected.txt: Added.
* platform/wpe/imported/w3c/web-platform-tests/WebCryptoAPI/generateKey/failures.worker-expected.txt:
* platform/wpe/imported/w3c/web-platform-tests/WebCryptoAPI/generateKey/failures_ECDH.worker-expected.txt: Added.
* platform/wpe/imported/w3c/web-platform-tests/WebCryptoAPI/generateKey/failures_ECDSA.worker-expected.txt: Added.
* platform/wpe/imported/w3c/web-platform-tests/WebCryptoAPI/generateKey/successes.worker-expected.txt:
* platform/wpe/imported/w3c/web-platform-tests/WebCryptoAPI/generateKey/successes_ECDH.worker-expected.txt: Added.
* platform/wpe/imported/w3c/web-platform-tests/WebCryptoAPI/generateKey/successes_ECDSA.worker-expected.txt: Added.
* platform/wpe/imported/w3c/web-platform-tests/WebCryptoAPI/generateKey/test_failures.https-expected.txt:
* platform/wpe/imported/w3c/web-platform-tests/WebCryptoAPI/generateKey/test_failures_ECDH.https-expected.txt: Added.
* platform/wpe/imported/w3c/web-platform-tests/WebCryptoAPI/generateKey/test_failures_ECDSA.https-expected.txt: Added.
* platform/wpe/imported/w3c/web-platform-tests/WebCryptoAPI/generateKey/test_successes_ECDH.https-expected.txt: Added.
* platform/wpe/imported/w3c/web-platform-tests/WebCryptoAPI/generateKey/test_successes_ECDSA.https-expected.txt: Added.
* platform/wpe/imported/w3c/web-platform-tests/WebCryptoAPI/import_export/ec_importKey.worker-expected.txt: Added.
* platform/wpe/imported/w3c/web-platform-tests/WebCryptoAPI/import_export/test_ec_importKey.https-expected.txt: Added.
* platform/wpe/imported/w3c/web-platform-tests/WebCryptoAPI/sign_verify/ecdsa.worker-expected.txt: Added.
* platform/wpe/imported/w3c/web-platform-tests/WebCryptoAPI/sign_verify/test_ecdsa.https-expected.txt: Added.

2017-10-30 Carlos Garcia Campos <cgarcia@igalia.com>

Unreviewed WPE gardening. Skip Service Workers tests again after r224132.
@@ -0,0 +1,30 @@
Test generating an EC key pair with malformed-paramters.

On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".


PASS crypto.subtle.generateKey("ecdh", extractable, ["deriveKey", "deriveBits"]) rejected promise with TypeError: Member EcKeyParams.namedCurve is required and must be an instance of DOMString.
PASS crypto.subtle.generateKey({name: "ecdh"}, extractable, ["deriveKey", "deriveBits"]) rejected promise with TypeError: Member EcKeyParams.namedCurve is required and must be an instance of DOMString.
PASS crypto.subtle.generateKey({name: "ecdh", namedCurve: true}, extractable, ["deriveKey", "deriveBits"]) rejected promise with NotSupportedError: The algorithm is not supported.
PASS crypto.subtle.generateKey({name: "ecdh", namedCurve: null}, extractable, ["deriveKey", "deriveBits"]) rejected promise with NotSupportedError: The algorithm is not supported.
PASS crypto.subtle.generateKey({name: "ecdh", namedCurve: undefined}, extractable, ["deriveKey", "deriveBits"]) rejected promise with TypeError: Member EcKeyParams.namedCurve is required and must be an instance of DOMString.
PASS crypto.subtle.generateKey({name: "ecdh", namedCurve: Symbol()}, extractable, ["deriveKey", "deriveBits"]) rejected promise with TypeError: Cannot convert a symbol to a string.
PASS crypto.subtle.generateKey({name: "ecdh", namedCurve: { }}, extractable, ["deriveKey", "deriveBits"]) rejected promise with NotSupportedError: The algorithm is not supported.
PASS crypto.subtle.generateKey({name: "ecdh", namedCurve: 1}, extractable, ["deriveKey", "deriveBits"]) rejected promise with NotSupportedError: The algorithm is not supported.
PASS crypto.subtle.generateKey({name: "ecdh", namedCurve: "P-256"}, extractable, ["encrypt"]) rejected promise with SyntaxError: A required parameter was missing or out-of-range.
PASS crypto.subtle.generateKey({name: "ecdh", namedCurve: "P-256"}, extractable, ["decrypt"]) rejected promise with SyntaxError: A required parameter was missing or out-of-range.
PASS crypto.subtle.generateKey({name: "ecdh", namedCurve: "P-256"}, extractable, ["sign"]) rejected promise with SyntaxError: A required parameter was missing or out-of-range.
PASS crypto.subtle.generateKey({name: "ecdh", namedCurve: "P-256"}, extractable, ["verify"]) rejected promise with SyntaxError: A required parameter was missing or out-of-range.
PASS crypto.subtle.generateKey({name: "ecdh", namedCurve: "P-256"}, extractable, ["wrapKey"]) rejected promise with SyntaxError: A required parameter was missing or out-of-range.
PASS crypto.subtle.generateKey({name: "ecdh", namedCurve: "P-256"}, extractable, ["unwrapKey"]) rejected promise with SyntaxError: A required parameter was missing or out-of-range.
PASS crypto.subtle.generateKey({name: "ecdsa", namedCurve: "P-256"}, extractable, ["encrypt"]) rejected promise with SyntaxError: A required parameter was missing or out-of-range.
PASS crypto.subtle.generateKey({name: "ecdsa", namedCurve: "P-256"}, extractable, ["decrypt"]) rejected promise with SyntaxError: A required parameter was missing or out-of-range.
PASS crypto.subtle.generateKey({name: "ecdsa", namedCurve: "P-256"}, extractable, ["deriveKey"]) rejected promise with SyntaxError: A required parameter was missing or out-of-range.
PASS crypto.subtle.generateKey({name: "ecdsa", namedCurve: "P-256"}, extractable, ["deriveBits"]) rejected promise with SyntaxError: A required parameter was missing or out-of-range.
PASS crypto.subtle.generateKey({name: "ecdsa", namedCurve: "P-256"}, extractable, ["wrapKey"]) rejected promise with SyntaxError: A required parameter was missing or out-of-range.
PASS crypto.subtle.generateKey({name: "ecdsa", namedCurve: "P-256"}, extractable, ["unwrapKey"]) rejected promise with SyntaxError: A required parameter was missing or out-of-range.
FAIL crypto.subtle.generateKey({name: "ecdh", namedCurve: "P-521"}, extractable, ["deriveKey"]) should reject promise. Resolved with [object Object].
PASS successfullyParsed is true

TEST COMPLETE

@@ -0,0 +1,24 @@
Test ECDH deriveBits operation for corner-case length values.

On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".


PASS deriveBits(..., 0) successfully derived 256 bits for a P-256 curve
PASS deriveBits(..., 8) successfully derived 8 bits for a P-256 curve
PASS deriveBits(..., 256) successfully derived 256 bits for a P-256 curve
PASS Bit derivations for EC P-256 with minimum and maximum lengths succeeded
PASS deriveBits(P256, 256 + 8) rejected promise with OperationError: The operation failed for an operation-specific reason.
PASS deriveBits(..., 0) successfully derived 384 bits for a P-384 curve
PASS deriveBits(..., 8) successfully derived 8 bits for a P-384 curve
PASS deriveBits(..., 384) successfully derived 384 bits for a P-384 curve
PASS Bit derivations for EC P-384 with minimum and maximum lengths succeeded
PASS deriveBits(P384, 384 + 8) rejected promise with OperationError: The operation failed for an operation-specific reason.
PASS deriveBits(..., 0) successfully derived 528 bits for a P-521 curve
PASS deriveBits(..., 8) successfully derived 8 bits for a P-521 curve
PASS deriveBits(..., 528) successfully derived 528 bits for a P-521 curve
PASS Bit derivations for EC P-521 with minimum and maximum lengths succeeded
PASS deriveBits(P521, 528 + 8) rejected promise with OperationError: The operation failed for an operation-specific reason.
PASS successfullyParsed is true

TEST COMPLETE

@@ -0,0 +1,30 @@
Test importing P-256, P-384 and P-521 SPKI ECDH keys that are using the ecDH algorithm identifier

On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".


Importing a P-256 key that uses the ecDH algorithm identifier ...
PASS publicKey.toString() is '[object CryptoKey]'
PASS publicKey.type is 'public'
PASS publicKey.extractable is true
PASS publicKey.algorithm.name is 'ECDH'
PASS publicKey.algorithm.namedCurve is 'P-256'
PASS publicKey.usages is [ ]
Importing a P-384 key that uses the ecDH algorithm identifier ...
PASS publicKey.toString() is '[object CryptoKey]'
PASS publicKey.type is 'public'
PASS publicKey.extractable is true
PASS publicKey.algorithm.name is 'ECDH'
PASS publicKey.algorithm.namedCurve is 'P-384'
PASS publicKey.usages is [ ]
Importing a P-521 key that uses the ecDH algorithm identifier ...
PASS publicKey.toString() is '[object CryptoKey]'
PASS publicKey.type is 'public'
PASS publicKey.extractable is true
PASS publicKey.algorithm.name is 'ECDH'
PASS publicKey.algorithm.namedCurve is 'P-521'
PASS publicKey.usages is [ ]
PASS successfullyParsed is true

TEST COMPLETE

@@ -0,0 +1,44 @@

PASS P-521 good parameters
PASS P-521 mixed case parameters
PASS P-521 with null length
PASS P-521 short result
FAIL P-521 non-multiple of 8 bits assert_unreached: deriveBits failed with error OperationError: The operation failed for an operation-specific reason Reached unreachable code
PASS P-521 missing public curve
PASS P-521 public property of algorithm is not a CryptoKey
PASS P-521 mismatched curves
PASS P-521 public property of algorithm is not an ECDSA public key
PASS P-521 no deriveBits usage for base key
PASS P-521 base key is not a private key
PASS P-521 public property value is a private key
PASS P-521 public property value is a secret key
PASS P-521 asking for too many bits
PASS P-256 good parameters
PASS P-256 mixed case parameters
PASS P-256 with null length
PASS P-256 short result
FAIL P-256 non-multiple of 8 bits assert_unreached: deriveBits failed with error OperationError: The operation failed for an operation-specific reason Reached unreachable code
PASS P-256 missing public curve
PASS P-256 public property of algorithm is not a CryptoKey
PASS P-256 mismatched curves
PASS P-256 public property of algorithm is not an ECDSA public key
PASS P-256 no deriveBits usage for base key
PASS P-256 base key is not a private key
PASS P-256 public property value is a private key
PASS P-256 public property value is a secret key
PASS P-256 asking for too many bits
PASS P-384 good parameters
PASS P-384 mixed case parameters
PASS P-384 with null length
PASS P-384 short result
FAIL P-384 non-multiple of 8 bits assert_unreached: deriveBits failed with error OperationError: The operation failed for an operation-specific reason Reached unreachable code
PASS P-384 missing public curve
PASS P-384 public property of algorithm is not a CryptoKey
PASS P-384 mismatched curves
PASS P-384 public property of algorithm is not an ECDSA public key
PASS P-384 no deriveBits usage for base key
PASS P-384 base key is not a private key
PASS P-384 public property value is a private key
PASS P-384 public property value is a secret key
PASS P-384 asking for too many bits

@@ -0,0 +1,32 @@

PASS P-521 good parameters
PASS P-521 mixed case parameters
PASS P-521 missing public curve
PASS P-521 public property of algorithm is not a CryptoKey
PASS P-521 mismatched curves
PASS P-521 public property of algorithm is not an ECDSA public key
PASS P-521 no deriveKey usage for base key
PASS P-521 base key is not a private key
PASS P-521 public property value is a private key
PASS P-521 public property value is a secret key
PASS P-256 good parameters
PASS P-256 mixed case parameters
PASS P-256 missing public curve
PASS P-256 public property of algorithm is not a CryptoKey
PASS P-256 mismatched curves
PASS P-256 public property of algorithm is not an ECDSA public key
PASS P-256 no deriveKey usage for base key
PASS P-256 base key is not a private key
PASS P-256 public property value is a private key
PASS P-256 public property value is a secret key
PASS P-384 good parameters
PASS P-384 mixed case parameters
PASS P-384 missing public curve
PASS P-384 public property of algorithm is not a CryptoKey
PASS P-384 mismatched curves
PASS P-384 public property of algorithm is not an ECDSA public key
PASS P-384 no deriveKey usage for base key
PASS P-384 base key is not a private key
PASS P-384 public property value is a private key
PASS P-384 public property value is a secret key

@@ -0,0 +1,46 @@
deriveBits Tests for ECDH


PASS P-521 good parameters
PASS P-521 mixed case parameters
PASS P-521 with null length
PASS P-521 short result
FAIL P-521 non-multiple of 8 bits assert_unreached: deriveBits failed with error OperationError: The operation failed for an operation-specific reason Reached unreachable code
PASS P-521 missing public curve
PASS P-521 public property of algorithm is not a CryptoKey
PASS P-521 mismatched curves
PASS P-521 public property of algorithm is not an ECDSA public key
PASS P-521 no deriveBits usage for base key
PASS P-521 base key is not a private key
PASS P-521 public property value is a private key
PASS P-521 public property value is a secret key
PASS P-521 asking for too many bits
PASS P-256 good parameters
PASS P-256 mixed case parameters
PASS P-256 with null length
PASS P-256 short result
FAIL P-256 non-multiple of 8 bits assert_unreached: deriveBits failed with error OperationError: The operation failed for an operation-specific reason Reached unreachable code
PASS P-256 missing public curve
PASS P-256 public property of algorithm is not a CryptoKey
PASS P-256 mismatched curves
PASS P-256 public property of algorithm is not an ECDSA public key
PASS P-256 no deriveBits usage for base key
PASS P-256 base key is not a private key
PASS P-256 public property value is a private key
PASS P-256 public property value is a secret key
PASS P-256 asking for too many bits
PASS P-384 good parameters
PASS P-384 mixed case parameters
PASS P-384 with null length
PASS P-384 short result
FAIL P-384 non-multiple of 8 bits assert_unreached: deriveBits failed with error OperationError: The operation failed for an operation-specific reason Reached unreachable code
PASS P-384 missing public curve
PASS P-384 public property of algorithm is not a CryptoKey
PASS P-384 mismatched curves
PASS P-384 public property of algorithm is not an ECDSA public key
PASS P-384 no deriveBits usage for base key
PASS P-384 base key is not a private key
PASS P-384 public property value is a private key
PASS P-384 public property value is a secret key
PASS P-384 asking for too many bits

@@ -0,0 +1,34 @@
deriveKey Tests for ECDH


PASS P-521 good parameters
PASS P-521 mixed case parameters
PASS P-521 missing public curve
PASS P-521 public property of algorithm is not a CryptoKey
PASS P-521 mismatched curves
PASS P-521 public property of algorithm is not an ECDSA public key
PASS P-521 no deriveKey usage for base key
PASS P-521 base key is not a private key
PASS P-521 public property value is a private key
PASS P-521 public property value is a secret key
PASS P-256 good parameters
PASS P-256 mixed case parameters
PASS P-256 missing public curve
PASS P-256 public property of algorithm is not a CryptoKey
PASS P-256 mismatched curves
PASS P-256 public property of algorithm is not an ECDSA public key
PASS P-256 no deriveKey usage for base key
PASS P-256 base key is not a private key
PASS P-256 public property value is a private key
PASS P-256 public property value is a secret key
PASS P-384 good parameters
PASS P-384 mixed case parameters
PASS P-384 missing public curve
PASS P-384 public property of algorithm is not a CryptoKey
PASS P-384 mismatched curves
PASS P-384 public property of algorithm is not an ECDSA public key
PASS P-384 no deriveKey usage for base key
PASS P-384 base key is not a private key
PASS P-384 public property value is a private key
PASS P-384 public property value is a secret key

0 comments on commit 8b62f50

Please sign in to comment.