[webkit-changes] [WebKit/WebKit] 6940fc: Implement a Ed25519 key pair check during the JWK ...

Javier Fernandez Garcia-Boente noreply at github.com
Wed Sep 13 09:53:46 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 6940fc8a24d037525d6a83c817016ad79489e2a2
      https://github.com/WebKit/WebKit/commit/6940fc8a24d037525d6a83c817016ad79489e2a2
  Author: Javier Fernandez <jfernandez at igalia.com>
  Date:   2023-09-13 (Wed, 13 Sep 2023)

  Changed paths:
    M LayoutTests/platform/glib/imported/w3c/web-platform-tests/WebCryptoAPI/import_export/okp_importKey_failures_Ed25519.https.any-expected.txt
    M LayoutTests/platform/glib/imported/w3c/web-platform-tests/WebCryptoAPI/import_export/okp_importKey_failures_Ed25519.https.any.worker-expected.txt
    M Source/WebCore/crypto/gcrypt/CryptoKeyOKPGCrypt.cpp
    M Source/WebCore/crypto/gcrypt/GCryptRFC7748.cpp
    A Source/WebCore/crypto/gcrypt/GCryptRFC8032.cpp
    A Source/WebCore/crypto/gcrypt/GCryptRFC8032.h
    M Source/WebCore/platform/SourcesGCrypt.txt

  Log Message:
  -----------
  Implement a Ed25519 key pair check during the JWK import
https://bugs.webkit.org/show_bug.cgi?id=261323

Reviewed by Žan Doberšek.

This change implemenets the logic to ensure they private and public
keys imported using JWK format are actually compatible, according to
the RFC8032 specification.

There are similar checks for the X25519, already implemented in both
the Mac and Gtk+ ports. The implementation of this check is also present
in the Mac port.

* LayoutTests/platform/glib/imported/w3c/web-platform-tests/WebCryptoAPI/import_export/okp_importKey_failures_Ed25519.https.any-expected.txt:
* LayoutTests/platform/glib/imported/w3c/web-platform-tests/WebCryptoAPI/import_export/okp_importKey_failures_Ed25519.https.any.worker-expected.txt:
* Source/WebCore/crypto/gcrypt/CryptoKeyOKPGCrypt.cpp:
(WebCore::CryptoKeyOKP::platformCheckPairedKeys):
* Source/WebCore/crypto/gcrypt/GCryptRFC7748.cpp:
* Source/WebCore/crypto/gcrypt/GCryptRFC8032.cpp: Added.
(WebCore::validateEd25519KeyPair):
* Source/WebCore/crypto/gcrypt/GCryptRFC8032.h: Added.
* Source/WebCore/platform/SourcesGCrypt.txt:

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




More information about the webkit-changes mailing list