Re: Certificate Encoding Questions
Ryan Sleevi <[email protected]>
| Newsgroups | gmane.ietf.x509 |
|---|---|
| Message-ID | <CAErg=HE2YOc5jFK0km7eoTHMkykxzFTXBY0swkdbQD8JJ-5JKQ@mail.gmail.com> |
On Thu, Sep 5, 2019 at 11:19 AM <[email protected]> wrote: > I have a few simple questions about ASN.1 encoding for X.509 certificates. > Can you help? > > > > 1) The KeyUsage extension includes a BIT STRING. Is this encoded so > that the most significant bit in the DER encoded value is bit 0 > (digitalSignature)? After looking at a few certificates, that seems to be > true but I want to verify. > X.690 addresses this, as that describes how DER encoding (and BER encoding) work on the wire. In X.690 (08/15), the relevant clause will be 8.6.2.1 (for the general BER encoding) and 11.2 for the further DER modifications. > 2) RFC 5754 says that when the algorithm OID in an > AlgorithmIdentifier structure is sha256WithRSAEncryption, the parameters > MUST be NULL. Would that NULL value encode to an additional 05 00 at the > end of the SEQUENCE? Again, I observe this to be true but I want to verify > it. > Yes. Omission would have been specified by "MUST be absent.". This is perhaps more obvious in RFC 5912, which provides an explicit ASN.1 module that captures these encoding requirements (specifically, see Section 8, ASN.1 Module for RFC 4055) _______________________________________________ pkix mailing list [email protected] https://www.ietf.org/mailman/listinfo/pkix