> TECHNICAL_DOCUMENTATION

SYSTEM ARCHITECTURE

Deep dive into NuDefndr's privacy-first architecture. Real implementation. Auditable code.

> SYSTEM_OVERVIEW

On-Device Processing Pipeline

┌──────────────────────────────────────────────────────────────────┐ │ NUDEFNDR ANALYSIS FLOW │ └──────────────────────────────────────────────────────────────────┘ USER PHOTO LIBRARY (iOS Photos.framework) │ ├─> [PhotoLibraryService: Fetch PHAssets] │ ├─ Incremental Scan (timestamp-based skipping) │ └─ Target: Last 24h / 7d / 30d / 90d / All │ ▼ BATCH PROCESSING QUEUE │ ├─> [Device-Aware Concurrency] │ ├─ A17+ Devices: 6 concurrent analyses │ ├─ A15/A16: 3 concurrent analyses │ └─ Older: Sequential processing │ ▼ APPLE ML FRAMEWORK (iOS 18+) │ ├─> [SensitiveContentAnalysis.framework] │ ├─ On-device Neural Engine processing │ ├─ Binary classification (sensitive/safe) │ └─ Zero network activity (verified) │ ▼ RESULTS PIPELINE │ ├─> [Ephemeral Cache - RAM only] │ ├─ Results not persisted │ └─ Cleared on app termination │ ▼ USER REVIEW │ └─> [User Action: Move/Copy/Ignore] ├─ Move to Vault → Encrypt + Remove from Photos ├─ Copy to Vault → Encrypt + Keep in Photos └─ Mark Safe → Exclude from future scans ┌──────────────────────────────────────────────────────────────────┐ │ PRIVACY GUARANTEES │ └──────────────────────────────────────────────────────────────────┘ ✓ Zero network requests during analysis ✓ No cloud uploads (all processing local) ✓ Results not logged or persisted ✓ Memory cleared after analysis ✓ Apple's privacy-first ML framework

NEURAL ENGINE

Hardware-accelerated ML processing on A12+ chips. Zero CPU overhead during analysis.

SANDBOXED

iOS App Sandbox prevents data exfiltration. Network requests blocked during analysis.

INCREMENTAL

Smart timestamp skipping only analyzes new/modified photos on repeat scans.

> SOURCE_CODE

Incremental Scan Engine

> /Services/ScanManager.swift Smart Timestamp Skipping
/// Incremental scanning with timestamp-based skip logic
func performIncrementalScan(range: ScanRangeOption) async throws {
    guard let lastScanDate = getLastSuccessfulScanDate() else {
        return try await fullScan(range: range)
    }
    
    var skippedCount = 0
    var analyzedCount = 0
    
    for asset in photoAssets {
        if let modDate = asset.modificationDate,
           modDate < lastScanDate {
            skippedCount += 1
            continue
        }
        
        let result = try await analyzer.analyze(asset)
        analyzedCount += 1
        
        if result.isSensitive {
            await notifyUser(asset)
        }
    }
    
    saveLastSuccessfulScanDate(Date())
}

> VAULT_CRYPTOGRAPHY

ChaCha20-Poly1305 Encryption

> /Vault/VaultCrypto.swift AEAD Cipher with Hardware Backing
import CryptoKit

final class VaultCrypto {
    
    static func encryptData(_ data: Data, key: SymmetricKey) throws -> Data {
        let sealedBox = try ChaChaPoly.seal(data, using: key)
        return sealedBox.combined
    }
    
    static func decryptData(_ encryptedData: Data, key: SymmetricKey) throws -> Data {
        let sealedBox = try ChaChaPoly.SealedBox(combined: encryptedData)
        let decryptedData = try ChaChaPoly.open(sealedBox, using: key)
        return decryptedData
    }
    
    static func generateVaultKey() throws -> SymmetricKey {
        let key = SymmetricKey(size: .bits256)
        
        let keyData = key.withUnsafeBytes { Data($0) }
        let entropy = calculateEntropy(keyData)
        
        guard entropy >= 7.5 else {
            throw CryptoError.insufficientEntropy
        }
        
        return key
    }
}

WHY CHACHA20-POLY1305?

  • Faster than AES on ARM processors
  • Authenticated encryption (detects tampering)
  • Used by Signal, WireGuard, TLS 1.3
  • Timing-attack resistant
  • IETF standard (RFC 8439)

KEY PROTECTION

  • 256-bit keys (2^256 combinations)
  • iOS Keychain with hardware backing
  • Never persisted unencrypted
  • Device-only (no backup/sync)
  • Entropy validation

> SPECIFICATIONS

Technical Details

Component Implementation Security Level
ML Framework Apple SensitiveContentAnalysis (iOS 18+) Hardware-accelerated
Encryption Algorithm ChaCha20-Poly1305 AEAD 256-bit keys
Key Storage iOS Keychain (Secure Enclave) Hardware-backed
File Protection .completeFileProtection iOS secure storage
Network Activity None (100% offline) Zero cloud exposure
Jailbreak Detection 10-vector analysis with confidence scoring Platform-aware

> THREAT_MODEL

Security Guarantees

PROTECTED

DEVICE SEIZURE

Vault encrypted at rest. Unreadable without FaceID.

NETWORK INTERCEPTION

Zero network activity. Photos never leave device.

CLOUD BREACH

No cloud storage. Everything local.

BACKUP EXTRACTION

Keys device-bound. Cannot extract from backup.

OUT OF SCOPE

UNLOCKED DEVICE

Vault requires additional FaceID even with unlocked phone.

PHYSICAL COERCION

Cannot prevent forced biometric unlock.

JAILBROKEN DEVICES

iOS security model compromised (detected, not blocked).

> AUDITABLE_CODE

Open Source Security

VERIFY OUR CLAIMS

NuDefndr's core privacy components are open source on GitHub. Security researchers can independently verify zero network activity, encryption implementation, and privacy guarantees.

> END_OF_TRANSMISSION

Privacy-first architecture. Auditable implementation.

← BACK TO HOME