Bug 124466

Summary: Use uint8_t vectors for WebCrypto data
Product: WebKit Reporter: Alexey Proskuryakov <ap>
Component: WebCore Misc.Assignee: Alexey Proskuryakov <ap>
Status: RESOLVED FIXED    
Severity: Normal CC: andersca, darin, sam
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 122679    
Attachments:
Description Flags
proposed patch sam: review+

Alexey Proskuryakov
Reported 2013-11-16 23:57:35 PST
Using Vector<char> for key data is somewhat non-idiomatic, and it gets simply dangerous for bignums, because signed arithmetic is not appropriate for bignum digits. There is no good way to move data between Vector<char> and Vector<uint8_t>, so switching to Vector<uint8_t> requires teaching Base64 code how to produce and consume those.
Attachments
proposed patch (47.45 KB, patch)
2013-11-17 00:14 PST, Alexey Proskuryakov
sam: review+
Alexey Proskuryakov
Comment 1 2013-11-17 00:14:42 PST
Created attachment 217145 [details] proposed patch Not sure if the SignedOrUnsignedCharVectorAdapter and ConstSignedOrUnsignedCharVectorAdapter classes are the very best way to make Base64 work with both types. Thoughts?
Sam Weinig
Comment 2 2013-11-17 12:05:54 PST
(In reply to comment #1) > Created an attachment (id=217145) [details] > proposed patch > > Not sure if the SignedOrUnsignedCharVectorAdapter and ConstSignedOrUnsignedCharVectorAdapter classes are the very best way to make Base64 work with both types. Thoughts? Seems fine.
Alexey Proskuryakov
Comment 3 2013-11-17 13:39:53 PST
Note You need to log in before you can comment on or make changes to this bug.