HackerReposA FIELD GUIDE TO OPEN SOURCE
ProSponsor the shelf♧ 0
← Back to top all-time
trevp
double_ratchet
Libraries & SDKs2014–2016
trevp / double_ratchet

double_ratchet

Double Ratchet Algorithm

9Distinct people
10Mentions
0Explicit recommenders
377GitHub stars
REPOSITORY AT A GLANCE

What to know before exploring

What it is

Double Ratchet Algorithm

GitHub

Where it is used

No documented product use has been verified yet.

What people are saying

No recommendation phrase was found in the indexed comments.

No classified warning is attached to this page. Read the discussions before treating silence as approval.

Also in these discussions

No other repository is repeatedly linked in the same discussions.

This week on Hacker News

Nov 7–Nov 14 UTC · Direct repository links and separately labeled related project stories. Indexed through 11/14/2026, 3:56:07 PM UTC.

No direct repository links were found in the indexed HN discussions over the past seven days. Older discussions are available below.

Mentions over time

HN mentions by month10 dated mentions

Observed mentions: 2014-11-19 17:48:22 UTC to 2016-12-09 17:08:50 UTC.

0122014-11-01 00:00:00 UTC to 2014-12-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 commentsNov 20142014-12-01 00:00:00 UTC to 2015-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2015-01-01 00:00:00 UTC to 2015-02-01 00:00:00 UTC (exclusive): 2 mentions; 0 submissions, 2 comments2015-02-01 00:00:00 UTC to 2015-03-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2015-03-01 00:00:00 UTC to 2015-04-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2015-04-01 00:00:00 UTC to 2015-05-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2015-05-01 00:00:00 UTC to 2015-06-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2015-06-01 00:00:00 UTC to 2015-07-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2015-07-01 00:00:00 UTC to 2015-08-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2015-08-01 00:00:00 UTC to 2015-09-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2015-09-01 00:00:00 UTC to 2015-10-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2015-10-01 00:00:00 UTC to 2015-11-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2015-11-01 00:00:00 UTC to 2015-12-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 commentsNov 20152015-12-01 00:00:00 UTC to 2016-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2016-01-01 00:00:00 UTC to 2016-02-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2016-02-01 00:00:00 UTC to 2016-03-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2016-03-01 00:00:00 UTC to 2016-04-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2016-04-01 00:00:00 UTC to 2016-05-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2016-05-01 00:00:00 UTC to 2016-06-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2016-06-01 00:00:00 UTC to 2016-07-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2016-07-01 00:00:00 UTC to 2016-08-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2016-08-01 00:00:00 UTC to 2016-09-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2016-09-01 00:00:00 UTC to 2016-10-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2016-10-01 00:00:00 UTC to 2016-11-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2016-11-01 00:00:00 UTC to 2016-12-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2016-12-01 00:00:00 UTC to 2017-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 commentsDec 2016

Counts come from the repository’s dated source evidence. Index cutoff: 2026-11-02 08:16:59 UTC.

