This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 27783 - Incompatible specification for how usages is enforced for ECDH
Summary: Incompatible specification for how usages is enforced for ECDH
Status: RESOLVED MOVED
Alias: None
Product: Web Cryptography
Classification: Unclassified
Component: Web Cryptography API Document (show other bugs)
Version: unspecified
Hardware: PC Windows NT
: P2 normal
Target Milestone: ---
Assignee: Ryan Sleevi
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-01-07 22:30 UTC by jimsch
Modified: 2016-05-24 00:25 UTC (History)
4 users (show)

See Also:


Attachments

Description jimsch 2015-01-07 22:30:20 UTC
ECDH says that key usages must contain deriveKey or deriveBits in step 3 for type jwk.
ECDH says that key usages must be empty in step 4 for type jwk.

The two are mutually incompatable.  I assume one is supposed to be for when d is absent as both are marked as being for d being present.
Comment 1 Ryan Sleevi 2015-01-07 22:41:07 UTC
Can you please provide a link to the revision you are quoting?

From the current https://dvcs.w3.org/hg/webcrypto-api/raw-file/d73602c274f0/spec/Overview.html#ecdh-operations

Import Key
JWK

3. If the "d" field is present and if usages contains an entry which is not "deriveKey" or "deriveBits" then throw a SyntaxError.

4. If the "d" field is present and if usages is not empty then throw a SyntaxError.
Comment 2 Eric Roman 2015-01-08 00:33:44 UTC
I agree with Jim, the language in step 4 seems reversed.
It would make more sense if it read:

If the "d" field is *NOT* present and if usages is not empty then throw a SyntaxError.

Which phrased differently is "public ECDH keys must have empty usages".

(The prohibition of private ECDH keys having empty usages is already covered by the generic language of importKey() which place such a restriction on secret/private keys)
Comment 3 jimsch 2016-03-04 02:34:03 UTC
as near as I can tell this has been fixed,