cossacklabs / acra

Database security suite. Database proxy with field-level encryption, search through encrypted data, SQL injections prevention, intrusion detection, honeypots. Supports client-side and proxy-side ("transparent") encryption. SQL, NoSQL.
https://www.cossacklabs.com/acra/
Apache License 2.0
1.34k stars 128 forks source link

Don't generate poison keys during the query #516

Closed G1gg1L3s closed 2 years ago

G1gg1L3s commented 2 years ago

Right now every call to the GetPoison* creates keys, if they don't exist. These results in a superfluous side effect, unexpected behaviour and delays in decryption (because we try to check records with fresh keys, which obviously do nothing useful).

Change this, by:

Also, keep this behaviour for poisonrecordmaker, but do this explicitly.

Checklist