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

Import of existing PGP keys #98

Closed
Caliandroid opened this issue Jun 5, 2017 · 8 comments

Comments

@Caliandroid
Copy link

commented Jun 5, 2017

If i try to import my existing set of pgp key, i receive the following message over adb:

06-05 12:36:22.291  5231  5231 I DeltaChat: T1: Checking: /storage/emulated/0/Download/public-key-default.asc
06-05 12:36:22.312  5231  5231 W DeltaChat: T1: Split key: Given key is no private key.
06-05 12:36:22.312  5231  5231 I DeltaChat: T1: Checking: /storage/emulated/0/Download/private-key-default.asc
06-05 12:36:25.276  5231  5231 I DeltaChat: T1: Checking: /storage/emulated/0/Download/public-key-default.asc
06-05 12:36:25.294  5231  5231 W DeltaChat: T1: Split key: Given key is no private key.
06-05 12:36:25.294  5231  5231 I DeltaChat: T1: Checking: /storage/emulated/0/Download/private-key-default.asc

Are there limitations for existing keys?
I was only able to re-import my auto-generated delta chat pgp keys

@r10s

This comment has been minimized.

Copy link
Member

commented Jun 5, 2017

In general, Delta Chat should support "common" private key formats, however, it is unlikely that we will support 100% of all private keys of any sources. This is also not the main focus of Delta Chat (if fact, the large majority of the Delta Chat users will not have any key before they start using Delta).

However, we try to support private keys from other sources as good as possible. And of course, we do not want bugs here.

I have a concrete private key that does not work at the moment, I will check this key these days - maybe this key has the same issue as your key.

In any case it may help if you can reproduce the behavior with another private key that you can post here. This would help us massively in testing.

@r10s

This comment has been minimized.

Copy link
Member

commented Jun 5, 2017

@r10s

This comment has been minimized.

Copy link
Member

commented Jun 5, 2017

With a very good chance, the problem is that you key is encrypted and/or uses an password. Such keys are not supported by Delta Chat. Please remove the encryption and the password and try the import again.

@r10s r10s closed this Jun 5, 2017
@Caliandroid

This comment has been minimized.

Copy link
Author

commented Jun 7, 2017

Thank you! The encryption will be the reason for it but i don't want to store my personal mail pgp key unencrypted on my phone, so i will use the auto-generated key

@Caliandroid

This comment has been minimized.

Copy link
Author

commented Apr 2, 2018

Hi again,

i've tried once again to import my 2048bit key created with enigmail without sucess.

To avoid problems with the password, i've tried
gpg --armor --export-secret-keys 0xxxxxxx > deltachat.asc

and also with the asc armor option
gpg --export-secret-keys 0x3DDE7C11 > deltachat.asc

It sill does not accept the key:

04-02 22:23:02.758 138 173 I DeltaChat: T5: Import/export process started.
04-02 22:23:02.759 138 173 I DeltaChat: T5: Checking: /storage/emulated/0/Download/privat-default-key.asc
04-02 22:23:02.760 138 173 E DeltaChat: Fehler: File does not contain a valid private key.

Any advices or ideas?

Thanks in advance

@r10s r10s reopened this Apr 2, 2018
@r10s

This comment has been minimized.

Copy link
Member

commented Apr 2, 2018

To avoid problems with the password, i've tried gpg --armor --export-secret-keys 0xxxxxxx > deltachat.asc

@Caliandroid i am not sure if the given command removes the password from the key; a quick duckduckgo-search shows options as "export-reset-subkey-passwd", see https://duckduckgo.com/?q=gpg+remove+password

However, even if you are really sure you have no password in the key, to fix this issue, we would need reproducible steps to create a key with similar problems.

@Caliandroid

This comment has been minimized.

Copy link
Author

commented Apr 3, 2018

Thank you.
Your solution did not work as gpg does not know this option but the following worked finally:

gpg --edit-key  0xXXXXX [key-id]
passwd

enter existing passphrase
change passphrase to [empty]
confirm twice
save
Now export to file
gpg --armor --export-secret-keys 0xxxxxxx > deltachat.asc

DeltaChat was now able to import the key

i've set a new passphrase afterwards to lock my key on the desktop computer again.

@r10s

This comment has been minimized.

Copy link
Member

commented Apr 4, 2018

maybe we should add this to the faq somewhere, i've created an issue so that this won't get forgotten :) deltachat/deltachat-pages#68

Moreover, we should print a more concrete warning when a password-protected key could not be imported: deltachat/deltachat-core#144

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.