Implementing the Double Ratchet algorithm

258 views Asked by At

I'm trying to implement from scratch the Double Ratchet algorithm using this as my guide, however I am not an expert of crypto stuff, thus some things are quite unclear:

  1. The guide refers to a "root key" RK, and an output of a DH as parameters to the function KDF_RK(rk, dh_out), but I need to know what is this root key and how it must be initialized the first time.
  2. I see that KDF_RK(rk, dh_out) and KDF_CK(ck) are based on the HKDF cryptographic function: can someone make a drawing in order to make me better understand how those functions work? It is enough a simulation of a typical execution between Alice and Bob in a pseudo code fashion.

Thank you

0

There are 0 answers