Bug 225294

Summary: [OpenSSL] Implement CryptoAlgorithmRSA*
Product: WebKit Reporter: Yoshiaki Jitsukawa <yoshiaki.jitsukawa>
Component: PlatformAssignee: Yoshiaki Jitsukawa <yoshiaki.jitsukawa>
Status: RESOLVED FIXED    
Severity: Normal CC: annulen, benjamin, cdumez, chris.reid, cmarcelo, don.olmstead, ews-watchlist, gyuyoung.kim, Hironori.Fujii, jiewen_tan, ryuan.choi, sergio, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 206439    
Attachments:
Description Flags
Patch
none
Patch
none
Patch none

Description Yoshiaki Jitsukawa 2021-05-03 02:10:45 PDT
Implement CryptoAlgorithmRSA_OAEP for OpenSSL along with CryptoKeyRSA.
Comment 1 Yoshiaki Jitsukawa 2021-05-03 03:50:59 PDT
Created attachment 427550 [details]
Patch
Comment 2 Yoshiaki Jitsukawa 2021-05-04 05:29:05 PDT
Comment on attachment 427550 [details]
Patch

Taking down the first patch to add some more RSA implementation.
Comment 3 Yoshiaki Jitsukawa 2021-05-05 05:58:40 PDT
Created attachment 427762 [details]
Patch
Comment 4 Christopher Reid 2021-05-05 17:16:07 PDT
Comment on attachment 427762 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=427762&action=review

Just have an informal comment

> Source/WebCore/crypto/openssl/CryptoAlgorithmRSAES_PKCS1_v1_5OpenSSL.cpp:38
> +    RELEASE_ASSERT_WITH_SECURITY_IMPLICATION(!(key.keySizeInBits() % 8));

Are these RELEASE_ASSERT_WITH_SECURITY_IMPLICATION checks needed? It looks like keySizeInBits returns either 0 or a multiple of 8 from getRSAModulusLength.
Comment 5 Yoshiaki Jitsukawa 2021-05-05 18:05:31 PDT
> Are these RELEASE_ASSERT_WITH_SECURITY_IMPLICATION checks needed? It looks like keySizeInBits returns either 0 or a multiple of 8 from getRSAModulusLength.

Nope, not really needed. I'll remove these.
Comment 6 Yoshiaki Jitsukawa 2021-05-06 04:50:47 PDT
Created attachment 427871 [details]
Patch
Comment 7 Yoshiaki Jitsukawa 2021-05-06 04:53:42 PDT
(In reply to Yoshiaki Jitsukawa from comment #6)
> Created attachment 427871 [details]
> Patch

Removed RELEASE_ASSERT_WITH_SECURITY_IMPLICATION(!(key.keySizeInBits() % 8)).
Comment 8 EWS 2021-05-06 17:17:13 PDT
Committed r277142 (237429@main): <https://commits.webkit.org/237429@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 427871 [details].
Comment 9 Radar WebKit Bug Importer 2021-05-06 17:18:38 PDT
<rdar://problem/77632965>
Comment 10 Fujii Hironori 2021-05-09 13:23:05 PDT
Filed: Bug 225581 – [WinCairo][Clang] lld-link: error: undefined symbol: public: static class GenericTypedArrayView<> in CryptoKeyRSAOpenSSL.cpp
Comment 11 Yoshiaki Jitsukawa 2021-07-07 16:04:51 PDT
*** Bug 206635 has been marked as a duplicate of this bug. ***