Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I assume that they are implying that the code is not constant time. In this snippet, the code bails as soon as a deviation is detected. This can, in theory, allow an attacker to determine the desired value by measuring the time taken to reject incorrect options. I haven't reviewed the code to see if this is actually a problem, but that's my guess for why it was highlighted.


I took it to mean they should use the Linq `x.SequenceEqual(y)` instead (assuming .NET 3.5+) (and x isn't null...).


Wrong.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: