Alice Bob R[0] = HKDF(0, S)R[0] = HKDF(0, S)generate new ratchet keypair T[0]R[0](msg0), T[0]R[0](msg1), T[0]R[0](msg2), T[0]generate new ratchet keypair T[1]R[1] = HKDF(R[0], DH(T[1], T[0]))R[1](msg3), T[1]R[1] = HKDF(R[0], DH(T[0], T[1]))R[1](msg4), T[1]R[1](msg5), T[1]generate new ratchet keypair T[2]R[2] = HKDF(R[1], DH(T[2], T[1]))R[2](msg6), T[2]R[2] = HKDF(R[1], DH(T[1], T[2]))where:  S is the shared secret derived from the 3ECDH exchange  R[n] is a root key  T[n] is a ratchet keypair  HKDF(salt, key) means performing an HMAC-based key derivation with a salt value of salt and input key material of key  DH(k1, k2) means performing Diffie-Hellman with the private half of k1 and the public half of k2  R[n](msg) means a message encrypted with a key derived from root key R[n]