Skip to main content
  • Company
    • About Us
    • Projects
    • Startup Lab
    • AI Solutions
    • Security Expertise
    • Contact
  • Knowledge
    • Blog
    • Research
hello@horizon-dynamics.tech
Horizon Dynamics
Company
  • About Us
  • Projects
  • Startup Lab
  • AI Solutions
  • Security Expertise
  • Contact
Contact Ushello@horizon-dynamics.tech
Horizon Dynamics
© 2013 - 2026 Horizon Dynamics LLC — All rights reserved.

Right Solution For True Ideas

Cryptographic Authentication

OPAQUE Protocol Implementation

PAKE protocol with post-quantum protection. Server never receives or stores the password.

Cryptographic Authentication

What is OPAQUE?

OPAQUE (Oblivious Pseudo-Random Function with Asymmetric Password-Authenticated Key Exchange) is the cryptographically most secure method of password authentication. Unlike traditional password hashing, the server never sees, stores, or processes the actual password — not even during registration.

01

Zero-Knowledge OPRF

Password processed via Oblivious PRF — server evaluates blinded input without ever seeing the plaintext password

02

No Password Storage

Server stores no password-equivalent data. Database breaches yield nothing usable for offline attacks

03

Offline Attack Resistance

Dictionary and brute-force attacks impossible without server cooperation. OPRF requires server's private key

04

Mutual Authentication

Both client and server prove identity cryptographically. Prevents phishing and man-in-the-middle attacks

05

Post-Quantum Protection

Hybrid ML-KEM-768 + Ristretto255 4DH key exchange. Resistant to harvest-now-decrypt-later quantum attacks

Cryptographic Authentication

Security Properties

OPAQUE provides comprehensive password security at every layer of the authentication protocol

Zero-Knowledge

Server never learns the password. Not during registration, not during login, not ever. Mathematically proven via OPRF.

Post-Quantum Protection

Hybrid ML-KEM-768 + Ristretto255 4DH key exchange. Resistant to both classical and quantum attacks. NIST-standardized.

Offline Attack Resistant

Database breaches yield no usable data. Attacker cannot mount dictionary or brute-force attacks offline.

Mutual Authentication

Both client and server prove their identity. Prevents phishing and man-in-the-middle attacks.

Forward Secrecy

Each session generates unique keys via ephemeral DH. Compromise of long-term keys cannot decrypt past sessions.

Secure Key Derivation

Argon2id with configurable parameters for password stretching. HKDF-SHA512 for cryptographic key derivation.

Cryptographic Architecture

Key Types & Sizes

Complete cryptographic material inventory for the OPAQUE protocol

Ristretto255

Classical Cryptography

Elliptic curve keys for identity and key exchange operations

Classical Keys

OPRF Private KeyRistretto255 scalar
32 bytes
OPRF Public KeyIdentity key
32 bytes
Initiator Private KeyStatic client key
32 bytes
Initiator Public KeyClient identity
32 bytes
Responder Private KeyServer static key
32 bytes
Responder Public KeyServer identity
32 bytes
Ephemeral KeysPer-session DH
32 bytes each
ML-KEM-768

Post-Quantum Cryptography

Lattice-based keys providing quantum resistance

Post-Quantum Keys

ML-KEM-768 Public KeyKEM encapsulation
1,184 bytes
ML-KEM-768 Secret KeyKEM decapsulation
2,400 bytes
ML-KEM-768 CiphertextEncapsulated secret
1,088 bytes
ML-KEM-768 Shared SecretCombined with 4DH
32 bytes
AEAD / HMAC

Cryptographic Material

Seeds, nonces, MACs, and derived session values

Cryptographic Material

OPRF SeedServer secret
32 bytes
Nonce (XSalsa20)Envelope encryption
24 bytes
MAC (HMAC-SHA512)Message authentication
64 bytes
Session KeySHA512 output
64 bytes
Master KeyKey derivation root
32 bytes
Argon2id / HKDF

Key Derivation

Password stretching and cryptographic key derivation

Argon2id Configuration

AlgorithmMemory-hard KDF
Argon2id13
OpSlimitModerate iterations
3
MemLimit268,435,456 bytes
256 MiB
OutputRandomized password
64 bytes
Protocol State

Runtime State Objects

Memory-resident state during protocol execution

01

Initiator (Client) State

Client-side cryptographic material maintained during authentication handshake

  • blind 32 bytes
  • initiator_secret_key 32 bytes
  • initiator_public_key 32 bytes
  • ephemeral_secret_key 32 bytes
  • pq_secret_key 2,400 bytes
  • pq_public_key 1,184 bytes
