georgemarshall / django-cryptography

Easily encrypt data in Django
https://django-cryptography.readthedocs.io/
BSD 3-Clause "New" or "Revised" License
371 stars 70 forks source link

Handling of SALT #25

Closed Gee19 closed 4 years ago

Gee19 commented 4 years ago

Upon first glance it looks like this library is using a default hardcoded SALT for every encrypted field.

https://github.com/georgemarshall/django-cryptography/blob/master/django_cryptography/conf.py#L13

Am I misunderstanding something or can you point me in the right direction where a unique salt is generated for each new field?

georgemarshall commented 4 years ago

The SALT has to be consistent in order to generate the same decryption key. It is an exercise left to the user to change the value.

Additional information can be found in the cryptography library docs.