[Webkit-unassigned] [Bug 279963] [WebCrypto] JWK import / export round-trip fails in X25519
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Thu Sep 19 02:31:29 PDT 2024
https://bugs.webkit.org/show_bug.cgi?id=279963
--- Comment #1 from Javier Fernandez <jfernandez at igalia.com> ---
The problem seems to be the public key set to the 'x' attribute:
< x: HPKx5gIuxTc3Htf1PlT6EVTYPpjrZOpR-uWzMHz-lwY
> x: hbrW0bCab1ERDBqLWuWTwnQLzwZcuzYSiYsyGkVcT8A
This bug happens only in the Mac port; the Gtk+ port produces a successfully round-trip operation.
Looking that the code, the JWK export operation in X25519 calls to generateJwkX() function [1], which generates the public key bytes from the private key material.
auto* di = ccsha512_di();
ccec25519pubkey publicKey;
cced25519_make_pub(di, publicKey, m_data.data());
The result of this operation is different than the original public key previously imported.
[1] https://github.com/WebKit/WebKit/blob/2d09e4618e7a51850fd9095f908b7683d4c9b7d9/Source/WebCore/crypto/cocoa/CryptoKeyOKPCocoa.cpp#L376
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20240919/2a753c6b/attachment.htm>
More information about the webkit-unassigned
mailing list