02

Responder (Server) State

Server-side cryptographic material maintained during credential verification

  • expected_initiator_mac 64 bytes
  • session_key 64 bytes
  • ke1_serialized 1,272 bytes
  • ke2_serialized 1,376 bytes

Client Envelope

Encrypted client credentials stored on server

FieldSizeDescription
nonce24 bytesRandom nonce for encryption
ciphertext96 bytesXSalsa20-Poly1305 ciphertext
auth_tag16 bytesPoly1305 authentication tag
Total envelope size136 bytesClient encrypted blob

Nonce Construction

XSalsa20-Poly1305 24-byte extended nonce format

Random24 bytesPure cryptographic randomness (libsodium randombytes_buf)
Total: 24 bytes (192 bits) — XSalsa20 extended nonce

Protocol Sequence

Registration Phase

Client
Registration Request (OPRF Blind)32 bytes
Registration Response (Evaluated + PK)64 bytes
Registration Record (Envelope + PK)168 bytes
Server

Authentication Phase

Client
KE1: Blind + Ephemeral + ML-KEM PK1,272 bytes
KE2: Credential + MAC + ML-KEM CT1,376 bytes
KE3: Initiator MAC64 bytes
Shared session key (64 bytes)
Server

OPRF Process

How passwords are processed without server knowledge

OPRF Flow

1. Blindelement = H(password); blinded = r × element32 bytes
2. Evalevaluated = oprf_key × blinded32 bytes
3. Unblindunblinded = r^-1 × evaluated32 bytes
4. Finalizeoutput = SHA512(context || unblinded || password)64 bytes
PRF output = SHA-512(context || unblinded || password)

Key Exchange Derivation

DH1initiator_sk × responder_pk32 bytes
DH2ephemeral_sk × responder_pk32 bytes
DH3initiator_sk × responder_ephemeral_pk32 bytes
DH4ephemeral_sk × responder_ephemeral_pk32 bytes
KEMML-KEM-768.Decaps(ciphertext, sk)32 bytes
IKM = DH1 || DH2 || DH3 || DH4 || KEM_SS (160 bytes)

Protocol Flow

Complete OPAQUE authentication sequence from registration to session establishment

1Registration Request
OPRF BlindH(password) -> elementr * element -> blindedSend blinded (32 bytes)
2OPRF Evaluation
oprf_key * blindedReturn evaluated (32 bytes)Generate server keys
3Envelope Creation
r^-1 * evaluated -> unblindedDerive envelope keyEncrypt client keys
4Credential Request (KE1)
Blind + ephemeral PKML-KEM-768 PK1,272 bytes total
5Credential Response (KE2)
OPRF eval + envelopeResponder MAC1,376 bytes total
6Session Established
Mutual key derivation64-byte session keyForward-secret channel

Domain Separation Labels

AAD labels ensuring cryptographic domain separation

Classical Domain

OPRF ContextECLIPTIX-OPAQUE-v1/OPRF
OPRF KeyECLIPTIX-OPAQUE-v1/OPRF-Key
OPRF SeedECLIPTIX-OPAQUE-v1/OPRF-Seed
Envelope KeyECLIPTIX-OPAQUE-v1/EnvelopeKey
HKDF SaltECLIPTIX-OPAQUE-v1/HKDF-Salt
TranscriptECLIPTIX-OPAQUE-v1/Transcript
KSF ContextECLIPTIX-OPAQUE-v1/KSF
KSF SaltECLIPTIX-OPAQUE-v1/KSF-Salt
Session KeyECLIPTIX-OPAQUE-v1/SessionKey
Master KeyECLIPTIX-OPAQUE-v1/MasterKey
Responder MACECLIPTIX-OPAQUE-v1/ResponderMAC
Initiator MACECLIPTIX-OPAQUE-v1/InitiatorMAC

Post-Quantum Domain

PQ CombinerECLIPTIX-OPAQUE-PQ-v1/Combiner
PQ KEMECLIPTIX-OPAQUE-PQ-v1/KEM
PQ Session KeyECLIPTIX-OPAQUE-PQ-v1/SessionKey
PQ Master KeyECLIPTIX-OPAQUE-PQ-v1/MasterKey
PQ Responder MACECLIPTIX-OPAQUE-PQ-v1/ResponderMAC
PQ Initiator MACECLIPTIX-OPAQUE-PQ-v1/InitiatorMAC

