google / end-to-end

End-To-End is a crypto library to encrypt, decrypt, digital sign, and verify signed messages (implementing OpenPGP)
Apache License 2.0
4.13k stars 298 forks source link

OpenPGP: Hidden recipient support (keyid=0x000000) #322

Open mkf opened 9 years ago

mkf commented 9 years ago

I tried to decrypt a message encrypted by me using GnuPG v2 to my friend (visible recipient) and me (hidden). It said that "No keys found for message".

sirdarckcat commented 9 years ago

Could you please replicate with a dummy message? We support wildcard keyids so it should work

koto commented 9 years ago

I don't think it works now. EncryptedMessage.decrypt asks for a single key from the KeyRing based on KeyID, so we don't iterate over all keys. https://github.com/google/end-to-end/blob/3288abc94b3c7b9adc1258a427f779dd584ff50e/src/javascript/crypto/e2e/openpgp/contextimpl.js#L325

mkf commented 9 years ago

Just use gpg2 -aeR [your hidden recipient] [your file].