- From: Ryan Sleevi <sleevi@google.com>
- Date: Fri, 14 Dec 2012 10:56:38 -0800
- To: Wan-Teh Chang <wtc@google.com>
- Cc: Aymeric Vitte <vitteaymeric@gmail.com>, public-webcrypto-comments@w3.org
On Fri, Dec 14, 2012 at 5:58 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. > > Wan-Teh As I explained to Aymeric, what's being asked has nothing to do with streaming data - it's a request for a Clone operation, which is tracked in ISSUE-22. There are "roll your own crypto" operations that try to encrypt multiple blocks by starting with the same base state, or attempt to decrypt a block and, if it fails, "roll back" to some known good state. These are broken protocols, but they too would insist upon a need for cloning.
Received on Friday, 14 December 2012 18:57:07 UTC