[Bug 27331] deriveBits() has a non-nullable length

https://www.w3.org/Bugs/Public/show_bug.cgi?id=27331

Mark Watson <watsonm@netflix.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |watsonm@netflix.com

--- Comment #1 from Mark Watson <watsonm@netflix.com> ---
The deriveBits *operation* is also used by the deriveKey method, in which case
the length supplied is the output of the 'get length' operation of the target
key algorithm. The value null is used for the case where (i) the target key
algorithm can import any number of bits and (ii) the derivation algorithm has a
default number of bits to output.

(i) includes the key derivation algorithms
(ii) includes the DH algorithms, where the derived bits are the DH shared
secret which has a defined length

So, whether the deriveBits *method* supports nullable length is an API design
decision. Technically, both options would make sense.

[It's still possible there are spec errors - the inconsistency between the
returned error types when checking the length value seems wrong].

-- 
You are receiving this mail because:
You are on the CC list for the bug.

Received on Monday, 17 November 2014 16:03:18 UTC