Feature #21407
closedProvide a t3lib library for symmetric encryption
0%
Description
TYPO3 lacks general encryption support.
This RFC is about an easy to use t3lib library that provides symmetric encryption (!=asymmetric encryption/public key-private key).
The attached library is currently at proof of concept state; so please don't use it inproduction environments and expect API to change.
The library is a wrapper on mcrypt PHP extension.
The easies use case is to instanicate the t3lib library and use methods encrypt()/decrypt() with a given key (e.g. TYPO3's encryption key) and message to be encrypted.
Depending on the used encryption mode, you need to retrieve an initialisation vector (IV) using getCurrentIV() to be able to decrypt an encrypted message.
The IV doesn't need to be secret (so please don't use TYPO3's encryption key for it) and could easily transmitted/displayed together with an encrypted message.
Please test, comment and send suggestions.
What needs to be improved: * more testcases for different ciphers/modes * determine proper default settings (ciphers/modes) * use exceptions instead of null/false method results * ...
(issue imported from #M12402)
Files