惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

GbyAI
GbyAI
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
Security Archives - TechRepublic
Security Archives - TechRepublic
H
Heimdal Security Blog
T
Tenable Blog
Webroot Blog
Webroot Blog
Cisco Talos Blog
Cisco Talos Blog
NISL@THU
NISL@THU
Help Net Security
Help Net Security
W
WeLiveSecurity
量子位
Stack Overflow Blog
Stack Overflow Blog
Schneier on Security
Schneier on Security
Simon Willison's Weblog
Simon Willison's Weblog
Recorded Future
Recorded Future
Martin Fowler
Martin Fowler
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
L
Lohrmann on Cybersecurity
SecWiki News
SecWiki News
Blog — PlanetScale
Blog — PlanetScale
F
Full Disclosure
Recent Commits to openclaw:main
Recent Commits to openclaw:main
小众软件
小众软件
Cyberwarzone
Cyberwarzone
S
Security Affairs
L
LangChain Blog
Hacker News - Newest:
Hacker News - Newest: "LLM"
V
V2EX
WordPress大学
WordPress大学
爱范儿
爱范儿
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
L
LINUX DO - 热门话题
Forbes - Security
Forbes - Security
Engineering at Meta
Engineering at Meta
博客园 - 三生石上(FineUI控件)
Scott Helme
Scott Helme
H
Help Net Security
www.infosecurity-magazine.com
www.infosecurity-magazine.com
C
Cyber Attacks, Cyber Crime and Cyber Security
有赞技术团队
有赞技术团队
IT之家
IT之家
G
Google Developers Blog
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
S
Schneier on Security
Google DeepMind News
Google DeepMind News
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
月光博客
月光博客
Hacker News: Ask HN
Hacker News: Ask HN
O
OpenAI News
宝玉的分享
宝玉的分享

DEV Community

