Menu

#117 Timing Attack Vulnerability

cppcms-v1.0.x
closed
nobody
None
1
2014-10-30
2014-04-07
Anonymous
No

framework/trunk/src/hmac_encryptor.cpp

...
bool ok = memcmp(&mac[0],cipher.c_str() + message_size,digest_size) == 0;

framework/branches/maintance_0_0_x/hmac_encryptor.cpp

...
hash(&data.front()+16,data.size()-16,md5);
if(!equal(data.begin(),data.begin()+16,md5))
    return false;

http://codahale.com/a-lesson-in-timing-attacks/

Discussion

  • Artyom Beilis

    Artyom Beilis - 2014-05-23
    • status: open --> closed
     
  • Artyom Beilis

    Artyom Beilis - 2014-05-23

    Fixed in cs 2246

    The chance of using it virtually none due to the fact that memcmp works on 4 bytes blocks and that the noise would be so high in comparison to memcmp time...

    But not to be paranoid

     

Anonymous
Anonymous

Add attachments
Cancel





Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.