Homomorphic Encryption
เทคโนโลยีที่สามารถทำ arithmetic/comparison operations บน encrypted data ได้โดยไม่ต้อง decrypt — จะเปลี่ยนเกม database security ในอนาคต
ปัญหาปัจจุบัน
ในการทำงานของ database/web server ต้อง decrypt ข้อมูลเพื่อ:
- Query:
WHERE id = 7ต้อง compare ค่า → ต้องเห็น plaintext - Index, query plan, optimization ต้องเห็น value
- Layer 7 reverse proxy ต้องดู HTTP path → ต้อง decrypt TLS
→ ทุกครั้งที่ “ใช้งาน” data → ต้อง decrypt → key ต้องถูกถืออยู่ที่ไหนสักที่ → เป็นช่องโหว่
Concept
Encrypt(a) ⊕ Encrypt(b) = Encrypt(a + b)
ทำ operations บน ciphertext → ผลลัพธ์ decrypt ออกมาได้เหมือนทำบน plaintext
ผลกระทบ:
- Database store data encrypted ตลอดเวลา
- Query (
SELECT WHERE x > 10) ทำบน ciphertext ได้ - Layer 7 proxy route HTTP request โดยไม่ต้อง decrypt TLS
- Indexes สร้างบน encrypted column ได้
ประวัติการพัฒนา
| ปี | เหตุการณ์ |
|---|---|
| 1978 | Rivest, Adleman, Dertouzos เสนอ concept (RSA homomorphic บางส่วน) |
| 2009 | Craig Gentry (IBM) — Fully Homomorphic Encryption (FHE) ทำได้ในทางทฤษฎี |
| 2020s | IBM ปล่อย HElib + HE Toolkit — open-source C++ |
| 2024+ | เริ่มใช้ใน production จริงบางอุตสาหกรรม (healthcare, finance) |
ข้อจำกัดปัจจุบัน
- ช้า — encrypted operations ช้ากว่า plaintext 1,000-100,000 เท่า
- Ciphertext ใหญ่ — ต้องเก็บ 100x-1000x ของ plaintext
- ทำได้บาง operations (FHE แท้ทำได้ทั้งหมด แต่ช้ามาก)
อนาคต
ในอีก 5-10 ปี hardware acceleration (specialized chips) + algorithm improvements จะทำให้ FHE ใช้งานจริงได้ในวงกว้าง
Key Points
- Homomorphic Encryption = ทำ query บน encrypted data โดยไม่ต้อง decrypt
- FHE (Fully Homomorphic) ทำได้ตั้งแต่ 2009 แต่ยังช้ามาก
- ปัจจุบันใช้จริงในวงแคบ (healthcare, finance)
- จะเปลี่ยนรูปแบบ Database Security ทั้งหมดในอนาคต
Related
- Database Security — encryption เป็นส่วนหนึ่งของ security stack
- Database Internals — query processing ปัจจุบันต้อง decrypt