View mention counts and date ranges
UTC ranges include their start and exclude their end. Select a period to filter the source evidence.
PeriodStart (UTC)End (exclusive, UTC)MentionsSubmissionsComments
Nov 20142014-11-01 00:00:00 UTC2014-12-01 00:00:00 UTC101
Dec 20142014-12-01 00:00:00 UTC2015-01-01 00:00:00 UTC101
Jan 20152015-01-01 00:00:00 UTC2015-02-01 00:00:00 UTC202
Feb 20152015-02-01 00:00:00 UTC2015-03-01 00:00:00 UTC101
Mar 20152015-03-01 00:00:00 UTC2015-04-01 00:00:00 UTC000
Apr 20152015-04-01 00:00:00 UTC2015-05-01 00:00:00 UTC000
May 20152015-05-01 00:00:00 UTC2015-06-01 00:00:00 UTC000
Jun 20152015-06-01 00:00:00 UTC2015-07-01 00:00:00 UTC000
Jul 20152015-07-01 00:00:00 UTC2015-08-01 00:00:00 UTC101
Aug 20152015-08-01 00:00:00 UTC2015-09-01 00:00:00 UTC000
Sep 20152015-09-01 00:00:00 UTC2015-10-01 00:00:00 UTC000
Oct 20152015-10-01 00:00:00 UTC2015-11-01 00:00:00 UTC000
Nov 20152015-11-01 00:00:00 UTC2015-12-01 00:00:00 UTC101
Dec 20152015-12-01 00:00:00 UTC2016-01-01 00:00:00 UTC000
Jan 20162016-01-01 00:00:00 UTC2016-02-01 00:00:00 UTC000
Feb 20162016-02-01 00:00:00 UTC2016-03-01 00:00:00 UTC000
Mar 20162016-03-01 00:00:00 UTC2016-04-01 00:00:00 UTC000
Apr 20162016-04-01 00:00:00 UTC2016-05-01 00:00:00 UTC101
May 20162016-05-01 00:00:00 UTC2016-06-01 00:00:00 UTC000
Jun 20162016-06-01 00:00:00 UTC2016-07-01 00:00:00 UTC000
Jul 20162016-07-01 00:00:00 UTC2016-08-01 00:00:00 UTC000
Aug 20162016-08-01 00:00:00 UTC2016-09-01 00:00:00 UTC000
Sep 20162016-09-01 00:00:00 UTC2016-10-01 00:00:00 UTC000
Oct 20162016-10-01 00:00:00 UTC2016-11-01 00:00:00 UTC101
Nov 20162016-11-01 00:00:00 UTC2016-12-01 00:00:00 UTC000
Dec 20162016-12-01 00:00:00 UTC2017-01-01 00:00:00 UTC101

What Hacker News says

