Re: "gpg: decryption failed: No secret key" after export-import to another host

2021-06-06 Thread anon85786376 via Gnupg-users

‐‐‐ Original Message ‐‐‐
On Sunday, June 6, 2021 2:24 PM, sergio via Gnupg-users  
wrote:

> I found the sequence to reproduce my problem:
>
> $ rm -rf .gnupg
> $ gpg --gen-key --batch < %echo Generating a 25519 key
> Key-Type: eddsa
> Key-Curve: Ed25519
> Key-Usage: cert
> Subkey-Type: ecdh
> Subkey-Curve: Ed25519

The problem is the subkey curve being ed25519. It will not import correctly. 
For an encryption subkey you must use "Subkey-Curve: cv25519".

See: https://dev.gnupg.org/T5401

___
Gnupg-users mailing list
Gnupg-users@gnupg.org
http://lists.gnupg.org/mailman/listinfo/gnupg-users

Re: "gpg: decryption failed: No secret key" after export-import to another host

2021-06-06 Thread sergio via Gnupg-users

I found the sequence to reproduce my problem:


$ rm -rf .gnupg
$ gpg --gen-key --batch  keys.asc
$ rm -rf .gnupg
$ gpg --import --trust-model always keys.asc
gpg: directory '/home/test/.gnupg' created
gpg: keybox '/home/test/.gnupg/pubring.kbx' created
gpg: key 6C6DB60F0545821C: public key "test " imported
gpg: key 6C6DB60F0545821C: secret key imported
gpg: Total number processed: 1
gpg:   imported: 1
gpg:   secret keys read: 1
gpg:   secret keys imported: 1
$ gpg -K
gpg: /home/test/.gnupg/trustdb.gpg: trustdb created
/home/test/.gnupg/pubring.kbx
-
sec   ed25519 2021-06-06 [C]
  268017E33AFCBAD119C2FB626C6DB60F0545821C
uid   [ unknown] test 
ssb#  ed25519 2021-06-06 [E]

$ echo test | gpg --encrypt --recipient t...@test.com | gpg --decrypt
gpg: 683197C0DF776EC0: There is no assurance this key belongs to the 
named user


sub  ed25519/683197C0DF776EC0 2021-06-06 test 
 Primary key fingerprint: 2680 17E3 3AFC BAD1 19C2  FB62 6C6D B60F 0545 
821C
  Subkey fingerprint: C0E4 F2BE 8532 1C1A 3777  8963 6831 97C0 DF77 
6EC0


It is NOT certain that the key belongs to the person named
in the user ID.  If you *really* know what you are doing,
you may answer the next question with yes.

Use this key anyway? (y/N) y
gpg: encrypted with 256-bit ECDH key, ID 683197C0DF776EC0, created 
2021-06-06

  "test "
gpg: decryption failed: No secret key
$


Is this a gnupg bug or I'm doing something wrong?

--
sergio.

___
Gnupg-users mailing list
Gnupg-users@gnupg.org
http://lists.gnupg.org/mailman/listinfo/gnupg-users