Bug 171219 - [GCrypt] RSAES-PKCS1-v1_5 support
Summary: [GCrypt] RSAES-PKCS1-v1_5 support
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Zan Dobersek
URL:
Keywords: InRadar
Depends on: 171213
Blocks: 133122
  Show dependency treegraph
 
Reported: 2017-04-24 06:55 PDT by Zan Dobersek
Modified: 2017-05-30 20:30 PDT (History)
4 users (show)

See Also:


Attachments
Patch (8.93 KB, patch)
2017-04-24 07:02 PDT, Zan Dobersek
no flags Details | Formatted Diff | Diff
Patch (11.32 KB, patch)
2017-04-26 01:07 PDT, Zan Dobersek
mcatanzaro: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Zan Dobersek 2017-04-24 06:55:58 PDT
[GCrypt] RSAES-PKCS1-v1_5 support
Comment 1 Zan Dobersek 2017-04-24 07:02:11 PDT
Created attachment 307970 [details]
Patch

Still has to enable the relevant layout tests.
Comment 2 Build Bot 2017-04-24 07:03:13 PDT
Attachment 307970 [details] did not pass style-queue:


ERROR: Source/WebCore/crypto/gcrypt/CryptoAlgorithmRSAES_PKCS1_v1_5GCrypt.cpp:126:  CryptoAlgorithmRSAES_PKCS1_v1_5::platformEncrypt is incorrectly named. Don't use underscores in your identifier names.  [readability/naming/underscores] [4]
ERROR: Source/WebCore/crypto/gcrypt/CryptoAlgorithmRSAES_PKCS1_v1_5GCrypt.cpp:153:  CryptoAlgorithmRSAES_PKCS1_v1_5::platformDecrypt is incorrectly named. Don't use underscores in your identifier names.  [readability/naming/underscores] [4]
Total errors found: 2 in 2 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 3 Zan Dobersek 2017-04-26 01:07:21 PDT
Created attachment 308231 [details]
Patch
Comment 4 Build Bot 2017-04-26 01:08:38 PDT
Attachment 308231 [details] did not pass style-queue:


ERROR: Source/WebCore/crypto/gcrypt/CryptoAlgorithmRSAES_PKCS1_v1_5GCrypt.cpp:126:  CryptoAlgorithmRSAES_PKCS1_v1_5::platformEncrypt is incorrectly named. Don't use underscores in your identifier names.  [readability/naming/underscores] [4]
ERROR: Source/WebCore/crypto/gcrypt/CryptoAlgorithmRSAES_PKCS1_v1_5GCrypt.cpp:153:  CryptoAlgorithmRSAES_PKCS1_v1_5::platformDecrypt is incorrectly named. Don't use underscores in your identifier names.  [readability/naming/underscores] [4]
Total errors found: 2 in 4 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 5 Michael Catanzaro 2017-05-20 12:54:28 PDT
Comment on attachment 308231 [details]
Patch

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

I'm surprised that WebKit supports so many crypto algorithms that are not part of the WebCryto standard. I know this is permitted, it's just unusual. Anyway, thanks for bringing us up to feature parity with the Mac port.

As with all these WebCrypto patches, you should try to get a review from Jiewen as well.

> Source/WebCore/crypto/gcrypt/CryptoAlgorithmRSAES_PKCS1_v1_5GCrypt.cpp:88
> +    // Return MPI data of the embedded a integer.

This comment is missing something!
Comment 6 Zan Dobersek 2017-05-22 11:26:02 PDT
(In reply to Michael Catanzaro from comment #5)
> Comment on attachment 308231 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=308231&action=review
> 
> I'm surprised that WebKit supports so many crypto algorithms that are not
> part of the WebCryto standard. I know this is permitted, it's just unusual.
> Anyway, thanks for bringing us up to feature parity with the Mac port.
> 

We should review what we want to support -- whether we want to follow the spec closely, or whether we're fine with supporting other algorithms as well.

For instance, I think AES_CFB has been dropped from the spec, and we might not want to support it since there's been no release of libgcrypt yet that we could use to support that algorithm.

> As with all these WebCrypto patches, you should try to get a review from
> Jiewen as well.
> 
> > Source/WebCore/crypto/gcrypt/CryptoAlgorithmRSAES_PKCS1_v1_5GCrypt.cpp:88
> > +    // Return MPI data of the embedded a integer.
> 
> This comment is missing something!

The integer is actually named as `a`. I should add quotations.
Comment 7 Jiewen Tan 2017-05-24 11:57:02 PDT
Comment on attachment 308231 [details]
Patch

Looks good to me as well.
Comment 8 Zan Dobersek 2017-05-30 00:45:13 PDT
Committed r217546: <http://trac.webkit.org/changeset/217546>
Comment 9 Radar WebKit Bug Importer 2017-05-30 20:30:15 PDT
<rdar://problem/32479867>