W3C home > Mailing lists > Public > public-webcrypto-comments@w3.org > December 2012

Re: Streaming - [Re: CryptoOperation and its life cycle]

From: Mark Watson <watsonm@netflix.com>
Date: Fri, 14 Dec 2012 14:31:25 +0000
To: Wan-Teh Chang <wtc@google.com>
CC: Ryan Sleevi <sleevi@google.com>, Aymeric Vitte <vitteaymeric@gmail.com>, "public-webcrypto-comments@w3.org" <public-webcrypto-comments@w3.org>
Message-ID: <E96CE501-28F6-415F-9B52-EC9325C57883@netflix.com>

Sent from my iPhone

On Dec 14, 2012, at 6:00 AM, "Wan-Teh Chang" <wtc@google.com> wrote:

> On Fri, Dec 14, 2012 at 3:29 AM, Aymeric Vitte <vitteaymeric@gmail.com> wrote:
>> I am not talking about a partial hash output.
>> To be clear, the question is how to do what is here
>> https://github.com/Ayms/node-Tor/blob/master/src/crypto.cc#l396-416 ( what
>> is commented was the initial behavior, ie close the hash after digest, I did
>> modify it to keep the state before digest and process it again after digest)
>> or here https://gitweb.torproject.org/tor.git/blob/HEAD:/src/common/crypto.c
>> (lines 1578-1587, same thing)
> What Aymeric Vitte requested is the ability to fork a digest operation
> so that we can finish one branch of the fork to obtain the digest of
> the data up to that point.
> This is used in the CertificateVerify handshake message of the SSL/TLS
> protocol, so most native crypto libraries have this function. This
> issue was discussed before. Digest is the only operation I know of
> that has uses cases for this fork/copy/clone feature.

I can see why something additional is needed to do this with actual streams - but we don't have those yet in the API.

With simple ArrayBuffers, what's the problem with calculating separately the digest over A and A|B ? ( | = concatenation). Is it just to optimize so that we don't do the work for A twice ?

> Wan-Teh
Received on Friday, 14 December 2012 14:31:55 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 20:12:49 UTC