01Principles
Only proven building blocks
X25519, Ed25519, ML-KEM-768, ML-DSA-65, AES-256-GCM, HKDF and Argon2id — from the Go standard library, golang.org/x/crypto and the browser’s WebCrypto. SFrame and all HuVam protocols are built only from these. HuVam has no ciphers of its own.
Keys stay on your devices
All key pairs are created on the device. The server never receives a private key, a message key or a call key.
Hybrid post-quantum protection
Key exchanges for contacts, messages and calls combine a classical algorithm with a post-quantum one. To read the content, an attacker has to break both. The exceptions are listed on this page.
As little metadata as possible
No phone number, no email, no contact list on the server. The sender of a message is hidden inside the encryption, and every message is padded to one of three fixed sizes.
Open about the limits
Every protection has limits. We list them on this page — including the ones we have not solved yet.
02Cryptographic building blocks
Everything else in HuVam is assembled from these primitives.
| Purpose | Algorithm | Parameters | Standard |
|---|---|---|---|
| Encryption of messages, files and local storage | AES-256-GCM | 256-bit key, 96-bit nonce, 128-bit tag | NIST SP 800-38D |
| Key derivation | HKDF-SHA256 | a separate label for every purpose; SFrame uses HKDF-SHA512 | RFC 5869 |
| Message chain keys | HMAC-SHA256 | as in the Signal Double Ratchet | RFC 2104 |
| Key agreement | X25519 | low-order public keys are rejected | RFC 7748 |
| Post-quantum key agreement | ML-KEM-768 | public key 1184 bytes, ciphertext 1088 bytes | FIPS 203 |
| Signatures | Ed25519 + ML-DSA-65 | hybrid: valid only if both signatures verify (64 + 3309 bytes) | RFC 8032, FIPS 204 |
| Hashes and fingerprints | SHA-256 | safety codes, mailbox addresses, fingerprints | FIPS 180-4 |
| Protection of PINs and passwords | Argon2id | parameters per use — see “On your device” | RFC 9106 |
| Large files and backups | STREAM / AES-256-GCM | pieces with counter and “last piece” flag in the nonce | Hoang et al., CRYPTO 2015 |
| Audio and video frames of calls | SFrame AES_256_GCM_SHA512_128 | on top of DTLS-SRTP | RFC 9605 |
| Connection to the server | TLS | pinned to the Let’s Encrypt roots ISRG Root X1 and X2 | — |
Implementations: the Go standard library (crypto/ecdh, crypto/ed25519, crypto/mlkem, crypto/mldsa, crypto/aes, crypto/cipher), golang.org/x/crypto (hkdf, argon2) and WebCrypto. The same Go core runs on Android, on Windows and — compiled to WebAssembly — in the browser.
Besides the protocols themselves, HuVam implements four building blocks on top of the library primitives, all checked by tests. SFrame (in JavaScript, on WebCrypto) is checked against the test vectors of RFC 9605. STREAM is built on the library’s AES-256-GCM. The step-by-step ML-KEM-768 needed by the post-quantum ratchet is the ML-KEM code of the Go standard library, split into two steps; in tests its ciphertexts are opened by the standard crypto/mlkem. The post-quantum ratchet SPQR is compared byte for byte with test vectors produced by Signal’s Rust reference implementation.
Known-answer tests: RFC 8032 (Ed25519), RFC 7748 (X25519), RFC 9605 appendix C (SFrame), plus fixed test vectors for the HuVam protocol itself.
03Identity and account
A HuVam account is a set of keys, not a person’s data. On first start the device creates three key pairs:
Ed25519signing key; your account number is derived from itX25519key agreement: sessions and sealed envelopesML-DSA-65post-quantum signing key, always used together with Ed25519
account = "HV-" ‖ Crockford32( SHA-256("huvam-id-v1" ‖ Ed25519_pub)[0..5) ) // 40 bit
The account number (HV-XXXX-XXXX) is 40 bits of SHA-256 over the Ed25519 public key, written in Crockford Base32. It is an address, not proof of identity: 40 bits can be found by brute force. Identity is proven by the safety code.
There is no registration: no phone number, no email, no password on the server. The name you choose goes only to your contacts, inside the encryption.
04Adding a contact (PQXDH)
Contacts are added with a QR code or a one-time invite link. The invite carries the keys from hand to hand; the server takes no part in the key exchange.
What an invite contains
- the inviter’s public identity keys (Ed25519, X25519) and the SHA-256 fingerprint of their ML-DSA-65 key
- a one-time X25519 key and a one-time ML-KEM-768 key, made only for this invite
- a 16-byte one-time pass, the inviter’s mailbox address and notification key
- lifetime: QR code 10 minutes, link 7 days minus 2 hours; each invite can be accepted only once
DH1 = X25519(IK_B, OTK_A)
DH2 = X25519(EK_B, IK_A)
DH3 = X25519(EK_B, OTK_A)
(ct, ss) = ML-KEM-768.Encaps(PQOTK_A)
SK = HKDF-SHA256(ikm = 0xFF×32 ‖ DH1 ‖ DH2 ‖ DH3 ‖ ss,
salt = 0x00×32,
info = "huvam-pqxdh-v1")
This follows Signal’s X3DH and PQXDH, with one difference: the one-time keys come from the invite itself, not from a key server. The introduction of the accepting person and the reply of the inviter are both signed with the hybrid signature (Ed25519 + ML-DSA-65); a reply whose ML-DSA key does not match the fingerprint in the invite is rejected. The old invite format without these signatures (HV1) is no longer accepted.
A contact added by scanning a QR code in person becomes “verified” only after the signed reply proves that the other side really holds the keys from the code.
In a link, the invite sits after the # sign, which browsers never send to the server. Short links (HV3) contain only a 32-byte secret and the SHA-256 of the full invite; the full invite waits as one 16 KiB packet in a temporary mailbox, encrypted with a key derived from that secret. If anyone changes it, the fingerprint does not match and HuVam rejects the link.
05Messages: the triple ratchet
Every message has its own key, which is erased right after use. HuVam combines the classic Signal Double Ratchet with Signal’s Sparse Post-Quantum Ratchet (SPQR).
Double Ratchet
Every reply brings a new X25519 exchange; the root key is advanced with HKDF-SHA256, and every message key in a chain comes from HMAC-SHA256. A stolen key does not reveal earlier messages, and once the other person replies, later messages are protected again.
SPQR — post-quantum ratchet
The two sides take turns sending ML-KEM-768 keys and ciphertexts in epochs (ML-KEM Braid). The data is cut into 192-byte pieces with Reed–Solomon coding over GF(2^16), so lost messages do not stall it, and is authenticated with HMAC-SHA256. Each completed epoch yields a new shared secret and new chains.
Combined message key
The final key comes from HKDF-SHA256 with the classical key as input and the post-quantum key as salt. It gives a 256-bit AES-GCM key and a 96-bit nonce. Both identities and the full message header are authenticated data.
RK', CK = HKDF-SHA256(ikm = X25519(DHs, DHr), salt = RK, info = "huvam-rk-v1") // 64 B
CK', ec_mk = HMAC-SHA256(CK, 0x02), HMAC-SHA256(CK, 0x01)
pq_mk = SPQR epoch chain // "Signal PQ Ratchet V1 Chain Next"
key ‖ nonce = HKDF-SHA256(ikm = ec_mk, salt = pq_mk, info = "huvam-triple-ratchet-v1") // 32 + 12 B
ciphertext = AES-256-GCM(key, nonce, plaintext, AD = identities ‖ header)
- Messages may arrive out of order: up to 1000 skipped message keys are kept.
- Decryption works on a copy of the state: a damaged or replayed packet is rejected and does not break the session.
- No downgrade: once a conversation has completed a post-quantum epoch, messages without the post-quantum part are rejected.
Sealed envelope1 / 16 / 256 KiB · X25519 + AES-256-GCM
fixed size; the sender is inside
Triple ratchetDouble Ratchet + SPQR · AES-256-GCM
a new key for every message
Your message
text, name, file keys, reactions
06Sealed envelopes and mailboxes
Every message leaves your device as an envelope of exactly 1 KiB, 16 KiB or 256 KiB. It holds the ratchet ciphertext together with the sender’s identity (sealed sender) and is encrypted to the recipient’s X25519 key with a fresh one-time key, using HKDF-SHA256 and AES-256-GCM. The server cannot tell who sent it, or whether it contains a “yes” or a long text.
eph = fresh X25519 key
key ‖ iv = HKDF-SHA256(ikm = X25519(eph, recipient_IK), salt = eph_pub ‖ recipient_IK, info = "huvam-seal-v1")
envelope = 0x01 ‖ hint(60 B) ‖ eph_pub ‖ AES-256-GCM(key, iv, len ‖ inner ‖ padding) // 1024 | 16384 | 262144 B
mailbox = SHA-256("huvam-box-v1" ‖ secret) // secret: 32 B, only the owner knows it
For the background service the envelope carries a 32-byte hint, encrypted with the recipient’s notification key: only the type (message, call or call ended), a call number, a time and a “silent” flag; for a contact request also an anonymous tag, so that requests from someone you have declined stay silent. No text and no sender identity — that is why notifications say just “New message”.
Mailboxes: the address is the SHA-256 of a 32-byte secret with the label huvam-box-v1. Anyone who knows the address can drop an envelope in; only the holder of the secret can read and delete. The server does not know whose mailbox it is. The phone switches to a new mailbox every 7 days and tells its contacts inside the encryption; the old one is still read for 7 days.
Notifications without Google’s push service: the HuVam app keeps its own connection to our server (long polling, up to 50 seconds per request). No third-party push service learns that you have received something.
- Your devicetriple ratchet, then envelope
- Mailbox on the serversees only a closed envelope
- Recipient’s deviceopens envelope, then message
07What the server stores — and what it does not
| Data | Stored? | How long |
|---|---|---|
| Mailbox address (hash of a secret) | yes | until 30 days without access; last access only to the day |
| Encrypted envelopes | yes | until fetched, at most 7 days; arrival time only to the hour |
| Encrypted file parts | yes | until all recipients have downloaded them, at most 7 days |
| Group call rooms | in memory only | while the call is running |
| IP addresses | in memory only, for rate limits | not written to disk, no access logs |
| Names, phone numbers, emails, contact lists | no | — |
| Message content and keys | no | — |
| Sender of an envelope | no — it is inside the encryption | — |
The database is SQLite with secure_delete: deleted envelopes are overwritten with zeros, and the write-ahead log is truncated so that no copies remain. No table holds two addresses side by side or a sender’s key.
The web server’s access and error logs are switched off; the call relay (coturn) writes no logs; the group call relay keeps rooms only in memory and writes nothing to disk.
The HuVam core in the apps accepts the server’s TLS certificate only if it chains to ISRG Root X1 or X2 (pinned SHA-256 of the public key). A certificate wrongly issued by another authority is not accepted. The connection to the group call relay is opened by the system web view with the normal certificate checks; the frames it carries are SFrame-encrypted anyway.
Like any internet service, the server unavoidably sees the IP addresses that connect, when envelopes arrive and are fetched, their size class and which mailbox they go to. An operator who recorded IP addresses could in theory guess from timing who talks to whom. We do not log, but you cannot check that from outside — if this matters to you, use a VPN.
08Calls
Every call has two layers of encryption, and its keys exist only for the length of the call.
Signalling inside the encryption
Offer and answer (SDP), including the DTLS fingerprints, travel as end-to-end encrypted messages through the mailboxes. The server can neither read nor replace them, so it cannot step into the connection.
Layer 1: DTLS-SRTP
The standard WebRTC encryption between the two devices.
Layer 2: SFrame
Every audio and video frame is encrypted once more with SFrame (RFC 9605, AES_256_GCM_SHA512_128). The call key is new for every call and is discarded when it ends.
IP address hidden
By default every call goes through our relay (TURN, ICE policy “relay”): the other person does not see your IP address. A direct connection can be switched on only for verified contacts. Relay passwords are valid for one hour and are issued only to holders of an existing mailbox.
(ct, ss) = ML-KEM-768.Encaps(caller_one_time_pk)
k = HKDF-SHA256(ikm = X25519(EK_mine, EK_peer) ‖ ss, salt = call_id(16 B), info = "huvam-call-v2") // 64 B
caller sends with k[0:32], callee with k[32:64] // SFrame base keys, one per direction
SFrame: AES_256_GCM_SHA512_128 (0x0005), key/salt = HKDF-SHA512(base_key, "SFrame 1.0 Secret key|salt " ‖ KID ‖ suite)
Both one-time private keys are discarded after the call (the X25519 key is overwritten): recorded traffic cannot be decrypted later, not even with the long-term keys.
Shared screens use the same SFrame key as the camera. Remote control in a 1:1 call works only with HuVam for Windows, only while the whole screen is shared, and only after the person sharing it allows it — in every call anew; they can stop it at any moment.
Call recording (HuVam for Windows and Mac, and a browser on a computer) happens only on the recording person’s device. Before the first frame every participant sees an “X is recording the call” badge and hears a tone: in a 1:1 call recording starts only after the other person’s app confirms it, in a group call only after the relay allows it — and the relay refuses if anyone has an old HuVam version without that badge. The file is a normal, unencrypted MP4/WebM in a HuVam folder inside Videos (Movies on a Mac; downloaded in a browser); the server never sees it. Phones (the app and the phone browser) cannot record; they only show the badge and play the tone.
In the browser, SFrame runs in a separate worker through RTCRtpScriptTransform; where that is not available, it runs through Insertable Streams on the page itself.
09Groups and group calls
A group has up to 50 members. A group message is a separate copy for each member, encrypted with the triple ratchet of that pair — there is no shared group key that could leak. The group name and member list are known only to the members.
Only admins can change members, admins and the name. Every change gets a higher version number; members accept a change only from someone who is an admin in their own copy of the list.
Group calls go through our relay (huvam-sfu, built on Pion WebRTC): up to 16 participants, 8 of them with video. The relay forwards frames that are already SFrame-encrypted; it has no keys. Each participant sends with their own random 32-byte key, delivered to the others over the 1:1 ratchets. Whenever someone joins or leaves, everyone makes a new key: a newcomer cannot decrypt what came before, and someone who left cannot decrypt what comes after. Call keys are kept only in memory.
Limit: an admin vouches for the keys of the members they add; only comparing the safety code with a member proves who they are. During a group call the relay knows, in memory, which connections share a room.
10Linked devices
Your phone is the main device; up to 8 computers or browsers can be linked to it. The computer shows a QR code (valid for 2 minutes) with a one-time X25519 key and the fingerprint of a one-time ML-KEM-768 key; the phone scans it and both derive a shared key from X25519 and ML-KEM with HKDF-SHA256. Your account data is handed over only after you tap “Allow” on the phone.
K = HKDF-SHA256(ikm = X25519(EK, X) ‖ ss_ML-KEM-768, salt = transcript, info = "huvam-link-v1")
list = { devices, version } + Ed25519 + ML-DSA-65 signature of the identity // phone + up to 8
Each device has its own keys. The phone publishes the list of your devices, signed with the hybrid signature of your identity and numbered; contacts accept only a correctly signed list with a higher number, so an unlinked device cannot be brought back with an old list. Messages are encrypted separately for each device.
A linked computer receives up to the last 90 days of history (less if it does not fit into the transfer). A device that has not been online for 30 days is unlinked automatically. After a restore from backup, all computers are unlinked.
11Photos, files and voice messages
Every file is encrypted on your device with its own random 32-byte key; the key travels inside the message, the server never has it. Photos: AES-256-GCM. Files, videos and voice messages: STREAM over AES-256-GCM, which protects long files against reordering, cutting and swapping of pieces.
key = 32 random bytes per file // travels inside the encrypted message
nonce = prefix(7 B) ‖ piece_no(4 B) ‖ last(1 B) // STREAM over AES-256-GCM
parts = 16 MiB, padded to a multiple of 256 KiB
Encrypted files travel in parts of 16 MiB, padded to multiples of 256 KiB; up to 100 MB per file. The server deletes a file once every recipient has downloaded it, at the latest after 7 days. It sees the number of parts and the size to within 256 KiB — not the name or the type.
12Disappearing messages, view once, screenshots
Timer per chat: off, 30 seconds, 5 minutes, 1 hour, 1 day or 1 week. The countdown starts when the recipient opens the message, and it disappears for both. If the read receipt never arrives, the message disappears from the sender’s device at the latest timer plus 7 days after sending.
View once: a photo or video can be opened only once; afterwards only the line “Photo” or “Video” remains. Files with a timer or view once cannot be saved or shared from HuVam.
Screenshot protection: on Android, HuVam blocks screenshots and screen recordings of its windows (FLAG_SECURE). On Windows this protection is switched off during the test phase and will be switched on before the public release. In the browser it is impossible. Nobody can prevent a photo of the screen taken with another device.
13Protection on your device
Messages and keys are stored on the device only in encrypted form: each record with AES-256-GCM under the storage key, and that key is in turn wrapped by a key the platform protects.
| Platform | The storage key is protected by |
|---|---|
| Android | Android Keystore — in the StrongBox security chip where available, otherwise in the trusted execution environment (TEE). The key cannot be taken off the phone. |
| Windows | TPM chip. Default: PIN + chip — the PIN is checked by the chip itself, which counts wrong attempts; Windows Hello can be added. Without a TPM, a PIN of at least 10 digits is required, protected with Argon2id (256 MiB of memory, 3 passes, 4 lanes). |
| Browser | A non-extractable WebCrypto AES-256 key in IndexedDB: not even the page’s own code can read its bytes. Less protected than the apps (see the limits). |
App lock PIN: 6–12 digits, stored only as Argon2id (19 MiB, 2 passes, 1 lane — the OWASP recommendation). After 5 wrong attempts there is a 30-second pause that doubles with every further mistake, up to 1 hour. The pause follows the device’s monotonic clock, so changing the time does not shorten it.
Duress PIN: entering it erases everything — the keys first, so the data is unreadable at once — and opens an empty account with the same name, as if HuVam had never been used.
Backup: encrypted with a 30-digit code or your own password. The key is HKDF-SHA256 over Argon2id (64 MiB, 3 passes, 4 lanes); the data is encrypted with STREAM over AES-256-GCM. A backup contains no ratchet state: after a restore HuVam starts fresh sessions with every contact, signed with the hybrid signature. These new sessions start with X25519 only; post-quantum protection returns once the post-quantum ratchet completes its first epoch, after a few messages in both directions.
Moving to a new phone happens directly over the local network, not through the server. Both phones agree on keys with fresh X25519 keys and a commitment, then each shows a 6-digit code; data flows only after you confirm on the old phone that the codes match.
app PIN : Argon2id(t = 2, m = 19 MiB, p = 1)
Windows : Argon2id(t = 3, m = 256 MiB, p = 4) // only without TPM, PIN ≥ 10 digits
backup : K = HKDF-SHA256(Argon2id(secret, salt; t = 3, m = 64 MiB, p = 4), salt, "huvam-backup-v1")
14Verifying a contact
The safety code has 24 digits (about 80 bits) and is the same on both phones. It is SHA-256 over the Ed25519 and X25519 keys and the ML-DSA-65 fingerprint of both people. Scanning the safety QR code compares all 256 bits.
h = SHA-256("huvam-safety-v2" ‖ min(A, B) ‖ max(A, B)) // A = Ed25519 ‖ X25519 ‖ SHA-256(ML-DSA-65)
code = h[0:8] mod 10¹² ‖ h[8:16] mod 10¹² // 24 digits, "dddd dddd dddd dddd dddd dddd"
QR = "HVS2:" ‖ base64url(h) // all 256 bits
How to verify
- Open the contact and show the safety code.
- Compare it with the other person — in person, or on a call where you recognise their voice — or scan each other’s safety QR code.
- If it matches, mark the contact as verified: nobody is in between — not even a future quantum computer.
- If a contact’s keys change (for example after reinstalling), HuVam shows a red warning, and the contact is no longer verified until you compare again.
15Updates
Android: the app from our website is signed with our own key. The built-in updater installs a new version only if its SHA-256 matches the update list and it is signed with the same certificate as the installed app; Android checks this as well. The Google Play version is delivered and updated by Google Play.
Windows: every update is signed with a separate Ed25519 release key; the signature covers the build number, size and SHA-256. The program installs only correctly signed builds, and only newer ones — no downgrade.
Browser: the code is loaded from our server every time the page opens. That is why the browser version is marked as less protected.
16Threat model
Who might attack, and what they can and cannot achieve.
| Attacker | Can | Cannot |
|---|---|---|
| Someone who breaks into the server, or its operator | see IP addresses, times and size classes of packets; delete packets; stop the service | read messages, calls or files; learn names, contacts or group members; swap keys unnoticed — the safety code reveals it |
| Network observer: provider, Wi-Fi | see that you use HuVam, when and how much | read or change content: TLS plus end-to-end encryption |
| A future quantum computer with recorded traffic | break the classical X25519 parts — including the outer envelope layer, which would reveal the senders in that recorded traffic | read message or call content: those keys also depend on ML-KEM-768 (except the first messages after a restore from backup) |
| A thief with your locked phone | try HuVam PINs, slowed down by growing pauses (if an app PIN is set) | copy the data and decrypt it elsewhere: the key stays in the phone’s Keystore |
| Spyware on your device | see what you see and type, read keys from memory | — no app, HuVam included, can protect against this |
| The person you talk to | copy texts, photograph the screen with another device, take screenshots on Windows (for now) and in the browser — view-once media included; record the call with the built-in recorder (everyone sees a badge) or with any other app | save or forward view-once or timed media from inside HuVam, take screenshots of HuVam on Android, or record the call with the built-in recorder without everyone seeing a badge |
| Someone who intercepts your invite link | accept it before the intended person — you would see a stranger instead of your contact, and the safety code would not match | change the invite or read your conversation with the person you meant |
17Honest limits
What HuVam does not protect, or not yet.
- No independent audit yet. Until an external audit is complete, please treat HuVam as test software.
- The source code is not public yet.
- Metadata: the server sees IP addresses and times. The outer envelope layer uses X25519 only — it is neither post-quantum nor forward-secret — so if a recipient’s identity key is stolen later, or broken by a future quantum computer, recorded envelopes would reveal who sent them. The content stays protected.
- Account numbers are short (40 bits): they are addresses, not proof. Only the safety code proves who someone is.
- In groups, an admin vouches for new members’ keys; only the safety code with each member proves who they are.
- The browser version loads its code from the server every time and keeps its key in the browser, not in a chip. A malicious browser extension sees what the page sees.
- Anyone at an unlocked computer with HuVam open can read your chats until you unlink it from your phone.
- Screenshot protection exists only on Android for now.
- Our relays see the packet sizes and timing of calls, as with any real-time call, and during a group call the relay knows which connections share a room.
- The Windows program is not yet signed with a code-signing certificate, so Windows warns about an unknown publisher. Updates are protected by our own Ed25519 signature.
- Without a backup, a lost phone means a lost account and history: we have no copy.
- No encryption stops the other person from copying what they see, or spyware on a device from watching.
- The recording badge is a warning, not protection: the other person can record the call with another app or a phone. A recording file lives outside HuVam’s storage: the duress PIN and “Log out and erase everything” don’t delete it.
- HuVam for Mac can’t choose a speaker: sound goes to the system default device. In a browser a recording is kept in the tab’s memory and lasts at most 2 hours.
18Audit status and roadmap
Not yet independently audited
HuVam has not yet been reviewed by independent experts.
So far: internal security reviews of the cryptography, server, browser version, calls and Android app in October 2026, with the findings fixed in versions 0.4.2 and 0.4.3. Every release goes through code review and automated tests: known-answer tests from the RFCs, Signal’s SPQR reference vectors, cross-checks of ML-KEM with the Go standard library, and data-race tests.
Next steps
- Independent audit of the cryptography and the protocol by external experts — before the public release.
- Screenshot protection on Windows — before the public release.
- Apps for iPhone and Mac, signed through the Apple Developer Program.
19Report a vulnerability
Found a weakness? Please write to us before publishing it, so that we can fix it and protect users first.
Email huvam@mpe21.com
Please describe the affected version, the steps to reproduce and the possible impact. Do not test against other people’s accounts and do not overload our server.