Encipherment คืออะไร?
Encipherment (การเข้ารหัส/การเข้ารหัสลับ) คือกระบวนการแปลงข้อความที่อ่านได้ (Plaintext) ให้กลายเป็นข้อความที่อ่านไม่เข้าใจ (Ciphertext) โดยใช้อัลกอริทึมและคีย์ (Key) เป็นคำที่ใช้แทนกันได้กับ Encryption ในบริบทสมัยใหม่
🔐 Encipherment vs Encryption vs Encoding
| คำศัพท์ | ความหมาย | จุดประสงค์ | ตัวอย่าง | |
|---|---|---|---|---|
| Encipherment / Encryption | แปลง Plaintext → Ciphertext ด้วยคีย์ลับ | Confidentiality (ความลับ) | AES, ChaCha20, RSA, ECC | |
| Encoding | แปลงรูปแบบข้อมูล (ไม่มีคีย์) | ความเข้ากันได้/การส่งผ่าน | Base64, URL Encoding, ASCII, UTF-8 | |
| Hashing | ฟังก์ชันทางเดียว Plaintext → Hash | Integrity, Password storage | SHA-256, bcrypt, Argon2 |
| ประเภท | คีย์ | ความเร็ว | การใช้งานหลัก | ตัวอย่าง |
|---|---|---|---|---|
| Symmetric | คีย์เดียว (Shared Secret) | เร็วมาก | เข้ารหัสข้อมูลจำนวนมาก | AES-256-GCM, ChaCha20-Poly1305 |
| Asymmetric (Public Key) | Key Pair (Public + Private) | ช้า | Key Exchange, Digital Signature, PKI | RSA-2048/3072/4096, ECDSA (P-256/P-384), Ed25519 |
| Hybrid | รวมทั้งสอง | สมดุล | TLS/SSL, PGP, Signal Protocol | ECDHE (Key Exchange) + AES-GCM (Data) |
🛡️ Security Mechanisms ที่เกี่ยวข้อง
- Notarization: ตัวกลาง (Trusted Third Party) จำพรากการสื่อสาร ป้องกัน Non-repudiation
- Trusted Functionality: โมดูลที่ได้รับการรับรอง (FIPS 140-2/3, Common Criteria) ทำหน้าที่ Crypto
- Pervasive Security Mechanisms: ทำงานทุก Layer (Audit trails, Security labels, Event detection)
🔓 Decryption (ถอดรหัส)
กระบวนการย้อนกลับ Ciphertext → Plaintext โดยใช้คีย์ที่ถูกต้อง ถ้าไม่มีคีย์/คีย์ผิด → ไม่สามารถถอดรหัสได้ (Computationally infeasible)
✅ มาตรฐานและ Best Practice 2024
- Symmetric: AES-256-GCM / ChaCha20-Poly1305 (Authenticated Encryption)
- Asymmetric: ECDSA/EdDSA (Ed25519) หรือ RSA-3072+
- Key Exchange: ECDHE (Forward Secrecy)
- Hashing: SHA-256/384/512, SHA-3, BLAKE2/3
- Password Hashing: Argon2id, bcrypt, scrypt (ไม่ใช่ SHA/MD5)
- TLS: TLS 1.2/1.3 เท่านั้น ห้าม SSL, TLS 1.0/1.1
❓ คำถามทั่วไป
- Encipherment = Encryption ไหม?
- ในทางปฏิบัติ ใช่ คำว่า Encryption ใช้กว้างกว่า Encipherment เป็นคำเก่า/ทางวิชาการมากกว่า
- Encoding ปลอดภัยไหม?
- ไม่ Base64 ใครก็ถอดรหัสได้ ไม่ใช่การเข้ารหัส
- Encryption 100% ปลอดภัยไหม?
- ไม่ Implementation bug, Side-channel, Key management, Quantum threat ยังเป็นความเสี่ยง
สรุป
Encipherment = Encryption = การแปลง Plaintext → Ciphertext ด้วยคีย์ เพื่อ Confidentiality แตกต่างจาก Encoding (ไม่มีคีย์) และ Hashing (ทางเดียว) ใช้ Cryptosystem ที่ทันสมัย (AES-GCM, ChaCha20-Poly1305, ECDHE, Ed25519) จัดการคีย์ให้ดี