79777256

Date: 2025-09-28 10:21:02
Score: 1
Natty:
Report link

TL;DR If you change algorithm in the future You migth sill want to be able to decrypt old data. If You hide algorithm You'll not know which one was used.

I've spent some time learning and creating my own stuff and I can share what I've learned.

In a lot of cases you will store encrypted data like an email address in the database, which most of them will be SQL, that means it will have certain columns.

Encrypted data is often stored with metadata, which can be different for each algorithm, but since SQL databases are ridged, you would have to create a new table or decrypt and encrypt everything once again if you decide to change the algorithm in the future, and that are not a good ideas. Better choice is to store that encrypted data as a concatenated string with metadata like:

$AES$version$encyptedData
So if You'd like to hide what algorithm was used you wouldn't know which one to use to decrypt it.
Reasons:
  • Long answer (-0.5):
  • No code block (0.5):
  • Low reputation (1):
Posted by: GheVrath