CHAPTER 7

Privacy and Security at the Edge

The Edge Security Paradigm

Edge AI fundamentally transforms the security and privacy landscape. Processing data locally eliminates many cloud-based vulnerabilities but introduces new challenges—physically accessible devices, resource-constrained security mechanisms, and distributed attack surfaces. This chapter explores both the privacy advantages of edge AI and the security considerations required for robust deployment.

Privacy Advantages of Edge AI

Data Minimization

Edge AI embodies the principle of data minimization—collect and process only what's necessary, discard the rest immediately:

This reduces the attack surface—data that never leaves the device can't be intercepted during transmission or breached from centralized databases.

GDPR and Privacy Compliance

Edge AI naturally aligns with privacy regulations:

Regulation Requirement Edge AI Solution
GDPR (EU) Data minimization, purpose limitation Process locally, transmit only necessary insights
CCPA (California) User control over personal data Data stays on user's device under their control
HIPAA (Healthcare) Protected health information security Medical data processed in secure enclaves on-device
COPPA (Children) Parental consent for data collection No data collection when processing locally

User Trust and Transparency

On-device processing builds user trust:

Secure Enclaves and Trusted Execution

Hardware-Based Security

Modern edge devices include isolated execution environments for sensitive operations:

Biometric Processing in Secure Enclaves

Face recognition and fingerprint authentication never expose biometric data to the main application processor:

// iOS Face ID using Secure Enclave
import LocalAuthentication

let context = LAContext()
var error: NSError?

if context.canEvaluatePolicy(.deviceOwnerAuthenticationWithBiometrics, error: &error) {
    context.evaluatePolicy(.deviceOwnerAuthenticationWithBiometrics,
                          localizedReason: "Authenticate to access secure data") { success, error in
        if success {
            // Biometric match occurred in Secure Enclave
            // Raw face data never accessible to app
            accessSecureResource()
        }
    }
}

Process:

  1. Camera captures face image
  2. Image sent directly to Secure Enclave (bypassing main memory)
  3. Neural network in enclave extracts face features
  4. Features compared to enrolled template (also in enclave)
  5. Only authentication result (pass/fail) exits enclave
  6. Raw biometric data never exposed

Model Security

Model Extraction Attacks

Attackers attempt to steal proprietary models deployed on edge devices:

Model Protection Techniques

1. Model Encryption:

// Encrypted model storage
// Encrypt model file with device-specific key
const deviceKey = getDeviceUniqueKey();  // From TPM or Secure Enclave
const encryptedModel = AES_GCM_encrypt(modelBytes, deviceKey);
saveToStorage('model.encrypted', encryptedModel);

// Decrypt at runtime
const decryptedModel = AES_GCM_decrypt(readFromStorage('model.encrypted'), deviceKey);
loadModel(decryptedModel);

2. Code Obfuscation:

Obfuscate model architecture and inference code to make reverse engineering difficult. Tools: ProGuard (Android), obfuscation libraries for JavaScript/Python.

3. Model Watermarking:

Embed unique signatures in model weights to trace stolen models back to specific devices or users.

4. Trusted Execution:

Run inference inside secure enclaves where even privileged processes can't access memory.

Adversarial Robustness

Edge models face adversarial attacks—carefully crafted inputs designed to fool the model:

// Adversarial example: Imperceptible perturbation fools classifier
original_image = load_image('stop_sign.jpg')
prediction = model.predict(original_image)  # → "stop sign" (99.9%)

# Add tiny noise (invisible to humans)
adversarial_noise = generate_adversarial_perturbation(original_image, model)
adversarial_image = original_image + 0.01 * adversarial_noise

prediction = model.predict(adversarial_image)  # → "speed limit 45" (98.3%)
# Model completely fooled by imperceptible change!

Defenses:

Secure Update Mechanisms

Over-the-Air (OTA) Model Updates

Edge models must be updated regularly—bug fixes, performance improvements, new features. Secure OTA updates require:

  1. Authentication: Verify update comes from legitimate source
  2. Integrity: Ensure update wasn't tampered with during transit
  3. Encryption: Protect update contents from eavesdropping
  4. Rollback Prevention: Prevent downgrade attacks to vulnerable versions
