Re: Separate method for key agreement?

On Mon, Apr 1, 2013 at 12:25 PM, Ryan Sleevi <sleevi@google.com> wrote:
>
> I'm not sure I'd agree here. Do you also see separate functions for ECDH
> agreement?

No.  The function that Richard proposed can handle both DH and ECDH:

"""
KeyOperation agreeKey(Key privateKey,
                      Key publicKey,
                      AlgorithmIdentifier? derivedKeyType,
                      bool extractable = false,
                      KeyUsage[] keyUsages = []);
"""

Richard's proposal is consistent with Windows CNG:
http://msdn.microsoft.com/en-us/library/windows/desktop/aa833130(v=vs.85).aspx

Note: Windows CAPI does Diffie-Hellman in a non-obvious manner (using
CryptImportKey), so Widows CAPI is not worth being consistent with:
http://msdn.microsoft.com/en-us/library/windows/desktop/aa381969(v=vs.85).aspx

Wan-Teh

Received on Tuesday, 2 April 2013 00:45:51 UTC