Discrepancies in extracted photo-id images from dumps
Stefan Claas
sac at 300baud.de
Mon Jan 21 12:46:14 CET 2019
On Sun, 20 Jan 2019 20:27:33 +0100, Stefan Claas wrote:
> On Sun, 20 Jan 2019 19:22:10 +0100, Peter Lebbing wrote:
> > On 20/01/2019 17:07, Peter Lebbing wrote:
> > > I had a quick scan through the source code, but couldn't find it.
> >
> > Oops! I was looking at ancient code instead of the current code. That's
> > why I didn't find it. It's a RIPEMD-160 hash of the attribute that
> > contains the JPEG image, but I'm not 100% clear on the exact byte
> > sequence. But it just hashes a representation of the image. You can see
> > the hash in it's hexadecimal form in:
> >
> > --8<---------------cut here---------------start------------->8---
> > $ gpg --with-colons -k KEYID
> > [...]
> > uat:n::::1497792746::91EC5F9C95BBB125AC85F65C06EF025712FCD036::1 2111:
> > [...]
> > --8<---------------cut here---------------end--------------->8---
> >
> > The 8th field (91EC...) is the UID hash, and is equal to the base32
> > encoded string in the %U escape.
>
> Thank you very much! I was able to hash a uid and it gave the proper
> hash value, same as in the gpg listing. However i am still unable to
> figure out the proper CLI sequence to get the same hash value and
> base32 value of a given uat. :-( I guess i must try harder! :-)
Problem solved. :-) A very good Usenet friend explained it to me.
To compute the hash of an image one has to add a 22bytes header
to the image and then the hash will be properly computed.
To get the proper base32 value i had to use Werner's zb32.
Regards
Stefan
More information about the Gnupg-users
mailing list