W3C home > Mailing lists > Public > public-webcrypto@w3.org > January 2015

[Bug 27771] New: Should HKDF's derive bits operation throw OperationError if length is null?

From: <bugzilla@jessica.w3.org>
Date: Tue, 06 Jan 2015 19:20:11 +0000
To: public-webcrypto@w3.org
Message-ID: <bug-27771-7213@http.www.w3.org/Bugs/Public/>
https://www.w3.org/Bugs/Public/show_bug.cgi?id=27771

            Bug ID: 27771
           Summary: Should HKDF's derive bits operation throw
                    OperationError if length is null?
           Product: Web Cryptography
           Version: unspecified
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Web Cryptography API Document
          Assignee: sleevi@google.com
          Reporter: nharper@chromium.org
                CC: public-webcrypto@w3.org

The spec for HKDF's derive bits operation says to throw a TypeError if length
is null. I'm wondering if OperationError would be a better choice.

For 3 of the 4 other algorithms that support the derive bits operation (ECDH,
DH, PBKDF2), they throw an OperationError if the provided length is not valid
(which includes if the length is null). The last one (CONCAT) doesn't specify,
but it is implied that it would throw an OperationError. Since HKDF is the only
one that throws a TypeError if length is null, it seems like it would make more
sense to throw an OperationError instead to match the behavior of other
algorithms.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
Received on Tuesday, 6 January 2015 19:20:15 UTC

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