Skip to content
This repository was archived by the owner on Mar 10, 2026. It is now read-only.

Commit bef280b

Browse files
authored
Update PROTOCOL.md
1 parent 6b00871 commit bef280b

File tree

1 file changed

+80
-3
lines changed

1 file changed

+80
-3
lines changed

PROTOCOL.md

Lines changed: 80 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ Author: ChadSec (Freedom Club)
1010
Coldwire is a post-quantum secure communication protocol focused on:
1111
- Minimal metadata
1212
- *0-trust* in server (server is just a dumb relay, and is always assumed malicious)
13-
- Messages & Keys plausible deniblity
13+
- Messages & Keys plausible deniability
1414
- Post-quantum future proofing (NIST Post-quantum algorithms with tier-5 security)
15-
- Design minimalism (few dependecies, simple UI)
15+
- Design minimalism (few dependencies, simple UI)
1616

1717

1818
There are a **best** and **worst** case scenario for Coldwire's security:
@@ -228,7 +228,7 @@ This **plausible unlinkability** only occurs if the server was compromised *Afte
228228

229229
Additionally, this **plausible unlinkability** will be the basis on which we build **plausible deniability** later on with `OTP` pads and `PFS`.
230230

231-
`SMP` verification, if done relatively quickly with an answer with sufficent entropy, provides an *unbreakable mathmatical guarantee of authenticity* and integrity for the verification of the keys (Assuming no hash collisions).
231+
`SMP` verification, if done relatively quickly with an answer with sufficent entropy, provides an *unbreakable mathematical guarantee of authenticity* and integrity for the verification of the keys (Assuming no hash collisions).
232232

233233
## 5. Perfect Forward Secrecy
234234
Perfect Forward Secrecy (PFS) ensure that if a ML-KEM-1024 keypair was compromised, it does not affect keys before, and after it.
@@ -359,6 +359,83 @@ The ciphertext result of `Kyber1024` is signed using `per-contact` keys and is s
359359
`Bob` then saves both the pad and the `hash chain` seed locally as `Alice`'s.
360360

361361
`Bob` will use that pad to decrypt future messages sent by `Alice`.
362+
362363
`Bob` will also use that `hash chain` to verify messages were not tampered with, nor replayed.
363364

365+
### 6.4. Message sending
366+
Now `Alice` have enough pads to send her messages, and `Bob` has enough pads to decrypt `Alice`'s messages.
367+
368+
`Alice` then proceeds to pad & encrypt her message:
369+
```python
370+
padding = random_bytes(message_otp_padding_length)
371+
padding_len = len(padding).to_bytes(OTP_PADDING_LENGTH, "big") # Big endian
372+
padded_message = padding_len + message + padding
373+
374+
encrypted_message = otp_encrypt_func(padded_message, alice_pads[:len(padded_message)])
375+
```
376+
377+
Now `Alice` can send her message to `Bob`:
378+
```json
379+
[POST] /messages/send_message
380+
{
381+
"message_encrypted": "encrypted_message base64 encoded",
382+
"recipient": "Bob's user ID"
383+
}
384+
```
385+
386+
`Bob` receives, decrypts the message, reads size of padding by reading first `2 bytes` and discards the padding, verifies hash chain, and finally, if valid, `Bob` `client` displays the message.
387+
388+
389+
### 6.5. Security notes
390+
Even though we utilize OTP encryption, which is unbreakable if used right, we ultimately share the pads using `ML-KEM-1024` (`Kyber1024`).
391+
392+
The unbreakable property of OTPs is only true if the `Kyber1024` was not intercepted, if it were, the security becomes `Kyber1024` security.
393+
394+
So, even in worst scenario where OTP security = `Kyber1024` security, our protocol still is arguebly more secure than other protocols that don't utilize OTPs.
395+
396+
So best case scenario: Your messages could never be broken, no matter how much computing power your adversary has.
397+
398+
Worst case scenario: OTP has inherited `Kyber1024` security. Now only compute-power-based security falls only on `Kyber1024`, if we compare that to a typical `Kyber1024` + `AES`, best case and worst case scenarios are equal, your security would be dependent on 2 complex algorithms, both with their own classes of cryptograhic attacks.
399+
400+
So in our worst case scenario, our security still wins, by purely focusing on `Kyber1024` instead of an additional complex algorithm with it's very own massive classes of attacks.
401+
402+
403+
## Security Considerations & Threat Model
404+
Coldwire is designed for:
405+
- Post-quantum confidentiality and authentication.
406+
407+
- Minimal metadata exposure (no timestamps, usernames, presence, contact lists, delivery logs, or message logging).
408+
409+
- Perfect forward secrecy (PFS) via frequent key rotation and one-time pad session material.
410+
411+
Coldwire does not attempt to defend against:
412+
413+
- Traffic analysis at the network layer (timing correlation outside the server).
414+
415+
- Compromise of endpoints (malware, key theft from device).
416+
417+
- Server compromise during per-contact SMP verification (may weaken plausible deniability).
418+
419+
- Attacks exploiting weak SMP shared secrets (low-entropy user-defined answers).
420+
421+
Coldwire assumes:
422+
423+
- The post-quantum primitives (`ML-KEM-1024`, `ML-DSA-87`) remain secure against both classical and quantum adversaries.
424+
425+
- Open-Quantum Safe library correctly implements the post-quantum primitives.
426+
427+
- Users securely verify per-contact keys before exchanging sensitive messages.
428+
429+
Future versions may:
430+
- Add group chat support
431+
- Improve support for offline messaging
432+
433+
434+
435+
Our protocol is experimental. Coldwire is not meant to be the next Signal, or Matrix. Instead, we trade usability for security.
436+
437+
We have a lot of ideas we want to implement, like Hybrid encryption, and group chats.
438+
When implemented, we will be updating this protocol spec.
439+
440+
364441

0 commit comments

Comments
 (0)