// Secure model update workflow
async function updateModel(updateURL) {
    // 1. Download encrypted update package
    const encryptedPackage = await downloadUpdate(updateURL);

    // 2. Verify digital signature
    const signature = encryptedPackage.signature;
    const publicKey = getVendorPublicKey();

    if (!verifySignature(encryptedPackage.data, signature, publicKey)) {
        throw new Error("Invalid signature - update rejected");
    }

    // 3. Check version (prevent rollback)
    const updateVersion = encryptedPackage.version;
    const currentVersion = getCurrentModelVersion();

    if (updateVersion <= currentVersion) {
        throw new Error("Rollback attempt detected");
    }

    // 4. Decrypt update
    const deviceKey = getDeviceKey();
    const newModel = decrypt(encryptedPackage.data, deviceKey);

    // 5. Validate model (structural checks)
    if (!validateModelStructure(newModel)) {
        throw new Error("Corrupted model");
    }

    // 6. Atomic update with rollback capability
    backupCurrentModel();
    try {
        loadModel(newModel);
        testInference();  // Smoke test
        commitUpdate();
    } catch (error) {
        rollbackToPreviousModel();
        throw error;
    }
}

Secure Boot Chain

Ensure device boots only authorized code, preventing malware from compromising edge AI systems:

  1. Boot ROM: Immutable code in hardware verifies bootloader signature
  2. Bootloader: Verifies OS kernel signature
  3. OS Kernel: Verifies device drivers and system services
  4. Application Layer: Verifies model files and ML frameworks

Each stage validates the next, creating a "chain of trust" rooted in hardware.

Privacy-Preserving Techniques

Differential Privacy for Local Inference

Add noise to inference outputs to prevent information leakage about training data:

// Differentially private prediction
function privatePrediction(input, model, epsilon = 1.0) {
    // Standard inference
    const rawOutput = model.infer(input);

    // Add Laplace noise for differential privacy
    const sensitivity = computeSensitivity(model);
    const scale = sensitivity / epsilon;

    const noisyOutput = rawOutput.map(value => {
        const noise = laplace(0, scale);
        return value + noise;
    });

    return noisyOutput;
}

Trade-off: Stronger privacy (lower epsilon) reduces prediction accuracy.

Homomorphic Encryption

Perform computations on encrypted data without decrypting:

// Homomorphic encryption (simplified concept)
// Encrypt input on device
const encrypted_input = homomorphic_encrypt(input, public_key);

// Send to untrusted server for inference
const encrypted_output = server.infer(encrypted_input);

// Decrypt result on device
const result = homomorphic_decrypt(encrypted_output, private_key);

// Server performed inference without ever seeing plaintext input or output!

Fully homomorphic encryption is still computationally expensive (~1000x slower), but practical for specific use cases like medical diagnosis where privacy is paramount.

Federated Analytics

Compute aggregate statistics without collecting individual data:

Threat Models and Attack Vectors

Physical Access Attacks

Edge devices are physically accessible to attackers:

Mitigations:

Supply Chain Attacks

Compromise devices during manufacturing or distribution:

Mitigations:

Network-Based Attacks

Even edge-first systems often communicate with cloud services:

Mitigations:

Regulatory Compliance

GDPR Requirements

Edge AI compliance considerations:

Requirement Edge AI Implementation
Right to Explanation Explainable AI models, on-device explanation generation
Right to Erasure Secure deletion of on-device data and model personalization
Data Portability Export on-device learned preferences in standard format
Privacy by Design On-device processing as default, minimal data collection

Sector-Specific Regulations

弘益人間 Privacy Principle:

Edge AI security protects not just data, but human dignity and autonomy. Privacy-preserving edge intelligence empowers individuals while safeguarding their most sensitive information—health data, biometrics, personal communications—from unauthorized access.

Best Practices

