Bug 164939 - [Mac] Change uint8_t* to Vector<uint8_t> type in all crypto algorithm implementation
Summary: [Mac] Change uint8_t* to Vector<uint8_t> type in all crypto algorithm impleme...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Sam Weinig
URL:
Keywords: InRadar
Depends on:
Blocks: 164938
  Show dependency treegraph
 
Reported: 2016-11-18 11:39 PST by Jiewen Tan
Modified: 2017-08-19 09:42 PDT (History)
8 users (show)

See Also:


Attachments
Patch (24.43 KB, patch)
2017-08-18 18:43 PDT, Sam Weinig
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jiewen Tan 2016-11-18 11:39:16 PST
Change uint8_t* to Vector<uint8_t> type in all crypto algorithm implementation once WebKitSubtleCrypto is deprecated.
This includes:
CryptoAlgorithmAES_CBCMac.cpp::static ExceptionOr<Vector<uint8_t>> transformAES_CBC(CCOperation operation, const uint8_t* iv, const Vector<uint8_t>& key, const uint8_t* data, size_t dataLength);
CryptoAlgorithmRSA_OAEP.cpp::static ExceptionOr<Vector<uint8_t>> encryptRSA_OAEP(CryptoAlgorithmIdentifier hash, const Vector<uint8_t>& label, const PlatformRSAKey key, size_t keyLength, const uint8_t* data, size_t dataLength);
CryptoAlgorithmRSAES_PKCS1_v1_5.cpp::static ExceptionOr<Vector<uint8_t>> encryptRSAES_PKCS1_v1_5(const PlatformRSAKey key, size_t keyLength, const uint8_t* data, size_t dataLength);
Comment 1 Brent Fulgham 2016-11-18 11:57:29 PST
I assume this implies getting rid of the distinct 'dataLength' argument, too?
Comment 2 Jiewen Tan 2016-11-18 11:58:50 PST
(In reply to comment #1)
> I assume this implies getting rid of the distinct 'dataLength' argument, too?

Yes.
Comment 3 Jiewen Tan 2016-11-22 13:32:52 PST
Appended:
CryptoAlgorithmRSA_OAEP.cpp::static ExceptionOr<Vector<uint8_t>> decryptRSA_OAEP(CryptoAlgorithmIdentifier hash, const Vector<uint8_t>& label, const PlatformRSAKey key, size_t keyLength, const uint8_t* data, size_t dataLength);
CryptoAlgorithmRSAES_PKCS1_v1_5.cpp::static ExceptionOr<Vector<uint8_t>> decryptRSAES_PKCS1_v1_5(const PlatformRSAKey key, size_t keyLength, const uint8_t* data, size_t dataLength);
Comment 4 Jiewen Tan 2016-11-29 18:47:11 PST
Appended:
CryptoAlgorithmHMACMac.cpp::static Vector<uint8_t> calculateSignature(CCHmacAlgorithm algorithm, const Vector<uint8_t>& key, const uint8_t* data, size_t dataLength)
CryptoAlgorithmRSASSA_PKCS1_v1_5Mac.cpp::static ExceptionOr<Vector<uint8_t>> signRSASSA_PKCS1_v1_5(CryptoAlgorithmIdentifier hash, const PlatformRSAKey key, size_t keyLength, const uint8_t* data, size_t dataLength)
Comment 5 Jiewen Tan 2016-11-30 13:22:35 PST
Appended:
CryptoAlgorithmRSASSA_PKCS1_v1_5Mac.cpp::static ExceptionOr<bool> verifyRSASSA_PKCS1_v1_5(CryptoAlgorithmIdentifier hash, const PlatformRSAKey key, const uint8_t* signature, size_t signatureLength, const uint8_t* data, size_t dataLength)
Comment 6 Jiewen Tan 2017-01-03 13:01:59 PST
Appended:
CryptoAlgorithmAES_KWMac.cpp::static ExceptionOr<Vector<uint8_t>> wrapKeyAES_KW(const Vector<uint8_t>& key, const uint8_t* data, size_t dataLength)
CryptoAlgorithmAES_KWMac.cpp::static ExceptionOr<Vector<uint8_t>> unwrapKeyAES_KW(const Vector<uint8_t>& key, const uint8_t* data, size_t dataLength)
Comment 7 Sam Weinig 2017-08-18 18:43:37 PDT
Created attachment 318570 [details]
Patch
Comment 8 Build Bot 2017-08-18 18:46:44 PDT Comment hidden (obsolete)
Comment 9 WebKit Commit Bot 2017-08-19 09:41:51 PDT
Comment on attachment 318570 [details]
Patch

Clearing flags on attachment: 318570

Committed r220953: <http://trac.webkit.org/changeset/220953>
Comment 10 WebKit Commit Bot 2017-08-19 09:41:52 PDT
All reviewed patches have been landed.  Closing bug.
Comment 11 Radar WebKit Bug Importer 2017-08-19 09:42:54 PDT
<rdar://problem/33979696>