التجزئة والتمليح والتجزئة البطيئة
في هذا الدرس 4 موضوعات
هذا الدرس مخطط له. يعرض المخطط أدناه الموضوعات التي سيغطيها، ولم يُنشر الدرس الكامل بعد.
نص الدروس والتمارين باللغة الإنجليزية، بينما تبقى واجهة الموقع وعناوين الدروس بالعربية.
في هذا الدرس
explain why passwords are hashed, salted, and hashed slowly.
الموضوعات المخطط لها
- Encryption can be reversed with a key. Hashing is one-way; you store the hash, never the password.
- To log in, hash the attempt and compare.
- A salt is random data added per user, so equal passwords get different hashes and precomputed tables fail.
- Fast hashes (MD5, SHA-256) let attackers try billions of guesses per second. Password hashes are deliberately slow and costly: bcrypt, scrypt, Argon2.
- The slowness is tunable (cost factor) and can be raised over time.
تفاصيل المخطط المبدئي
عرض عملي
bcrypt("secret") twice gives two different strings, both starting $2a$ or $2b$ with the cost embedded.
اختبر فهمك
Why is SHA-256 a poor choice for passwords?
أظهر الإجابة
It is too fast, so guessing is cheap.
التطبيق
طبّق هذا الدرس بمختبر الوحدة وتمارينها واختبارها.
تعليم الدرس كمكتمل اختياري ويمكنك التراجع عنه في أي وقت. يبقى تقدمك محفوظًا في هذا المتصفح.