Files
servo/components/script
Kingsley Yung 7640a38dae script: Use base64ct instead of base64 in SubtleCrypto (#40334)
The `SubtleCrypto` interface of WebCrypto API needs to encode and decode
keys in base64 alphabets when exporting/importing keys in JsonWebKey
format.

We currently use the `base64` crate to handle base64 encoding and
decoding. This patch switches to use the `base64ct` crate, which is a
constant-time implementation of base64 alphabets.

Using constant-time implementation to handle base64 encoding and
decoding of cryptographic secret provides a better protection against
time-based sidechannel attack.

Remarks: The multi-line changes in `ecdh_operation.rs` are mostly caused
by `./mach fmt`.

Testing: Refactoring. Existing tests suffice.

Signed-off-by: Kingsley Yung <kingsley@kkoyung.dev>
2025-11-03 12:03:20 +00:00
..
2025-10-24 18:03:29 +00:00
2025-10-02 07:51:19 +00:00
2025-10-02 07:51:19 +00:00