Technology Stack

LanguageRust
Elliptic CurveRistretto255
Post-QuantumML-KEM-768
Key StretchingArgon2id
MACHMAC-SHA512
AEADXSalsa20-Poly1305
Crypto Librarylibsodium
PQ Libraryml-kem

Security Guarantees

Formal security properties mathematically proven by the OPAQUE protocol

Zero-Knowledge Password

Server never learns the password at any point. Mathematically proven via Oblivious PRF construction.

Offline Attack Resistance

Database breaches yield no password-equivalent data. Dictionary attacks require online server interaction.

Forward Secrecy

Each session generates unique ephemeral keys. Compromise of long-term keys cannot decrypt past sessions.

Mutual Authentication

Both parties prove identity cryptographically. Prevents phishing, MITM, and server impersonation attacks.

Security Comparison

How OPAQUE compares to traditional authentication methods

Security PropertyOPAQUEPassword HashOAuth 2.0
Password never leaves client✓✗~
Offline attack resistant✓✗~
Mutual authentication✓✗✗
Post-quantum secure✓✗✗
Forward secrecy✓✗~

Formal Verification

All security properties mathematically proven by two independent tools under a Dolev-Yao adversary with quantum oracle

Tamarin

Tamarin Prover 1.10.0

8 / 8 lemmas verified

ProVerif

ProVerif 2.05

8 / 8 queries verified (5 main model + 3 auth model)

01Verified

Session Key Secrecy

The derived session key remains computationally indistinguishable from random for any PPT adversary, provided neither party's long-term key has been compromised at the time of the handshake.

SKC(C,S,sk) ∧ ¬CLtk(C) ∧ ¬CLtk(S) ⟹ ¬K(sk)
02Verified

Password Secrecy

The user's password is never transmitted, stored, or derivable by the server or any network adversary. The OPRF construction ensures that only the blinded output enters the key schedule.

PwdGen(C,p) ⟹ ¬K(p)
03Verified

Classical Forward Secrecy

Compromise of long-term Ristretto255 keys after session completion does not allow decryption of past sessions. Fresh ephemeral DH shares are zeroized on completion.

SKC(C,S,sk)@i ∧ CLtk(C)@j ∧ CLtk(S)@k ∧ i'<'j ∧ i'<'k ⟹ ¬K(sk)
04Verified

PQ Forward Secrecy

Even if a quantum adversary breaks ECDLP, past sessions remain protected by ML-KEM-768 encapsulation, as long as ephemeral keys are not directly revealed.

UsedQuantum() ∧ ¬RevEph(C) ∧ ¬RevEph(S) ⟹ ¬K(sk)
05Verified

Mutual Auth (Initiator)

The initiator is authenticated to the responder via HMAC-SHA-512 MAC over the full transcript. The server verifies the KE3 MAC before accepting.

CommI(C,S,sk,τ) ⟹ ∃ CommR(S,C,sk,τ)
06Verified

Mutual Auth (Responder)

The responder is authenticated to the initiator via the KE2 MAC. The client verifies this MAC before sending KE3, preventing server impersonation.

CommR(S,C,sk,τ) ⟹ ∃ CommI(C,S,sk,τ)
07Verified

AND-Model Hybrid

The hybrid combiner follows the AND-model: an attacker must break BOTH Ristretto255 4DH AND ML-KEM-768 simultaneously. Breaking only one is provably insufficient.

¬RevEph(C) ∧ ¬RevEph(S) ⟹ ¬K(sk)
08Verified

Offline Dictionary Resistance

Even with full access to the server's credential database, offline dictionary attacks are infeasible. The OPRF key derived from the server's secret seed is required.

PwdGen(C,p) ∧ CDB(S,C) ⟹ ¬K(p)

Threat Model

Dolev-Yao adversary with full network control, adaptive long-term key corruption, and quantum oracle breaking classical Diffie-Hellman. Security follows the AND-model: an attacker must compromise BOTH Ristretto255 4DH AND ML-KEM-768 simultaneously to break session key secrecy.

Attack Coverage

Comprehensive defense against 12 critical attack vectors with dedicated test suites for each

