Branch: refs/heads/main Home: https://github.com/WebKit/WebKit Commit: 3abe0e45310ef3e846f8509e44b5514fb2099f76 https://github.com/WebKit/WebKit/commit/3abe0e45310ef3e846f8509e44b5514fb2099f76 Author: Youenn Fablet <youe...@gmail.com> Date: 2023-01-24 (Tue, 24 Jan 2023)
Changed paths: A LayoutTests/http/wpt/crypto/serialize-cryptokey-okp-expected.txt A LayoutTests/http/wpt/crypto/serialize-cryptokey-okp.html M LayoutTests/imported/w3c/web-platform-tests/WebCryptoAPI/generateKey/failures_Ed25519.https.any-expected.txt M LayoutTests/imported/w3c/web-platform-tests/WebCryptoAPI/generateKey/failures_Ed25519.https.any.worker-expected.txt M LayoutTests/imported/w3c/web-platform-tests/WebCryptoAPI/generateKey/successes_Ed25519.https.any-expected.txt M LayoutTests/imported/w3c/web-platform-tests/WebCryptoAPI/generateKey/successes_Ed25519.https.any.worker-expected.txt M LayoutTests/imported/w3c/web-platform-tests/WebCryptoAPI/import_export/okp_importKey.https.any-expected.txt M LayoutTests/imported/w3c/web-platform-tests/WebCryptoAPI/import_export/okp_importKey.https.any.worker-expected.txt 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 M LayoutTests/imported/w3c/web-platform-tests/WebCryptoAPI/sign_verify/eddsa.https.any-expected.txt M LayoutTests/imported/w3c/web-platform-tests/WebCryptoAPI/sign_verify/eddsa.https.any.worker-expected.txt M LayoutTests/platform/glib/TestExpectations M Source/WTF/Scripts/Preferences/UnifiedWebPreferences.yaml M Source/WebCore/PAL/PAL.xcodeproj/project.pbxproj A Source/WebCore/PAL/pal/spi/cocoa/CoreCryptoSPI.h M Source/WebCore/Sources.txt M Source/WebCore/SourcesCocoa.txt M Source/WebCore/WebCore.xcodeproj/project.pbxproj M Source/WebCore/bindings/js/SerializedScriptValue.cpp M Source/WebCore/crypto/CryptoAlgorithmIdentifier.h M Source/WebCore/crypto/CryptoKey.h M Source/WebCore/crypto/SubtleCrypto.cpp A Source/WebCore/crypto/algorithms/CryptoAlgorithmEd25519.cpp A Source/WebCore/crypto/algorithms/CryptoAlgorithmEd25519.h A Source/WebCore/crypto/keys/CryptoKeyOKP.cpp A Source/WebCore/crypto/keys/CryptoKeyOKP.h A Source/WebCore/crypto/mac/CryptoAlgorithmEd25519Cocoa.cpp M Source/WebCore/crypto/mac/CryptoAlgorithmHKDFMac.cpp M Source/WebCore/crypto/mac/CryptoAlgorithmRegistryMac.cpp A Source/WebCore/crypto/mac/CryptoKeyOKPCocoa.cpp M Source/WebCore/platform/Logging.h Log Message: ----------- Support https://wicg.github.io/webcrypto-secure-curves/#ed25519 https://bugs.webkit.org/show_bug.cgi?id=246145 rdar://problem/100401588 Reviewed by Chris Dumez. Introduce CryptoKeyOKP to support secure safe curves. Add support for generating, importing and exporting Ed25519 keys. Add a runtime flag to control exposing the support. This patch reuses work done in https://github.com/WebKit/WebKit/pull/5026 by Angela Izquierdo Garcia. * LayoutTests/http/wpt/crypto/serialize-cryptokey-okp-expected.txt: Added. * LayoutTests/http/wpt/crypto/serialize-cryptokey-okp.html: Added. * LayoutTests/imported/w3c/web-platform-tests/WebCryptoAPI/import_export/okp_importKey.https.any-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/WebCryptoAPI/import_export/okp_importKey.https.any.worker-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/WebCryptoAPI/import_export/okp_importKey_failures_Ed25519.https.any-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/WebCryptoAPI/import_export/okp_importKey_failures_Ed25519.https.any.worker-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/WebCryptoAPI/sign_verify/eddsa.https.any-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/WebCryptoAPI/sign_verify/eddsa.https.any.worker-expected.txt: * LayoutTests/platform/glib/TestExpectations: * Source/WebCore/PAL/PAL.xcodeproj/project.pbxproj: * Source/WebCore/PAL/pal/spi/cocoa/CoreCryptoSPI.h: Added. (cccurve25519_make_priv): (cccurve25519_make_pub): (cccurve25519_make_key_pair): * Source/WebCore/Sources.txt: * Source/WebCore/SourcesCocoa.txt: * Source/WebCore/WebCore.xcodeproj/project.pbxproj: * Source/WebCore/bindings/js/SerializedScriptValue.cpp: (WebCore::CloneSerializer::write): (WebCore::CloneDeserializer::read): (WebCore::CloneDeserializer::readOKPKey): (WebCore::CloneDeserializer::readCryptoKey): * Source/WebCore/crypto/CryptoAlgorithmIdentifier.h: * Source/WebCore/crypto/CryptoKey.h: * Source/WebCore/crypto/SubtleCrypto.cpp: (WebCore::normalizeCryptoAlgorithmParameters): (WebCore::isSupportedExportKey): * Source/WebCore/crypto/algorithms/CryptoAlgorithmEd25519.cpp: Added. (WebCore::CryptoAlgorithmEd25519::platformSign): (WebCore::CryptoAlgorithmEd25519::platformVerify): (WebCore::CryptoAlgorithmEd25519::create): (WebCore::CryptoAlgorithmEd25519::identifier const): (WebCore::CryptoAlgorithmEd25519::generateKey): (WebCore::CryptoAlgorithmEd25519::sign): (WebCore::CryptoAlgorithmEd25519::verify): (WebCore::CryptoAlgorithmEd25519::importKey): (WebCore::CryptoAlgorithmEd25519::exportKey): * Source/WebCore/crypto/algorithms/CryptoAlgorithmEd25519.h: Added. * Source/WebCore/crypto/keys/CryptoKeyOKP.cpp: Added. (WebCore::keySizeInBytesFromNamedCurve): (WebCore::CryptoKeyOKP::create): (WebCore::CryptoKeyOKP::CryptoKeyOKP): (WebCore::CryptoKeyOKP::generatePair): (WebCore::CryptoKeyOKP::importRaw): (WebCore::CryptoKeyOKP::importJwk): (WebCore::CryptoKeyOKP::exportRaw const): (WebCore::CryptoKeyOKP::exportJwk const): (WebCore::CryptoKeyOKP::namedCurveString const): (WebCore::CryptoKeyOKP::isValidOKPAlgorithm): (WebCore::CryptoKeyOKP::algorithm const): (WebCore::CryptoKeyOKP::platformSupportedCurve): (WebCore::CryptoKeyOKP::platformGeneratePair): (WebCore::CryptoKeyOKP::importSpki): (WebCore::CryptoKeyOKP::exportSpki const): (WebCore::CryptoKeyOKP::importPkcs8): (WebCore::CryptoKeyOKP::exportPkcs8 const): (WebCore::CryptoKeyOKP::computePublicKeyFromPrivateKey const): * Source/WebCore/crypto/keys/CryptoKeyOKP.h: Added. * Source/WebCore/crypto/mac/CryptoAlgorithmEd25519Cocoa.cpp: Added. (WebCore::signEd25519): (WebCore::verifyEd25519): (WebCore::CryptoAlgorithmEd25519::platformSign): (WebCore::CryptoAlgorithmEd25519::platformVerify): * Source/WebCore/crypto/mac/CryptoAlgorithmHKDFMac.cpp: * Source/WebCore/crypto/mac/CryptoAlgorithmRegistryMac.cpp: (WebCore::CryptoAlgorithmRegistry::platformRegisterAlgorithms): * Source/WebCore/crypto/mac/CryptoKeyOKPCocoa.cpp: Added. (WebCore::CryptoKeyOKP::platformSupportedCurve): (WebCore::CryptoKeyOKP::computePublicKeyFromPrivateKey const): (WebCore::CryptoKeyOKP::platformGeneratePair): (WebCore::CryptoKeyOKP::importSpki): (WebCore::CryptoKeyOKP::exportSpki const): (WebCore::CryptoKeyOKP::importPkcs8): (WebCore::CryptoKeyOKP::exportPkcs8 const): * Source/WebCore/platform/Logging.h: Canonical link: https://commits.webkit.org/259277@main _______________________________________________ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes