Project

General

Profile

Feature #2975

safe_memcmp new function proposal

Added by devnexen 8 months ago. Updated 7 months ago.

Status:
Invalid
Priority:
Normal
Assignee:
-
Category:
-
Target version:
Start date:
2019-08-24
Due date:
% Done:

0%

Estimated time:
Missing in 1.5.x:

Description

More effective against timing attacks than the raw memcmp even though quality depends on oses... plus a "timid" introduction into authn file module.


Files

diff (1.52 KB) diff devnexen, 2019-08-24 14:04
#1

Updated by gstrauss 7 months ago

  • Status changed from New to Invalid

A similar routine already exists in http_auth.c:http_auth_const_time_memeq()

A constant time comparison of digests is unnecessary. If you are using a weak digest algorithm for which someone may have generated rainbow tables, then your problem is that you are using a weak digest algorithm. Otherwise, the generated nonce should provide sufficient salt to the generated digest that a constant time comparison of digests does not provide much additional protection.

.

If you would like security-related patches to be taken more seriously, please provide some context about why you think your implementation is better. Your code is not better because you wrote it. Please describe why when you make a post. Your single line description is obtuse, and provides zero justification on why your code is "more effective". ("raw memcmp" does not claim to provide any protection against timing attacks.)

#2

Updated by devnexen 7 months ago

gstrauss wrote:

A similar routine already exists in http_auth.c:http_auth_const_time_memeq()

A constant time comparison of digests is unnecessary. If you are using a weak digest algorithm for which someone may have generated rainbow tables, then your problem is that you are using a weak digest algorithm. Otherwise, the generated nonce should provide sufficient salt to the generated digest that a constant time comparison of digests does not provide much additional protection.

.

If you would like security-related patches to be taken more seriously, please provide some context about why you think your implementation is better. Your code is not better because you wrote it. Please describe why when you make a post. Your single line description is obtuse, and provides zero justification on why your code is "more effective". ("raw memcmp" does not claim to provide any protection against timing attacks.)

:-) Ah no I do not pretend I just did notice your existing functions, apologies then, let's forget this infortunate episod.

Also available in: Atom