Closed Bug 1050785 Opened 10 years ago Closed 10 years ago

RSA-OAEP encrypt/decrypt should accept strings as AlgorithmIdentifiers

Categories

(Core :: Security, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla34

People

(Reporter: ttaubert, Assigned: ttaubert)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

dictionary RsaOaepParams : Algorithm {
  // The optional label/application data to associate with the message
  CryptoOperationData? label;
};

RsaOaepParams are the only interface that might just carry the algorithm name due to |label| being optional. encrypt() and decrypt() take an AlgorithmIdentifier so given that there are no other required parameters this should work right?

> crypto.subtle.encrypt("RSA-OAEP", pubKey, data);

I'm a little confused because the section about "normalizing an algorithm" [1] talks about returning a KeyAlgorithm in case the given algorithm identifier is a DOMString...

[1] https://dvcs.w3.org/hg/webcrypto-api/raw-file/tip/spec/Overview.html#dfn-normalize-an-algorithm
So... in case I got this right, here's a patch.
Attachment #8470048 - Flags: review?(rlb)
Attachment #8470048 - Flags: review?(rlb) → review+
https://hg.mozilla.org/mozilla-central/rev/8f65aea3ba06
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla34
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: