diff options
author | Justus Winter <justus@sequoia-pgp.org> | 2022-02-15 10:02:57 +0100 |
---|---|---|
committer | Justus Winter <justus@sequoia-pgp.org> | 2022-02-15 10:02:57 +0100 |
commit | f7e3e6fbb693add25401b792c495f4a35adacd55 (patch) | |
tree | 8bbce5149ebddc17af637899c9d90643c96d2c84 /buffered-reader/src/lib.rs | |
parent | cf2a472a34588c453f10efa0263ec51e0c860988 (diff) |
openpgp: Use unique keys for memory encryption.
- Previously, we used the same session key for every encrypted
memory region, relying on the nonces being derived from a random
initialization vector.
- However, in cf2a472a34588c453f10efa0263ec51e0c860988 we changed
the nonce to be a simple counter. This leads reuse of (key,
nonce) pairs.
- Instead of relying on the nonces having some entropy, a more
robust way to deal with this is to have distinct keys. To that
end, add a random salt to each memory region that we hash before
hashing the prekey.
Diffstat (limited to 'buffered-reader/src/lib.rs')
0 files changed, 0 insertions, 0 deletions