Is there some writeable memory on the OpenPGP-card

Damien Goutte-Gattat dgouttegattat at
Tue Oct 10 15:27:11 CEST 2017

On 10/10/2017 01:38 PM, Matthias Apitz wrote:
> it would be nice transfer some small files together with the
> USB OpenPGP-card. Is there some memory for read/write on them, maybe
> with some commands of the card daemon?

The OpenPGP Card specification defines "Private Use Data Objects" that 
you may use to store arbitrary data.

You can write to those DO using the "privatedo" command of the GnuPG's 
card editor. For example, to send the contents of the test1.txt file to 
the private DO #1:

   $ gpg --card-edit

   gpg/card> privatedo 1 < test1.txt

Caveats to be aware of:

* In versions 2.0 and 2.1 of the OpenPGP Card specification, private DOs 
are limited in size to 254 bytes each. (In version 3, there is no upper 
limit fixed in the specification.)

* Private DOs are optional and not all implementations support them. 
(Yubico's Yubikey NEO does not, for example).


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: </pipermail/attachments/20171010/4807f9c8/attachment.sig>

More information about the Gnupg-users mailing list