I am trying to create a 2 way encryption function using PHP.
As yet I do not have a very good system at all, it is severely flawed and highly insecure, it is using a substitute cipher running from the periodic table of elements (this is not what want, but what I am working on making better).
My question is as follows:
What is the best way to create a symmetric key algorithm that both creates a salt for a string to be encrypted with and a decrypt function using the same salt and algorithm that is safe, secure and maintainable? What do I have to look out for that creates a weakness/vulnerability within the code/crypto function?
For what I have now, please see this question on codereview.stackexchange.
- This is not going to be used as a "rolled out" product, it is purely for training and development purposes
- I understand that this may very well be off topic, if so please say and I'll remove this question