Automatic update from web-platform-tests
[WebCryptoAPI] Split EdDSA small order point tests into separate file (#47797)
--
wpt-commits: 6748a0a24614b01ce6527493a19ef846738bee3a
wpt-pr: 47797
Automatic update from web-platform-tests
Test `crypto.getRandomValues` using subclasses of `ArrayBufferView`s (#47778)
--
wpt-commits: 2f30517e7efd7cab3b283c8aeb98f7f50149e207
wpt-pr: 47778
Automatic update from web-platform-tests
Test the behavior of deriveBits with extreme length values (#43400)
The PR#345 to the WebCrypto API spec resolves an inconsistency
on the 'length' parameter in the deriveBits operations of several
algorithms, such as ECDH, HKDF, PBKDF2 or X25519.
These cange adds a few tests to evaluate the behavior of these algorithms
with extreme values, like 0, null or undefined.
--
wpt-commits: 4993c18fa4e51a82e3e2bfbe4f2d223bbb74f4cc
wpt-pr: 43400
Automatic update from web-platform-tests
Correctly reject promise if failed to normalize algorithm
We used to leave the promise returned by crypto.subtle.importKey and some other crypto methods in an unsettled state in case the method failed with unsupported algorithm, which has been caught by a recently introduced DCHECK().
This fixes the invariant, along with bringing this and other crypto methods to spec compliance: an unsupported algorithm is generally
supposed to cause promise rejection rather than synchronous exception
according to https://w3c.github.io/webcrypto/:
> If an error occurred, return a Promise rejected with normalizedAlgorithm.
Bug: 349877609
Change-Id: I72288a3fe084a2bf2ed2b30a4d01d41a4f0fa571
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5668545
Commit-Queue: Andrey Kosyakov <[email protected]>
Reviewed-by: Dmitry Gozman <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1321728}
--
wpt-commits: 82f4f7d37c29e98c90da648365a5efb96a8dddcf
wpt-pr: 46946
Automatic update from web-platform-tests
Update tests which are generic across all TypedArrays for Float16Array
For https://github.com/whatwg/webidl/pull/1398.
--
wpt-commits: 5aa50dd4151b5bc1d04d5505366c6e27df30af5b
wpt-pr: 45483
Automatic update from web-platform-tests
Fix Ed25519 small order tests (#44720)
Use the `verified` field of the test vectors, instead of assuming all
test vectors should fail to verify.
--
wpt-commits: 461d00368c4b46de5f2e3c12e976999cab54e581
wpt-pr: 44720
Automatic update from web-platform-tests
Test Ed25519 with small- and mixed-order points (#43751)
Add tests to ensure that the Ed25519 Verify implementation performs
checks for small-order keys and signature's point R.
Additionally, add tests for mixed-order points, and check that the
cofactorless (unbatched) verification equation is used, as required
by the latest draft.
--
wpt-commits: 0926ff577d9bf675024588efb0925b0f478d299d
wpt-pr: 43751
Automatic update from web-platform-tests
Fenced frames: Make same-origin fenced frame redaction check consistent
Fix at least one potential cause of a BadMessage where renderer's view
of "same-origin to mapped url" and browser's view of "same-origin to
mapped url" differ.
The origin to be committed is not necessarily the origin of the url to
be committed, e.g. for sandboxed iframes. All our browser-side checks
are with respect to the last committed origin, so we should use the
origin to be committed when redacting fenced frame properties for the
renderer.
Bug: 1515202, 1508030
Change-Id: I4e1bfde4c0bab7c88a93ae0f01d8568ead3fdc18
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5165532
Reviewed-by: Alex Moshchuk <[email protected]>
Reviewed-by: Dominic Farolino <[email protected]>
Commit-Queue: Garrett Tanzer <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1244665}
--
wpt-commits: 044dab08dd244a5ff9836d13d9baff4b596ac8f8
wpt-pr: 43868
Automatic update from web-platform-tests
WebCryptoAPI: add a test for any ECDH importKey JWK alg (#43110)
--
wpt-commits: 0a3f2e840cf62c44f5b0961dacc6df7e2f0bf071
wpt-pr: 43110
Automatic update from web-platform-tests
WebCryptoAPI: check that EdDSA and HMAC signatures match expected value (#42292)
--
wpt-commits: 3c6d898df6b6e806ae038f017eab564c6495813c
wpt-pr: 42292
Automatic update from web-platform-tests
WebCryptoAPI: use all public usages combinations for import tests (#41771)
--
wpt-commits: f4e7e32fd0d4937f5b024602c6bf665ebeb1fa17
wpt-pr: 41771
Automatic update from web-platform-tests
WebCryptoAPI: refactor small order tests (#39053)
--
wpt-commits: 188993d46b95c9c0414ba2cef8751f5e19d3d498
wpt-pr: 39053
Automatic update from web-platform-tests
Initial implementation of the X25519 algorithm
This CL implements the DeriveBits and import/export operations
for the X25519 algorithms (spki, pkcs, raw and jwk).
Additionally, it adds the new algorithm in the registry and implements
its normalization, which is quite simple due to the lack of parameters.
The feature is implemented behind the WebCryptoCurve25519 runtime flag
for now. See the intent-to-prototype request [1] for details.
[1] https://groups.google.com/a/chromium.org/g/blink-dev/c/n0uKIqfypW0/m/xu5UBbaBAwAJ
Bug: 1370697
Change-Id: Ibad2a728a5b25b40c130e4da270747104ae056ab
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4016576
Reviewed-by: Jeremy Roman <[email protected]>
Reviewed-by: Daniel Cheng <[email protected]>
Reviewed-by: David Benjamin <[email protected]>
Commit-Queue: Javier Fernandez <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1118402}
--
wpt-commits: 1406b5c0d07b5e8dd08e328c451e42c23f3b96c8
wpt-pr: 37063
Automatic update from web-platform-tests
WebCryptoAPI: extend AES-GCM and ECDSA tests, and test key properties after unwrapping (#38827)
- Test AES-GCM both with 96 bit and 128 bit IV lengths
- Extend ECDSA invalid test vectors
- Use assert_goodCryptoKey to test the key properties after unwrapping
- Avoid unsupported failures during key imports for wrapping
- Use common IV length for AES-GCM wrapping & unwrapping
--
wpt-commits: ee30029d47cf9f7cf8f71fe851b4c29903edf851
wpt-pr: 38827
Automatic update from web-platform-tests
WebCryptoAPI: reuse assert_goodCryptoKey in import tests (#38518)
This tests that imported keys have the correct properties.
--
wpt-commits: 238d9d9bac54d4f1ae8844fc8dd4389b1ad99b4e
wpt-pr: 38518
Automatic update from web-platform-tests
WebCryptoAPI: test that Secure Curves have no namedCurve property (#38516)
--
wpt-commits: ffc5a2487d753a8cee094486293987c93fc90dc2
wpt-pr: 38516
Automatic update from web-platform-tests
WebCryptoAPI: reuse assert_goodCryptoKey in import tests (#38518)
This tests that imported keys have the correct properties.
--
wpt-commits: 238d9d9bac54d4f1ae8844fc8dd4389b1ad99b4e
wpt-pr: 38518
Automatic update from web-platform-tests
WebCryptoAPI: test that Secure Curves have no namedCurve property (#38516)
--
wpt-commits: ffc5a2487d753a8cee094486293987c93fc90dc2
wpt-pr: 38516
Automatic update from web-platform-tests
WebCryptoAPI: test verifying RSA-PSS signatures with wrong saltLength (#38367)
Adds a test which checks that when verifying an RSA-PSS signature with a
different saltLength than the one used to sign, the verification fails.
--
wpt-commits: 3e863c134cbcab2b9a0f4c4de4e9da0d5a23ffb2
wpt-pr: 38367
Automatic update from web-platform-tests
WebCryptoAPI: test remaining CFRG algorithms in wrapKey and unwrapKey (#38247)
Add tests for wrapping and unwrapping X25519, X448, and Ed448 keys.
These tests do not add new failures unless the algorithm is supported.
The results have been verified in Node.js where all four algorithms
from https://wicg.github.io/webcrypto-secure-curves/ are supported.
Also, work around an instability issue by always generating the same set
of tests, and skipping cases where key wrapping is impossible.
--
wpt-commits: 47b53fe644523c83bbe7c29caa16831b9244686d
wpt-pr: 38247
Automatic update from web-platform-tests
WebCryptoAPI: check that CryptoKey instances have the expected Symbol.toStringTag (#37716)
--
wpt-commits: 450f829d2567ed9c44bd9b10f7e8f34a2ad15315
wpt-pr: 37716
Automatic update from web-platform-tests
WebCryptoAPI: remove test for OperationError for tagLength 256 (#37734)
Because `tagLength` is defined as `[EnforceRange] octet tagLength;` 256
is out of range for an `octet` and the WebIDL behavior is to throw a
TypeError because of EnforceRange, this test checks for OperationError
from https://w3c.github.io/webcrypto/#aes-gcm-operations 1.4.otherwise.
Remove 256 from the list so that it only contains invalid values from
within the `octet` allowed range.
--
wpt-commits: a976727425d0ddbf28f877224d9361ac644df33b
wpt-pr: 37734
Automatic update from web-platform-tests
WebCryptoAPI: add EC public key raw and spki import vectors (#37319)
--
wpt-commits: 84456654f439f236f3470a36601ecbc4365f50c5
wpt-pr: 37319
Automatic update from web-platform-tests
Additional tests to ensure Ed25519 keys are valid
Most of the test we have for the Ed25519 algorithm's operations rely on
the import / export API to manage the keys. We have specific tests for
the generateKey API, but we don't verify the obtained keys are correct
to be used in the algorithm's operations.
The new tests ensure that keys created using the generateKey API are
valid for the 'sign' and 'verify' operations.
Bug: 1370697
Change-Id: I0499ff809fee295e14b5e699f93cbe4619fb88eb
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4031830
Commit-Queue: Javier Fernandez <[email protected]>
Reviewed-by: David Benjamin <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1074283}
--
wpt-commits: e40bcdf29002522fbf04e70f7dfd79f0e232dc13
wpt-pr: 37021
Automatic update from web-platform-tests
Adding import / export in raw and jwk format in Ed25519
This CL adds the import and export operations for the Ed25519 algorithm
for both, raw and JWK formats.
It also adapts some test expectations, since several test cases pass
thanks to this change.
Bug: 1370697
Change-Id: I1ecee4f26e7da92ddad7998edfb45bd8751e6669
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3967976
Commit-Queue: Javier Fernandez <[email protected]>
Reviewed-by: David Benjamin <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1072295}
--
wpt-commits: d7b5950b1844c9f33a6172d7f40c0fb4794dc809
wpt-pr: 36752
Automatic update from web-platform-tests
Migrate WebCrypto ecdsa.json tests to WPT
ecdsa.json contains:
- A handful of ECDSA tests across curves and hash algorithms
- JWT and SPKI importers
- Some specially crafted invalid signatures
Of these, the first two seem to be redundant with WPT tests. The third
one is unique; WPT's current negative tests are just made by modifying
successful inputs.
I've just removed the first two (we can rely on BoringSSL tests for
fine-grained algorithm tests, WebCrypto just needs to test the general
API and plumbing) and upstreamed the third.
While I'm here, I've also updated rsa.js to check signature output
equality for deterministic algorithms. This is a slightly stronger check
than just checking two signatures give the same output. (Our unit tests
check the latter.)
Bug: 375569
Change-Id: Ida998dfc668084adaf2c596013ea7ec62756ce78
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3982905
Auto-Submit: David Benjamin <[email protected]>
Reviewed-by: Jeremy Roman <[email protected]>
Reviewed-by: Elly Fong-Jones <[email protected]>
Commit-Queue: David Benjamin <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1064642}
--
wpt-commits: e80bfdf737bbd4179b4253a43a412fdda5775469
wpt-pr: 36676
Automatic update from web-platform-tests
fix(WebCryptoAPI): remove unhandled rejections (#36249)
* fix(WebCryptoAPI): remove unhandled rejections
* fix(WebCryptoAPI): allow test to run when some algs are not supported
--
wpt-commits: 9978756397acdf900df364f3732c1f8bf13c35b0
wpt-pr: 36249
Automatic update from web-platform-tests
Add additional tests for CFRG curves in Web Crypto (#34434)
Add additional test vectors for https://wicg.github.io/webcrypto-secure-curves/.
--
wpt-commits: edca84af42bd7e84da94e63b322fe343191842d2
wpt-pr: 34434
Automatic update from web-platform-tests
Add tests for CFRG curves in Web Crypto (#34399)
Add initial test vectors for https://wicg.github.io/webcrypto-secure-curves/.
--
wpt-commits: a8003c2cd79f2eea5ca180229dc12e2617147110
wpt-pr: 34399
Automatic update from web-platform-tests
Handle the context getting discarded in NormalizeAlgorithm
The WebCrypto result machinery tracks when the context was discarded
to cancel the operation, if still pending. However, that logic did not
correctly account for the context being discarded before the task is
posted:
- CryptoResultImpl::Resolver DCHECKs that the context is valid when
it is created. As far as I can tell, that DCHECK isn't necessary?
- If CryptoResultImpl::Cancel is called before calling
CryptoResultImpl::Result, the cancel flag is null, which breaks
WebCryptoResult's DCHECKs and null pointer derefs later in release
code.
Instead, remove the DCHECK and retain the cancel flag in CryptoResultImpl
so WebCryptoResult can observe cancelation in either order.
These two changes fix the crashes. This CL additionally makes
webcrypto_impl.cc check for cancellation before posting the task. This
isn't strictly necessary, but avoids a pointless thread hop.
Bug: 1324846
Change-Id: Idd8f2174f438fc3bfb5ffd140b9983d5b6b8039d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3664759
Reviewed-by: Elly Fong-Jones <[email protected]>
Reviewed-by: Daniel Cheng <[email protected]>
Commit-Queue: David Benjamin <[email protected]>
Reviewed-by: Yuki Shiino <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1008433}
--
wpt-commits: 335c36d606c02daa4a35bd073d8c0bbd96a2fad3
wpt-pr: 34191
Automatic update from web-platform-tests
Make WebCryptoAPI/getRandomValues test more strict (#32397)
- Test that passing `DataView`s is prohibited
- Adjust amount of floats needed to exceed quota
--
wpt-commits: 52fd03afa76e0319178cb7b5fb6f02ebca08c850
wpt-pr: 32397
Automatic update from web-platform-tests
Make crypto.randomUUID regexp test more strict (#30119)
Previously this test passed with UUIDs that mistakenly had prefixes/suffixes.
--
wpt-commits: 9bdea1cdcffa45d9a8d5ac34693272651e7efe8d
wpt-pr: 30119
Automatic update from web-platform-tests
webcrypto: merge tentative BigInt test into main (#29713)
--
wpt-commits: cdd0f03df41b222aed098fbbb11c6a3cc500a86b
wpt-pr: 29713