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 23498 - Should the nonce, IV, and associated data be separated?
Summary: Should the nonce, IV, and associated data be separated?
Status: RESOLVED WONTFIX
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-10-14 19:47 UTC by Harry Halpin
Modified: 2014-01-24 23:53 UTC (History)
2 users (show)

See Also:


Attachments

Description Harry Halpin 2013-10-14 19:47:57 UTC
The API should be suggestive of the right use.

    The encrypt interface seems to be missing some key parameters. For symmetric encryption I would suggest expanding it to

    Promise<any> encrypt(AlgorithmIdentifier algorithm,
    Key key,
    Nonce nonce,
    sequence<CryptoOperationData> associatedData);
    sequence<CryptoOperationData> cleartextData);

    As is, the Nonce and associatedData arguments are missing. As a result,
    in several modes the IV and associatedData are given as parameters to the
    algorithms. I worry that this will confuse developers into thinking that
    the IV and associatedData are set once when the key is initialized and
    never changed again. But both, especially the nonce, will need to be
    different for every message. At least if it is being passed in it would suggest to the developer that the nonce would be changed.

    Similarly, AES-GCM decrypt will need to take as input the ciphertext *and*
    associatedData. Would associatedData always be given as an algorithm
    parameter? (Dan Boneh)

    at least if it is being passed in it would suggest to the developer that the nonce would be changed.

    http://lists.w3.org/Archives/Public/public-webcrypto/2013Sep/0055.html
Related Actions Items:
Comment 1 Mark Watson 2014-01-24 23:53:40 UTC
There was no response to Ryan's comments on the list: 
http://lists.w3.org/Archives/Public/public-webcrypto/2013Oct/0022.html