Q62: What is Hash Seed Randomization and how does it prevent Hash Collision DoS attacks?
CPython randomizes string and byte hash seed values on process startup (PYTHONHASHSEED). This prevents attacker inputs from triggering deliberate hash collision $O(N^2)$ algorithmic degradation DoS attacks on dictionaries.
Key Takeaways
- Randomizes string hash seeds on process startup.
- Defends dictionaries against Hash Collision Denial-of-Service attacks.
Knowledge Check
Are string hash values hash('text') identical across different execution runs of Python scripts?