2020-04-08 10:59:16 +00:00
|
|
|
# Encryption
|
|
|
|
|
|
|
|
Encryption is done in PMAPI, bridge utils and bridge itself. The best would be to keep encryption
|
2021-09-20 12:28:57 +00:00
|
|
|
in PMAPI and bridge utils (in package such as messages). All packages are using our high-level
|
|
|
|
GopenPGP library on top of OpenPGP.
|
2020-04-08 10:59:16 +00:00
|
|
|
|
|
|
|
## `gopenpgp.KeyRing`
|
|
|
|
|
|
|
|
We use one `KeyRing` per address. Our usage then contains all keys for specific address. Primary
|
|
|
|
key is always on the first position, then there old ones to be able to decrypt last e-mail.
|
2021-09-20 12:28:57 +00:00
|
|
|
OpenPGP encrypts given message with all available keys, so we need to first get first (primary)
|
2020-04-08 10:59:16 +00:00
|
|
|
key for encryption to have message encrypted only once with primary key.
|