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:
- The guide refers to a "root key"
RK, and an output of aDHas parameters to the functionKDF_RK(rk, dh_out), but I need to know what is this root key and how it must be initialized the first time. - I see that
KDF_RK(rk, dh_out)andKDF_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