[webkit-changes] [WebKit/WebKit] 2a6d9d: Adding the first CryptoKit API to webCrypto: AesGc...

Commit Queue noreply at github.com
Thu Jan 25 02:00:50 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 2a6d9d74bd17076029b5c2313612086d1009fddb
      https://github.com/WebKit/WebKit/commit/2a6d9d74bd17076029b5c2313612086d1009fddb
  Author: nmahendru <nitinmahendru at apple.com>
  Date:   2024-01-25 (Thu, 25 Jan 2024)

  Changed paths:
    M LayoutTests/crypto/subtle/aes-gcm-encrypt-malformed-parameters-expected.txt
    M LayoutTests/crypto/subtle/aes-gcm-encrypt-malformed-parameters.html
    M LayoutTests/crypto/subtle/aes-gcm-generate-key-encrypt-decrypt-null-plain-text-expected.txt
    M LayoutTests/crypto/subtle/aes-gcm-generate-key-encrypt-decrypt-null-plain-text.html
    M LayoutTests/crypto/subtle/aes-gcm-import-key-encrypt-additional-data-expected.txt
    M LayoutTests/crypto/subtle/aes-gcm-import-key-encrypt-additional-data-tag-length-32-expected.txt
    M LayoutTests/crypto/subtle/aes-gcm-import-key-encrypt-additional-data-tag-length-32.html
    M LayoutTests/crypto/subtle/aes-gcm-import-key-encrypt-additional-data.html
    M LayoutTests/crypto/subtle/aes-gcm-import-key-encrypt-expected.txt
    M LayoutTests/crypto/subtle/aes-gcm-import-key-encrypt-tagLengths-expected.txt
    M LayoutTests/crypto/subtle/aes-gcm-import-key-encrypt-tagLengths.html
    M LayoutTests/crypto/subtle/aes-gcm-import-key-encrypt.html
    M Source/WTF/Scripts/Preferences/UnifiedWebPreferences.yaml
    M Source/WebCore/Configurations/WebCore.xcconfig
    A Source/WebCore/Configurations/WebCoreSwift.xcconfig
    M Source/WebCore/SourcesCocoa.txt
    M Source/WebCore/WebCore.xcodeproj/project.pbxproj
    M Source/WebCore/WebCorePrefix.h
    A Source/WebCore/WebCoreSwift/CryptoKitShim.swift
    M Source/WebCore/crypto/algorithms/CryptoAlgorithmAES_GCM.cpp
    M Source/WebCore/crypto/algorithms/CryptoAlgorithmAES_GCM.h
    M Source/WebCore/crypto/gcrypt/CryptoAlgorithmAES_GCMGCrypt.cpp
    R Source/WebCore/crypto/mac/CryptoAlgorithmAES_GCMMac.cpp
    A Source/WebCore/crypto/mac/CryptoAlgorithmAES_GCMMac.mm
    M Source/WebCore/crypto/openssl/CryptoAlgorithmAES_GCMOpenSSL.cpp

  Log Message:
  -----------
  Adding the first CryptoKit API to webCrypto: AesGcm Encrypt
https://bugs.webkit.org/show_bug.cgi?id=246350
rdar://101040216

Reviewed by Alex Christensen and Elliott Williams.

This PR does the following:
1. Adds plumbing to call into CryptoKit which is swift only.
2. Only adds one API for now just to gather early feedback on how it's structured.
3. Tries to compare the encryption outputs with the existing implementation bit for bit
   to prove that this works exactly the same.

* LayoutTests/crypto/subtle/aes-gcm-encrypt-malformed-parameters-expected.txt:
* LayoutTests/crypto/subtle/aes-gcm-encrypt-malformed-parameters.html:
* LayoutTests/crypto/subtle/aes-gcm-generate-key-encrypt-decrypt-null-plain-text-expected.txt:
* LayoutTests/crypto/subtle/aes-gcm-generate-key-encrypt-decrypt-null-plain-text.html:
* LayoutTests/crypto/subtle/aes-gcm-import-key-encrypt-additional-data-expected.txt:
* LayoutTests/crypto/subtle/aes-gcm-import-key-encrypt-additional-data-tag-length-32-expected.txt:
* LayoutTests/crypto/subtle/aes-gcm-import-key-encrypt-additional-data-tag-length-32.html:
* LayoutTests/crypto/subtle/aes-gcm-import-key-encrypt-additional-data.html:
* LayoutTests/crypto/subtle/aes-gcm-import-key-encrypt-expected.txt:
* LayoutTests/crypto/subtle/aes-gcm-import-key-encrypt-tagLengths-expected.txt:
* LayoutTests/crypto/subtle/aes-gcm-import-key-encrypt-tagLengths.html:
* LayoutTests/crypto/subtle/aes-gcm-import-key-encrypt.html:
* Source/WTF/Scripts/Preferences/UnifiedWebPreferences.yaml:
* Source/WebCore/Configurations/WebCore.xcconfig:
* Source/WebCore/Configurations/WebCoreSwift.xcconfig: Added.
* Source/WebCore/SourcesCocoa.txt:
* Source/WebCore/WebCore.xcodeproj/project.pbxproj:
* Source/WebCore/WebCoreSwift/CryptoKitShim.swift: Added.
* Source/WebCore/crypto/CryptoAlgorithm.h:
* Source/WebCore/crypto/algorithms/CryptoAlgorithmAES_GCM.cpp:
(WebCore::CryptoAlgorithmAES_GCM::encrypt):
* Source/WebCore/crypto/algorithms/CryptoAlgorithmAES_GCM.h:
* Source/WebCore/crypto/gcrypt/CryptoAlgorithmAES_GCMGCrypt.cpp:
(WebCore::CryptoAlgorithmAES_GCM::platformEncrypt):
* Source/WebCore/crypto/mac/CryptoAlgorithmAES_GCMMac.mm:
(WebCore::encryptAES_GCM):
(WebCore::encryptCryptoKitAES_GCM):
(WebCore::CryptoAlgorithmAES_GCM::platformEncrypt):
* Source/WebCore/crypto/openssl/CryptoAlgorithmAES_GCMOpenSSL.cpp:
(WebCore::CryptoAlgorithmAES_GCM::platformEncrypt):
* Source/WebCore/WebCorePrefix.h:

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




More information about the webkit-changes mailing list