incuna / django-pgcrypto-fields

Transparent field level encryption for Django using the pgcrypto postgresql extension.
BSD 2-Clause "Simplified" License
230 stars 50 forks source link

Want to know Encryption type AES128 or AES256 is used? #388

Open aadi0923 opened 2 years ago

aadi0923 commented 2 years ago

I want AES-256 to encypt my data. I have used this but don't know which encryption type is used. If i want to use AES-256 with this how can i do it.

jmp commented 2 years ago

This is a bit late, but the symmetric encryption uses AES-128 (see #135), which is the default in PostgreSQL.

There doesn't seem to be a way to use AES-256 or other cipher algorithm. It would be possible if django-pgcrypto-fields let you pass custom parameters (e.g. cipher-algo=aes256) for the pgp_sym_encrypt function, however at the moment that can't be done.