[webkit-changes] [WebKit/WebKit] 8c9a44: [WebCrypto] Implement a key pair check for Ed25519.

Javier Fernandez Garcia-Boente noreply at github.com
Wed Aug 23 07:26:48 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 8c9a448b18a44fda10a8b6de16db52e7582cefa9
      https://github.com/WebKit/WebKit/commit/8c9a448b18a44fda10a8b6de16db52e7582cefa9
  Author: Javier Fernandez <jfernandez at igalia.com>
  Date:   2023-08-23 (Wed, 23 Aug 2023)

  Changed paths:
    M LayoutTests/imported/w3c/web-platform-tests/WebCryptoAPI/import_export/okp_importKey_failures_Ed25519.https.any-expected.txt
    M LayoutTests/imported/w3c/web-platform-tests/WebCryptoAPI/import_export/okp_importKey_failures_Ed25519.https.any.worker-expected.txt
    A LayoutTests/platform/glib/imported/w3c/web-platform-tests/WebCryptoAPI/import_export/okp_importKey_failures_Ed25519.https.any-expected.txt
    A LayoutTests/platform/glib/imported/w3c/web-platform-tests/WebCryptoAPI/import_export/okp_importKey_failures_Ed25519.https.any.worker-expected.txt
    M Source/WebCore/crypto/keys/CryptoKeyOKP.cpp
    M Source/WebCore/crypto/keys/CryptoKeyOKP.h
    M Source/WebCore/crypto/mac/CryptoKeyOKPCocoa.cpp

  Log Message:
  -----------
  [WebCrypto] Implement a key pair check for Ed25519.
https://bugs.webkit.org/show_bug.cgi?id=260469

Reviewed by Youenn Fablet.

When importing an Ed25519 key-pair in JWK format we extract
different values from the 'x' and 'd' dict properties, which
correspond to the public and private keys respectively.

The new platformCheckPairedKeys ensures that the public key
imported matches the one generated from the private one, using
the Ed25519 key-pair generation operation.

There are several WPT that pass thanks to this change, so no
new tests are needed.
* Source/WebCore/crypto/keys/CryptoKeyOKP.cpp:
(WebCore::CryptoKeyOKP::platformCheckPairedKeys):
* Source/WebCore/crypto/keys/CryptoKeyOKP.h:
* Source/WebCore/crypto/mac/CryptoKeyOKPCocoa.cpp:
(WebCore::CryptoKeyOKP::platformCheckPairedKeys):

Canonical link: https://commits.webkit.org/267184@main




More information about the webkit-changes mailing list