Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 18 additions & 1 deletion test/fixtures/wpt/WebCryptoAPI/README.md
Original file line number Diff line number Diff line change
@@ -1 +1,18 @@
Directory for Crypto API tests
Tests for the Web Cryptography API are grouped by specification:

- Tests for [Web Cryptography API Level 2](https://w3c.github.io/webcrypto/)
are in this directory's existing operation subdirectories and root files.
- Tests for [Modern Algorithms in the Web Cryptography API](https://wicg.github.io/webcrypto-modern-algos/)
are in `modern-algos/`, including `supports()`, `getPublicKey()`, and key format extensions.
- Tests for [Secure Curves in the Web Cryptography API](https://wicg.github.io/webcrypto-secure-curves/)
are in `secure-curves/`. Ed25519 and X25519 are part of the core specification;
Ed448 and X448 are covered by the secure curves specification.

Each specification directory has a `META.yml` linking to its specification.
Helpers used across specifications remain in the shared operation directories
or `util/`; helpers specific to an extension are alongside that extension's tests.

Use `.tentative` only for assertions not yet required by a specification or that
contradict a specification, as described in the [file naming guidelines](../docs/writing-tests/file-names.md).
An algorithm being defined in an extension specification does not by itself make
its tests tentative.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

1 change: 1 addition & 0 deletions test/fixtures/wpt/WebCryptoAPI/modern-algos/META.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
spec: https://wicg.github.io/webcrypto-modern-algos/
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// META: title=WebCryptoAPI: deriveBits() Using Argon2
// META: timeout=long
// META: script=../util/helpers.js
// META: script=../../util/helpers.js
// META: script=/common/subset-tests.js
// META: script=argon2_vectors.js
// META: script=argon2.js
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// META: title=WebCryptoAPI: digest() cSHAKE algorithms
// META: script=../util/helpers.js
// META: script=digest_test_data.js
// META: script=digest.js
// META: script=../../util/helpers.js
// META: script=../../digest/digest_test_data.js
// META: script=../../digest/digest.js
// META: timeout=long

var subtle = crypto.subtle; // Change to test prefixed implementations
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// META: title=WebCryptoAPI: digest() KangarooTwelve algorithms
// META: script=../util/helpers.js
// META: script=../../util/helpers.js
// META: script=xof_digest.js
// META: timeout=long

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// META: title=WebCryptoAPI: digest() SHA-3 algorithms
// META: script=../util/helpers.js
// META: script=digest_test_data.js
// META: script=digest.js
// META: script=../../util/helpers.js
// META: script=../../digest/digest_test_data.js
// META: script=../../digest/digest.js
// META: timeout=long

var subtle = crypto.subtle; // Change to test prefixed implementations
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// META: title=WebCryptoAPI: digest() TurboSHAKE algorithms
// META: script=../util/helpers.js
// META: script=../../util/helpers.js
// META: script=xof_digest.js
// META: timeout=long

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// META: title=WebCryptoAPI: KEM encapsulateBits() and decapsulateBits() tests
// META: script=../util/helpers.js
// META: script=../../util/helpers.js
// META: script=ml_kem_vectors.js
// META: script=hybrid_kem_vectors.js
// META: timeout=long
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// META: title=WebCryptoAPI: KEM encapsulateKey() and decapsulateKey() tests
// META: script=../util/helpers.js
// META: script=../../util/helpers.js
// META: script=ml_kem_vectors.js
// META: script=hybrid_kem_vectors.js
// META: timeout=long
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
// META: title=WebCryptoAPI: encrypt() Using AES-OCB w/ 120-bit iv
// META: script=../util/helpers.js
// META: script=aes_common_fixtures.js
// META: script=../../util/helpers.js
// META: script=../../encrypt_decrypt/aes_common_fixtures.js
// META: script=aes_ocb_fixtures.js
// META: script=aes_ocb_vectors.js
// META: script=aes.js
// META: script=../../encrypt_decrypt/aes.js
// META: timeout=long

run_test();
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// META: title=WebCryptoAPI: encrypt()/decrypt() ChaCha20-Poly1305
// META: timeout=long
// META: script=../util/helpers.js
// META: script=../../util/helpers.js

var subtle = crypto.subtle; // Change to test prefixed implementations

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
// META: title=WebCryptoAPI: generateKey() for Failures
// META: timeout=long
// META: script=../../util/helpers.js
// META: script=../../generateKey/algorithm_registry.js
// META: script=../../generateKey/failures.js
run_test(["AES-OCB"]);
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// META: title=WebCryptoAPI: generateKey() for Failures
// META: timeout=long
// META: script=../util/helpers.js
// META: script=algorithm_registry.js
// META: script=failures.js
// META: script=../../util/helpers.js
// META: script=../../generateKey/algorithm_registry.js
// META: script=../../generateKey/failures.js
run_test(["MLKEM768-P256", "MLKEM768-X25519", "MLKEM1024-P384"]);
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
// META: title=WebCryptoAPI: generateKey() for Failures
// META: timeout=long
// META: script=../../util/helpers.js
// META: script=../../generateKey/algorithm_registry.js
// META: script=../../generateKey/failures.js
run_test(["ML-DSA-44", "ML-DSA-65", "ML-DSA-87"]);
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
// META: title=WebCryptoAPI: generateKey() for Failures
// META: timeout=long
// META: script=../../util/helpers.js
// META: script=../../generateKey/algorithm_registry.js
// META: script=../../generateKey/failures.js
run_test(["ML-KEM-512", "ML-KEM-768", "ML-KEM-1024"]);
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
// META: title=WebCryptoAPI: generateKey() for Failures
// META: timeout=long
// META: script=../../util/helpers.js
// META: script=../../generateKey/algorithm_registry.js
// META: script=../../generateKey/failures.js
run_test(["ChaCha20-Poly1305"]);
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
// META: title=WebCryptoAPI: generateKey() for Failures
// META: timeout=long
// META: script=../../util/helpers.js
// META: script=../../generateKey/algorithm_registry.js
// META: script=../../generateKey/failures.js
run_test(["KMAC128", "KMAC256"]);
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// META: title=WebCryptoAPI: generateKey() Successful Calls
// META: timeout=long
// META: script=../util/helpers.js
// META: script=../../util/helpers.js
// META: script=/common/subset-tests.js
// META: script=algorithm_registry.js
// META: script=successes.js
// META: script=../../generateKey/algorithm_registry.js
// META: script=../../generateKey/successes.js
run_test(["AES-OCB"]);
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// META: title=WebCryptoAPI: generateKey() Successful Calls
// META: timeout=long
// META: script=../util/helpers.js
// META: script=../../util/helpers.js
// META: script=/common/subset-tests.js
// META: script=algorithm_registry.js
// META: script=successes.js
// META: script=../../generateKey/algorithm_registry.js
// META: script=../../generateKey/successes.js
run_test(["MLKEM768-P256", "MLKEM768-X25519", "MLKEM1024-P384"]);
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// META: title=WebCryptoAPI: generateKey() Successful Calls
// META: timeout=long
// META: script=../util/helpers.js
// META: script=../../util/helpers.js
// META: script=/common/subset-tests.js
// META: script=algorithm_registry.js
// META: script=successes.js
// META: script=../../generateKey/algorithm_registry.js
// META: script=../../generateKey/successes.js
run_test(["ML-DSA-44", "ML-DSA-65", "ML-DSA-87"]);
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// META: title=WebCryptoAPI: generateKey() Successful Calls
// META: timeout=long
// META: script=../util/helpers.js
// META: script=../../util/helpers.js
// META: script=/common/subset-tests.js
// META: script=algorithm_registry.js
// META: script=successes.js
// META: script=../../generateKey/algorithm_registry.js
// META: script=../../generateKey/successes.js
run_test(["ML-KEM-512", "ML-KEM-768", "ML-KEM-1024"]);
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// META: title=WebCryptoAPI: generateKey() Successful Calls
// META: timeout=long
// META: script=../util/helpers.js
// META: script=../../util/helpers.js
// META: script=/common/subset-tests.js
// META: script=algorithm_registry.js
// META: script=successes.js
// META: script=../../generateKey/algorithm_registry.js
// META: script=../../generateKey/successes.js
run_test(["ChaCha20-Poly1305"]);
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// META: title=WebCryptoAPI: generateKey() Successful Calls
// META: timeout=long
// META: script=../util/helpers.js
// META: script=../../util/helpers.js
// META: script=/common/subset-tests.js
// META: script=algorithm_registry.js
// META: script=successes.js
// META: script=../../generateKey/algorithm_registry.js
// META: script=../../generateKey/successes.js
run_test(["KMAC128", "KMAC256"]);
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// META: title=WebCryptoAPI: getPublicKey() method
// META: timeout=long
// META: script=util/helpers.js
// META: script=../util/helpers.js

"use strict";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,11 @@
// META: script=/resources/idlharness.js
// META: timeout=long

// https://wicg.github.io/webcrypto-secure-curves/
// https://wicg.github.io/webcrypto-modern-algos/

idl_test(
['webcrypto', 'webcrypto-secure-curves', 'webcrypto-modern-algos'],
['html', 'dom'],
['webcrypto-modern-algos'],
['webcrypto', 'html', 'dom'],
idl_array => {
idl_array.add_objects({
Crypto: ['crypto'],
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// META: title=WebCryptoAPI: importKey() for symmetric keys
// META: timeout=long
// META: script=../util/helpers.js
// META: script=symmetric_importKey.js
// META: script=../../util/helpers.js
// META: script=../../import_export/symmetric_importKey.js

runTests("AES-OCB");
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// META: title=WebCryptoAPI: importKey() for symmetric keys
// META: timeout=long
// META: script=../util/helpers.js
// META: script=symmetric_importKey.js
// META: script=../../util/helpers.js
// META: script=../../import_export/symmetric_importKey.js

runTests("Argon2i");
runTests("Argon2d");
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// META: title=WebCryptoAPI: importKey() for symmetric keys
// META: timeout=long
// META: script=../util/helpers.js
// META: script=symmetric_importKey.js
// META: script=../../util/helpers.js
// META: script=../../import_export/symmetric_importKey.js

runTests("ChaCha20-Poly1305");
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// META: title=WebCryptoAPI: importKey() for Hybrid KEM keys
// META: timeout=long
// META: script=../util/helpers.js
// META: script=../../util/helpers.js
// META: script=Hybrid-KEM_importKey_fixtures.js
// META: script=ml_importKey.js

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// META: title=WebCryptoAPI: importKey() for symmetric keys
// META: timeout=long
// META: script=../util/helpers.js
// META: script=symmetric_importKey.js
// META: script=../../util/helpers.js
// META: script=../../import_export/symmetric_importKey.js

runTests("KMAC128");
runTests("KMAC256");
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// META: title=WebCryptoAPI: importKey() for ML-DSA keys
// META: timeout=long
// META: script=../util/helpers.js
// META: script=../../util/helpers.js
// META: script=../util/mldsa_key_fixtures.js
// META: script=ML-DSA_importKey_fixtures.js
// META: script=ml_importKey.js
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// META: title=WebCryptoAPI: importKey() for ML-KEM keys
// META: timeout=long
// META: script=../util/helpers.js
// META: script=../../util/helpers.js
// META: script=ML-KEM_importKey_fixtures.js
// META: script=ml_importKey.js

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// META: title=WebCryptoAPI: raw-secret and raw-public importKey() format aliases
// META: timeout=long
// META: script=../util/helpers.js
// META: script=../../util/helpers.js

// For all existing symmetric algorithms in WebCrypto, "raw-secret" acts as an
// alias of "raw". For all existing asymmetric algorithms in WebCrypto,
Expand Down
Loading
Loading