W3C home > Mailing lists > Public > public-webcrypto@w3.org > July 2014

Re: Spec for RSA-OAEP doesn't say what to do for null or missing or array buffer view labels

From: Ryan Sleevi <sleevi@google.com>
Date: Wed, 9 Jul 2014 18:41:53 -0700
Message-ID: <CACvaWvYj1_GO5aNgsvKpPX1Ez22jKdYODLPso=wEpOufZFDR9A@mail.gmail.com>
To: Boris Zbarsky <bzbarsky@mit.edu>
Cc: "public-webcrypto@w3.org" <public-webcrypto@w3.org>, Cameron McCormack <cam@mcc.id.au>
On Wed, Jul 9, 2014 at 6:35 PM, Boris Zbarsky <bzbarsky@mit.edu> wrote:

> On 7/9/14, 4:16 PM, Ryan Sleevi wrote:
>
>> I think we're saying the same thing, just differently, in that algorithm
>> normalization allows an ES NULL value to be propagated through, right?
>>
>
> null value.  Yes, for nullable members.
>
>
>  I didn't think default values were legal for union types
>> (CryptoOperationData).
>>
>
> They are legal as long as it's a valid default value for a type in the
> union.


>
>  I also didn't think it was legal for ArrayBuffer/ArrayBufferView, since
>> Web IDL currently (AIUI) treats them as object types, and there's no way
>> to represent constant object types (which would be needed for default
>> value, AIUI)
>>
>
> Yes, I'm saying we should fix this in Web IDL as needed .  More
> importantly, I'm saying that we should not allow Web IDL to constrain our
> API design in cases when it's obviously leading to a worse API.  If that
> happens, that's a problem with Web IDL.
>

Agreed - it's just a matter of identifying when something is "obviously
worse" :)

FWIW, I don't think Web IDL currently permits it, at least by the grammar.

DefaultValue = ConstValue | string | " [" "]"
ConstValue = BooleanLiteral | FloatLiteral | integer | "null"

So there's no IDL-way to say CryptoOperationData label = ArrayBuffer(0)



> Most simply, we could add some syntax in Web IDL to require a dictionary
> value to be present in a dictionary.  This has come up a few times now.


Yeah, this would have been nice.


>
>
>  Just to make sure linguistically we're on the same page. You're
>> proposing I refer to the value of %ArrayBufferPrototype%.slice, right?
>> Using the aforementioned table as the definition for
>> %ArrayBufferPrototype%
>>
>
> I think you want "the initial value of %ArrayBufferPrototype%.slice" here.
>
> -Boris
>
Received on Thursday, 10 July 2014 01:42:20 UTC

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