Authentication Security Deep Dive: From Brute Force to Salted Hashing (With Java Examples) Why AI Systems Don’t Fail — They Drift Spilling beans for how i learn for exam😁"Reinforcement Learning Cheat Sheet" I Replaced Chrome with Safari for AI Browser Automation. Here's What Broke (and What Finally Worked) How Python Borrows Other People's Work The $40 Architecture: Processing 1 Billion API Requests with 99.99% Uptime Vibe Coding: A Workflow Guide (From Zero to SaaS) Most webhook security guides protect the wrong side. The scary part is delivery. Headless CMS for TanStack Start: Build a Blog with Cosmic EU Age Verification App "Hacked in 2 Minutes" — What Actually Happened Comfy Cloud’s delete function does not actually remove files Running AI Models on GPU Cloud Servers: A Beginner Guide Event-driven media intelligence with AWS Step Functions and Bedrock I scored 500 AI prompts across 8 quality dimensions — here's what broke How to Call Google Gemini API from Next.js (Free Tier, No Backend Needed) The Portal Protocol: Reclaiming Human Connection in the Age of AI How to Fix Your Team's Scattered Knowledge Problem With a Self-Hosted Forum Intro to tc Cloud Functors: A Graph-First Mental Model for the Modern Cloud Designing Multi-Tenant Backends With Both Ownership and Team Access I Built a Neumorphic CSS Library with 77+ Components — Here's What I Learned PostgreSQL Performance Optimization: Why Connection Pooling Is Critical at Scale Cómo construí un SaaS multi-rubro para gestionar expensas en Argentina con FastAPI + Vue 3 🚀 I Built an Ethical Hacking Scanner Tool – Open Source Project I Replaced /usage and /context in Claude Code With a Single Statusline A Pythonic Way to Handle Emails (IMAP/SMTP) with Auto-Discovery and AI-Ready Design I Collected 8.9 Million Polymarket Price Points — Here's What I Found About How Markets Really Move EcoTrack AI — Carbon Footprint Tracker & Dashboard Everyone's Using AI. No One Agrees How. 5 self-hosted ebook managers worth trying in 2026 Building Your First AI Agent with LangChain: From Chatbot to Autonomous Assistant Common SOC 2 Failures (Real World) Stop Vibe-Checking Your AI App: A Practical Guide to Evals How to Use SonarQube and SonarScanner Locally to Level Up Your Code Quality Your Next To-Do App Is Dead — I Replaced Mine with an OpenClaw AI Sign a Nostr event in 60 lines of Python using coincurve — no nostr-sdk, no nbxplorer, no rust toolchain ITGC Audit Explained Like You’re in Big 4 Patch Tuesday abril 2026: Microsoft parcha 163 vulnerabilidades y un zero-day en SharePoint Stop scraping everything: a better way to track competitor price changes Listing on MCPize + the Official MCP Registry while routing payments OUTSIDE the marketplace — how I kept 100% of my x402 revenue Building an AI-Powered Risk Intelligence System Using Serverless Architecture Why We Ripped Function Overloading Out of Our AI Toolchain Testing AI-Generated Code: How to Actually Know If It Works SaaS Churn Is Killing Your Business. Here Is What to Do About It (Without a Support Team) The Speed of AI Is No Longer Linear - And Self-Improving Models Are Why How to Implement RBAC for MCP Tools: A Practical Guide for Engineering Teams From Standard Quote to Persuasive Proposal: AI Automation for Arborists I built a CLI that scaffolds complete multi-tenant SaaS apps Axios CVE-2025–62718: The Silent SSRF Bug That Could Be Hiding in Your Node.js App Right Now The dashboard that ended our friendship Data Pipelines Explained Simply (and How to Build Them with Python) The Hidden Cost of AI Systems Nobody Talks About. undefined vs undeclared, and how typeof behaves Switching from file-based jobs to NATS/Kafka in Rust without changing code io_uring Adventures: Rust Servers That Love Syscalls Why Agentic AI is Killing the Traditional Database The POUR principles of web accessibility for developers and designers Quantum Neural Network 3D — A Deep Dive into Interactive WebGL Visualization How To Install Caveman In Codex On macOS And Windows Automation Pipeline Reliability: Why Your Workflow Breaks When Nobody Is Watching I Built an 'Open World' AI Coding Agent — It Works From ANY Folder From Freelancing to Product: A Tech Service Company's SaaS Transformation China's AI Giants: Adding Tencent Hunyuan & ByteDance Doubao to AI University (74 Providers) On the Vibe Coders and Their Lies clerk: Auto-Summarize Your Claude Code Sessions AI Weekly — 2026/04/10–04/17 | The Model Lockdown Is Here, but the Toolchain Is the Real Battleground AI 週報 — 2026/04/10–2026/04/17 模型封鎖潮來了,但工具鏈才是真戰場 Maybe this is how Open-Source apps are born... 🚀 Fine-Tune LLMs with LoRA and QLoRA: 2026 Guide tRPC v11 + Next.js App Router: End-to-End Type Safety Without the Boilerplate ShadCN UI in 2026: Why I Stopped Installing Component Libraries and Started Owning My Components SaaS Billing in React Server Components: Stripe + Supabase Without a Single `useEffect` Join our DEV Weekend Challenge — $1,000 in Prizes Across TEN winners! Submissions Due April 20 at 6:59 AM UTC. Implementing FSRS Spaced Repetition in Flutter + Supabase — Adding Memory Science to an AI Learning App "I Texted My Localhost From the Train — Claude Code Fixed the Bug Before I Got Home" I Built a Sales Prep AI and It Went Deeper Than Expected Design to Code #2: One JSON, Eleven Outputs Solving the 100M-Row Problem: A Summary Table Pattern for High-Volume Push Notification Logs Flutter Web With Wasm: What Actually Changes For Developers I Built 50 Royalty-Free Soundtracks for My Side Project in a Weekend Using AI Music Generation The Vibe Coding Security Checklist: 7 Things to Check Before You Ship Stop Letting Googlebot Guess Fix Your React App's SEO Right Desconstruindo o Streaming do LinkedIn: Como Criar um Engine de Extração de Vídeo de Alta Performance com HLS e FFmpeg (EDA Part-1) EDA (Exploratory Data Analysis) Explained With Real Life — Why Looking at Your Data Is the Most Important Step in Machine Learning Brand Relationship Management at Scale: Our 4-Touch Outreach System for 200+ Brands Why String.fromEnvironment() Might Return an Empty String in Dart JGuardrails 1.0.0 — Hardening Java LLM Apps Against Jailbreaks, Toxicity, and Prompt Injection Plan and Schedule a Full Week of Threads Content From One Claude Conversation Coding Cat Oran Ep3, Five Tables Changed Everything Updated: BFF Pattern I'm done watching freelancers get buried by 200 proposals. So I'm building the alternative. This is my first post BFS Algorithm in Java Step by Step Tutorial with Examples Tracking LLM Pricing Monthly: An Open Dataset for 22 AI Models How We Measure Content ROI on a Comparison Site: Revenue Attribution Without Perfect Data Introducing Nova AI Ops: The AI-Native Operating System for SRE Teams I built a free desktop video downloader for Windows — Grabbit How Talkie OCR Helps Vision-Impaired & Dyslexic Users Read the World Around Them VRCFaceTracking安装和iPhone面捕配置教程,有bug Even CrowdStrike Can't See Your Agents The Automation Gold Rush: What n8n Workflows and Claude Are Opening Up for Developers Right Now
Encryption Protocols for Secure AI Systems: A Practical Guide
Artemii Amel · 2026-05-13 · via DEV Community

