You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While doing a userland class to allow the use of scrypt hashing in Phalcon, I came across lots of talk about theoretical timing attacks on hash/encyption checking functions. The issue comes about with C function memcmp() internally used by PHP. Basically, it returns on the first non-equal byte, which can provide timing info to allow iterative guessing of the string. Other vendors have added utility functions to do constant-time string comparison. I noticed that the checkHash() function uses the is_equal_function C function. I believe that this has the same issue, but I'm not totally sure. Perhaps something to think about for 2.0?
The text was updated successfully, but these errors were encountered:
While doing a userland class to allow the use of scrypt hashing in Phalcon, I came across lots of talk about theoretical timing attacks on hash/encyption checking functions. The issue comes about with C function memcmp() internally used by PHP. Basically, it returns on the first non-equal byte, which can provide timing info to allow iterative guessing of the string. Other vendors have added utility functions to do constant-time string comparison. I noticed that the checkHash() function uses the is_equal_function C function. I believe that this has the same issue, but I'm not totally sure. Perhaps something to think about for 2.0?
The text was updated successfully, but these errors were encountered: