Our goal is to eliminate the non-constructible KeyAlgorithm
interface, and all its derived counterparts (e.g. RsaKeyAlgorithm
). We can just use plain JavaScript objects instead, represented by their counterpart Algorithm
dictionaries (e.g. RsaKeyParams
).
As WebIDL is lacking in technology for manipulating JS objects, this will require a line or two of prose.
On Formalization
One problem with the existing spec that makes formalizing this difficult is that the spec sets readonly attributes on instances, which should be impossible. E.g. section 18.4.5, Generate Key, step 12 says "Set the algorithm attribute of publicKey to be algorithm": but the algorithm
attribute is readonly, and so it cannot be set.
We can work around this, without having to make extensive disruptive changes to the spec, by granting the spec special powers to set readonly attributes. We need to specially call out the interaction of these special powers with normal attribute semantics, however. We'll see that in action bel