Which options are available in the default installation and which ones by third-parties like extensions or frameworks?
P.S. By Cryptography I mean algorithms which could be decrypted, not one-way encryption like md5.
|
Which options are available in the default installation and which ones by third-parties like extensions or frameworks? P.S. By Cryptography I mean algorithms which could be decrypted, not one-way encryption like md5. |
|||||||||||||
|
|
As encryption primitive I'd use AES. Both AES-128 and AES-256 are strong enough. Numerically AES-256 is stronger, but it's very unlikely that AES-128 is the weakest point in your system. Since php doesn't seem to support an authenticated encryption mode, you need to build that yourself. I'd use HMAC-SHA-256, possibly truncated to 128 bits. To combine these operations I'd:
To decrypt:
This is an encrypt-then-mac scheme. It's recommended to use different keys for MAC and encryption. I recommend deriving both from a master key. |
|||
|
|
There are cryptographic standards, which are language independent, therefore I advice to use AES. EDIT A php library that supports this is MYCRYPT. You should be using AES with a 128 or 256 bit block size (since you want the strongest possibility, use the 256) and you should also use OCB mode when possible (there are patents on it unforunately) and otherwise CBC. More info on modes can be found here. |
|||||||||||
|