Security by Design

  1. Minimize Attack Surface: Disable unused features, minimize exposed APIs
  2. Defense in Depth: Multiple security layers (encryption + access control + monitoring)
  3. Least Privilege: Grant minimum necessary permissions
  4. Fail Secure: Security failures should deny access, not grant it
  5. Security Updates: Plan for rapid patching of vulnerabilities

Privacy by Default

  1. Local-First Processing: Prefer on-device over cloud when possible
  2. Data Minimization: Collect and retain only necessary data
  3. User Control: Explicit consent for data sharing, easy opt-out
  4. Transparency: Clear communication about data processing
  5. Secure Deletion: Properly erase data when no longer needed

Summary

Edge AI offers fundamental privacy advantages through local processing and data minimization, naturally aligning with regulations like GDPR, CCPA, and HIPAA. Security considerations include:

  • Secure Enclaves: Hardware-isolated environments for biometric processing and sensitive operations
  • Model Protection: Encryption, obfuscation, and trusted execution prevent model theft
  • Adversarial Robustness: Defend against adversarial examples through training and detection
  • Secure Updates: Authenticated, encrypted OTA updates with rollback protection
  • Privacy Techniques: Differential privacy, homomorphic encryption, federated analytics

Threat models include physical access attacks, supply chain compromise, and network-based attacks—each requiring specific mitigations. Best practices emphasize security by design, defense in depth, and privacy by default.

Edge AI security is not just technical—it's fundamental to user trust and regulatory compliance, enabling AI deployment while respecting human dignity and privacy.

Review Questions

  1. How does edge AI naturally align with GDPR's data minimization principle?
  2. What are secure enclaves, and how do they protect biometric data processing?
  3. Describe three model protection techniques against extraction attacks.
  4. What is an adversarial example, and how can models be made robust against them?
  5. What are the key requirements for secure over-the-air model updates?
  6. Explain how differential privacy works for local inference.
  7. What is homomorphic encryption, and what are its current limitations for edge AI?
  8. Describe three types of physical access attacks on edge devices.
  9. How does a secure boot chain establish trust from hardware to applications?
  10. What are five best practices for "security by design" in edge AI systems?

Korea Digital Transformation Detailed Mapping

Korea operates digital transformation through a comprehensive governance system. Digital Government: Digital Platform Government Committee (established September 2022, under the President)·Ministry of the Interior and Safety Digital Government Bureau·e-Government Support Center·Gov.kr·National Citizen Service·KDIS (Korea Digital Information Society)·NIA (National Information Society Agency)·MOIS (Ministry of the Interior and Safety). K-DNS Infrastructure: Korea Internet & Security Agency (KISA) Korea Internet Center·KISA DNS Root Server·KRNIC (Korea Network Information Center)·BGP Korea·National Cyber Security Center (NCSC)·KCC (Korea Communications Commission)·MSIT (Ministry of Science and ICT)·NIA·NIPA. Korean Cloud Infrastructure: KT Cloud·NAVER Cloud (NCloud)·Samsung SDS Cloud·LG U+ Cloud·NHN Cloud·Kakao Enterprise Cloud·SK Telecom Cloud·KISA Cloud Security Assurance Program (CSAP)·KCMVP-validated cloud·ISMS-P (Information Security & Personal Information Management System). Korean Security Certifications: KISA ISMS-P certification·KCMVP (Korean Cryptographic Module Validation Program)·NIS (National Intelligence Service) "National Cryptographic Technology Operation Standards"·NCSC "National Cyber Security Strategy 2024-2028"·CC (Common Criteria) Korean evaluation bodies·EAL4·EAL5·KS X ISO/IEC 15408·19790·24759 Korean Profile. Korean Data Standards: NIA AI Hub·National Data Standardization Committee·Statistics Korea (KOSTAT)·MyData 4 Designated Combination Specialists (Samsung SDS, KICI, KOSTAT, KFTC)·National Institute of Korean Language·National Law Information Center·National Spatial Information Platform·National Spatial Data Center·Korean Spatial Information Standards. Finance and Fintech Standards: FSC (Financial Services Commission)·FSS (Financial Supervisory Service)·FIU (Financial Intelligence Unit)·BOK (Bank of Korea)·FSEC (Financial Security Institute)·KFTC (Korea Financial Telecommunications)·KSD (Korea Securities Depository)·KRX (Korea Exchange) 8-agency cooperation. 5G/6G Communications Infrastructure: 5G subscribers 35 million (2024)·5G base stations 350,000·6G commercialization target 2028·5G dedicated networks 16 operators·6G Acceleration Council (MSIT, 2024). K-Content: KOCCA (Korea Creative Content Agency)·MCST (Ministry of Culture, Sports and Tourism)·KCA (Korea Communications Agency)·Korea Culture Information Service Agency·Korean Film Archive·Korea Publishing Industry Promotion Agency. Data 3 Acts (Personal Information Protection Act·Credit Information Act·Telecommunications Network Act, 2020 enforcement)·Data Industry Act (2021)·Public Data Act (2013)·AI Framework Act (2026)·Digital Platform Government Framework Act (2024 proposed) — Korea digital transformation core legislation.

