Skip to content

Compare secret strings in constant time #9

@AndreasBriese

Description

@AndreasBriese

I have a (1)suggestion and a (2)question about the "Compare secret strings in constant time".

(1) I guess the Cryptocoding resource is supposed to be an introduction beside giving expertise.
For the first group an advise to only use hashes of plain text for (database storage and) comparison of secrets might be helpful. Furthermore the comparison algorithms might be tailored and optimized for fixed length of hashes. Mentioning this might be helpful.

(2) I know, constant time comparison is kind of a mantra in security, but what about a randomized shuffled index test with the time variant code (using hashes, of course)?
Why? From a perspective of practical attack costs a randomly shuffled first-fault-breaks-comparison attempt makes timing attacks equally hard but might result in automated or ai based attacks going for it anyways and therefore waisting time on it. There is additional processing cost on side of the defender to shuffle the indices. Anyway this might be outweight by the tactical advantage of luring the attacker into investing resources.

Thanks for reading
Andreas

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions