Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fails to generate a QRCode for GPG keys #11

Open
ralt opened this issue Feb 19, 2014 · 2 comments
Open

Fails to generate a QRCode for GPG keys #11

ralt opened this issue Feb 19, 2014 · 2 comments

Comments

@ralt
Copy link

ralt commented Feb 19, 2014

Hi,

$ gpg --export-secret-key -a "Florian Margaine" | qrencode -o test.png
Failed to encode the input data: Numerical result out of range
$ gpg --export-secret-key -a "Florian Margaine" | wc -c
3594
$ qrencode --version
qrencode version 3.4.2
Copyright (C) 2006-2012 Kentaro Fukuchi

Any idea of where it could come from? I've seen the other issue on libqrencode's repository, but not sure if it's related and if my version includes this library.

@antenore
Copy link

I have the same issues

   qrencode -V
   qrencode version 3.9.0
   Copyright (C) 2006-2014 Kentaro Fukuchi

@d4ndo
Copy link

d4ndo commented Feb 27, 2014

Hi,

qrencode is encoding your private GPG key as 8 bit (binary|utf-8), because the key is not pure alphanumeric. It contains special character. the alphanumeric mode only supports those special character .(%*+-./:).

So the maximum GPG key can only be 2953 char long.

Maybe you could create a QR code from your revoke key. It does not have that many characters. Just for the case of loosing the secret key.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants