passforios icon indicating copy to clipboard operation
passforios copied to clipboard

Updated to 0.10.0 in app store, pass now asks for passphrase of PGP secret key

Open bpfh999 opened this issue 4 years ago • 32 comments

secret key has no passphrase as it stands.

this seems similar to issue #395.

returns error that "key is not locked"

bpfh999 avatar Jan 06 '21 13:01 bpfh999

Same problem, cannot access my passes, get this:

image

snakelab avatar Jan 06 '21 15:01 snakelab

Find this error in the gopenpgp:

https://github.com/ProtonMail/gopenpgp/blob/e0deea82a35fcc27989cf67e98969fbeb1f3dcda/crypto/key.go#L262

snakelab avatar Jan 06 '21 15:01 snakelab

Seeing "Cannot show password Passphrase of your PGP secret key is wrong" here, starting today after using for many months without issue.

ghost avatar Jan 06 '21 17:01 ghost

Thanks for the report. To help me debug this issue, I need more information to reproduce it.

  • Can you try to reset the PGP key in the app to see if it works.
  • Do you have a .gpg-id file along with the password files. What's the content? The current strategy is to use this this file to find PGP ID, and if failed then use the default one.

mssun avatar Jan 06 '21 18:01 mssun

Tried both, but no luck - same result!

snakelab avatar Jan 06 '21 19:01 snakelab

Hi, can someone come up a simple test repo for me? Thanks!

mssun avatar Jan 06 '21 20:01 mssun

Some more info:

I have only a single key pair. I xfer to the iOS device via itunes file sharing.

I'll try deleting the keys and re-adding them to the device shortly.

I do not have a .gpg-id, that I am aware...

$ gpg --version gpg (GnuPG) 2.2.20 libgcrypt 1.8.6

bpfh999 avatar Jan 06 '21 22:01 bpfh999

Resetting the PGP key in the app did not work.

bpfh999 avatar Jan 06 '21 23:01 bpfh999

I also removed my key and reimported it and received the same message reported above.

ghost avatar Jan 07 '21 10:01 ghost

I don't know if it's related but I can't manage to import my keys using QR Codes anymore.

PierrickGT avatar Jan 08 '21 19:01 PierrickGT

Oh, should also mention, devices are an iphone 12 mini, and a ipad mini 4 gen, both running iOS 14.3. Identical behavior on both.

bpfh999 avatar Jan 09 '21 23:01 bpfh999

Same here. I have a passphrase which works before and stops working in 0.10.0. Tried reimporting key, reseting local data, reinstalling the app.

doitian avatar Jan 10 '21 06:01 doitian

Hi all, can you try the TestFlight beta version? Thanks.

You can apply at here: https://testflight.apple.com/join/whK4zUFG

mssun avatar Jan 10 '21 07:01 mssun

I have the same issue. Happened after updating to v0.10.0 Resetting key did not work.

MarkusZoppelt avatar Jan 10 '21 20:01 MarkusZoppelt

@mssun Tried the TestFlight beta version but cannot import my gpg keys whatsoever. Tried both copy pasting armored keys into application and iTunes file sync.

signal-2021-01-10-220639

MarkusZoppelt avatar Jan 10 '21 21:01 MarkusZoppelt

@MarkusZoppelt, what's the Pass version and iOS your are using? Thanks. I'm asking this because we I didn't see any place to report this error in the current codebase.

BTW, this should be in a separate issue.

mssun avatar Jan 10 '21 22:01 mssun

For people with the "key is not locked" error. Can you kindly give me an instruction to reproduce this issue (like how to generate the key with the gpg command line, how do you export the keys). Thank you so much!

mssun avatar Jan 10 '21 22:01 mssun

Hi,

I had the same problem with my PGP key which had no passphrase set. I then set a passphrase with ggp at computer, reimport the "locked" key to passforios and it works after entering the passphrase :-)

My interpretation of the messages "gopenpgp: key is not locked" is that the underlying gopengpg is trying to unlock the key with an empty passphrase, rather than just using it without trying to unlock it.

Why it occurs now? Perhaps a change in gopenpgp.

Best regards Matthias

Update: Setting the passphrase at PC

gpg --edit-key My-Key-ID
gpg> passwd
gpg> save

mafasi avatar Jan 10 '21 22:01 mafasi

@MarkusZoppelt, what's the Pass version and iOS your are using? Thanks. I'm asking this because we I didn't see any place to report this error in the current codebase.

I am using iOS 14.3 on an iPhone X

  • with Pass for iOS 0.10.0 (68): ==> gopenpgp: a public key cannot be locked
  • and Pass for iOS Beta 0.11.0: ==> cannot import keys

BTW, this should be in a separate issue.

Done. See #452

MarkusZoppelt avatar Jan 10 '21 22:01 MarkusZoppelt

@mafasi, thank you so much! I think this is the problem. I just fixed it with a new testcase without passphrase in 011762c. Will release a new TestFlight version.

mssun avatar Jan 10 '21 23:01 mssun

Can confirm that v0.11.0 (8) Testflight Beta works for me after successfully importing gpg key. (my key had a passphrase set though)

MarkusZoppelt avatar Jan 10 '21 23:01 MarkusZoppelt

@mafasi, can you try the TestFlight version 0.11.0 (10). Thank you so much!

mssun avatar Jan 10 '21 23:01 mssun

@mafasi, can you try the TestFlight version 0.11.0 (10). Thank you so much!

Just installed 0.11.0 (11) and yes, it works without passphrase too :-)

Thanks for fixing and developing/providing this great app!

mafasi avatar Jan 11 '21 08:01 mafasi

Sorry, but this fixed it not for me: I am using iOS 14.3 on an iPhone X

with Pass for iOS 0.11.0 (11): ==> gopenpgp: a public key cannot be locked

☹️

Tried new import of the keys...

snakelab avatar Jan 11 '21 13:01 snakelab

After updating to the 0.11.0 version from the app store, I was still presented with a prompt for a passcode for my private key, but upon hitting Ok while leaving the field blank, I was then able to access my passwords.

Thanks for your work on this, and the app. I find this app tremendously useful.

bpfh999 avatar Jan 12 '21 13:01 bpfh999

Sorry, but this fixed it not for me: I am using iOS 14.3 on an iPhone X

with Pass for iOS 0.11.0 (11): ==> gopenpgp: a public key cannot be locked

☹️

Tried new import of the keys...

I didn't encrypt my public key. I guess you have two possibilities:

  1. do not encrypt any key
  2. encrypt the private key only Since you export from a password-protected key store, the export will be protected too. For case case 2, you have to export twice.

Usually the private key export should also contain the public key, but it seems that gopenpgp can't handle it.

mafasi avatar Jan 12 '21 15:01 mafasi

That was the correct direction you pushed me. It works now for me. Just did the export not via GUI but on command line like described on the page in the app.

gpg --export -a ... gpg --export-export-secret -a

Thanks

snakelab avatar Jan 12 '21 20:01 snakelab

Does not work for me, although it's been so long since I've needed to re-import my keys that I may have done something incorrectly. I use an encryption subkey, so I did

gpg --export -a 0xMYSUBKEY gpg --export-secret-subkeys -a 0xMYSUBKEY

and loaded those as files. I was prompted to enter my key's password when trying to unlock, and after enter it the entire app crashed. Now, whenever I open the app and try to decrypt a password, the app immediately crashes. Same happens if I import by copy/paste into the armor import section of the app.

Importing the primary key and subkeys doesn't help either

gpg --export -a 0xPRIMARYKEY gpg --export-secret-keys -a 0xPRIMARYKEY

Anything I can do to gather more useful information to help debug this? Maybe same as https://github.com/mssun/passforios/issues/450, which sounds like the inflight test version is working again.

chipsenkbeil avatar Jan 13 '21 18:01 chipsenkbeil

It still asks for the passphrase after updating to 0.11.0. Should I delete and re-import my keys?

egegunes avatar Jan 14 '21 10:01 egegunes

sure - it is worth a try

snakelab avatar Jan 14 '21 19:01 snakelab

I have exactly the same problem as @chipsenkbeil. At first, I couldn't view any password because the passphrase of my gpg key was always requested and entering the right passphrase didn't help. Then I tried to re-import my keys and the app started to crash.

gromakovsky avatar Jan 24 '21 10:01 gromakovsky