ISSUE-28: Short-names for algorithms

Short-names for algorithms

State:
CLOSED
Product:
usability for Web Crypto API
Raised by:
Ryan Sleevi
Opened on:
2012-08-22
Description:
As part of ACTION-7, the API was adjusted such that "AlgorithmIdentifier" was a WebIDL union of (Algorithm OR DOMString). The use of DOMString was to allow a short-hand symbolic name to be supplied for an algorithm, as opposed to requiring a complete algorithm name. The intent is that the DOMString can be translated into a qualified Algorithm that is fully initialized.

For example, a string of 'RSA-PSS-SHA1' might be translated into an Algorithm equivalent of
{ 'name': 'rsa-pss',
'params': {
'hash': { 'name': 'sha1' },
'mgf': { 'name': 'sha1' }
}
}

However, that fails to identify the saltLength passed as part of the RsaPssParams.

One option would be to encode the missing parameters as part of the string identifier, essentially adding an alternative syntax to Dictionary to pass objects. For example, 'RSA-PSS-SHA1-20', would be parsed as ('rsa-pss', (hash = mgf = 'sha1'), saltLength = 20)

Another option would be to allow the DOMString identifier to be passed as the 'name' of an Algorithm, thus permitting the following:
{ 'name': 'rsa-pss-sha1',
'params': { 'saltLength': 20 }
}

Both solutions have the downside in that they're resorting to string-encoding the parameters, rather than specifying the object. However, for parameters that may be repetitive, such simplification may lead to an easier programming experience.

A third solution would be to remove short-names, as they originated in part due to a desire to use JOSE algorithm names. The result of ISSUE-13 appears to suggest this use case may not be as significant.
Related Actions Items:
Related emails:
  1. RE: New Editor's Draft Published (from karen.lu@gemalto.com on 2012-09-04)
  2. New Editor's Draft Published (from sleevi@google.com on 2012-08-31)
  3. Re: crypto-ISSUE-28: Short-names for algorithms [Web Cryptography API] (from sleevi@google.com on 2012-08-22)
  4. Re: crypto-ISSUE-28: Short-names for algorithms [Web Cryptography API] (from watsonm@netflix.com on 2012-08-22)
  5. crypto-ISSUE-28: Short-names for algorithms [Web Cryptography API] (from sysbot+tracker@w3.org on 2012-08-22)

Related notes:

No additional notes.

Display change log ATOM feed


Chair, Staff Contact
Tracker: documentation, (configuration for this group), originally developed by Dean Jackson, is developed and maintained by the Systems Team <w3t-sys@w3.org>.
$Id: 28.html,v 1.1 2017/02/13 16:16:51 ted Exp $