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 23098 - Specify algorithm normalization when reflected to key.algorithm (are generation parameters dropped?)
Summary: Specify algorithm normalization when reflected to key.algorithm (are generati...
Status: RESOLVED FIXED
Alias: None
Product: Web Cryptography
Classification: Unclassified
Component: Web Cryptography API Document (show other bugs)
Version: unspecified
Hardware: PC Linux
: P2 normal
Target Milestone: ---
Assignee: Ryan Sleevi
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-08-30 02:44 UTC by Eric Roman
Modified: 2014-02-13 13:05 UTC (History)
1 user (show)

See Also:


Attachments

Description Eric Roman 2013-08-30 02:44:25 UTC
Let's say you call generateKey() with an HmacKeyParams.

There are several possibilities for what the resulting key.algorithm looks like.
  (1) It is simplified to a HmacParams (i.e. the optional "length" field is dropped)
  (2) It is mirrored as the exact same HmacKeyParams
  (3) It is mirrored as a HmacKeyParams, where the optional "length" parameter is filled in with the default length that was inferred.

From an implementation standpoint my preference is to (1), since it means we don't need to define interfaces to reflect back the generation parameters. Option (2) by comparison is redundant since the caller already knows what parameters they passed in.
Comment 1 Alexey Proskuryakov 2013-11-01 17:58:46 UTC
Isn't key.algorithm the only way to observe the normalized algorithm anyway?

If the spec goes with (1), then it seems like algorithm normalizing rules can be removed.
Comment 2 Ryan Sleevi 2014-02-13 13:05:46 UTC
This should be resolved with https://dvcs.w3.org/hg/webcrypto-api/rev/2fa3494f0179