[webkit-changes] [WebKit/WebKit] 63e903: Remove runtime CryptoKit Enablement
Commit Queue
noreply at github.com
Fri Aug 23 09:21:23 PDT 2024
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 63e903788f95a0c2dccb3d5c3034001e5d7d6018
https://github.com/WebKit/WebKit/commit/63e903788f95a0c2dccb3d5c3034001e5d7d6018
Author: Nitin Mahendru <nitinmahendru at apple.com>
Date: 2024-08-23 (Fri, 23 Aug 2024)
Changed paths:
M Source/WTF/Scripts/Preferences/UnifiedWebPreferences.yaml
M Source/WebCore/Modules/webauthn/AuthenticatorAttestationResponse.cpp
M Source/WebCore/Modules/webauthn/fido/Pin.cpp
M Source/WebCore/PAL/pal/crypto/CryptoDigest.h
M Source/WebCore/bindings/js/SerializedScriptValue.cpp
M Source/WebCore/crypto/CryptoAlgorithm.cpp
M Source/WebCore/crypto/CryptoAlgorithm.h
M Source/WebCore/crypto/CryptoKey.h
M Source/WebCore/crypto/SubtleCrypto.cpp
M Source/WebCore/crypto/algorithms/CryptoAlgorithmAESCBC.cpp
M Source/WebCore/crypto/algorithms/CryptoAlgorithmAESCBC.h
M Source/WebCore/crypto/algorithms/CryptoAlgorithmAESCFB.cpp
M Source/WebCore/crypto/algorithms/CryptoAlgorithmAESCFB.h
M Source/WebCore/crypto/algorithms/CryptoAlgorithmAESCTR.cpp
M Source/WebCore/crypto/algorithms/CryptoAlgorithmAESCTR.h
M Source/WebCore/crypto/algorithms/CryptoAlgorithmAESGCM.cpp
M Source/WebCore/crypto/algorithms/CryptoAlgorithmAESGCM.h
M Source/WebCore/crypto/algorithms/CryptoAlgorithmAESKW.cpp
M Source/WebCore/crypto/algorithms/CryptoAlgorithmAESKW.h
M Source/WebCore/crypto/algorithms/CryptoAlgorithmECDH.cpp
M Source/WebCore/crypto/algorithms/CryptoAlgorithmECDH.h
M Source/WebCore/crypto/algorithms/CryptoAlgorithmECDSA.cpp
M Source/WebCore/crypto/algorithms/CryptoAlgorithmECDSA.h
M Source/WebCore/crypto/algorithms/CryptoAlgorithmEd25519.cpp
M Source/WebCore/crypto/algorithms/CryptoAlgorithmEd25519.h
M Source/WebCore/crypto/algorithms/CryptoAlgorithmHKDF.cpp
M Source/WebCore/crypto/algorithms/CryptoAlgorithmHKDF.h
M Source/WebCore/crypto/algorithms/CryptoAlgorithmHMAC.cpp
M Source/WebCore/crypto/algorithms/CryptoAlgorithmHMAC.h
M Source/WebCore/crypto/algorithms/CryptoAlgorithmPBKDF2.cpp
M Source/WebCore/crypto/algorithms/CryptoAlgorithmPBKDF2.h
M Source/WebCore/crypto/algorithms/CryptoAlgorithmRSAES_PKCS1_v1_5.cpp
M Source/WebCore/crypto/algorithms/CryptoAlgorithmRSAES_PKCS1_v1_5.h
M Source/WebCore/crypto/algorithms/CryptoAlgorithmRSASSA_PKCS1_v1_5.cpp
M Source/WebCore/crypto/algorithms/CryptoAlgorithmRSASSA_PKCS1_v1_5.h
M Source/WebCore/crypto/algorithms/CryptoAlgorithmRSA_OAEP.cpp
M Source/WebCore/crypto/algorithms/CryptoAlgorithmRSA_OAEP.h
M Source/WebCore/crypto/algorithms/CryptoAlgorithmRSA_PSS.cpp
M Source/WebCore/crypto/algorithms/CryptoAlgorithmRSA_PSS.h
M Source/WebCore/crypto/algorithms/CryptoAlgorithmX25519.cpp
M Source/WebCore/crypto/algorithms/CryptoAlgorithmX25519.h
M Source/WebCore/crypto/cocoa/CryptoAlgorithmAESGCMMac.cpp
M Source/WebCore/crypto/cocoa/CryptoAlgorithmAESKWMac.cpp
M Source/WebCore/crypto/cocoa/CryptoAlgorithmECDHMac.cpp
M Source/WebCore/crypto/cocoa/CryptoAlgorithmECDSAMac.cpp
M Source/WebCore/crypto/cocoa/CryptoAlgorithmEd25519Cocoa.cpp
M Source/WebCore/crypto/cocoa/CryptoAlgorithmHKDFMac.cpp
M Source/WebCore/crypto/cocoa/CryptoAlgorithmHMACMac.cpp
M Source/WebCore/crypto/cocoa/CryptoAlgorithmX25519Cocoa.cpp
M Source/WebCore/crypto/cocoa/CryptoKeyECMac.cpp
M Source/WebCore/crypto/gcrypt/CryptoAlgorithmAESGCMGCrypt.cpp
M Source/WebCore/crypto/gcrypt/CryptoAlgorithmAESKWGCrypt.cpp
M Source/WebCore/crypto/gcrypt/CryptoAlgorithmECDHGCrypt.cpp
M Source/WebCore/crypto/gcrypt/CryptoAlgorithmECDSAGCrypt.cpp
M Source/WebCore/crypto/gcrypt/CryptoAlgorithmEd25519GCrypt.cpp
M Source/WebCore/crypto/gcrypt/CryptoAlgorithmHKDFGCrypt.cpp
M Source/WebCore/crypto/gcrypt/CryptoAlgorithmHMACGCrypt.cpp
M Source/WebCore/crypto/gcrypt/CryptoAlgorithmX25519GCrypt.cpp
M Source/WebCore/crypto/gcrypt/CryptoKeyECGCrypt.cpp
M Source/WebCore/crypto/keys/CryptoKeyAES.cpp
M Source/WebCore/crypto/keys/CryptoKeyAES.h
M Source/WebCore/crypto/keys/CryptoKeyEC.cpp
M Source/WebCore/crypto/keys/CryptoKeyEC.h
M Source/WebCore/crypto/openssl/CryptoAlgorithmAESGCMOpenSSL.cpp
M Source/WebCore/crypto/openssl/CryptoAlgorithmAESKWOpenSSL.cpp
M Source/WebCore/crypto/openssl/CryptoAlgorithmECDHOpenSSL.cpp
M Source/WebCore/crypto/openssl/CryptoAlgorithmECDSAOpenSSL.cpp
M Source/WebCore/crypto/openssl/CryptoAlgorithmHKDFOpenSSL.cpp
M Source/WebCore/crypto/openssl/CryptoAlgorithmHMACOpenSSL.cpp
M Source/WebCore/crypto/openssl/CryptoKeyECOpenSSL.cpp
M Tools/TestWebKitAPI/Tests/WebCore/CtapPinTest.cpp
Log Message:
-----------
Remove runtime CryptoKit Enablement
https://bugs.webkit.org/show_bug.cgi?id=277699
rdar://133221998
Reviewed by Alex Christensen.
With this change we are totally removing the option to switch back to CoreCrypto
at runtime.
A side effect of this is that the PlatformECKeyContainer(CryptoKeyEC.h) for Apple platforms
can no longer be a variant. It will either be CryptoKit or CommonCrypto depending on compile
time flags. As a result, the PlatformECKeyContainer also needs to be refactored to reflect
the same. Both of these changes have to go in lockstep.
No new tests have been added as this is just a refactor with no change in behavior.
* Source/WTF/Scripts/Preferences/UnifiedWebPreferences.yaml:
* Source/WebCore/Modules/webauthn/AuthenticatorAttestationResponse.cpp:
(WebCore::AuthenticatorAttestationResponse::getPublicKey const):
* Source/WebCore/Modules/webauthn/fido/Pin.cpp:
(fido::pin::makePinAuth):
(fido::pin::KeyAgreementResponse::parseFromCOSE):
(fido::pin::TokenRequest::tryCreate):
(fido::pin::SetPinRequest::tryCreate):
* Source/WebCore/PAL/pal/crypto/CryptoDigest.h:
* Source/WebCore/bindings/js/SerializedScriptValue.cpp:
(WebCore::CloneSerializer::write):
(WebCore::CloneDeserializer::readECKey):
(WebCore::CloneSerializer::isUsingCryptoKit): Deleted.
(WebCore::CloneDeserializer::isUsingCryptoKit): Deleted.
* Source/WebCore/crypto/CryptoAlgorithm.cpp:
(WebCore::CryptoAlgorithm::importKey):
(WebCore::CryptoAlgorithm::exportKey):
(WebCore::CryptoAlgorithm::wrapKey):
(WebCore::CryptoAlgorithm::unwrapKey):
* Source/WebCore/crypto/CryptoAlgorithm.h:
* Source/WebCore/crypto/CryptoKey.h:
* Source/WebCore/crypto/SubtleCrypto.cpp:
(WebCore::SubtleCrypto::deriveKey):
(WebCore::SubtleCrypto::importKey):
(WebCore::SubtleCrypto::exportKey):
(WebCore::SubtleCrypto::wrapKey):
(WebCore::SubtleCrypto::unwrapKey):
* Source/WebCore/crypto/algorithms/CryptoAlgorithmAESCBC.cpp:
(WebCore::CryptoAlgorithmAESCBC::importKey):
(WebCore::CryptoAlgorithmAESCBC::exportKey):
* Source/WebCore/crypto/algorithms/CryptoAlgorithmAESCBC.h:
* Source/WebCore/crypto/algorithms/CryptoAlgorithmAESCFB.cpp:
(WebCore::CryptoAlgorithmAESCFB::importKey):
(WebCore::CryptoAlgorithmAESCFB::exportKey):
* Source/WebCore/crypto/algorithms/CryptoAlgorithmAESCFB.h:
* Source/WebCore/crypto/algorithms/CryptoAlgorithmAESCTR.cpp:
(WebCore::CryptoAlgorithmAESCTR::importKey):
(WebCore::CryptoAlgorithmAESCTR::exportKey):
* Source/WebCore/crypto/algorithms/CryptoAlgorithmAESCTR.h:
* Source/WebCore/crypto/algorithms/CryptoAlgorithmAESGCM.cpp:
(WebCore::CryptoAlgorithmAESGCM::encrypt):
(WebCore::CryptoAlgorithmAESGCM::importKey):
(WebCore::CryptoAlgorithmAESGCM::exportKey):
* Source/WebCore/crypto/algorithms/CryptoAlgorithmAESGCM.h:
* Source/WebCore/crypto/algorithms/CryptoAlgorithmAESKW.cpp:
(WebCore::CryptoAlgorithmAESKW::importKey):
(WebCore::CryptoAlgorithmAESKW::exportKey):
(WebCore::CryptoAlgorithmAESKW::wrapKey):
(WebCore::CryptoAlgorithmAESKW::unwrapKey):
* Source/WebCore/crypto/algorithms/CryptoAlgorithmAESKW.h:
* Source/WebCore/crypto/algorithms/CryptoAlgorithmECDH.cpp:
(WebCore::CryptoAlgorithmECDH::generateKey):
(WebCore::CryptoAlgorithmECDH::deriveBits):
(WebCore::CryptoAlgorithmECDH::importKey):
(WebCore::CryptoAlgorithmECDH::exportKey):
* Source/WebCore/crypto/algorithms/CryptoAlgorithmECDH.h:
* Source/WebCore/crypto/algorithms/CryptoAlgorithmECDSA.cpp:
(WebCore::CryptoAlgorithmECDSA::sign):
(WebCore::CryptoAlgorithmECDSA::verify):
(WebCore::CryptoAlgorithmECDSA::generateKey):
(WebCore::CryptoAlgorithmECDSA::importKey):
(WebCore::CryptoAlgorithmECDSA::exportKey):
* Source/WebCore/crypto/algorithms/CryptoAlgorithmECDSA.h:
* Source/WebCore/crypto/algorithms/CryptoAlgorithmEd25519.cpp:
(WebCore::CryptoAlgorithmEd25519::platformSign):
(WebCore::CryptoAlgorithmEd25519::platformVerify):
(WebCore::CryptoAlgorithmEd25519::sign):
(WebCore::CryptoAlgorithmEd25519::verify):
(WebCore::CryptoAlgorithmEd25519::importKey):
(WebCore::CryptoAlgorithmEd25519::exportKey):
* Source/WebCore/crypto/algorithms/CryptoAlgorithmEd25519.h:
* Source/WebCore/crypto/algorithms/CryptoAlgorithmHKDF.cpp:
(WebCore::CryptoAlgorithmHKDF::deriveBits):
(WebCore::CryptoAlgorithmHKDF::importKey):
* Source/WebCore/crypto/algorithms/CryptoAlgorithmHKDF.h:
* Source/WebCore/crypto/algorithms/CryptoAlgorithmHMAC.cpp:
(WebCore::CryptoAlgorithmHMAC::sign):
(WebCore::CryptoAlgorithmHMAC::verify):
(WebCore::CryptoAlgorithmHMAC::importKey):
(WebCore::CryptoAlgorithmHMAC::exportKey):
* Source/WebCore/crypto/algorithms/CryptoAlgorithmHMAC.h:
* Source/WebCore/crypto/algorithms/CryptoAlgorithmPBKDF2.cpp:
(WebCore::CryptoAlgorithmPBKDF2::importKey):
* Source/WebCore/crypto/algorithms/CryptoAlgorithmPBKDF2.h:
* Source/WebCore/crypto/algorithms/CryptoAlgorithmRSAES_PKCS1_v1_5.cpp:
(WebCore::CryptoAlgorithmRSAES_PKCS1_v1_5::importKey):
(WebCore::CryptoAlgorithmRSAES_PKCS1_v1_5::exportKey):
* Source/WebCore/crypto/algorithms/CryptoAlgorithmRSAES_PKCS1_v1_5.h:
* Source/WebCore/crypto/algorithms/CryptoAlgorithmRSASSA_PKCS1_v1_5.cpp:
(WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::importKey):
(WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::exportKey):
* Source/WebCore/crypto/algorithms/CryptoAlgorithmRSASSA_PKCS1_v1_5.h:
* Source/WebCore/crypto/algorithms/CryptoAlgorithmRSA_OAEP.cpp:
(WebCore::CryptoAlgorithmRSA_OAEP::importKey):
(WebCore::CryptoAlgorithmRSA_OAEP::exportKey):
* Source/WebCore/crypto/algorithms/CryptoAlgorithmRSA_OAEP.h:
* Source/WebCore/crypto/algorithms/CryptoAlgorithmRSA_PSS.cpp:
(WebCore::CryptoAlgorithmRSA_PSS::importKey):
(WebCore::CryptoAlgorithmRSA_PSS::exportKey):
* Source/WebCore/crypto/algorithms/CryptoAlgorithmRSA_PSS.h:
* Source/WebCore/crypto/algorithms/CryptoAlgorithmX25519.cpp:
(WebCore::CryptoAlgorithmX25519::platformDeriveBits):
(WebCore::CryptoAlgorithmX25519::deriveBits):
(WebCore::CryptoAlgorithmX25519::importKey):
(WebCore::CryptoAlgorithmX25519::exportKey):
* Source/WebCore/crypto/algorithms/CryptoAlgorithmX25519.h:
* Source/WebCore/crypto/cocoa/CryptoAlgorithmAESGCMMac.cpp:
(WebCore::CryptoAlgorithmAESGCM::platformEncrypt):
* Source/WebCore/crypto/cocoa/CryptoAlgorithmAESKWMac.cpp:
(WebCore::CryptoAlgorithmAESKW::platformWrapKey):
(WebCore::CryptoAlgorithmAESKW::platformUnwrapKey):
* Source/WebCore/crypto/cocoa/CryptoAlgorithmECDHMac.cpp:
(WebCore::platformDeriveBitsCC):
(WebCore::platformDeriveBitsCryptoKit):
(WebCore::CryptoAlgorithmECDH::platformDeriveBits):
* Source/WebCore/crypto/cocoa/CryptoAlgorithmECDSAMac.cpp:
(WebCore::signECDSACryptoKit):
(WebCore::verifyECDSACryptoKit):
(WebCore::signECDSA):
(WebCore::verifyECDSA):
(WebCore::CryptoAlgorithmECDSA::platformSign):
(WebCore::CryptoAlgorithmECDSA::platformVerify):
* Source/WebCore/crypto/cocoa/CryptoAlgorithmEd25519Cocoa.cpp:
(WebCore::CryptoAlgorithmEd25519::platformSign):
(WebCore::CryptoAlgorithmEd25519::platformVerify):
* Source/WebCore/crypto/cocoa/CryptoAlgorithmHKDFMac.cpp:
(WebCore::CryptoAlgorithmHKDF::platformDeriveBits):
* Source/WebCore/crypto/cocoa/CryptoAlgorithmHMACMac.cpp:
(WebCore::CryptoAlgorithmHMAC::platformSign):
(WebCore::CryptoAlgorithmHMAC::platformVerify):
* Source/WebCore/crypto/cocoa/CryptoAlgorithmX25519Cocoa.cpp:
(WebCore::CryptoAlgorithmX25519::platformDeriveBits):
* Source/WebCore/crypto/cocoa/CryptoKeyECMac.cpp:
(WebCore::toPlatformKey):
(WebCore::CryptoKeyEC::platformGeneratePair):
(WebCore::CryptoKeyEC::platformImportRaw):
(WebCore::CryptoKeyEC::platformExportRaw const):
(WebCore::CryptoKeyEC::platformImportJWKPublic):
(WebCore::CryptoKeyEC::platformImportJWKPrivate):
(WebCore::CryptoKeyEC::platformAddFieldElements const):
(WebCore::CryptoKeyEC::platformImportSpki):
(WebCore::CryptoKeyEC::platformExportSpki const):
(WebCore::CryptoKeyEC::platformImportPkcs8):
(WebCore::CryptoKeyEC::platformExportPkcs8 const):
* Source/WebCore/crypto/gcrypt/CryptoAlgorithmAESGCMGCrypt.cpp:
(WebCore::CryptoAlgorithmAESGCM::platformEncrypt):
* Source/WebCore/crypto/gcrypt/CryptoAlgorithmAESKWGCrypt.cpp:
(WebCore::CryptoAlgorithmAESKW::platformWrapKey):
(WebCore::CryptoAlgorithmAESKW::platformUnwrapKey):
* Source/WebCore/crypto/gcrypt/CryptoAlgorithmECDHGCrypt.cpp:
(WebCore::CryptoAlgorithmECDH::platformDeriveBits):
* Source/WebCore/crypto/gcrypt/CryptoAlgorithmECDSAGCrypt.cpp:
(WebCore::CryptoAlgorithmECDSA::platformSign):
(WebCore::CryptoAlgorithmECDSA::platformVerify):
* Source/WebCore/crypto/gcrypt/CryptoAlgorithmEd25519GCrypt.cpp:
(WebCore::CryptoAlgorithmEd25519::platformSign):
(WebCore::CryptoAlgorithmEd25519::platformVerify):
* Source/WebCore/crypto/gcrypt/CryptoAlgorithmHKDFGCrypt.cpp:
(WebCore::CryptoAlgorithmHKDF::platformDeriveBits):
* Source/WebCore/crypto/gcrypt/CryptoAlgorithmHMACGCrypt.cpp:
(WebCore::CryptoAlgorithmHMAC::platformSign):
(WebCore::CryptoAlgorithmHMAC::platformVerify):
* Source/WebCore/crypto/gcrypt/CryptoAlgorithmX25519GCrypt.cpp:
(WebCore::CryptoAlgorithmX25519::platformDeriveBits):
* Source/WebCore/crypto/gcrypt/CryptoKeyECGCrypt.cpp:
(WebCore::CryptoKeyEC::platformGeneratePair):
(WebCore::CryptoKeyEC::platformImportRaw):
(WebCore::CryptoKeyEC::platformImportJWKPublic):
(WebCore::CryptoKeyEC::platformImportJWKPrivate):
(WebCore::CryptoKeyEC::platformImportSpki):
(WebCore::CryptoKeyEC::platformImportPkcs8):
(WebCore::CryptoKeyEC::platformExportRaw const):
(WebCore::CryptoKeyEC::platformAddFieldElements const):
(WebCore::CryptoKeyEC::platformExportSpki const):
(WebCore::CryptoKeyEC::platformExportPkcs8 const):
* Source/WebCore/crypto/keys/CryptoKeyAES.cpp:
(WebCore::CryptoKeyAES::importRaw):
(WebCore::CryptoKeyAES::importJwk):
* Source/WebCore/crypto/keys/CryptoKeyAES.h:
* Source/WebCore/crypto/keys/CryptoKeyEC.cpp:
(WebCore::CryptoKeyEC::generatePair):
(WebCore::CryptoKeyEC::importRaw):
(WebCore::CryptoKeyEC::importJwk):
(WebCore::CryptoKeyEC::importSpki):
(WebCore::CryptoKeyEC::importPkcs8):
(WebCore::CryptoKeyEC::exportRaw const):
(WebCore::CryptoKeyEC::exportJwk const):
(WebCore::CryptoKeyEC::exportSpki const):
(WebCore::CryptoKeyEC::exportPkcs8 const):
(WebCore::CryptoKeyEC::toCCPlatformECKeyContainer): Deleted.
(WebCore::CryptoKeyEC::toCKPlatformECKeyContainer): Deleted.
* Source/WebCore/crypto/keys/CryptoKeyEC.h:
* Source/WebCore/crypto/openssl/CryptoAlgorithmAESGCMOpenSSL.cpp:
(WebCore::CryptoAlgorithmAESGCM::platformEncrypt):
* Source/WebCore/crypto/openssl/CryptoAlgorithmAESKWOpenSSL.cpp:
(WebCore::CryptoAlgorithmAESKW::platformWrapKey):
(WebCore::CryptoAlgorithmAESKW::platformUnwrapKey):
* Source/WebCore/crypto/openssl/CryptoAlgorithmECDHOpenSSL.cpp:
(WebCore::CryptoAlgorithmECDH::platformDeriveBits):
* Source/WebCore/crypto/openssl/CryptoAlgorithmECDSAOpenSSL.cpp:
(WebCore::CryptoAlgorithmECDSA::platformSign):
(WebCore::CryptoAlgorithmECDSA::platformVerify):
* Source/WebCore/crypto/openssl/CryptoAlgorithmHKDFOpenSSL.cpp:
(WebCore::CryptoAlgorithmHKDF::platformDeriveBits):
* Source/WebCore/crypto/openssl/CryptoAlgorithmHMACOpenSSL.cpp:
(WebCore::CryptoAlgorithmHMAC::platformSign):
(WebCore::CryptoAlgorithmHMAC::platformVerify):
* Source/WebCore/crypto/openssl/CryptoKeyECOpenSSL.cpp:
(WebCore::CryptoKeyEC::platformGeneratePair):
(WebCore::CryptoKeyEC::platformImportRaw):
(WebCore::CryptoKeyEC::platformImportJWKPublic):
(WebCore::CryptoKeyEC::platformImportJWKPrivate):
(WebCore::CryptoKeyEC::platformImportSpki):
(WebCore::CryptoKeyEC::platformImportPkcs8):
(WebCore::CryptoKeyEC::platformExportRaw const):
(WebCore::CryptoKeyEC::platformAddFieldElements const):
(WebCore::CryptoKeyEC::platformExportSpki const):
(WebCore::CryptoKeyEC::platformExportPkcs8 const):
* Tools/TestWebKitAPI/Tests/WebCore/CtapPinTest.cpp:
(TestWebKitAPI::TEST(CtapPinTest, TestSetPinRequest)):
(TestWebKitAPI::TEST(CtapPinTest, TestKeyAgreementResponse)):
(TestWebKitAPI::TEST(CtapPinTest, TestTokenRequest)):
Canonical link: https://commits.webkit.org/282660@main
To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications
More information about the webkit-changes
mailing list