Compliance: Decryption in de-vs with bp256 key fails
Closed, ResolvedPublic


$ echo foo | gpg2 -e -r E6180B54860592B5CA4EEE82BCD0BEFF039761A0 > enc_to_bp.gpg 
$ gpg2 --decrypt enc_to_bp.gpg
gpg: key 43086C42CEDBDC18 not suitable for decryption while in --compliance=de-vs mode
gpg: encrypted with 256-bit ECDH key, ID 43086C42CEDBDC18, created 2017-07-25
      "Andre Heinecke <>"
gpg: public key decryption failed: Invalid public key algorithm
gpg: decryption failed: No secret key
$ gpgme/tests/run-keylist E6180B54860592B5CA4EEE82BCD0BEFF039761A0
keyid   : BCD0BEFF039761A0
fpr     : E6180B54860592B5CA4EEE82BCD0BEFF039761A0
curve   : brainpoolP256r1
caps    : esc
flags   : de-vs
upd     : 0 (0)
fpr    1: 48C125C8261B4FCC4259509F43086C42CEDBDC18
curve  1: brainpoolP256r1
caps   1: e
flags  1: de-vs
userid 0: Andre Heinecke <>
    name: Andre Heinecke
     upd: 0 (0)
   valid: ultimate
werner closed this task as Resolved.Jul 27 2017, 2:07 PM

Okay, decryption now gives only a warning.

I also had to tweak the compliance checking code which may have fixed other bugs or changed their behaviour.