-
Notifications
You must be signed in to change notification settings - Fork 16
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
passforios works with gpg-generated keys, but not passphrase2pgp ones #5
Comments
They also have differing packets and subpackets: passphrase2pgp (not working):
gpg (working):
|
I have a few ideas of what might be going wrong.
1) Perhaps passforios doesn't properly handle keys with zero dates
(1970-01-01). I've found that both GnuPG and Keybase have issues with
zero dates:
https://dev.gnupg.org/T4670
keybase/keybase-issues#3484
To test this, see if the problem persists with a non-zero date. Do
everything the same, but when generating the key use --time (-t) with a
non-zero argument such as 1. Note: They key material will be identical,
but the fingerprint will change since it incorporates the creation date.
2) What version of GnuPG does passforios use? The new OpenPGP standard
(4880bis) still isn't finalized, and Ed25519 keys are a relatively new
feature (GnuPG 2.1.0, November 2014). RedHat didn't even start
supporting such keys until a few months ago. Perhaps passforios uses an
older version of GnuPG and fails to import the keys.
To remove passforios from the loop, in addition to knowing its version
of GnuPG, I'd like to see the exact gpg commands it's running to get
that error. When GnuPG says "No secret key" it doesn't always mean
there's no secret key. If the key is protected by a passphrase, and it
failed to prompt for that passphrase, it gives the same error message
(rather than something more relevant). This can easily happen when gpg
is used in an automated way with --batch (via script, etc.) and standard
input/output has been redirected:
https://dev.gnupg.org/T4677
If you're using passphrase protection via --protect (-e), see if the bug
persists when you omit that option. This will avoid pinentry failures
that result in "No secret key."
3) If you look carefully at the packet listing you might notice that
passphrase2pgp doesn't output a "hashed subpkt 33". This is intentional
since that subpacket is optional, and, for self-signatures, entirely
redundant and unnecessary. Leaving it out shaves off 22 bytes (and more
when armored) making the key smaller. I'm not aware of an implementation
refusing to import a key lacking this subpacket. Since passforios farms
the work out to GnuPG, it's unlikely this is the issue.
|
Tried and adding a date does not help. passforios doesn't use GPG but https://github.com/krzyzanowskim/ObjectivePGP I'm not using passphrase protection anywhere. Keep in mind it's not a problem to import keys. Keys are in passforios and on my mac. Encrypted on mac -> can be decrypted in passforios So problem is (I guess?) in encryption. |
Actually I'm not sure if they use ObjectivePGP or gopenpgp, both seems to be referenced in the source code. |
I can reproduce this using the gopenpgp library directly:
|
What version of |
See mssun/passforios#318. Likely a bug there, but something is different between the keys that makes one work but not the other one.
The only difference I can see is the Authentication usage, but that shouldn't matter.
Key generated by passphrase2pgp (not working):
Key generated by gpg (working):
The text was updated successfully, but these errors were encountered: