DimensionDev / TesserPG-iOS

Encryption Made Mobile.
https://tesserpg.com
GNU Affero General Public License v3.0
41 stars 5 forks source link

Interpret message process enhancement #63

Closed MainasuK closed 4 years ago

MainasuK commented 5 years ago

Not burst force loop all private key to decrypt the message. Use message encryption key id and find the matching keys to decrypting like BCPGP.

(Not sure if we resolve it already. Just mark it as a note.

jk234ert commented 5 years ago

64

MainasuK commented 5 years ago

The previours version decrypt process checks the decryption key if we have or not. Now we loop all key try to decrypt. It just works.

The KeyID is identification for key pair to aid cipher & signature. Fingerprint or long ID / short ID is hash for the primary signing key. So the signature key should use KeyID to matching.

https://github.com/DimensionDev/Tessercube-iOS/blob/d81cc5f449810e0e6de0e98e641c6cce0ee54fa4/TesserCube/Crypto/KeyFactory%2BBCOpenPGP.swift#L142-L149

https://github.com/DimensionDev/Tessercube-iOS/pull/11#discussion_r294037967

MainasuK commented 4 years ago

Resolved issue.