Double Ratchet algorithm