It looks pretty similar to the issue https://dev.gnupg.org/T5114 :
GnuPG successfully imports attached secret primary key, but fails to import a Cure25519 subkey, asking for password 3 times (while it is stored in cleartext).
If secret key is encrypted, then it shows this message:
gpg: key 0865619E8F83FDC0/CF64DDBAD20995D3: error sending to agent: Bad secret key gpg: error reading 'rnp-25519-secret.pgp': Bad secret key gpg: import from 'rnp-25519-secret.pgp' failed: Bad secret key
Things I checked as well:
- public key part works - encrypt in GnuPG -> decrypt in RNP succeeds.
- generate the same keypair in GnuPG->import to RNP succeds (and works for decryption) as well.
- generate the same keypair in GnuPG-re-import back also works.
As Curve25519 secret key is just 32-byte string, and I tried generation multiple times, I cannot see what can go wrong.