Discussion:
photo-ID
(too old to reply)
Philip Jackson
2014-12-31 12:42:49 UTC
Permalink
I've been looking for documentation with info on adding a photo id to a gpg key.
The instructions for adding are available but I can't find any advice for the
size, format, dpi etc of the image to be used.

I guess that the image size should be kept down somewhat to avoid making the key
too large. And it appears that not all software will display the image at the
same size.

Can anyone offer practical advice on the image parameters ?

Philip
Sandeep Murthy
2014-12-31 13:27:43 UTC
Permalink
Hi Philip

Actually, there is information in the Manual (https://www.gnupg.org/documentation/manuals.html)
about adding photos to your keys, the relevant section is 4.1.3 (of the HTML version of the manual)
on key management, which is this page

https://www.gnupg.org/documentation/manuals/gnupg/OpenPGP-Key-Management.html#OpenPGP-Key-Management.

The command is the `addphoto` subcommand of `—edit-key` - one adds a photo by executing

`$ gpg —edit-key <short key ID> addphoto`

which prints out the following message (after the key information and associated emails):

```
Pick an image to use for your photo ID. The image must be a JPEG file.
Remember that the image is stored within your public key. If you use a
very large picture, your key will become very large as well!
Keeping the image close to 240x288 is a good size to use.

Enter JPEG filename for photo ID:
```

This message indicates acceptable dimensions but not size. However some GUI key
management tools, such as Keychain tool from the GPG Suite (https://gpgtools.org/) specify that
photos must be < 500 KB and the recommended size be < 15 KB.

Sandeep Murthy
Post by Philip Jackson
I've been looking for documentation with info on adding a photo id to a gpg key.
The instructions for adding are available but I can't find any advice for the
size, format, dpi etc of the image to be used.
I guess that the image size should be kept down somewhat to avoid making the key
too large. And it appears that not all software will display the image at the
same size.
Can anyone offer practical advice on the image parameters ?
Philip
_______________________________________________
Gnupg-users mailing list
http://lists.gnupg.org/mailman/listinfo/gnupg-users
Philip Jackson
2014-12-31 21:57:44 UTC
Permalink
Post by Sandeep Murthy
https://www.gnupg.org/documentation/manuals/gnupg/OpenPGP-Key-Management.html#OpenPGP-Key-Management.
The command is the `addphoto` subcommand of `—edit-key` - one adds a photo by executing
`$ gpg —edit-key <short key ID> addphoto`
```
Pick an image to use for your photo ID. The image must be a JPEG file.
Remember that the image is stored within your public key. If you use a
very large picture, your key will become very large as well!
Keeping the image close to 240x288 is a good size to use.
Thanks, Sandeep. I had found that page but didn't realise that I'd actually
have to implement the command to get the additional info on a suggested size.
That is not actually very clever - it hardly permits you to prepare an image
before installing it to the key.

Philip
Robert J. Hansen
2014-12-31 14:31:31 UTC
Permalink
Post by Philip Jackson
I've been looking for documentation with info on adding a photo id to a gpg key.
The instructions for adding are available but I can't find any advice for the
size, format, dpi etc of the image to be used.
The major problem is there is very little good advice about this, and what there is keeps changing. For a long time the PGP Desktop product used 120x144 as a picture size. Back when a high-resolution display was 800x600 it made a lot of sense; now, when my laptop has a 2880x1800 display, a 120x144 image is literally smaller than a postage stamp.

GnuPG adopted the photo-ID feature a few years later and technology had already progressed to the point where the GnuPG advice was 240x288. That advice hasn’t changed in over ten years; it’s probably out of date by now.

With respect to what format should be used, the de-facto standard seems to be JPEG.

I personally don’t find photo ID to be a useful feature. They’re too static. The photo ID on my certificate, for instance, is almost ten years old. If you need photo ID, a better route would appear to be something like keybase.io, which offers some neat tools for binding a certificate to photographs, social media accounts, and whatnot.
MFPA
2014-12-31 21:27:16 UTC
Permalink
Hi


On Wednesday 31 December 2014 at 2:31:31 PM, in
I personally don’t find photo ID to be a useful
feature. They’re too static. The photo ID on my
certificate, for instance, is almost ten years old.
Just as much use as the photo in a passport, then. (-;


- --
Best regards

MFPA mailto:2014-667rhzu3dc-lists-***@riseup.net

Adults are obsolete children.
Sandeep Murthy
2014-12-31 21:54:37 UTC
Permalink
I don’t agree.

Why isn’t the photo ID feature not useful? Surely any piece of
information that would help another person, with whom you
are proposing to communicate, to identify you first, is a good
thing. Before they can trust you enough to sign the key (which
can’t be very often using the PGP model) they must be able to
identify you, and a photo ID helps them to put a name to a face,
or at least provides a reference point with which to do other
checks, before signing the key, let alone encrypting -
someone’s photo ID to do a google image search on it, bringing
up other information that could be useful.

Maybe I’m wrong but the problem with GPG is that it has too few
verification tools, like the photo ID. In my keychain I have 35
public keys for different individuals with whom I may want
to communicate via GPG, but I’ve probably only signed a fraction
of them, maybe 10, and only a handful of those are people I
know personally. I always sign my messages, but if you are
unable to trust someone enough to sign they key (or even their
signature) then I’m not sure that PGP is very useful or fulfils
its purpose.

As for the photo ID feature itself surely there are technical fixes
for that, including allowing people to upload slightly larger images
than would bepossible with the recommended dimensions without increasing
the key size. For reference, passport photographs are pretty
small, as we are all aware, (I think 35 by 45 mm in the EU), and
when we send email a scan of our passport page for some job
application or whatever it is not likely to be a good.
Post by Robert J. Hansen
Post by Philip Jackson
I've been looking for documentation with info on adding a photo id to a gpg key.
The instructions for adding are available but I can't find any advice for the
size, format, dpi etc of the image to be used.
The major problem is there is very little good advice about this, and what there is keeps changing. For a long time the PGP Desktop product used 120x144 as a picture size. Back when a high-resolution display was 800x600 it made a lot of sense; now, when my laptop has a 2880x1800 display, a 120x144 image is literally smaller than a postage stamp.
GnuPG adopted the photo-ID feature a few years later and technology had already progressed to the point where the GnuPG advice was 240x288. That advice hasn’t changed in over ten years; it’s probably out of date by now.
With respect to what format should be used, the de-facto standard seems to be JPEG.
I personally don’t find photo ID to be a useful feature. They’re too static. The photo ID on my certificate, for instance, is almost ten years old. If you need photo ID, a better route would appear to be something like keybase.io, which offers some neat tools for binding a certificate to photographs, social media accounts, and whatnot.
_______________________________________________
Gnupg-users mailing list
http://lists.gnupg.org/mailman/listinfo/gnupg-users
Robert J. Hansen
2015-01-01 02:30:05 UTC
Permalink
Post by Sandeep Murthy
I don’t agree.
With what?
Post by Sandeep Murthy
Why isn’t the photo ID feature not useful?
I never said it wasn’t.

I said the photo ID feature, *as used within OpenPGP certificates*, isn’t. There’s a big difference there.

Frankly, the possibility of allowing arbitrarily-sized binary blobs to be attached to OpenPGP certificates scares the ever-living bloody f*ck out of me. (I try to avoid vulgarity, but I’m using it here to underline just how critical this problem is.) The keyserver network, as currently configured, is susceptible to a total worldwide denial-of-service attack that can be conducted by just one malicious individual who figures out how to turn the photo ID feature into an attack vector.

I’ve discussed this attack vector on the keyserver mailing list. The general consensus is that the attack that I’m concerned about is real, and would result in serious disruption to the global keyserver network for an extended period until we developed countermeasures — but those countermeasures would fundamentally transform the keyserver network and force us to radically redefine our expectations of service.

So, yeah. Photo IDs on OpenPGP certificates is really another way of saying “OpenPGP supports putting arbitrarily-sized binary blobs on certificates that will be replicated worldwide and, depending on local jurisdictions, will immediately convert keyserver operators into felons.” That’s enough for me to declare the entire OpenPGP implementation of photo IDs a staggering clusterf*ck of failure, and something that I really wish would get dropped from the OpenPGP spec.

(I’m not going into specifics about the attack because I don’t want to give anyone ideas, not in any expectation that it really matters a damn. My write-up is available, but I’m not going to help you find it.)
Post by Sandeep Murthy
Surely any piece of
information that would help another person, with whom you
are proposing to communicate, to identify you first, is a good
thing.
Sure, but it would be nice if it didn’t expose people to phenomenal risk while we’re at it.

We have better ways of doing photo IDs — e.g., keybase.io. I think we should use them.

You’re arguing against something I never said and don’t believe.
Robert J. Hansen
2015-01-01 02:58:59 UTC
Permalink
Post by Robert J. Hansen
I’ve discussed this attack vector on the keyserver mailing list. The general consensus is that the attack that I’m concerned about is real, and would result in serious disruption to the global keyserver network for an extended period until we developed countermeasures — but those countermeasures would fundamentally transform the keyserver network and force us to radically redefine our expectations of service.
Before people think I’m overreacting —

A few years ago we lost an Austrian keyserver to, of all things, EU data privacy laws. Think about the irony of that: a tool meant to help safeguard individual privacy got shut down by a single individual who invoked EU data privacy laws to get rid of a tool that helps data privacy.

A user uploaded their certificate to a keyserver, and that certificate soon propagated around the net. The user then decided they didn’t want their email address published like that, and invoked a right under EU law to require the keyserver operator to delete his email address. The keyserver operator was unable to do this due to the way the keyserver network works — if he’d complied, the certificate just would have resynced a minute later. The only way to support this EU data privacy provision was to allow the global network to drop certificates, and the global network has as a design goal that certificates *cannot* be dropped, in order to protect the integrity of the database against deliberate attack.

The keyserver operator received legal advice saying that continuing to operate his keyserver exposed him to significant legal risk. So, without any real other alternatives, he did the only thing he could under the EU data privacy law and took his keyserver offline.

It is cheap and easy to take down any keyserver in the EU; just do what this user did.

The keyserver network is an important part of the OpenPGP ecosystem, and it’s nowhere near as robust as we like to imagine.
Nicholas Cole
2015-01-01 12:01:02 UTC
Permalink
I’ve discussed this attack vector on the keyserver mailing list. The
general consensus is that the attack that I’m concerned about is real, and
would result in serious disruption to the global keyserver network for an
extended period until we developed countermeasures — but those
countermeasures would fundamentally transform the keyserver network and
force us to radically redefine our expectations of service.
Before people think I’m overreacting —
No. It is a realistic attack. Key servers might legitimately strip photo
ids if it were ever a problem, IMHO.

But in fact, a UID packet can contain arbitrary data anyway, can't it?
Isn't that just the same problem.

N.
Sandeep Murthy
2015-01-01 13:33:38 UTC
Permalink
Hi

Sorry if I misunderstood, but I didn’t say that the photo ID should
be allowed to be as large as possible, and this is not allowed anyway
by, for example, apps like GPG Keychain.

But I was wondering … instead of attaching a photo to a public key,
why not attach a hash of the photo using an image hashing
algorithm? I don’t know much about image hashing (but this
discussion has now made me more curious to learn) but such an
algorithm is supposed to calculate a hash value for an image that
could be compared against **perceptually similar** images. Since this will
be a string it would not lead to the blob attack scenario described before.

I found some interesting resources including a paper describing some
algorithms

http://www.phash.org/docs/pubs/thesis_zauner.pdf

and there are also several API implementations

http://www.phash.org/ (C++)
https://pypi.python.org/pypi/ImageHash (Python).

Would it not be possible for gpg to incorporate these so that a user
can attach a set of hash values for their photo(s) to their public key that
recipients could check against some other source?

Sandeep Murthy
Post by Robert J. Hansen
Post by Sandeep Murthy
I don’t agree.
With what?
Post by Sandeep Murthy
Why isn’t the photo ID feature not useful?
I never said it wasn’t.
I said the photo ID feature, *as used within OpenPGP certificates*, isn’t. There’s a big difference there.
Frankly, the possibility of allowing arbitrarily-sized binary blobs to be attached to OpenPGP certificates scares the ever-living bloody f*ck out of me. (I try to avoid vulgarity, but I’m using it here to underline just how critical this problem is.) The keyserver network, as currently configured, is susceptible to a total worldwide denial-of-service attack that can be conducted by just one malicious individual who figures out how to turn the photo ID feature into an attack vector.
I’ve discussed this attack vector on the keyserver mailing list. The general consensus is that the attack that I’m concerned about is real, and would result in serious disruption to the global keyserver network for an extended period until we developed countermeasures — but those countermeasures would fundamentally transform the keyserver network and force us to radically redefine our expectations of service.
So, yeah. Photo IDs on OpenPGP certificates is really another way of saying “OpenPGP supports putting arbitrarily-sized binary blobs on certificates that will be replicated worldwide and, depending on local jurisdictions, will immediately convert keyserver operators into felons.” That’s enough for me to declare the entire OpenPGP implementation of photo IDs a staggering clusterf*ck of failure, and something that I really wish would get dropped from the OpenPGP spec.
(I’m not going into specifics about the attack because I don’t want to give anyone ideas, not in any expectation that it really matters a damn. My write-up is available, but I’m not going to help you find it.)
Post by Sandeep Murthy
Surely any piece of
information that would help another person, with whom you
are proposing to communicate, to identify you first, is a good
thing.
Sure, but it would be nice if it didn’t expose people to phenomenal risk while we’re at it.
We have better ways of doing photo IDs — e.g., keybase.io. I think we should use them.
You’re arguing against something I never said and don’t believe.
Johan Wevers
2015-01-01 15:33:38 UTC
Permalink
Sorry if I misunderstood, but I didn’t say that the photo ID should
be allowed to be as large as possible, and this is not allowed anyway
by, for example, apps like GPG Keychain.
Huge size would not be the only problem. Wait until the first person
uploads a key with a child porn image as photo-id, and then wildly posts
"to download this child porn image, get GnuPG and download key
0x12345678. It might even be done by someone who deliberately wishes to
get all keyservers offline.
--
ir. J.C.A. Wevers
PGP/GPG public keys at http://www.xs4all.nl/~johanw/pgpkeys.html
Robert J. Hansen
2015-01-01 23:38:42 UTC
Permalink
Post by Sandeep Murthy
Sorry if I misunderstood, but I didn’t say that the photo ID should
be allowed to be as large as possible, and this is not allowed anyway
by, for example, apps like GPG Keychain.
It *is* allowed by the spec, and it’s the spec that’s the problem here.
Post by Sandeep Murthy
But I was wondering … instead of attaching a photo to a public key,
why not attach a hash of the photo using an image hashing
algorithm?
This is sort of what keybase.io does; it lets you post cryptographically-signed statements like “this is my Twitter account” to let other people have confidence that a given social media account really does belong to you.
Philip Jackson
2014-12-31 22:21:12 UTC
Permalink
Post by Robert J. Hansen
Post by Philip Jackson
I've been looking for documentation with info on adding a photo id to a gpg key.
The instructions for adding are available but I can't find any advice for the
size, format, dpi etc of the image to be used.
The major problem is there is very little good advice about this, and what there is keeps changing. For a long time the PGP Desktop product used 120x144 as a picture size. Back when a high-resolution display was 800x600 it made a lot of sense; now, when my laptop has a 2880x1800 display, a 120x144 image is literally smaller than a postage stamp.
GnuPG adopted the photo-ID feature a few years later and technology had already progressed to the point where the GnuPG advice was 240x288. That advice hasn’t changed in over ten years; it’s probably out of date by now.
With respect to what format should be used, the de-facto standard seems to be JPEG.
I personally don’t find photo ID to be a useful feature. They’re too static. The photo ID on my certificate, for instance, is almost ten years old. If you need photo ID, a better route would appear to be something like keybase.io, which offers some neat tools for binding a certificate to photographs, social media accounts, and whatnot.
I take your point, Robert, regarding size. I've just tried a 240x288 image at
72 dpi and it is really small on my screen but it only weighs 29kB.

I'll have a look at your suggestion, keybase.io.

Philip
Continue reading on narkive:
Loading...