<div dir="ltr">Hi all<div><br>I wonder if someone might be able to help me with the above.  I understand, that to generate the digest, the PK must be encoded in PKCS#1 format.  And further to this, the public keys in the router descriptors are NOT in PKCS#1 format, but plain ASN.1.</div>

<div><br></div><div>I'm trying to generate the fingerprint given just the pubilc key in Java and after almost a whole day I'm about to give up.  Does anyone have a sample PKCS#1 encoded public key that is used immediately before SHA-1 to generate the fingerprint?  e.g. a hex string is what I'm after.  </div>

<div><br></div><div>It seems there are subtle ways that an PKCS#1 can vary while encoding the same information which affects the hash, Java seems to be doing it one way, OpenSSL another, an example on stack overflow adds an extra field, etc.</div>

<div><br></div><div>Many thanks</div><div>Gareth<br><div dir="ltr"></div>
</div></div>