<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-gb">
<link rel="self" type="application/atom+xml" href="https://forum.yubico.com/feed.php?f=33&amp;t=2526" />

<title>Yubico Forum</title>
<subtitle>...visit our web-store at</subtitle>
<link href="https://forum.yubico.com/index.php" />
<updated>2017-01-19T11:35:17+01:00</updated>

<author><name><![CDATA[Yubico Forum]]></name></author>
<id>https://forum.yubico.com/feed.php?f=33&amp;t=2526</id>
<entry>
<author><name><![CDATA[robn]]></name></author>
<updated>2017-01-19T11:35:17+01:00</updated>
<published>2017-01-19T11:35:17+01:00</published>
<id>https://forum.yubico.com/viewtopic.php?t=2526&amp;p=9279#p9279</id>
<link href="https://forum.yubico.com/viewtopic.php?t=2526&amp;p=9279#p9279"/>
<title type="html"><![CDATA[Re: Invalid signature in attestation certificate]]></title>

<content type="html" xml:base="https://forum.yubico.com/viewtopic.php?t=2526&amp;p=9279#p9279"><![CDATA[
Never mind. I've been informed that there's a <a href="https://github.com/briansmith/webpki/pull/34#issuecomment-273727506" class="postlink">set of six attestation certs with broken signatures</a>. Seems there's nothing here to see.<p>Statistics: Posted by <a href="https://forum.yubico.com/memberlist.php?mode=viewprofile&amp;u=4624">robn</a> — Thu Jan 19, 2017 11:35 am</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[robn]]></name></author>
<updated>2017-01-19T08:21:21+01:00</updated>
<published>2017-01-19T08:21:21+01:00</published>
<id>https://forum.yubico.com/viewtopic.php?t=2526&amp;p=9278#p9278</id>
<link href="https://forum.yubico.com/viewtopic.php?t=2526&amp;p=9278#p9278"/>
<title type="html"><![CDATA[Invalid signature in attestation certificate]]></title>

<content type="html" xml:base="https://forum.yubico.com/viewtopic.php?t=2526&amp;p=9278#p9278"><![CDATA[
I'm looking at an attestation certificate from a Yubikey Plus. The signature part (as shown by openssl asn1parse -dump) starts like this:<br /><br /><div class="codetitle"><b>Code:</b></div><div class="codecontent">  268:d=1  hl=2 l=  11 cons: SEQUENCE<br />  270:d=2  hl=2 l=   9 prim: OBJECT            :sha256WithRSAEncryption<br />  281:d=1  hl=4 l= 257 prim: BIT STRING<br />      0000 - 03 76 0e 36 95 65 ef 88-e9 04 28 04 d8 8f fa 5f   .v.6.e....(...._<br />      0010 - bd 5b 99 93 a3 12 46 8f-b1 74 96 12 96 a5 39 cc   .&#91;....F..t....9.<br />  ...</div><br /><br />In an ASN.1 BIT STRING, the first byte is the number of unused/padding bits at the end of the string.<br /><br />According to <a href="https://tools.ietf.org/html/rfc3447#section-8.2.1" class="postlink">RFC3477 s8.2.1</a>: &quot;Output: an octet string of length k, where k is the length in octets of the RSA modulus n.&quot;<br /><br />Therefore, it is impossible to have a valid DER-encoded RSA PKCS#1 signature that has unused bits.<br /><br />Is this certificate completely broken? Can you advise an approach for parsing it?<br /><br />(for more info and the certificate in question, please see <!-- m --><a class="postlink" href="https://github.com/briansmith/webpki/pull/34">https://github.com/briansmith/webpki/pull/34</a><!-- m -->).<p>Statistics: Posted by <a href="https://forum.yubico.com/memberlist.php?mode=viewprofile&amp;u=4624">robn</a> — Thu Jan 19, 2017 8:21 am</p><hr />
]]></content>
</entry>
</feed>