#double ratchet algorithm