Re: [push-api] Message encryption (#130)

> +      <ol>
> +        <li>Let <var>map</var> be an empty map.
> +        </li>
> +        <li>Add an entry to <var>map</var> whose key name is <code>endpoint</code> and whose value
> +        is the result of converting the <code>endpoint</code> attribute of the
> +        <a><code>PushSubscription</code></a> to a serialized value.
> +        </li>
> +        <li>Let <var>keys</var> be an empty map.
> +        </li>
> +        <li>For each identifier <var>i</var> corresponding to keys in internal slots on the
> +        <a><code>PushSubscription</code></a>, ordered by the name of the key:
> +          <ol>
> +            <li>Add an entry to <var>keys</var> whose key name is the name of the key and whose
> +            value is an <code>ArrayBuffer</code> containing the defined serialization of the public
> +            key (for an asymmetric key pair) or the key (for a symmetric key).
> +            </li>

If `K` is 32 octets of binary data, then this is easy, but keys are often other than an octet string.  An elliptic curve public key is sometimes a pair of numbers, which then have to be compressed and encoded, or just encoded (where you define whether it is big- or little-endian).  This probably needs to refer to the encryption spec, which specifies the format for the public key we are using.

---
Reply to this email directly or view it on GitHub:
https://github.com/w3c/push-api/pull/130/files#r37892818

Received on Tuesday, 25 August 2015 17:21:53 UTC