Thanks for the commentary, Carl.  I was guessing that integers with the high 
bit set were prefixed by a zero byte, as you said.  That’s different than the 
zero byte (the 22nd byte in the attached RFC 7250 example) that comes before 
the ASN.1 INTEGER tag and length for the modulus, which I find to be more 
mysterious.  See below…


> ·        Is there always the apparently unused zero byte in the key 
> representation or if not, when is it present and absent?

> The leading zero is present for any integer value with the high bit set, 
> which is the case for RSA keys being encoded here.

This isn’t a leading zero of an integer – it’s a zero in the first byte of the 
bit field that holds the key value, which is followed by two ASN.1-encoded 
integers for the modulus and exponent.  Does anyone know why this zero is here? 
 And whether it is always there?


> ·        Is there always a leading zero byte in the RSA modulus or if not, 
> when is it present and absent?

> See above, except in this case the high bit is not set so no leading zero.

As I surmised – thanks.

                                                            -- Mike

Attachment: RFC 7520 Appendix A.docx
Description: RFC 7520 Appendix A.docx

Attachment: RFC 7250 Appendix A.docx
Description: RFC 7250 Appendix A.docx

_______________________________________________
jose mailing list
[email protected]
https://www.ietf.org/mailman/listinfo/jose

Reply via email to