Feat/strandlock protocol #8
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull requests add support for my novel strandlock protocol.
This protocol purpose is to intertwine every cryptographic primitive with each other (sort of like hair strands). So that failure of 1, 2 or even 3 primitives at same time, does not compromise security of messages.
Even if
ML-KEM-1024, andMcElie8192128are both broken, your messages are safe (if initial SMP verification request was not intercepted / logged)Even if initial SMP verification request was intercepted / logged, and
ML-KEM-1024,McElie8192128both are broken, ifSMPanswer has enough entropy, your messages are still safe.This update also makes the "selling pitch" of Coldwire (i.e. information-theoretic security) a bit more applicable / practical in real world than previously has been. It's still not true information-theoretic security, it's impossible to achieve so using any asymmetric algorithm, but it is now much "closer" to that objective than before.
This is done by switching from fixed padding of
1024bytes, to a bucket-based padding scheme, which pads up to64 bytes, and if message is >64 bytes, it would add random padding up to 16 bytes.This new scheme significantly reduces amount of pads used for ciphertext length defense (i.e. message padding), therefore reducing the need to send new pads often.
On average, before i've implemented strandlock protocol, you would be able to send 10 messages before needing to send more pads to your contact.
On average, after I've implemented strandlock, you now could send an average of up to 176 messages before running out of pads.
The reason this improves security, is because the less pads goes on wire, the less likelyhood of interception (i.e. if pads ciphertext was intercepted, that would collapse the security of OTP into the security of
ML-KEM-1024andMcElie8192128combined, which are far from OTP. But now , since you don't have to send pads as much, the likelyhood of OTP pads ciphertext being intercepted drastically decreases, putting us a bit closer to that OTP goal.Also, public-keys, and ciphertext are both encrypted now. End-to-end, so even if previously mentioned algorithms are both broken, unless xChaCha20Poly1305 is also broken, your messages stay safe. Yes, that even includes an adversary who logged everything, including very first SMP request.
Additionally, I've added xChaCha20Poly1305 wrapping of OTP encrypted messages. This is meant to protect against the possiblity of OTP implementation errors breaking all security guarantees.
Additionally, strandlock protocol adds some significant improvements to our plausible unlinkbility and deniability (wip).
I've also cleaned up code in this pull request. It's still WIP, I am cleaning more and unifying Coldwire server protocol.