Tete17
7ac6aecef0
LibWeb: Implement decapsulation for ML-KEM algorithms
2026-01-06 01:06:06 +01:00
Tete17
140bbe50ab
LibWeb: Extend decapsulate(Key|Bits) methods to pass the key
...
This is mandated by the spec but since no algorithm supported this
method, yet we didn't notice it was missing.
2026-01-06 01:06:06 +01:00
Tete17
56804e7930
LibWeb: Support the exporting of ml-kem keys in spki format
2026-01-06 01:06:06 +01:00
Tete17
86e9765fe7
LibWeb: Pass the correct algorithms parameters when importing shared key
...
During decapsulate we were passing the parameters for decapsulate
instead of the ones for the shared key.
2026-01-06 01:06:06 +01:00
Tete17
94410298f3
LibWeb: Implement Derive Bits for Argon2 algorithm
2026-01-04 15:56:54 +01:00
Tete17
2cc71e6437
LibWeb: Support the importing for Argon2 keys
2026-01-04 15:56:54 +01:00
Tete17
ebd0874fb5
LibWeb: Implement Get Key Length for Argon2 algorithm
2026-01-04 15:56:54 +01:00
Tete17
1e6b5a6f81
LibWeb: Set the extractable and usages fields of the generated key
...
This was a spec bug updated in
https://github.com/WICG/webcrypto-modern-algos/pull/39
2025-12-30 14:16:35 +01:00
Tete17
a414819dd6
LibWeb: Support the importing of ml-kem keys in spki format
2025-12-30 14:16:35 +01:00
Tete17
6350b063ab
LibWeb: Implement encapsulation for ML-KEM algorithms
2025-12-30 14:16:35 +01:00
Tete17
013cf34d1b
LibWeb: Implement key generation for ML-KEM algorithms
2025-12-30 14:16:35 +01:00
Tete17
336929c5a3
LibWeb: Add TemporaryExecutionContext to encapsulate/decapsulate methods
...
Some operations like retrieving the algorithm name require it.
2025-12-30 14:16:35 +01:00
Tete17
ec67f0ae8d
LibWeb: Change return type of encapsulate for AlgorithmMethods
...
The standard ask to turn EncapsulatedBits into an ECMAScript Object
which means it must initially live in the host stack.
2025-12-30 14:16:35 +01:00
Tete17
63c99f3703
LibWeb: Correctly check the usage of the encapsulation key
2025-12-30 14:16:35 +01:00
Tete17
fdb01e7f93
LibWeb: Add the Crypto task source
...
This is used by the spec to queue tasks to resolve or reject promises
created in response to calls to methods of SubtleCrypto.
2025-12-28 18:56:50 +01:00
Tete17
305e9c1b0f
LibWeb: Implement decapsulateBits for SubtleCrypto
2025-12-28 18:56:50 +01:00
Tete17
c9b8b4557d
LibWeb: Implement decapsulateKey for SubtleCrypto
2025-12-28 18:56:50 +01:00
Tete17
f13c0fb317
LibWeb: Support the exporting of ml-dsa keys in spki format
2025-12-10 21:26:06 +01:00
Tete17
7a9ed4ba71
LibWeb: Support the importing of ml-dsa keys in spki format
2025-12-10 21:26:06 +01:00
Tete17
e596572085
LibWeb: Implement verify for ML-DSA algorithm
2025-12-10 21:26:06 +01:00
Tete17
ef0205ec86
LibWeb: Implement message signing for ML-DSA algorithm
2025-12-10 21:26:06 +01:00
Tete17
a9ade1c238
LibWeb: Implement key generation for ML-DSA algorithms
2025-12-10 21:26:06 +01:00
Tete17
6c143049b3
LibWeb: Fix typo in spec url
2025-12-10 21:26:06 +01:00
Tete17
c790de24dd
LibWeb: Implement encapsulateBits method for SubtleCrypto
...
None of the current algorithms supports the method but the future
post quantum algorithms will do so.
2025-11-27 21:50:06 +01:00
Tete17
b36a702ad1
LibWeb: Implement encapsulateKey method for SubtleCrypto
...
None of the current algorithms supports the method but the future
post quantum algorithms will do so.
2025-11-27 21:50:06 +01:00
Tete17
1d6a64b26c
LibWeb: Update the Key Usage enum to adapt for PostQuantum Algorithms
2025-11-27 21:50:06 +01:00
Tete17
5e736d4e07
LibWeb: Expose SHA3 hashing algorithm through WebCryptoAPI
...
This give us 48 WPT subtests :)
2025-11-26 22:01:00 -05:00
Timothy Flynn
70db474cf0
LibJS+LibWeb: Port interned bytecode strings to UTF-16
...
This was almost a no-op, except we intern JS exception messages. So the
bulk of this patch is porting exception messages to UTF-16.
2025-08-14 10:27:08 +02:00
Timothy Flynn
0efa98a57a
LibJS+LibWeb+WebContent: Port JS::PropertyKey to UTF-16
...
This has quite a lot of fall out. But the majority of it is just type or
UDL substitution, where the changes just fall through to other function
calls.
By changing property key storage to UTF-16, the main affected areas are:
* NativeFunction names must now be UTF-16
* Bytecode identifiers must now be UTF-16
* Module/binding names must now be UTF-16
2025-08-05 07:07:15 -04:00
Andreas Kling
a6dfc74e93
LibWeb: Only set prototype once for object with IDL interface
...
Before this change, we were going through the chain of base classes for
each IDL interface object and having them set the prototype to their
prototype.
Instead of doing that, reorder things so that we set the right prototype
immediately in Foo::initialize(), and then don't bother in all the base
class overrides.
This knocks off a ~1% profile item on Speedometer 3.
2025-04-20 18:43:11 +02:00
Andreas Kling
938b1e91fe
LibJS: Inline the fast path of Value::to_i32() and simplify to_u32()
...
The fast path of to_i32() can be neatly inlined everywhere, and we still
have to_i32_slow_case() for non-trivial conversions.
For to_u32(), it really can just be implemented as a static cast to i32!
2025-04-09 22:06:49 +02:00
Andreas Kling
de424d6879
LibJS: Make Completion.[[Value]] non-optional
...
Instead, just use js_undefined() whenever the [[Value]] field is unused.
This avoids a whole bunch of presence checks.
2025-04-05 11:20:26 +02:00
Andreas Kling
53da8893ac
LibJS: Replace PropertyKey(char[]) with PropertyKey(FlyString)
...
...and deal with the fallout.
2025-03-24 22:27:17 +00:00
Andreas Kling
d7908dbff5
LibJS: Change PropertyKey(ByteString) to PropertyKey(String)
...
...and deal with the fallout.
2025-03-24 22:27:17 +00:00
devgianlu
718d338d68
LibWeb: Remove useless JS::ThrowCompletionOr return types
...
All `SubtleCrypto` methods except `import_key` do not require
`JS::ThrowCompletionOr` as they return only rejected promises.
2025-02-12 00:40:17 +01:00
Timothy Flynn
85b424464a
AK+Everywhere: Rename verify_cast to as
...
Follow-up to fc20e61e72 .
2025-01-21 11:34:06 -05:00
devgianlu
999f456ba4
LibWeb: Support RSASSA-PKCS1-v1_5 in WebCryptoAPI
2025-01-17 12:43:03 +01:00
devgianlu
e05ee9d297
LibWeb: Support RSA-PSS in WebCryptoAPI
2025-01-17 12:43:03 +01:00
devgianlu
b9ba1b3f72
LibWeb: Add Ed448 support in WebCryptoAPI
...
Add full support for Ed448 and import relevant tests.
2025-01-11 11:13:06 +01:00
devgianlu
4b87467fc2
LibWeb: Update SubtleCrypto IDL according to latest spec
...
I suppose the IDL definition for `deriveBits` changed to make the
last parameter optional.
2024-12-18 13:18:40 +01:00
devgianlu
94374f0d19
LibWeb: Implement AES-KW in WebCryptoAPI
...
Add support for AES-KW for key wrapping/unwrapping. Very similar
implementation to other AES modes.
Added generic tests for symmetric import and specific AES-KW ones.
Adds ~400 test passes on WPT. Now we do better than Firefox in
`WebCryptoAPI/wrapKey_unwrapKey`!
2024-12-17 11:00:14 +01:00
devgianlu
584cbcf3ef
LibWeb: Implement wrapKey and unwrapKey methods
...
This implements the last WebCryptoAPI methods `wrapKey` and `unwrapKey`.
Most of the functionality is already there because they rely on
`encrypt` and `decrypt`. The only test failures are for `AES-GCM` which
is not implemented yet.
2024-12-16 11:35:00 +01:00
Jelle Raaijmakers
1514197e36
LibWeb: Remove dom_ from dom_exception_to_throw_completion
...
We're not converting `WebIDL::DOMException`, but `WebIDL::Exception`
instead.
2024-12-09 20:02:51 -07:00
devgianlu
f0fbd50c66
LibWeb: Implement ECDSA.importKey and ECDSA.exportKey
...
Very similar implementation to ECDH. Fixes ~700 tests!
2024-12-03 13:20:51 +01:00
devgianlu
46e724729c
LibWeb: Match algorithm names case-insensitive
...
I dug through the code and the WebCryptoAPI spec to figure out the
reason for `... mixed case parameters` WPT tests and figured out that
our implementation was slightly wrong.
By being closer to the spec we can now pass those tests and also remove
a bunch of duplicated code.
Context: https://github.com/LadybirdBrowser/ladybird/pull/2598#discussion_r1859263798
2024-11-28 00:21:49 +01:00
devgianlu
6ebc812035
LibWeb: Rename EcdhKeyDerivePrams to EcdhKeyDeriveParams
2024-11-28 00:21:49 +01:00
devgianlu
6fa53a4382
LibWeb: Implement ECDH.exportKey
2024-11-27 10:59:48 +01:00
devgianlu
228276a383
LibWeb: Implement ECDH.importKey
2024-11-27 10:59:48 +01:00
devgianlu
e6056ab959
LibWeb: Implement ECDH.deriveBits
2024-11-27 10:59:48 +01:00
Andreas Kling
d625e12082
LibWeb: Implement the deriveBits algorithm for X448
2024-11-25 17:16:51 +01:00