Skip to main content
SecurityAI/MLCryptography

Building Secure Systems in the Age of AI

Exploring the intersection of machine learning and cybersecurity, and why post-quantum cryptography matters now more than ever.

Andrew Yong

Security Engineer

December 7, 2025
3 min read

The landscape of cybersecurity is evolving rapidly. As AI systems become more prevalent, we're facing new challenges that require innovative solutions. In this post, I'll share insights from building real-world secure systems.

Why This Matters Now

By 2030, experts estimate that quantum computers may be capable of breaking current encryption standards. The data you encrypt today could be vulnerable tomorrow.

The Post-Quantum Challenge

Traditional cryptographic algorithms like RSA and ECDSA are vulnerable to quantum computing attacks. This isn't a theoretical concern—it's a practical problem we need to solve today.

Why Start Now?

Organizations need to act immediately for three critical reasons:

  1. Harvest Now, Decrypt Later — Adversaries are already collecting encrypted data, waiting for quantum capabilities
  2. Migration Takes Time — Updating cryptographic systems across an enterprise is a multi-year effort
  3. Standards Are Ready — NIST has finalized post-quantum algorithms including ML-KEM and ML-DSA

Quick Win

Start by inventorying your cryptographic assets. Tools like openssl can help identify which algorithms you're currently using across your infrastructure.

Lessons from Project Velocity

Building a post-quantum secure transport layer taught me several key lessons. Here's an example of using ML-KEM for key encapsulation in Rust:

// Using ML-KEM for key encapsulation
use ml_kem::ml_kem_768::{keypair, encapsulate, decapsulate};

fn establish_shared_secret() -> SharedSecret {
    // Generate key pair
    let (public_key, secret_key) = keypair();
    
    // Encapsulate to create shared secret
    let (ciphertext, shared_secret) = encapsulate(&public_key);
    
    // Receiver can decapsulate
    let recovered = decapsulate(&secret_key, &ciphertext);
    
    shared_secret
}

The performance overhead is surprisingly manageable with proper optimization. In our benchmarks, ML-KEM-768 key generation takes approximately 60μs on modern hardware.

Security Considerations

When implementing post-quantum cryptography, keep these factors in mind:

AlgorithmKey SizeSecurity LevelPerformance
ML-KEM-512800 bytes~128-bitFast
ML-KEM-7681,184 bytes~192-bitModerate
ML-KEM-10241,568 bytes~256-bitSlower

Important

Always use hybrid schemes that combine classical and post-quantum algorithms. This ensures security even if one algorithm is compromised.

Integrating AI-Based Threat Detection

Beyond cryptography, AI is revolutionizing how we detect and respond to threats. Key areas where ML excels:

  • Anomaly Detection — Identifying unusual patterns in network traffic or user behavior
  • Malware Classification — Using neural networks to classify previously unseen malware families
  • Phishing Detection — NLP models that analyze email content and URLs

"The best defense is a layered approach combining cryptographic security with intelligent monitoring systems."

What I've Learned

Combining post-quantum cryptography with ML-based threat detection creates a defense-in-depth strategy that's resilient against both current and future threats.

What's Next

In future posts, I'll dive deeper into:

  • Implementing hybrid cryptographic schemes in production
  • Performance optimization for constrained environments
  • Building real-time threat detection pipelines

Have questions about post-quantum security? Reach out — I'd love to discuss.