# Sovereign Form Encryption

X25519 ECDH + ChaCha20-Poly1305 client-side encryption

Loading encryption module...

## 🔑 Server Keypair

In production, generate this server-side and keep the private key secret. Only the public key is shared with clients.

Public Key (share with clients)
Private Key (keep secret!)

## 📝 Encrypt Form Data

Enter form fields to encrypt. Data is encrypted client-side before transmission.

⚠️ Generate a keypair first to enable encryption
Email
Password
Message
✅ Form encrypted successfully!

## 🔒 Encrypted Output

This base64 payload can be safely transmitted. Only the server with the private key can decrypt it.

-
Payload Size
-
Fields Encrypted
X25519
Key Exchange
ChaCha20
Cipher

## ℹ️ How It Works

1. Key Exchange: An ephemeral X25519 keypair is generated for each encryption.
2. Shared Secret: ECDH derives a shared secret using the ephemeral private key and server's public key.
3. Encryption: Form data is encrypted with ChaCha20-Poly1305 using the derived key.
4. Payload: The ephemeral public key is included in the header so the server can decrypt.
Each encryption produces a unique output even for the same data, ensuring forward secrecy.