https://github.com/friendica/friendica/blob/master/include/crypto.php#L189-L212
- ECB mode
- I don't even know what is going on with that
$ky loop. You're xoring it with null bytes so it literally does nothing.
- Code duplication
- Unauthenticated encryption
https://github.com/friendica/friendica/blob/master/include/crypto.php#L229-L245
- NULL IV for CBC mode, when
MCRYPT_DEV_URANDOM was being used for ECB mode? (It gets discarded in ECB mode, but you NEED an unpredictable and random IV for CBC mode.)
- Unauthenticated encryption
https://github.com/friendica/friendica/blob/master/include/crypto.php#L189-L212
$kyloop. You're xoring it with null bytes so it literally does nothing.https://github.com/friendica/friendica/blob/master/include/crypto.php#L229-L245
MCRYPT_DEV_URANDOMwas being used for ECB mode? (It gets discarded in ECB mode, but you NEED an unpredictable and random IV for CBC mode.)