ခဏလေး ဒီလိုပဲ စဉ်းစားကြည့်
Hashing ဆိုတာ password ကို fixed-length, one-way (reverse လုပ်၍မရ) string အဖြစ် ပြောင်းလဲတဲ့ mathematical function ပါ — database leak ဖြစ်ရင်တောင် attacker က hash ကနေ original password ကို တိုက်ရိုက် ပြန်ရှာလို့ မရပါ (bcrypt, Argon2 ကဲ့သို့ modern algorithm ကို သုံးထားရင်)။ Salt ကတော့ password တစ်ခုချင်းစီအတွက် random value ထပ်ထည့်တာပါ — user နှစ်ယောက် password တူတောင် hash result ကွဲပြားစေပါတယ် (rainbow table attack ကို ကာကွယ်ဖို့)။ Brute-force Attack (combination အားလုံးကို စမ်း) နဲ့ Dictionary Attack (common password list ကို စမ်း) က password cracking method နှစ်မျိုးပါ — password strength/complexity က ဒါတွေကို ခက်ခဲစေပါတယ်.
လက်တွေ့ scenario နဲ့ ချိတ်ကြည့်မယ်
Weak database design (MD5 hash, salt မပါ) ကို database leak scenario နဲ့ တွေးကြည့်ရင် — attacker က pre-computed rainbow table (MD5 hash → common password mapping) ကနေ password တွေကို minute အနည်းငယ်အတွင်း crack နိုင်ပါတယ်, bcrypt + salt သုံးထားရင်တော့ crack ဖို့ computationally expensive ဖြစ်သွားပါတယ် (algorithm ကိုယ်တိုင် intentionally slow ဒီဇိုင်းလုပ်ထားလို့) — developer အနေနဲ့ 'ဘယ် hashing algorithm ရွေးချယ်လဲ' ဆိုတာက user password security ကို တိုက်ရိုက် သက်ရောက်ပါတယ်.
အတူတူ ကြည့်မယ်
Weak (MD5, no salt):
password "123456" -> always the same hash
-> attacker can precompute a lookup table (rainbow table)
-> cracked instantly
Strong (bcrypt, with salt):
password "123456" + random salt -> unique hash per user
-> algorithm is intentionally slow (built-in "work factor")
-> cracking is computationally expensive even at scaleHashing/Salting/Brute-force ရဲ့ ဆက်စပ်ပုံကို ရှင်းပြနိုင်မည်။၅ မိနစ် စမ်းကြည့်
'password123' ဆိုတဲ့ weak password ကို MD5 (no salt) နဲ့ hash လုပ်ကြည့်ပါ (`echo -n "password123" | md5sum` command) — ပြီးရင် online 'MD5 hash lookup' tool တစ်ခုနဲ့ ဒီ hash ကို reverse-search ကြည့်ပါ (educational purpose, ကိုယ့် test password အတွက်ပဲ)။
သတိလေးတစ်ချက်
Real-world credential (ကိုယ့်ပိုင် account, colleague account) ကို target လုပ်ပြီး crack/brute-force practice မလုပ်ပါနှင့် — ကိုယ်ပိုင် test data (ကိုယ့်ဘာသာ create ထားတဲ့ password) ကိုသာ practice ဖို့ သုံးပါ.