Korea Industrial, Research, Education Infrastructure Mapping

Korea operates its industrial ecosystem and standardization system through the following core infrastructure. Korea Top 5 Groups: Samsung, Hyundai Motor, LG, SK, Lotte. Each group operates standardization committees and ISO/IEC TC Korean secretariats. Samsung Electronics (semiconductors, displays, home appliances, telecom)·Hyundai Motor (automobiles, mobility)·LG Electronics (home appliances, displays, OLED)·SK hynix (memory)·LG Energy Solution·Samsung SDI (batteries)·POSCO Future M (materials)·Hyundai Mobis (parts). Korean IT Big Tech: NAVER (search, cloud, AI HyperCLOVA)·Kakao (messenger, payment, mobility, banking)·Coupang (e-commerce, logistics)·Karrot Market·Toss·Woowa Brothers. Korea Telcos: SK Telecom·KT·LG U+. 5G·5G dedicated networks·B2B cloud·AI businesses operating. Korea Top 7 Research Universities: Seoul National University·KAIST·POSTECH·Yonsei University·Korea University·UNIST·DGIST·GIST. All serve as standardization R&D bases and ISO/IEC/IEEE Korean chairs. Korea Government-affiliated National Research Institutes (26): KIST, KAERI, KIMM, KIER, KFRI, KRICT, KRIBB, KARI, KASI, KIGAM, KICT, KISTI, KETI, ETRI, NIMS, KIMS, KISDI, KOTRA, STEPI, KOEN, KICCE, KIET, KIPF, KIHASA, KICJ, KLRI. Korea Industrial Complexes / Tech Valleys: Pangyo Techno Valley·Dongtan·Gwanggyo·Songdo IBD·Yeouido·Gangnam·Sihwa·Banwol·Gumi·Ulsan·Changwon·Geoje·Yeosu·Onsan·Cheongju·Iksan·Gwangyang·POSCO Gwangyang Steel Mill·Asan Bay·Seosan·Songdo·Incheon Airport·Sejong·Cheongna·Geomdan. Korea Trade and Finance Infrastructure: Korea International Trade Association (KITA)·Korea Trade-Investment Promotion Agency (KOTRA)·Export-Import Bank of Korea (KEXIM)·Bank of Korea·Kookmin Bank·Shinhan·Hana·Woori·NH Nonghyup·IBK Industrial Bank·SC First Bank·Citi Bank Korea·HSBC Korea·DBS Korea — 14 Korean major banks and foreign banks. Korea K-POP / K-Content: HYBE·SM·YG·JYP 4 major entertainment companies·CJ ENM·tvN·MBC·KBS·SBS·EBS·YTN·Yonhap News TV·JTBC Korean broadcasting·NETFLIX Korea·Disney Plus·TVING·Wavve·Watcha·Coupang Play. Korea Gaming Industry: Nexon·NCsoft·Krafton·Netmarble·Kakao Games·Pearl Abyss·Com2uS·Gamevil·NHN·Smilegate·Webzen. Korea Automotive / Battery: Hyundai Motor·Kia·Genesis·LG Energy Solution·Samsung SDI·SK On·POSCO Future M·EcoPro·L&F battery cathode material suppliers. Korea Semiconductor: Samsung Electronics (HBM3E·HBM4)·SK hynix (HBM3E 12-Hi)·DB HiTek·SK siltron·SK Enpulse·Dongjin Semichem·Seoul Semiconductor·Simmtech·Samsung Display·LG Display.