TL;DR: Modern AI systems face encryption challenges that standard protocols do not address — protecting data while it is being processed, proving computation correctness without revealing inputs, and maintaining security after quantum computers arrive. This guide covers the four layers every production AI deployment needs: homomorphic encryption, zero-knowledge proofs, trusted execution environments, and post-quantum cryptography — with performance benchmarks and implementation recommendations for each.

Encrypting data in transit and at rest is baseline hygiene. It is not sufficient for AI systems. The gap is computation: the moment your model touches data to produce an inference, that data is exposed in plaintext inside memory. For systems handling medical records, financial signals, or proprietary training sets, that exposure window is the attack surface that matters most. Closing it requires a different class of cryptographic tool — and choosing the wrong one can make a system either insecure or too slow to run in production.

The Core Problem: Encryption Covers Storage and Transit, Not Computation

Standard encryption protects two states. AES-256 covers data at rest. TLS 1.3 covers data in transit. Neither covers data in use — and every model inference, every gradient update in federated learning, every aggregation step in a distributed pipeline decrypts input before processing it.

For most web applications, this is acceptable. For AI systems processing sensitive inputs across multi-party or multi-cloud architectures, it is not. You need encryption that operates on encrypted data directly, or hardware isolation that prevents any software — including the hypervisor — from reading plaintext during computation.

Three threat models drive the need for stronger protocols:

  • Byzantine faults in federated learning: A compromised node in a federated training network can submit poisoned gradients that corrupt the global model. Detecting and isolating these requires cryptographic proof of computation integrity, not just network-layer trust.
  • Gradient inversion attacks: Shared gradients in federated learning are not private. Researchers have demonstrated reconstruction of training data from gradient updates alone — a form of adversarial machine learning that bypasses access controls entirely.
  • Quantum threat horizon: RSA-2048 and elliptic-curve cryptography are mathematically broken by a sufficiently powerful quantum computer. The timeline is uncertain but the migration cost is not — retrofitting post-quantum algorithms into a live system is expensive. Starting now is the rational choice.

Homomorphic Encryption: Computing on Encrypted Data

Homomorphic encryption (HE) allows computation directly on ciphertext, producing an encrypted result that, when decrypted, matches what you would have gotten by computing on plaintext. No decryption happens during processing — the plaintext never exists inside the compute environment.

Two HE schemes dominate current implementations:

  • BGV (Brakerski-Gentry-Vaikuntanathan): Efficient for integer arithmetic. Well-suited for models operating on quantized or integer-valued inputs.
  • CKKS (Cheon-Kim-Kim-Song): Supports approximate arithmetic on real numbers. The preferred scheme for machine learning workloads where small floating-point errors are acceptable.

