Timothy Flynn
93712b24bf
Everywhere: Hoist the Libraries folder to the top-level
2024-11-10 12:50:45 +01:00
rmg-x
0db171c36e
LibWeb/Crypto: Fix sizes being passed into generate_aes_key()
...
Previously, callers were passing the size in bytes, but the method
expected bits. This caused a crash in LibCrypto when verifying the key
size later on.
Also make the naming of local variables and parameters a little more
clear between the different AES algorithms :^)
2024-11-03 21:55:43 +01:00
stelar7
171af8de33
LibWeb: Implement AES-GCM.generateKey
2024-10-31 23:33:56 +01:00
stelar7
196d99352a
LibWeb: Stub out AES-GCM.decrypt
2024-10-31 23:33:56 +01:00
stelar7
2672acf9c4
LibWeb: Stub out AES-GCM.encrypt
2024-10-31 23:33:56 +01:00
stelar7
3dd80d2a6e
LibWeb: Implement AES-GCM.exportKey
2024-10-31 23:33:56 +01:00
stelar7
e53b3f5fb1
LibWeb: Implement AES-GCM.importKey
2024-10-31 23:33:56 +01:00
stelar7
80d37a6def
LibWeb: Implement AES-GCM.getKeyLength
2024-10-31 23:33:56 +01:00
stelar7
f9b511a7d6
LibWeb: Implement X25519.exportKey
2024-10-31 09:52:24 +01:00
stelar7
b281fa2b24
LibWeb: Implement X25519.importKey
2024-10-31 09:52:24 +01:00
stelar7
944f00c489
LibWeb: Implement X25519.generateKey
2024-10-31 09:52:24 +01:00
stelar7
8c5e5adc8a
LibWeb: Implement X25519.deriveBits
2024-10-31 09:52:24 +01:00
stelar7
af3383df09
LibWeb: Implement AES-CTR.decrypt
2024-10-31 08:15:00 +01:00
stelar7
74403d7f1e
LibWeb: Implement AES-CTR.encrypt
2024-10-31 08:15:00 +01:00
stelar7
55ef1c758a
LibWeb: Implement AES-CTR.generateKey
2024-10-31 08:15:00 +01:00
stelar7
4b2120d919
LibWeb: Implement AES-CTR.exportKey
2024-10-31 08:15:00 +01:00
stelar7
030cbef532
LibWeb: Implement AES-CTR.getKeyLength
2024-10-31 08:15:00 +01:00
stelar7
0864436383
LibWeb: Implement AES-CTR.importKey
2024-10-31 08:15:00 +01:00
Ben Wiederhake
3553861046
LibWeb: Omit padding in WebCrypto AES-CBC exportKey
2024-10-28 21:15:59 +01:00
stelar7
37f2818e90
LibWeb: Fix modulus length being wrong for RSA-OAEP key import
2024-10-27 11:26:12 +01:00
stelar7
23fc04d264
LibWeb: Implement RSAOAEP.decrypt()
2024-10-27 11:26:12 +01:00
stelar7
3b423f1852
LibWeb: Add and use new name() helper on HashAlgorithmIdentifier
2024-10-27 11:26:12 +01:00
stelar7
48bd094712
LibWeb: Implement RSAOAEP.encrypt()
2024-10-27 11:26:12 +01:00
Ben Wiederhake
b1056121f2
LibWeb: Implement WebCrypto AES-CBC decrypt operation
...
This lets us pass an additional (roughly) 15 WPT tests:
WebCryptoAPI/encrypt_decrypt/aes_cbc.https.any
2024-10-26 17:50:22 +02:00
Ben Wiederhake
eb193251b8
LibWeb: Implement WebCrypto AES-CBC encrypt operation
...
This lets us pass an additional (roughly) 20 WPT tests:
WebCryptoAPI/encrypt_decrypt/aes_cbc.https.any
2024-10-26 17:50:22 +02:00
Ben Wiederhake
d86dcac4f7
LibWeb: Implement WebCrypto AES-CBC generateKey operation
...
This is progress towards passing more WPT tests, although none of them
gets green due to this commit.
2024-10-26 17:50:22 +02:00
Ben Wiederhake
9255a1ac2e
LibWeb: Implement WebCrypto AES-CBC exportKey operation
...
This lets us pass an additional (roughly) 40 WPT tests:
WebCryptoAPI/import_export/symmetric_importKey.https.any
2024-10-26 17:50:22 +02:00
Ben Wiederhake
6f88376e24
LibWeb: Implement WebCrypto AES-CBC importKey operation
...
This alone lets us pass around 40 WPT tests:
WebCryptoAPI/import_export/symmetric_importKey.https.any
2024-10-26 17:50:22 +02:00
Ben Wiederhake
124bd115a1
LibWeb: Fix crash when importing malformed RSAOAEP key
...
This fixes a crash in WPT:
WebCryptoAPI/import_export/rsa_importKey.https.any
This allows us to pass 240 tests!
2024-10-26 00:14:42 +02:00
Ben Wiederhake
efad0b5676
LibWeb: Remove dead write in HKDF/PBKDF importKey operation
...
This corresponds to a recent change in the spec:
https://github.com/w3c/webcrypto/pull/379
2024-10-25 23:50:31 +02:00
Ben Wiederhake
ee3b86c3f8
LibWeb: Remove superfluous step in HKDF deriveBits operation
...
This corresponds to a recent change in the spec:
https://github.com/w3c/webcrypto/pull/372
Inspired by the following review comment:
https://github.com/LadybirdBrowser/ladybird/pull/1877#discussion_r1807648283
2024-10-25 23:50:31 +02:00
Ben Wiederhake
6d68d6ddb2
LibWeb: Test subtleties in HKDF 'salt' interpretation
...
This also doubles as HKDF implementation test.
2024-10-23 11:33:58 -06:00
Ben Wiederhake
f670c68ded
LibWeb: Implement and test SubtleCrypto interface for HKDF operations
...
This fixes several hundred if not thousands of WPT tests:
https://wpt.live/WebCryptoAPI/derive_bits_keys/hkdf.https.any.html?1-1000
2024-10-23 11:33:58 -06:00
Ben Wiederhake
6072ae5bae
LibWeb: Simplify WebCrypto accesses to keys
2024-10-23 11:33:58 -06:00
Andreas Kling
175f3febb8
LibWeb: Make DOMException take error message as a String
...
There was no need to use FlyString for error messages, and it just
caused a bunch of churn since these strings typically only existed
during the lifetime of the error.
2024-10-12 21:14:18 +02:00
Asutosh Variar
229b64a4b7
Everywhere: Convert from_string_view -> from_string_literal where static
2024-09-11 10:59:04 +01:00
Dennis Camera
81a0aa5725
LibWeb: Implement CryptoAlgorithms for big-endian
2024-07-10 10:23:26 -06:00
Matthew Olsson
8450041b52
LibWeb: Fix some GCVerifier warnings
2024-04-07 07:03:13 +02:00
stelar7
7c7f01b82f
LibWeb: Add RSAOAEP.exportKey for the pkcs8 format
2024-04-05 21:53:12 +02:00
stelar7
f9dd028119
LibWeb: Add RSAOAEP.exportKey for the spki format
2024-04-05 21:53:12 +02:00
stelar7
9f3c3925e0
LibWeb: Implement skeleton of SubtleCrypto.deriveKey
2024-04-04 21:00:40 +02:00
stelar7
abf55fe33d
LibWeb: Implement PBKDF2 getKeyLength for SubtleCrypto
2024-04-04 21:00:40 +02:00
stelar7
19bb62d60e
LibWeb: Implement PBKDF2 deriveBits for SubtleCrypto
2024-04-04 21:00:40 +02:00
stelar7
35676491ec
LibWeb: Implement ED25519 verify for SubtleCrypto
2024-04-03 13:10:01 -06:00
stelar7
9ad10566b2
LibWeb: Implement ED25519 sign for SubtleCrypto
2024-04-03 13:10:01 -06:00
stelar7
ec015034bd
LibWeb: Implement ED25519 generateKey for SubtleCrypto
2024-04-03 13:10:01 -06:00
stelar7
ae230c9150
LibWeb: Implement most of ECDSA verify for SubtleCrypto
2024-04-03 13:10:01 -06:00
stelar7
bc2a5e24bc
LibWeb: Implement skeleton of ECDSA sign for SubtleCrypto
2024-04-03 13:10:01 -06:00
stelar7
41449814db
LibWeb: Implement generateKey for ECDSA
2024-04-03 13:10:01 -06:00
Andrew Kaster
cddbdf5ae9
LibWeb: Implement skeleton of RSA-OAEP decrypt for SubtleCrypto
...
The actual Crypto algorithm part isn't implemented yet, so we just copy
the ciphertext and claim that's the plaintext :^)
2024-03-25 17:01:23 -06:00