Block Cipher Mode
ব্লক সাইফার মোড
একটা fixed-size block cipher (যেমন AES) দিয়ে যেকোনো-দৈর্ঘ্যের message এনক্রিপ্ট করার নিয়ম — ECB/CBC/CTR/GCM প্রতিটার আলাদা trade-off।
also: mode-of-operation, cipher-mode, ecb, cbc, ctr
ECB : block-প্রতি independent encrypt — identical block → identical ciphertext (broken)
CBC : IV + XOR-with-previous-ciphertext — pattern লুকায়, padding-oracle ইতিহাস আছে
CTR : counter → keystream → XOR — parallelizable, no padding, nonce-reuse ভয়ংকর
GCM : CTR + authentication tag — AEAD, আজকের default
- ECB-র সমস্যা cipher-এর দুর্বলতা না — mode-এর গঠনগত সমস্যা, যেকোনো block cipher-এই ঘটে
- CBC-র IV unpredictable হতে হবে; CTR/GCM-এর nonce শুধু unique হলেই চলে — দুইটা আলাদা শর্ত
- আধুনিক প্রোটোকল (TLS 1.3) non-AEAD mode একেবারে বাদ দিয়েছে — শুধু GCM/ChaCha20-Poly1305