Thuta Learning
Blockchain
BasicSecurityအဆင့်မြင့်

Hashing

Blockchainသင်ခန်းစာ 8

ဒီခန်းပြီးရင် ဘာတတ်သွားမလဲ

  • Hashing ရဲ့ protocol model, trust assumptions နဲ့failure modes ကိုရှင်းပြနိုင်ရန်
  • Local simulation/testnet တွင် normal, tampered နဲ့failure cases ကိုစမ်းနိုင်ရန်
  • Real keys/funds မသုံးဘဲ security limitations နဲ့safe practice ကိုအသုံးချနိုင်ရန်

Hashing ဆိုတာ input data ကို fixed-length digital fingerprint တစ်ခုအဖြစ်ပြောင်းတဲ့နည်းလမ်းပါ။ Input နည်းနည်းလေးပြောင်းတာနဲ့ hash output ကလုံးဝကွဲသွားတတ်ပါတယ်။ ဒါကြောင့် data ပြောင်းထားသလားဆိုတာ စစ်ဖို့အလွန်အသုံးဝင်ပါတယ်။

Hash က password မဟုတ်ပါ။ Hash ကနေ original data ကိုပြန်ဖော်ဖို့မဖြစ်နိုင်အောင် design လုပ်ထားတဲ့ one-way fingerprint ဖြစ်ပါတယ်။ Blockchain မှာ block data ပြောင်းပြီလားဆိုတာကို hash နဲ့သိနိုင်ပါတယ်.

ပိုပြီးနားလည်ထားရမယ့် အချက်

Cryptographic hash function က arbitrary input ကို fixed-size digest ပြောင်းပြီး preimage resistance, second-preimage resistance နဲ့ collision resistance properties ကိုရည်ရွယ်ပါတယ်။ Hashing က encryption မဟုတ်သဖြင့် original data confidentiality မပေးဘဲ low-entropy values ကိုdictionary guessing လုပ်နိုင်ပါတယ်။ Blockchain တွင် block links, transaction IDs, Merkle commitments နဲ့ proof-of-work puzzles အတွက်သုံးပါတယ်။

လက်တွေ့မှာ ဘယ်လိုအသုံးချမလဲ

SHA-256 နဲ့ inputs တစ်လုံးခြားသုံးခု hash လုပ်ပြီး avalanche effect ပြပါ။ Password storage အတွက် salt + password KDF လိုကြောင်း hash သက်သက်နဲ့နှိုင်းပါ။

နမူနာကို safe environment မှာစမ်းကြည့်မယ်

text
"ThutaTech"  -> 0x91a2...
"thutatech"  -> 0x4c77...

Small letter change, totally different hash.
You should see
Hashing က blockchain ရဲ့ tamper-detection alarm လိုအလုပ်လုပ်ပါတယ်။

ကိုယ်တိုင်စမ်းကြည့်ရန်

Hashing နမူနာကို real funds သို့real seed/private key မသုံးဘဲ local simulation သို့testnet မှာပြန်တည်ဆောက်ပါ။ Normal case နှစ်ခု၊ tampered/adversarial case တစ်ခုနှင့် failure case တစ်ခုအတွက် expected state နဲ့verification evidence ကိုမ run မီရေးထားပါ။

Security သတိပေးချက်

Secret သို့password ကိုplain hash တစ်ကြိမ်တည်းလုပ်ခြင်းက secure storage မဟုတ်ပါ။

NISTIR 8202 — Blockchain Technology Overview — NIST

ဒီနေရာမှာ လူအများမှားတတ်တယ်

  • Secret သို့password ကိုplain hash တစ်ကြိမ်တည်းလုပ်ခြင်းက secure storage မဟုတ်ပါ။
  • Happy path တစ်ခုအောင်တာနဲ့ system secure သို့production-ready ဖြစ်ပြီဟုယူဆခြင်းက adversarial, key-management နဲ့economic risks များကိုလွတ်စေနိုင်ပါတယ်။

လက်တွေ့လေ့ကျင့်ခန်း

Hashing နမူနာကို real funds သို့real seed/private key မသုံးဘဲ local simulation သို့testnet မှာပြန်တည်ဆောက်ပါ။ Normal case နှစ်ခု၊ tampered/adversarial case တစ်ခုနှင့် failure case တစ်ခုအတွက် expected state နဲ့verification evidence ကိုမ run မီရေးထားပါ။

အလုပ်ဖြစ်ကြောင်း ဒီလိုသိမယ်: Hashing က blockchain ရဲ့ tamper-detection alarm လိုအလုပ်လုပ်ပါတယ်။

နောက်ဆုံးပြင်ဆင်ရက်

Progress ကို ဤ browser (ဤစက်) တွင်သာ သိမ်းထားပါသည်။ အခြားစက်များနှင့် sync မလုပ်ပါ။

ဤသင်ခန်းစာတွင် အမှားတွေ့ပါက အကြောင်းကြားရန်သင့် email app ကို ဤသင်ခန်းစာလိပ်စာ ဖြည့်ပြီးသားဖြင့် ဖွင့်ပေးပါမည် — သင်ကိုယ်တိုင် ပို့မှသာ ပို့မည်ဖြစ်သည်။

Hashing | Thuta Learning