Commit graph

18 commits

Author SHA1 Message Date
Andreas Kling
4a734226aa LibWeb: Implement the exportKey algorithm for X448 2024-11-25 17:16:51 +01:00
Andreas Kling
5a8b0a2610 LibWeb: Implement the generateKey algorithm for X448 2024-11-25 17:16:51 +01:00
devgianlu
506e490793 LibWeb+LibCrypto: Remove OID constants scattered around
Now that `Certificate` has been moved, the OID constants are easily
reachable in `LibCrypto`.
2024-11-25 13:38:38 +01:00
devgianlu
49c388b891 LibTLS+LibWeb+LibCrypto: Move Certificate to LibCrypto
By moving `Certificate` to `LibCrypto` it is possible to reuse a bunch
of code from in `LibCrypto` itself. It also moves some constants
and pieces of code to a more appropriate place than `LibTLS`.

This also makes future work on WebCryptoAPI easier.
2024-11-25 13:38:38 +01:00
devgianlu
fcdcba51f5 LibTLS+LibWeb: Decouple EC parameters from TLS::SupportedGroup
This is in preparation of the next commits to split the changes.
2024-11-25 13:38:38 +01:00
Andreas Kling
ed7b1caba2 LibWeb: Implement the exportKey algorithm for Ed25519 2024-11-24 23:28:23 +01:00
Andreas Kling
4d25369f29 LibWeb: Implement the importKey algorithm for Ed25519 2024-11-24 23:28:23 +01:00
Andreas Kling
8cb371b2ce LibWeb: Decode X25519 keys as base64url + throw on bogus key data
This makes the X25519 importKey tests from WPT actually run.
2024-11-24 23:28:23 +01:00
devgianlu
009f328308 LibWeb: Implement ECDH.generateKey 2024-11-21 11:45:22 +01:00
Shannon Booth
f87041bf3a LibGC+Everywhere: Factor out a LibGC from LibJS
Resulting in a massive rename across almost everywhere! Alongside the
namespace change, we now have the following names:

 * JS::NonnullGCPtr -> GC::Ref
 * JS::GCPtr -> GC::Ptr
 * JS::HeapFunction -> GC::Function
 * JS::CellImpl -> GC::Cell
 * JS::Handle -> GC::Root
2024-11-15 14:49:20 +01:00
Jelle Raaijmakers
f8c853712e LibWeb: Add some missing spec links to Crypto 2024-11-15 12:32:04 +01:00
Jelle Raaijmakers
b290c180e0 LibWeb: Move PBKDF2::import_key() up in the file
Let's try to keep algorithm implementations together. No functional
changes.
2024-11-15 12:32:04 +01:00
stelar7
5b67f17551 LibWeb: Sset the key_usages on X25519 export in a better way 2024-11-14 19:48:06 +01:00
stelar7
19ee8ddec2 LibWeb: Correctly set the key_usages on HMAC export 2024-11-14 19:48:06 +01:00
Jelle Raaijmakers
329cd946ac LibWeb: Implement Web Crypto HMAC algorithm
Some checks are pending
CI / Lagom (false, FUZZ, ubuntu-24.04, Linux, Clang) (push) Waiting to run
CI / Lagom (false, NO_FUZZ, macos-15, macOS, Clang) (push) Waiting to run
CI / Lagom (false, NO_FUZZ, ubuntu-24.04, Linux, GNU) (push) Waiting to run
CI / Lagom (true, NO_FUZZ, ubuntu-24.04, Linux, Clang) (push) Waiting to run
Package the js repl as a binary artifact / build-and-package (macos-14, macOS, macOS-universal2) (push) Waiting to run
Package the js repl as a binary artifact / build-and-package (ubuntu-24.04, Linux, Linux-x86_64) (push) Waiting to run
Run test262 and test-wasm / run_and_update_results (push) Waiting to run
Lint Code / lint (push) Waiting to run
Push notes / build (push) Waiting to run
2024-11-14 11:52:18 +01:00
Jelle Raaijmakers
884a4163a0 LibWeb: Centralize validating a JWK's key_ops field
This gets rid of a couple FIXMEs and allows reusing the logic of
validating this field between different algorithms. While we're here,
expand its logic to match the constraints as outlined in RFC 7517.
2024-11-14 11:52:18 +01:00
Jelle Raaijmakers
f73a434177 LibWeb: Centralize getting the hash algorithm identifier for crypto 2024-11-14 11:52:18 +01:00
Timothy Flynn
93712b24bf Everywhere: Hoist the Libraries folder to the top-level 2024-11-10 12:50:45 +01:00
Renamed from Userland/Libraries/LibWeb/Crypto/CryptoAlgorithms.cpp (Browse further)