10 sources
This is the Olm protocol by Matrix, which uses the Perrin-Marlinspike Double Ratchet described at [1], and makes some similar cryptographic decisions to the Signal Protocol, but has a different wire format. As complete protocols, Olm and the Signal Protocol started off close but have since diverged in a number and magnitude of ways that I lack the expertise to comment on. Nonetheless, here's the same thing directly out of both Arathorn and Moxie's mouths, devs of Matrix and Signal respectively [2]. Despite valiant efforts on many people's part to lessen the conflation and confusion of protocols, this happens a lot still, but we can all try to do our part to be as accurate as we can. [1] https://github.com/trevp/double_ratchet/wiki [2] https://news.ycombinator.com/item?id=11725652
In Signal protocol comes to XMPP/Jabber
I'm looking at libaxolotl-c. I'm a little bit disturbed about perfect forward/future secrecy. Perfect forward secrecy ensure that a session key cannot be compromised if a long-term key is compromised in future. With something like OTR even if a session key is compromised at n, session key at n-1 or n+1 will not be compromised. Here, we got perfect forward/future secrecy. If i take a look at axolotl, in scenario Alice send message to bob when Bob is offline: (1) , (2) MK = HMAC-HASH(CKs, "0") // (3) msg = Enc(HKs, Ns || PNs || DHRs) || Enc(MK, plaintext) Ns = Ns + 1 CKs = HMAC-HASH(CKs, "1") // (4) return msg We can see that Alice re-use CKs to get a new symmetric key. So if an attacker get CKs(n) he could easily compute CKs(n+1) CKs is not a long term key, but we cannot honestly call this _perfect_ futur secrecy... One more thing, if
Read the rest
I remember correctly, according of perfect forward secrecy definition, an implementation must NOT re-use previous session key to derive a new one ... I'm wrong ? (1) Quoted from https://github.com/trevp/axolotl/wiki (2) see session_cipher_get_or_create_message_keys (https://github.com/WhisperSystems/libaxolotl-c/blob/0640b5ac...) (3) i think we should read MK = HKDF(HMAC-HASH(CKs, 0x00) see ratchet_chain_key_get_message_keys (https://github.com/WhisperSystems/libaxolotl-c/blob/0640b5ac...) (4) i think we should read MK = HMAC-HASH(CKs, 0x02) see ratchet_chain_key_create_next (https://github.com/WhisperSystems/libaxolotl-c/blob/0640b5ac...)
In WhatsApp's Signal Protocol integration is now complete
> (the message will only be encrypted when the pre-key can be retrieved). The pre-key is needed when you have never talked to someone (I guess it's also needed when the last conversation is really old, I haven't dug throuh the code); it's a necessary bootstrap step. After that all you need is inside your client. > So, my laptop is off-line, and I have access to a recipients public key. How do I encrypt my message, before moving it to a machine that's on-line for sending via smtp? You encrypt it on your laptop, transfer the encrypted blob to your online machine and send the blob through it. All state is managed by your laptop, intermediary machines are just forwarding the message (which is merely an opaque blob at this point, possibly with a "destination" to ease routing to the recipient(s)). > Nor does it appear to work for writing and en
Read the rest
crypting an sms while on an air-plane From a user pov, there is no difference between: - I type the message and hit send, the message is encrypted now and sent when I have connectivity - I type the message and hit send, the message is encrypted and sent when I have connectivity The problem here will not be technical but purely UX (the software has to allow deferring encryption and sending when resources are available) > It also carries more state around (on the "server" and on the "client") so it's not decentralized. The little state there is on the server really doesn't sound centralized to me in that it is really simple (the server must be able to store a given list of blobs sent by the client, and the server must not send twice the same blob, ever) and a client can choose any server (there is no concept of "registration", but the client has to trust the server it will not misbehave). The state on the client is really client-specific, it wouldn't make sense to share a client's ratchet state: as a comparison you wouldn't share the current bucket list of your DHT client with other machines because it doesn't make sense, you would rebuild it from scratch on another machine. Effectively this means every device of yours is considered another independent "peer". I think it's important at this point to say that this mechanism is the Axolotl ratchet (more details here: https://github.com/trevp/axolotl/wiki). It only describes how to exchange encrypted messages between two DH keys, asynchronously, and with forward secrecy. It doesn't care about : - what is the relationship between DH keys ("should I encrypt to 2 DH keys because they belong to the same user ?") - how do get someone's key, and is it the good one (the key distribution management) - how can I have a coherent message history between my phone and my computer These are all real problems that TextSecure aims to solve, but they're a whole another thing.
In PGP: There’s Life in the Old Dog Yet
The proposal for forward secrecy in the spec (https://darkmail.info/downloads/dark-internet-mail-environme...) is not great and does not reflect the current state of the art: > PFS for message objects, as the description above suggests, is far more difficult, and contrary to the nature of email. It recommends just rotating public keys every few days with a paranoid mode. A much better solution is to implement the Axolotl Ratchet pioneered by Open Whisper Systems for TechSecure: https://www.whispersystems.org/blog/advanced-ratcheting/ https://github.com/trevp/axolotl/wiki With Axolotl Ratchet, you get: * forward secrecy - disclosure of private keys doesn't let an attacker in the future go back and read encrypted communication * future secrecy - disclosure of ephemeral private keys doesn't disclose (much) future content I also get the feeli
Read the rest
ng from a glance reading the spec that way too much trust is being placed on service providers. That there is even such a category as "trustful" where the server has access to your private keys is a huge red flag and that was exactly the problem with lavabit: http://www.thoughtcrime.org/blog/lavabit-critique/
In Dark Mail Technical Alliance
TextSecure doesn't use OTR, it uses a construction based on the Axolotl ratchet as described here: https://github.com/trevp/axolotl/wiki It's much much better than OTR in that: - Asynchronicity is on by default (you don't need both parties to be up and running at the same time to start a convo) - You don't need to wait for your recipient to answer before you can write something (ie you can send multiple messages one after another, directly) - Because you can do both of the above, you can easily do multiparty, something OTR struggles with. For more details: https://whispersystems.org/blog/asynchronous-security/ https://whispersystems.org/blog/private-groups/
In Open Whisper Systems partners with WhatsApp to provide end-to-end encryption

MAKE YOURSELF AT HOME

A few shortcuts

/
Search the collection
?
Open this guide
Esc
Close dialogs and navigation

Your saved repositories and interests stay in this browser.