Attack VectorProtection MechanismTests
Offline Dictionary AttackArgon2id (19 MiB, 2 iterations) + OPRF blinding47
OPRF Seed CompromiseServer-side rate limiting + credential isolation12
Server Impersonation4DH mutual authentication + server public key pinning23
Client ImpersonationOPRF prevents offline verification without server18
Replay AttackUnique nonces per session + transcript binding15
Transcript TamperingHMAC-based transcript hashing over all messages21
Forward Secrecy (Classical)Ephemeral X25519 keys + 4DH key schedule14
Forward Secrecy (Post-Quantum)Ephemeral ML-KEM-768 encapsulation per session14
Quantum Key RecoveryHybrid X25519 + ML-KEM-768 with dual combiner8
aPAKE Model ViolationFormal verification against Ristretto255 group laws31
Password Leakage via TimingConstant-time comparison + fake credential generation9
Version DowngradeProtocol version bound in AAD + strict negotiation6

Property-Based Tests

Randomized testing with proptest for invariant verification

Wrong password always fails authentication (1000 cases)
Tampered KE2 messages are always rejected
Tampered KE3 messages are always detected by server
Session keys are unique across 500 parallel sessions

Wire Protocol & Message Sizes

Compact binary format with hybrid post-quantum cryptography overhead

MessageTotal SizePayloadDescription
RegistrationRequest32 bytesBlinded OPRF elementClient-blinded password hash sent to server
RegistrationResponse64 bytesEvaluated element + server PKServer OPRF evaluation and public key
RegistrationRecord192 bytesEnvelope + client PKEncrypted credentials stored server-side
KE1 (Login Start)1,252 bytesCredential request + X25519 + ML-KEM-768Client ephemeral keys and blinded OPRF
KE2 (Login Response)2,468 bytesCredential response + ciphertext + MACServer response with PQ ciphertext
KE3 (Login Finish)64 bytesClient MACClient confirmation of shared key

Threat Model Analysis

Defense capabilities against common and advanced threat actors

ThreatStatusDescription
Passive EavesdropperProtectedAll messages encrypted; OPRF hides password from network
Active Man-in-the-MiddleProtected4DH mutual authentication prevents impersonation
Server Database CompromiseProtectedArgon2id + OPRF; no plaintext or reversible hashes stored
Server ImpersonationProtectedClient verifies server identity via public key in envelope
Offline Dictionary AttackProtectedOPRF blinding requires server cooperation for each guess
Online Brute ForceDetectedServer-side rate limiting; Argon2id slows each attempt
Client Device CompromisePartialForward secrecy limits exposure; no long-term secrets on client
Replay AttackProtectedUnique nonces and transcript binding prevent replay
Pre-computation / Rainbow TablesProtectedPer-user OPRF salt makes pre-computation infeasible
Key Compromise ImpersonationProtectedMutual 4DH prevents impersonation even with one key leaked

Security Audit Results

Comprehensive security audit completed March 2026 covering all protocol components

0Critical
0High
2Medium
3Low
5Informational
10Positive Findings
PASSNo critical or high severity findings. All medium and low findings have documented mitigations.

Positive Security Highlights

All cryptographic comparisons use constant-time operations
Error messages are generic — no information leakage
OsRng used exclusively — no weak PRNG paths
All sensitive memory zeroized on Drop via Zeroize trait
Identity point validation on all Ristretto255 inputs
Dual combiner for hybrid PQ — safe even if one primitive breaks
Fake credential generation for non-existent users (timing protection)
Strict canonical deserialization — no malleability
No unwrap/expect on untrusted input paths
Release builds with overflow checks, no debug_assertions

Performance Benchmarks

Criterion.rs benchmark suites for continuous performance regression testing

Micro-benchmarks: OPRF evaluation, Argon2id hashing, ML-KEM-768 encaps/decaps, X25519 DH
Protocol-level: Full registration flow, full login flow, concurrent session handling
Throughput: Registrations/sec, logins/sec, key derivation operations/sec

Fuzz Testing Targets

Continuous fuzzing with cargo-fuzz targeting all protocol entry points

OPRF input handling — malformed blinded elements, edge-case scalars
Envelope parsing — corrupted ciphertexts, truncated fields, wrong MACs
KE1/KE2/KE3 message parsing — oversized payloads, missing fields, version mismatches
FFI boundary — null pointers, invalid UTF-8, buffer overflows in C bindings

Use Cases

Enterprise applications requiring zero-knowledge password authentication

Authentication Servers
Mobile Applications
IoT Devices
SaaS Platforms
Financial Services
Healthcare Systems
Government Portals
Enterprise SSO
OPAQUE Protocol

Zero-Knowledge Authentication, Architected for Tomorrow

Password protection with post-quantum resilience — eliminate vulnerabilities at the protocol level

Discuss Implementation