This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
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.
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.
This should be resolved with https://dvcs.w3.org/hg/webcrypto-api/rev/2fa3494f0179