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

推荐订阅源

aimingoo的专栏
aimingoo的专栏
Y
Y Combinator Blog
云风的 BLOG
云风的 BLOG
Microsoft Azure Blog
Microsoft Azure Blog
腾讯CDC
T
The Blog of Author Tim Ferriss
P
Proofpoint News Feed
Hugging Face - Blog
Hugging Face - Blog
博客园_首页
小众软件
小众软件
美团技术团队
Martin Fowler
Martin Fowler
爱范儿
爱范儿
有赞技术团队
有赞技术团队
博客园 - 【当耐特】
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
Microsoft Security Blog
Microsoft Security Blog
宝玉的分享
宝玉的分享
J
Java Code Geeks
B
Blog
V
V2EX
Stack Overflow Blog
Stack Overflow Blog
B
Blog RSS Feed
博客园 - Franky

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
Building a Post-Quantum E2EE Library: Introducing Paranoi...
Matéo Callec · 2026-05-15 · via DEV Community

The web security landscape is about to change dramatically.

For years, modern cryptography has relied on algorithms like RSA and elliptic-curve cryptography (ECC). They are battle-tested and secure against classical computers — but quantum computing changes the equation entirely.

Once large-scale quantum computers become practical, many of today’s public-key systems will become vulnerable.

That future may still be years away, but encrypted data stolen today can still be decrypted later.

This is why post-quantum cryptography (PQC) matters now.

And yet, if you are a JavaScript or TypeScript developer, the ecosystem for PQC is still surprisingly small.

That’s why I built Paranoia.ts.


What is Paranoia.ts?

Paranoia.ts is a TypeScript-first cryptography library designed for frontend and full-stack applications that need:

  • End-to-end encryption (E2EE)
  • Post-quantum resistance
  • Optimization

The goal is simple:

Make post-quantum encryption practical and accessible for JavaScript developers.

Repositories:


Why hybrid cryptography matters

One of the biggest problems in modern PQC adoption is uncertainty.

Post-quantum algorithms are newer than classical cryptographic systems. While they are standardized and heavily researched, they do not yet have the same decades-long track record as ECC.

So Paranoia.ts does not force developers to choose between classical cryptography and post-quantum cryptography.

It combines both.

The library currently uses:

  • ML-KEM-1024 (NIST FIPS 203)
  • P-521 ECDH
  • HKDF-SHA-384
  • AES-256-GCM

The key idea is hybrid security:

Scenario Classical ECC PQC only Paranoia.ts
Classical attacker ⚠️
Quantum attacker
PQC algorithm weakness
ECC weakness

In practice:

An attacker would need to break both ML-KEM-1024 and P-521 simultaneously to recover plaintext.

That significantly improves resilience against future uncertainty.


Example: Post-Quantum E2EE in TypeScript

The library is intentionally designed to feel simple.

import { Paranoia } from 'paranoia-ts';

const paranoia = new Paranoia();

// Generate hybrid ML-KEM + P-521 keypair
const keyPair = await paranoia.generateKeyPair();

// Encrypt
const sealed = await paranoia.sealTo(
  new TextEncoder().encode('Top secret message'),
  keyPair.publicKey
);

// Decrypt
const plain = await paranoia.unsealWith(sealed, keyPair);

console.log(new TextDecoder().decode(plain));

Enter fullscreen mode Exit fullscreen mode

The objective is to expose advanced cryptography through a developer-friendly API without sacrificing transparency.


Beyond PQC: Experimental security features

Paranoia.ts also explores ideas that are still relatively uncommon in web cryptography libraries.

Some are experimental by design.

Webcam-based TRNG

One of the most unusual features in the project is webcam entropy generation.

The library can harvest webcam sensor noise and pixel variation as an additional entropy source.

const stream = await navigator.mediaDevices.getUserMedia({ video: true });

await paranoia.enableWebcamEntropy(stream);

Enter fullscreen mode Exit fullscreen mode

Internally:

  • Pixel noise is sampled from webcam frames
  • Data is hashed with SHA3-256
  • Mixed into the CSPRNG pool via HMAC

This does not replace the browser’s cryptographically secure RNG.

Instead, it augments entropy generation for environments where additional randomness is desirable.


WebAuthn PRF integration

Another major feature is WebAuthn PRF support.

This enables hardware-backed key unlocking using:

  • Biometrics
  • Security keys
  • Platform authenticators

The result is a workflow where users can unlock encrypted keypairs with a fingerprint or security key rather than repeatedly entering passwords.

const { credentialId, prfKey } = await registerWebAuthnPRF();
await storeKeyPair(keyPair, prfKey, 'my-key');

Enter fullscreen mode Exit fullscreen mode

This brings together:

  • WebAuthn
  • Browser-native crypto
  • Post-quantum encryption
  • Secure local storage

…inside a single TypeScript library.


Security philosophy

One thing I want to make explicit:

Paranoia.ts does not pretend JavaScript is a perfect environment for high-assurance cryptography.

The README openly documents limitations such as:

  • Garbage collector memory copying
  • Non-wipeable JS strings
  • Browser implementation constraints

The project tries to balance:

  • Practicality
  • Browser compatibility
  • Transparency
  • Defense in depth

Security tooling should be honest about tradeoffs.


Reference implementation

To demonstrate real-world usage, I also built a complete encrypted messaging application using Paranoia.ts:

It demonstrates:

  • End-to-end encrypted chat
  • Hybrid PQC encryption
  • WebAuthn biometric unlock
  • Secure key storage
  • Full-stack integration

Stack:

  • React
  • NestJS
  • Docker
  • TypeScript

Looking for contributors

This project is still early, and there is a lot to build.

I am currently looking for contributors interested in:

Security

  • Cryptographic review
  • Threat modeling
  • Side-channel analysis
  • Security auditing
  • Protocol analysis

Engineering

  • WebAssembly optimization
  • Browser compatibility
  • Performance improvements
  • DX improvements
  • Test coverage
  • API design

Research & experimentation

  • Additional PQC algorithms
  • Better entropy collection
  • Secure memory handling
  • Hardware integration
  • Advanced WebAuthn flows

Why contribute?

PQC is going to become one of the defining security challenges of the next decade.

JavaScript applications will eventually need:

  • Quantum-resistant encryption
  • Browser-native secure key management
  • Better client-side cryptography

The ecosystem around this is still very small.

This is an opportunity to help shape what post-quantum cryptography tooling looks like for the web.

All contributors will be publicly credited.


Final thoughts

I believe the future of web security will require:

  • Hybrid cryptography
  • Hardware-backed authentication
  • Better entropy systems
  • Developer-friendly APIs
  • Open-source collaboration

Paranoia.ts is an attempt to explore that future.

If this sounds interesting to you, feel free to contribute, review the code, open issues, or simply share feedback.

Repositories:

I’d love to hear thoughts from other developers and security researchers working in this space.