W3C home > Mailing lists > Public > public-webcrypto@w3.org > October 2013

Re: Mutability of CryptoOperationData

From: Ryan Sleevi <sleevi@google.com>
Date: Fri, 25 Oct 2013 22:51:16 -0700
Message-ID: <CACvaWvYW0eKcV_jToDsonfn0so4CKEnmMU4pFZqrk5XVEcjV2w@mail.gmail.com>
To: Alexey Proskuryakov <ap@webkit.org>
Cc: public-webcrypto@w3.org
On Oct 25, 2013 12:34 PM, "Alexey Proskuryakov" <ap@webkit.org> wrote:
>
>
> As SubtleCrypto functions take sequences of typed arrays, what is the
intended semantics in the case the arrays are mutated while an operation is
underway? Are implementors expected to copy the data (or mark it for copy
on write)?

Yeah.

>
> One way to solve this in a simple and efficient way would be to specify
that the operations implicitly freeze the typed arrays passed to them. As
far as I can tell, this should be just fine for all use cases - e.g. one is
unlikely to modify data they just signed.
>
> - WBR, Alexey Proskuryakov
>
>

I dislike having to have side effects on the inputs, especially since
sequence is defined to make a copy (as opposed to array).

This implies copy/copy-on-write already, per WebIDL, unless I'm incorrectly
interpreting the sequence semantics.
Received on Saturday, 26 October 2013 05:51:43 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:17:19 UTC