devgianlu
57cc248883
LibCrypto: Add optimized RSA decryption with CRT method
...
The textbook RSA decryption method of `c^d % n` is quite slow. If the
necessary parameters are present, the CRT variant will be used.
Performing RSA decryption this way is ~3 times faster.
2024-12-15 23:31:49 +01:00
devgianlu
ec990d620f
LibCrypto: Cleanup Crypto::PK::RSA
constructors to avoid pitfalls
...
- Removed the constructor taking a (n, d, e) tuple and moved
it to `RSAPrivateKey`
- Removed default constructor with key generation because it was always
misused and the default key size is quite small
- Added utility constructors to accept a key pair, public key, private
key or both
- Made constructor parameters const
- Updated test to use generated random keys where possible
2024-12-15 23:31:49 +01:00
devgianlu
f49a55d089
LibCrypto: Update ModularInverse
implementation to use extended GCD
...
The previous implementation of `ModularInverse` was flaky and did not
compute the correct value in many occasions, especially with big numbers
like in RSA.
Also added a bunch of tests with big numbers.
2024-12-15 23:31:49 +01:00
devgianlu
b35764da0e
LibCrypto: Add extended GCD algorithm
2024-12-15 23:31:49 +01:00
devgianlu
a74ef5df3d
LibCrypto: Reset cached trimmed length after add_into_accumulator
...
The trimmed cache length of the `UnsignedBigInteger` was not reset after
an `add_into_accumulator_without_allocation` operation because the
function manipulates the words directly.
This meant that if the trimmed length was calculated before this
operation it would be wrong after.
2024-12-15 23:31:49 +01:00
Pavel Shliak
40bf8dde88
LibWeb: Remove unnecessary Quad.h include
2024-12-15 23:27:42 +01:00
Aaron Van Doren
7824721107
LibGfx: Verify Rect and Quad are consistent in boundary point inclusions
2024-12-15 23:27:42 +01:00
Aaron Van Doren
5c4e162ba9
LibGfx: Implement even-odd method for Quad::contains() and add tests
2024-12-15 23:27:42 +01:00
Gustavo Ramirez
108701c899
LibWeb/CSS: Refactor phase() method to reduce redundancy
...
The function AnimationEffect::phase() contained duplicated condition
checks for the animation phase determination. This refactor eliminates
the redundant checks by simplifying the logic.
2024-12-15 10:05:08 +00:00
Feng Yu
7bb7edd6df
LibWeb: Fix is_valid_status_text
to handle UTF-8 correctly
...
This change fixed a WPT subtest which I also imported.
2024-12-15 08:33:30 +00:00
Feng Yu
9c76260756
LibWeb: Sync statusText check with spec update
...
Synced change from https://github.com/whatwg/fetch/pull/1795 .
No functional changes; only update comments to reflect the latest
spec.
2024-12-15 08:33:30 +00:00
stasoid
8ac5424f3a
LibTLS: Port to Windows
2024-12-15 08:20:16 +01:00
Pavel Shliak
ea469fbeab
LibGfx: Let Painter care about TinyVG transforms
...
This helps us with non-uniform scales, and makes things simple
2024-12-14 23:29:43 +01:00
stelar7
0b1c7d6af2
LibWeb: Mark open request as processed if the spec forgot
2024-12-14 23:02:59 +01:00
stelar7
32e5fb4da5
LibWeb: Add missing spec comment for method
2024-12-14 23:02:59 +01:00
stelar7
a25bba27fa
LibWeb: Close the database if the upgrade connection is aborted
2024-12-14 23:02:59 +01:00
stelar7
0b8f2a8b81
LibWeb: Implement wait step for IndexedDB upgrade_a_database
2024-12-14 23:02:59 +01:00
stelar7
7c3f44282d
LibWeb: Implement IDBTransaction::abort
2024-12-14 23:02:59 +01:00
stelar7
2954278e37
LibWeb: Implement abort_a_transaction for IndexedDB
2024-12-14 23:02:59 +01:00
stelar7
609f7aa659
LibWeb: Implement IDBFactory::delete_database
2024-12-14 23:02:59 +01:00
stelar7
452506964c
LibWeb: Add const qualifiers to Vector iteration in IndexedDB
2024-12-14 23:02:59 +01:00
stelar7
0327541999
LibWeb: Implement delete_a_database for IndexedDB
2024-12-14 23:02:59 +01:00
Tim Ledbetter
022141647a
LibWeb: Implement PopoverInvokerElement
attribute change steps
...
PopoverInvokerElement's explicitly set attr-element should be set to
null whenever the value of the `popovertarget` content attribute is
changed.
2024-12-14 12:11:28 -08:00
Tim Ledbetter
40cb36607c
LibWeb: Include namespace parameter in associated_attribute_changed()
2024-12-14 12:11:28 -08:00
Timothy Flynn
5947c37637
LibJS: Return the allocated dst register from deleting super properties
...
Even though calling delete on a super property will ultimately throw a
ReferenceError, we must return the allocated register for the result of
the delete operation (which would normally be a boolean). If the delete
operation is used in a return statement, the bytecode generator for the
return statement must be able to assume the statement had some output.
2024-12-14 12:08:50 -08:00
Shannon Booth
18dddaa742
LibWeb/HTML: Use DOM's post-connection steps for iframe elements
...
See: c8ec987d1
2024-12-14 12:06:41 -08:00
stasoid
0a90143420
AK: Fix BumpAllocator.h compilation errors on Windows
2024-12-14 16:12:12 +01:00
Pavel Shliak
03ac6e6e87
LibGC: Preallocate space before dumping GC graph
...
Speeds up the append_gc_graph function by preallocating space.
This change reduces the time taken to dump the GC graph by 4%
on about:blank.
2024-12-14 09:06:58 +01:00
Luke Wilde
160c15444b
LibWeb/WebGL2: Implement blitFramebuffer
2024-12-14 09:06:28 +01:00
Luke Wilde
4a4263d869
LibWeb/WebGL2: Implement readBuffer
2024-12-14 09:06:28 +01:00
Luke Wilde
ced5eea610
LibWeb/WebGL2: Implement MAX_COMBINED_UNIFORM_BLOCKS parameter
2024-12-14 09:06:28 +01:00
Luke Wilde
5d383fdd11
LibWeb/WebGL2: Implement MAX_FRAGMENT_INPUT_COMPONENTS parameter
2024-12-14 09:06:28 +01:00
Luke Wilde
f1d194a97a
LibWeb/WebGL2: Implement MAX_VERTEX_UNIFORM_BLOCKS parameter
2024-12-14 09:06:28 +01:00
Luke Wilde
a19fb0a759
LibWeb/WebGL2: Implement MAX_DRAW_BUFFERS parameter
2024-12-14 09:06:28 +01:00
Luke Wilde
db89b478ff
LibWeb/WebGL2: Implement renderbufferStorageMultisample
2024-12-14 09:06:28 +01:00
Luke Wilde
1fc8353da0
LibWeb/WebGL2: Implement UNIFORM_BUFFER_OFFSET_ALIGNMENT parameter
2024-12-14 09:06:28 +01:00
Luke Wilde
8b07af9801
LibWeb/WebGL2: Implement bindBufferBase
2024-12-14 09:06:28 +01:00
Luke Wilde
2adacbc8bb
LibWeb/WebGL2: Implement MAX_UNIFORM_BUFFER_BINDINGS parameter
2024-12-14 09:06:28 +01:00
Luke Wilde
0e5e0d922f
LibWeb/WebGL2: Implement MAX_UNIFORM_BLOCK_SIZE parameter
2024-12-14 09:06:28 +01:00
Luke Wilde
791c258754
LibWeb/WebGL2: Implement MAX_VERTEX_UNIFORM_COMPONENTS parameter
2024-12-14 09:06:28 +01:00
Luke Wilde
b6388abb9b
LibWeb/WebGL2: Implement MAX_COLOR_ATTACHMENTS parameter
2024-12-14 09:06:28 +01:00
Luke Wilde
99a501bd09
LibWeb/WebGL2: Implement MAX_ARRAY_TEXTURE_LAYERS parameter
2024-12-14 09:06:28 +01:00
Luke Wilde
6e42f401f9
LibWeb/WebGL2: Implement texImage3D with ArrayBufferView and offset
2024-12-14 09:06:28 +01:00
Luke Wilde
50b4d65540
LibWeb/WebGL2: Implement texImage2D with ArrayBufferView and offset
2024-12-14 09:06:28 +01:00
Luke Wilde
766f4d2ec4
LibWeb/WebGL2: Implement texSubImage2D with ArrayBufferView and offset
2024-12-14 09:06:28 +01:00
Luke Wilde
e6ebec853b
LibWeb/WebGL2: Implement texSubImage3D with ArrayBufferView and offset
2024-12-14 09:06:28 +01:00
Luke Wilde
5cde82ac80
LibWeb/WebGL2: Implement texStorage3D
2024-12-14 09:06:28 +01:00
Luke Wilde
f266705bc6
LibWeb/WebGL2: Implement MAX_3D_TEXTURE_SIZE parameter
2024-12-14 09:06:28 +01:00
Luke Wilde
dad30672d9
LibWeb/WebGL: Return GL_INVALID_ENUM for unknown buffer parameter names
2024-12-14 09:06:28 +01:00
Luke Wilde
776328e2e7
LibWeb/WebGL2: Implement getInternalformatParameter
2024-12-14 09:06:28 +01:00