ChainML's production implementation combines HE with zk-SNARKs for federated learning — using HE to protect training data from the aggregation server while using ZKPs to prove that each client's gradient update was computed correctly. This combination addresses both privacy and integrity, the two failure modes that HE alone cannot handle.

Performance reality: BGV and CKKS carry 10x–100x computational overhead compared to plaintext operations. This overhead is acceptable for offline batch processing and model validation workflows. It is not yet practical for real-time inference on standard hardware. Benchmark your specific workload before committing to HE for latency-sensitive paths.

Library BGV performance CKKS performance Notes
OpenFHE Fastest Fastest Preferred for production BGV/CKKS
Microsoft SEAL Moderate Moderate Well-documented, stable API

Empirical benchmarks confirm OpenFHE outperforms Microsoft SEAL on both BGV and CKKS schemes. Use OpenFHE as your baseline unless your team has existing SEAL integration that would be costly to replace.

Pro Tip: Apply HE selectively. Use it for the sensitive aggregation step in federated learning — gradient collection and model update — while using standard encryption for the training computation itself on trusted hardware.

Zero-Knowledge Proofs: Proving Correctness Without Revealing Inputs

Zero-knowledge proofs (ZKPs) allow one party to prove to another that a statement is true without revealing any information beyond the truth of the statement itself. In AI contexts, the most relevant application is proving that a model was trained correctly, or that an inference was computed on legitimate input, without exposing the model weights or the input data.

zk-SNARKs (Zero-Knowledge Succinct Non-Interactive Arguments of Knowledge) are the most deployed ZKP variant for AI systems. The "succinct" property means the proof size and verification time are small relative to the computation being proved — critical when you need to verify inference integrity at scale.

Where ZKPs apply in AI pipelines:

  1. Model provenance: Prove that a model was trained on an approved dataset without revealing the dataset.
  2. Inference audit trails: Prove that a prediction was produced by a specific model version without exposing model weights.
  3. Federated gradient integrity: Prove that a gradient update was computed correctly from real data without revealing the data.

Performance reality: zk-SNARK proof generation carries 5x–50x overhead relative to the underlying computation. Verification is fast — typically milliseconds. The bottleneck is the prover, which means proof generation should happen asynchronously rather than in the critical inference path.

Trusted Execution Environments: Hardware-Enforced Isolation

Trusted execution environments (TEEs) are hardware-isolated memory regions that prevent the host operating system, hypervisor, or other software from reading or modifying the contents of the enclave — even with physical access to the machine. TEEs address the computation exposure problem directly, at the hardware level, without the algorithmic overhead of HE or ZKPs.

Three TEE implementations dominate cloud deployments:

  • Intel SGX (Software Guard Extensions): Page-granular enclaves, mature SDK support, available across major cloud providers.
  • Intel TDX (Trust Domain Extensions): VM-granular isolation, designed for full confidential VM workloads at scale.
  • AMD SEV-SNP (Secure Encrypted Virtualization — Secure Nested Paging): Strong memory integrity guarantees, widely available on AMD EPYC-based cloud instances.

TEEs offer the best performance profile of the three approaches for AI inference:

Technology Overhead vs. plaintext Latency impact Best use case
Homomorphic Encryption (BGV/CKKS) 10x–100x Very high Offline batch, gradient aggregation
zk-SNARKs 5x–50x (prover) High (prover) Audit trails, model provenance
TEE (SGX/TDX/SEV-SNP) 3–7% Low Real-time inference, key management
Post-quantum cryptography Under 5% Very low Transport, signing, key exchange

The 3–7% overhead on TEEs makes them viable for production inference paths where HE is not. The trade-off is attestation complexity — you need a remote attestation protocol to verify enclave integrity before trusting computation results, and this attestation must be renewed when the enclave restarts.

Pro Tip: Use TEEs for key management operations. Moving key generation, derivation, and rotation into an enclave means your keys never exist outside hardware-enforced isolation — significantly reducing the blast radius of a host OS compromise.

Post-Quantum Cryptography: Preparing for the Quantum Threat

