Skip to content

Replace use of hmac.compare_digest #16

@mvondracek

Description

@mvondracek

hmac.compare_digest` uses an approach designed to prevent timing analysis by avoiding content-based short circuiting behaviour, making it appropriate for cryptography
https://docs.python.org/3.7/library/hmac.html#hmac.compare_digest

Note: If a and b are of different lengths, or if an error occurs, a timing attack could theoretically reveal information about the types and lengths of a and b—but not their values.

Type and length of seeds is known to the attacker, but not the value of expected seed.


I will ask after next lecture about hmac module.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions