Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: f065a754d536c386e738c9a27259a08bcdd3f7e2
https://github.com/WebKit/WebKit/commit/f065a754d536c386e738c9a27259a08bcdd3f7e2
Author: Claudio Saavedra <[email protected]>
Date: 2026-10-10 (Sat, 10 Oct 2026)
Changed paths:
A
LayoutTests/crypto/subtle/rsa-oaep-import-key-decrypt-leading-zeros-expected.txt
A LayoutTests/crypto/subtle/rsa-oaep-import-key-decrypt-leading-zeros.html
M Source/WebCore/crypto/gcrypt/CryptoAlgorithmRSA_OAEPGCrypt.cpp
Log Message:
-----------
[GCrypt] RSA-OAEP decrypt drops leading zero bytes of the plain text
https://bugs.webkit.org/show_bug.cgi?id=326989
Reviewed by Patrick Griffis.
libgcrypt returns the decrypted plain text as a byte string, but it was
read back through mpiData(), which parses it as an integer and drops
leading zero bytes. Decrypting or unwrapping data that starts with 0x00
returned a shorter result. Copy the bytes directly instead.
Test: crypto/subtle/rsa-oaep-import-key-decrypt-leading-zeros.html
*
LayoutTests/crypto/subtle/rsa-oaep-import-key-decrypt-leading-zeros-expected.txt:
Added.
* LayoutTests/crypto/subtle/rsa-oaep-import-key-decrypt-leading-zeros.html:
Added.
* Source/WebCore/crypto/gcrypt/CryptoAlgorithmRSA_OAEPGCrypt.cpp:
(WebCore::gcryptDecrypt):
Canonical link: https://commits.webkit.org/323285@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications