I've built a CMS system to allow users to create and manage online forms on my client's intranet app.
Of course some of the data handled by the forms may need to be encrypted e.g. if the system is used to build a form that handles salary specifics or whatever. So I'm using the AESManaged
class to symmetrically encrypt this sort of data prior to it going into our application db.
All is fine, but now, prior to release, I could do with a steer regarding the shared secret
and salt
.
My original idea was to make a (dynamic) shared secret
by combining the (GUID-based) ID of the Form
containing the encrypted field with the (again, GUID-based) id of the Question
the field is the answer to:
FormId:QuestionId
My Salt
is currently generated the same way, only with the order of Guids reversed ie.
QuestionID:FormID.
I'm new to this stuff so not sure if this a sensible strategy or if I should be doing it some other way?