Korea Standardization Infrastructure Mapping

Korea operates a comprehensive standards governance system through inter-ministerial cooperation. National Standards Council (under Prime Minister's Office, per Framework Act on National Standards Article 5) coordinates KATS (Korean Agency for Technology and Standards), MFDS (Ministry of Food and Drug Safety), MOTIE (Ministry of Trade, Industry and Energy), MSIT (Ministry of Science and ICT), MOIS (Ministry of the Interior and Safety), MOE (Ministry of Environment), MOHW (Ministry of Health and Welfare), MND (Ministry of National Defense), MCST (Ministry of Culture, Sports and Tourism), MOFA (Ministry of Foreign Affairs), MOJ (Ministry of Justice), and FSC (Financial Services Commission). Accreditation and Testing: KOLAS (Korea Laboratory Accreditation Scheme) accredits 800+ testing laboratories. KAS (Korea Accreditation System) accredits 50+ certification bodies. KTC (Korea Testing Certification), KTR (Korea Testing & Research Institute), KTL (Korea Testing Laboratory), and KCL (Korea Conformity Laboratories) provide conformance testing. Telecom and Cyber: KCC (Korea Communications Commission), KCA (Korea Communications Agency), TTA (Telecommunications Technology Association), IITP (Institute for Information & Communications Technology Planning & Evaluation), NIPA (National IT Industry Promotion Agency), KISA (Korea Internet & Security Agency), KCMVP (Korea Cryptographic Module Validation Program), NIS (National Intelligence Service), NSR (National Security Research Institute), and NCSC (National Cyber Security Center). National R&D Centers: KIST, ETRI, KAIST, Seoul National University, Yonsei University, Korea University, POSTECH, UNIST, GIST, DGIST, KISTI, KIER, KIMM, KRICT, KFRI, KRIBB. International Standards Cooperation: ISO TC/SC Korean secretariats, IEC TC/SC Korean secretariats, ITU-T Study Group Korean chairs, 3GPP RAN/SA Korean chairs, IEEE 802 Korean chairs, W3C Korea office, OASIS Korea office, IETF Korea cooperation, OECD CSTP, UN ESCAP, APEC SCSC Korean cooperation. Korean Industrial Standards (KS) Catalog: KS X (Information) 25,000+, KS A (Basic) 15,000+, KS B (Machinery) 25,000+, KS C (Electrical) 18,000+, KS D (Metallurgy) 12,000+, KS E (Mining) 5,000+, KS F (Construction) 18,000+, KS H (Food) 8,000+, KS I (Environment) 5,000+, KS J (Biology) 3,000+, KS K (Textile) 15,000+, KS L (Ceramics) 7,000+, KS M (Chemistry) 12,000+, KS P (Medical) 5,000+, KS Q (Quality Mgmt) 4,000+, KS R (Transport) 12,000+, KS S (Service) 3,000+, KS T (Packaging) 4,000+, KS V (Shipbuilding) 5,000+, KS W (Aerospace) 3,000+ — totaling 220,000+ Korean Industrial Standards. Key Acts: Personal Information Protection Act (Act 19234, effective Sept 15, 2024), Electronic Government Act, Electronic Signature Act, Act on Promotion of Information and Communications Network Utilization and Information Protection, Information and Communications Infrastructure Protection Act, Data Industry Act, Public Data Act, AI Framework Act (Act 20212, effective July 2026), Industrial Technology Innovation Promotion Act, Framework Act on Science and Technology — 70+ Korean standardization-related laws.