Skip to content
This repository was archived by the owner on Jan 13, 2023. It is now read-only.
This repository was archived by the owner on Jan 13, 2023. It is now read-only.

BaseAddressCache._gen_cache_key is too fast #51

@todofixthis

Description

@todofixthis

BaseAddressCache._gen_cache_key uses a single iteration of SHA-256, which is too fast to be secure against brute-force / rainbow table attacks.

An algo like PBKDF2 or bcrypt would be far more secure (although the salt would need to be constant, since the resulting hashes need to function as lookup keys).

See https://docs.python.org/3/library/hashlib.html#hashlib.pbkdf2_hmac for more info.

Interestingly, Python 3.6 introduces an scrypt implementation into stdlib; might be interesting to allow the user to specify which algo they want to use when initializing the cache.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions