Take the 2-minute tour ×
Information Security Stack Exchange is a question and answer site for Information security professionals. It's 100% free, no registration required.

Is there a standard for storing a public key printed on paper? Say, I want to hand out business cards with my public key pre-printed on them at a key signing party to help build the web of trust.

My understanding is that the standard for storing a public key in a computer file is: store that key as a long string of hex digits in a file in PKCS #12 format.

I suppose I could simply print out out a long string of hex digits on paper (either the short public key fingerprint used to confirm a public key from some other source -- see " How should I distribute my public key? " -- or perhaps print the entire full public key). Then my friends could manually type them in. But it seems like it might be more convenient and less error-prone if I to print some sort of barcode on my business cards containing the same data, such as a "Data Matrix code" or an "Aztec Code" or a "QR code".

Is there a standard for printing a public key as a barcode?

Is there a standard for printing a public key fingerprint as a barcode?

share|improve this question
1  
I've made QR bar codes out of vcard with PGP fingerprints with success. –  Dog eat cat world Jun 18 '12 at 22:50
1  
Why not print a link to a short url (e.g bitly) to where you keep your key? Then you have eliminated the need for the recipient to have compatible barcode reading software. The url could even include the key. –  Stuart Woodward Jun 25 '12 at 22:50
1  
"QR and Encryption" suggests putting the message digest of a public key in a QR code on a business card. –  David Cary Aug 16 '12 at 7:12
add comment

1 Answer

One can definitely print a QR code for displaying the public key. The modulus of the RSA Key for example of 1024 bits/128 bytes can be converted to a base64 encoded string and converted to QR code which can be printed on the visiting card.

The challenged which will be faced are:

  1. The base64 encoded data will be around 160 or greater in length; which shall increase the density of the QR code. The size of the bar code will be needed to increased and shall be a challenge to fit it in the visiting card.
  2. The number of mobile devices with QR Code Scanner capable of scanning such high capacity codes will be lesser. Hardware scanner can do but mobile scanners will struggle.

The easier option shall be (if you are using a CA issued certificate) is to encode the certificate serial number and the URL of the CA from where the certificate can be fetched. In this case the data in the QR code will be very less and can be easily scanned by the mobile devices. You can have a computer software which can decode the bar code; hit the URL and install the certificate in the system.

share|improve this answer
1  
Of course there are risks with using a QR code for a URL, as per our blog post: security.blogoverflow.com/2012/05/… –  Rory Alsop Jun 19 '12 at 10:32
1  
Just checked - 160 bytes is perfectly feasible on a business card size, and it seems to be fine on the free QR reader my phone came with. –  Rory Alsop Jun 19 '12 at 10:35
    
Be aware; the iso-8859-1 way of encoding a byte array in a QR code can have some issues while decoding in some of the reader software. If we go for base64 encoding than we have to bear the overhead of encoding. Yeah security issues exists with URL over barcode; but than we can have our own reader which is designed only for fetching certificates or parsing public keys. Using the very popular Zxing library It is quite possible. –  Mohit Sethi Jun 19 '12 at 10:58
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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