Crypto Lib
    Preparing search index...

    Class DoubleRatchet

    Double Ratchet providing forward secrecy and break-in recovery.

    Combines:

    • A root chain that advances on each DH ratchet step
    • Sending/receiving symmetric chains for per-message keys
    • DH ratchet steps when receiving a new public key
    Index
    • Initialize a Double Ratchet as the responder (Bob).

      Parameters

      • sharedSecret: string

        Initial shared secret from PQXDH (hex, 32 bytes).

      • ourRatchetKeyPair: { privateKey: string; publicKey: string }

        Bob's initial ratchet key pair {privateKey, publicKey} (hex).

      Returns DoubleRatchet