Quantum computers capable of breaking RSA-2048 and elliptic-curve Diffie-Hellman are not yet operational at the required scale, but the cryptographic migration they necessitate is a present-day engineering problem. NIST finalized the first post-quantum standards in 2024, giving production teams a stable target for migration.

NIST ML-KEM (FIPS 203) — formerly CRYSTALS-Kyber — is the primary post-quantum key encapsulation mechanism standardized by NIST. It replaces RSA and elliptic-curve key exchange in TLS and inter-service communication. The broader NIST post-quantum cryptography project also standardized ML-DSA (FIPS 204) for digital signatures and SLH-DSA (FIPS 205) as a stateless hash-based signature scheme.

Performance overhead for ML-KEM is under 5% in benchmarks against RSA-2048 on standard server hardware — making it the least disruptive migration of the four approaches in this guide.

Migration priorities for AI systems:

  1. Transport layer first: Migrate inter-agent and inter-service TLS to hybrid classical/post-quantum key exchange. Most TLS libraries support hybrid modes that maintain compatibility with non-PQC endpoints during transition.
  2. Signing keys second: Model signing, gradient signing in federated systems, and audit log signing are high-value targets for post-quantum digital signatures.
  3. Long-lived secrets last: Any secret expected to remain sensitive beyond 10 years should be encrypted with post-quantum algorithms now, even if those algorithms add overhead, because encrypted data captured today can be decrypted retroactively once quantum computers arrive — a threat model called "harvest now, decrypt later."

Multi-Party Computation and Differential Privacy

For scenarios where multiple parties must jointly compute a result without any single party seeing the others' inputs, secure multi-party computation (MPC) provides a cryptographic framework that complements HE and ZKPs. MPC is particularly relevant for cross-organization model training where participants will not accept a central aggregation server with plaintext access.

Differential privacy (DP) addresses a different threat: statistical inference attacks on model outputs. By adding calibrated noise to training data or model parameters, DP provides a mathematical guarantee that querying the model reveals nothing about any individual training example. The trade-off is model accuracy — higher privacy budgets produce noisier, less accurate models. Calibrating the privacy-utility trade-off is an empirical process that requires benchmarking on representative data.

Layered Encryption Strategy: A Framework for Production AI

No single technology covers all three data states. Production AI systems require a layered approach:

Data at rest: AES-256 with automated key rotation. Every data store, every model artifact, every training dataset. Key rotation should be scheduled and automated — manual rotation is consistently the source of missed rotations that leave old keys active longer than intended.

Data in transit: TLS 1.3 minimum for all inter-service communication. For agent-to-agent communication specifically, mutual TLS (mTLS) validates both sides of the connection, preventing a compromised agent from impersonating a legitimate peer. mTLS is the correct default for any autonomous agent network — one-way TLS is insufficient when agents accept work from peers.

Data in use: TEEs for latency-sensitive inference paths and key management operations. HE for sensitive batch aggregation steps, particularly in federated learning. ZKPs where you need verifiable integrity proofs for audit or compliance purposes.

Key management: Centralize key management with hardware security modules (HSMs) or TEE-backed key services. Multi-cloud deployments create key sprawl — different keys per provider, different rotation schedules, different access controls — that rapidly becomes unmanageable without automation. Audit all key access events. Rotate on a fixed schedule, not in response to suspected compromise.

Best Practices for Implementing Encryption in AI Pipelines

Audit your data states before choosing a protocol. Map where sensitive data is decrypted during your pipeline. Inference endpoints, gradient aggregation servers, and model serving layers are the highest-priority targets — prioritize them before addressing less exposed paths.

Do not implement HE or ZKPs from scratch. These are mathematically sophisticated protocols where implementation errors are difficult to detect and have severe consequences. Use audited libraries: Microsoft SEAL or OpenFHE for homomorphic encryption, established zk-SNARK toolkits for zero-knowledge proofs.

Benchmark before committing to HE for real-time paths. The 10x–100x overhead on BGV/CKKS is a real constraint. Run your workload through OpenFHE on representative hardware before designing an architecture that depends on HE for latency-sensitive inference.

