Closed defuse closed 9 years ago
@defuse Could this not have been reported privately?
@padraic I saw no need. This is the development branch and my understanding is that it's not what everyone is using. The crypto everyone is using is actually worse, see #1035.
I somewhat feel this would have been better disclosed privately first. Also parading it on Twitter doesn't help either, we know you probably know more about security than most of us, but don't think trying to make others work look bad is the way to prove that.
Anyway back to the original point, please share privately first next time, if you realise no-one is taking note of it after 30 days then by all means disclose it publicly.
Please post a security@ contact address and PGP key on the project website then.
It just took me 10 seconds to locate an email for Josh. Not all communications require a security@ email address or a PGP key. A normal unencrypted email still has some reasonable degree of privacy that is better than a public github issue. A DM over Twitter can often solicit an email contact.
The proverbial cat is running far from the bag, so I'll return the topic to the issue reported.
@silentworks I tweeted this to raise awareness about this common problem. Slim is not the first framework I've seen trying to implement this exact same thing, and they are invariably insecure in the exact same ways. I don't "try to make others work look bad." I care only about the technical facts and what I can do to make things more secure, not about the people behind it. If I see something wrong, I will point out the technical details; it's never intended as an attack against the author.
Just migrated the develop branch over to Zend\Crypt.
https://github.com/slimphp/Slim/commit/c5b6c76a2bba90dfab300280ed9258e2263edb52
Looking at https://github.com/slimphp/Slim/blob/develop/Slim/Crypt.php...
MCRYPT_RIJNDAEL_256
. This is not AES, it's the 256-bit block version of rijndael. You wantMCRYPT_RIJNDAEL_128
.mbstring.func_overload
-safe (thestrlen()
invalidateKeyLength()
).I only spent 10 minutes looking, so there are almost certainly more problems. Moral of the story: Please, please, please, please don't write yet another broken PHP encryption library. I've already written one, and have taken the time to get everything right. Please, just use that one, or make sure you carefully go through it and address all of the things that can go wrong.