Transparent field level encryption for Django with pgcrypto PostgreSQL extension
1–10 of 13 posts
Re: Transparent field level encryption for Django with pgcrypto PostgreSQL extension
#2If you encrypt within Django, all Postgres needs to worry about are bytea columns. If the concern is being able to effectively use the decrypted data in relation joins, I think back again to whole-disk encryption. To use this stuff, it has to be decrypted in memory anyway.
As a thought experiment, you could create expression indexes for fast lookup, but that leads to data leakage through index queries, and you're right back where you started, only with higher CPU load.
For per-user encryption, that also seems best/most flexible at the app tier.
In short, for a limited use case like saving passwords or an opaque data blob, pgcrypto within Postgres makes sense to me. As an overarching whole-database encryption strategy, I'm far less sure of its utility.
Re: Transparent field level encryption for Django with pgcrypto PostgreSQL extension
#3I love pgcrypto and Postgres in general. In this case, I'm wondering why you'd perform such widespread encryption on a per-column basis. If there is that much to be encrypted, there's whole-disk encryption at rest. For network transport there's TLS. Many column-level encryptions/decryptions would seem to me to put an undo CPU load on the database instance(s) when that load could be spread horizontally more easily at…
Re: Transparent field level encryption for Django with pgcrypto PostgreSQL extension
#4Re: Transparent field level encryption for Django with pgcrypto PostgreSQL extension
#5https://www.postgresql.org/message-id/89157929-c2b6-817b-602...
Re: Transparent field level encryption for Django with pgcrypto PostgreSQL extension
#6Re: Transparent field level encryption for Django with pgcrypto PostgreSQL extension
#7Re: Transparent field level encryption for Django with pgcrypto PostgreSQL extension
#8Re: Transparent field level encryption for Django with pgcrypto PostgreSQL extension
#9Whats the benefit of this inplace of using bcrypt or py-pgp? I really don understand this trend of piling on abstraction for simple problems. Its basically a hole github project that could be solved in 2 wrapper functions.
Re: Transparent field level encryption for Django with pgcrypto PostgreSQL extension
#10What are the performance implications of an application that uses this? I'd imagine constantly encrypting and decrypting would increase latency...
So of course anything related to payments, possibly emails/ips, that type of stuff.
In a lot of services you don't usually need to refer to these fields except on the settings pages and possibly a checkout page, things like that. So the Username, preferences, and content of your site will likely be unencrypted.
Because you can avoid using those types of fields on most pageloads/api calls it should have minimal impact, especially since those places often include using an external api you have to wait for anyway (email, checkout, etc).