Back to Blog

تخزين كلمات المرور بأمان: Salting وPeppering وStretching

عند تخزين كلمات المرور، لا تكفي دوال التجزئة السريعة مثل SHA-256 وحدها. نحتاج إلى تقنيات إضافية لإبطاء الهجمات وتقليل فرص النجاح.

Salting: ملح فريد لكل كلمة

الملح يمنع هجمات القواميس المُسبقة. لكل كلمة ملح فريد يُدمج قبل التجزئة. لاستكشاف الأنواع، راجع محدد نوع التشفير.

Peppering: سر منفصل على مستوى النظام

يُضاف سر (Pepper) مُدار مركزياً خارج قاعدة البيانات. حتى لو تسرّبت الجداول، يبقى جزء ضروري مفقود لدى المهاجم.

Stretching: إبطاء مقصود

استخدم دوال إبطاء مثل Bcrypt لفهم تأثير عامل الكلفة على زمن الحساب. الإبطاء يقلل فعالية الهجمات المتوازية.

منظومة متكاملة

مهما كانت التقنية، كلمة المرور نفسها يجب أن تكون قوية؛ أنشئها عبر المولّد، وأدر الحسابات المشتركة بواسطة خزنة الفريق.

الخلاصة

الملح والبيبر والإبطاء ليست بدائل عن كلمات قوية، بل طبقات دفاع إضافية. اجمع بينها لتحصل على حماية واقعية ضد الهجمات الحديثة.

Disclosure: we may earn a commission if you purchase through some links.

Services Related To This Article

These offers are related to privacy, password security, and development workflows. Replace the current links with your real affiliate links through environment variables.

Default Links Need Replacement

Proton

Privacy, mail, and VPN

A strong fit for privacy-focused visitors who want VPN and secure email under one brand.

Explore Proton

Surfshark

Consumer VPN

Best on pages about geo-blocking, privacy, and public Wi-Fi protection.

Try Surfshark

NordVPN

High-converting VPN

A clear offer for users who need a paid, more durable alternative to a free proxy.

View NordVPN

1Password

Password management

The best match for password, secrets, team access, and personal security pages.

Discover 1Password

DigitalOcean

Developer cloud hosting

A strong fit for proxy setup, server, and infrastructure content aimed at developers and small teams.

Start with DigitalOcean