Treat key rotation as a reliability requirement. Key management failures — stale keys, leaked keys, keys without rotation — are the most common real-world source of encryption weaknesses in production systems. Automate rotation, alert on rotation failures, and test rotation procedures regularly.

Start the post-quantum migration now. The overhead is low, the standards are stable, and the migration cost compounds with delay. Hybrid key exchange allows gradual rollout without breaking compatibility with systems you do not yet control.

Our Take: Why Most AI Teams Under-Invest in Encryption Infrastructure

The gap between AI encryption requirements and what teams actually implement is wide, and it closes slowly. The reason is architectural: encryption for data in transit and at rest slots neatly into existing infrastructure tooling — cloud provider managed keys, standard TLS termination, database encryption flags. Encryption for computation does not. It requires different libraries, different architectural patterns, and benchmarking work that is specific to each use case.

The consequence is that most AI systems handle sensitive data with plaintext exposure during computation that would be unacceptable under any serious threat model. The attack surface is not hypothetical — gradient inversion against federated learning systems, Byzantine fault exploitation in distributed training, and side-channel attacks against TEE implementations have all been demonstrated in research.

The teams building AI infrastructure for regulated industries — healthcare, finance, government — are moving fastest on this because they have to. But the pressure is coming for every team handling proprietary data at scale. Starting with a TEE-backed inference layer and mTLS for all inter-agent communication is the minimum viable baseline. Adding HE for sensitive aggregation steps and beginning the post-quantum migration on transport is the path to a defensible architecture.

Encryption at the Network Layer for Autonomous Agents

Agent networks add a specific challenge that static service architectures do not face: agents discover and contact new peers dynamically, which means trust cannot be established through a static allowlist. mTLS handles authentication for known peers, but dynamic discovery requires a reputation or attestation layer on top of transport encryption.

Pilot Protocol is designed for this environment. It provides virtual addresses, encrypted tunnels with NAT traversal, and mutual trust establishment for AI agents operating across dynamic, multi-cloud topologies. Rather than implementing mTLS configuration and peer verification per-service, agents on the network get encrypted peer-to-peer communication with trust built into the protocol layer. The encryption stack handles transport; agents can focus on the task layer above it.

Frequently Asked Questions

What is homomorphic encryption and why does it matter for AI?
Homomorphic encryption allows mathematical operations on ciphertext that produce the same result as operations on plaintext, without ever decrypting the data. For AI, it means model inference and federated learning aggregation can happen on encrypted inputs — the plaintext is never exposed during computation, even on untrusted infrastructure.

How much overhead does a trusted execution environment add to AI inference?
TEEs (Intel SGX, AMD SEV-SNP, Intel TDX) add approximately 3–7% latency compared to standard inference on the same hardware. This is the lowest overhead of any approach that protects data during computation, making TEEs the practical choice for latency-sensitive inference paths where homomorphic encryption's 10x–100x overhead is not acceptable.

When should I use zero-knowledge proofs instead of encryption?
Zero-knowledge proofs solve a different problem than encryption. Encryption protects confidentiality; ZKPs prove that a computation was performed correctly without revealing the inputs. Use ZKPs when you need verifiable audit trails — proving model provenance, verifying gradient integrity in federated learning, or demonstrating regulatory compliance — without exposing the underlying data.

What is ML-KEM and why is it replacing RSA?
ML-KEM (FIPS 203, formerly CRYSTALS-Kyber) is the NIST-standardized post-quantum key encapsulation mechanism that replaces RSA and elliptic-curve key exchange. RSA-2048 is mathematically broken by a sufficiently powerful quantum computer. ML-KEM is resistant to both classical and quantum attacks, adds under 5% overhead compared to RSA-2048, and has stable NIST standard status — making it the correct migration target for any system where keys need to remain secure beyond a 10-year horizon.

What is the difference between federated learning and secure multi-party computation?
Federated learning distributes model training across data owners who share gradients rather than raw data, keeping local data on-premises. Secure multi-party computation provides cryptographic guarantees that no single participant sees others' inputs during joint computation — a stronger privacy guarantee than federated learning alone, at higher computational cost. The two are complementary: MPC can be layered over federated learning to protect gradient exchange as well as local data.