Subject: [Acme] Prepended zero octets in the fields of a JWK

From: Sophie Herold <[email-masked]>
Date: Tue, 19 Dec 2017 12:23:12 +0100

Hi,

I found those two statements contradictory. R and S should be part of
the JWK object if I am not mistaken. Can someone point me to the
relevant statement in RFC 7518?

Best,
Sophie

ACME-09

> As noted in JWA {{!RFC7518}} any prepended
> zero octets in the fields of a JWK object MUST be stripped before doing the computation.

RFC 7518

>    2.  Turn R and S into octet sequences in big-endian order, with each
>        array being be 32 octets long.  The octet sequence
>        representations MUST NOT be shortened to omit any leading zero
>        octets contained in the values.

---

From: Ilari Liusvaara <[email-masked]>
Date: Tue, 19 Dec 2017 13:34:42 +0200

> relevant statement in RFC 7518?

No, R and S are not part of JWK object. They are part of ECDSA
signature.

The public JWK fields include crv, e, kty, n, x and y (not all present
at once).

> > zero octets in the fields of a JWK object MUST be stripped before

This is about JWKs, which are keys.
 
> >        octets contained in the values.

This is about ECDSA signatures.

So one is talking about keys, the other about signatures, so there is
no contradiction.

-Ilari