1
$\begingroup$

I have two X.509 certificates in DER format.

A:

3082013C3081E4A003020102020A47901280001155957352300A06082A8648CE3D0403023017311530130603550403130C476E756262792050696C6F74301E170D3132303831343138323933325A170D3133303831343138323933325A3031312F302D0603550403132650696C6F74476E756262792D302E342E312D34373930313238303030313135353935373335323059301306072A8648CE3D020106082A8648CE3D030107034200048D617E65C9508E64BCC5673AC82A6799DA3C1446682C258C463FFFDF58DFD2FA3E6C378B53D795C4A4DFFB4199EDD7862F23ABAF0203B4B8911BA0569994E101300A06082A8648CE3D0403020347003044022060CDB6061E9C22262D1AAC1D96D8C70829B2366531DDA268832CB836BCD30DFA0220631B1459F09E6330055722C8D89B7F48883B9089B88D60D1D9795902B30410DF

decoded

and

B:

308201b530820158a003020102020101300c06082a8648ce3d04030205003061310b300906035504061302444531263024060355040a0c1d556e7472757374776f72746879204341204f7267616e69736174696f6e310f300d06035504080c064265726c696e3119301706035504030c10556e7472757374776f727468792043413022180f32303134303932343132303030305a180f32313134303932343132303030305a305e310b30090603550406130244453121301f060355040a0c187669727475616c2d7532662d6d616e756661637475726572310f300d06035504080c064265726c696e311b301906035504030c127669727475616c2d7532662d76302e302e313059301306072a8648ce3d020106082a8648ce3d03010703420004361f015c81c6b8cf7a14a4856f19f6a3e4101f7b8b4ca4bdb1270180625cbefe0eb8534defbb73bb6506312b8287830e13137de499cb61508303fd6f8b5b186f300c06082a8648ce3d04030205000349003046022100a9d29ac6692a6ca13b15bb64e774f3eb8192bda1f260a76a3157ba4679f88641022100d1abb880443af65efa604ca1cd29043b0bef8d7816b4fbcd2ed5da64b2942751

decoded

On inspection I have noticed that the last integer sequences of the certificates have a different lengths. What purpose does this sequence have? What is a valid length for this sequence? How can the difference be explained?

$\endgroup$
  • 3
    $\begingroup$ the last 2 numbers are the ecdsa signature, it is two unsigned integers, when the highest byte happens to be larger than 127, the asn.1 BER encoding adds an extra zero. $\endgroup$ – Willem Hengeveld Sep 26 '14 at 11:09
  • $\begingroup$ @WillemHengeveld Could you make that an answer? Groetjes. $\endgroup$ – Maarten - reinstate Monica Sep 30 '14 at 22:07
2
$\begingroup$

The last 2 numbers are the ecdsa signature, it is two unsigned integers, when the highest byte happens to be larger than 127, the asn.1 BER encoding adds an extra zero.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.