@sovereignbase/cryptosuite
    Preparing search index...

    Class KeyAgreementCluster

    Routes key agreement operations through cached harness instances.

    Index
    • Decapsulates a shared cipher key from the provided key offer.

      Parameters

      • keyOffer: { ciphertext: Uint8Array }

        The encapsulated key offer artifact.

        • ciphertext: Uint8Array

          The encapsulated shared-secret artifact emitted by a supported key agreement algorithm.

      • decapsulateKey: DecapsulateKey

        The private key agreement key.

        • JsonWebKey & { k?: undefined } & {
              alg: "ML-KEM-1024";
              d: string;
              key_ops: readonly ("deriveBits" | "deriveKey")[];
              kty: "AKP";
              use: "enc";
          }
        • JsonWebKey & { k?: undefined } & {
              alg: "X25519-ML-KEM-768";
              d: string;
              key_ops: readonly ("deriveBits" | "deriveKey")[];
              kty: "AKP";
              use: "enc";
          }

      Returns Promise<{ cipherKey: CipherKey }>

      The reconstructed cipher key.

    • Encapsulates a shared cipher key for the provided public key agreement key.

      Parameters

      • encapsulateKey: EncapsulateKey

        The public key agreement key.

        • JsonWebKey & { k?: undefined } & {
              d?: undefined;
              dp?: undefined;
              dq?: undefined;
              oth?: undefined;
              p?: undefined;
              q?: undefined;
              qi?: undefined;
          } & {
              alg: "ML-KEM-1024";
              key_ops: readonly [];
              kty: "AKP";
              use: "enc";
              x: string;
          }
        • JsonWebKey & { k?: undefined } & {
              d?: undefined;
              dp?: undefined;
              dq?: undefined;
              oth?: undefined;
              p?: undefined;
              q?: undefined;
              qi?: undefined;
          } & {
              alg: "X25519-ML-KEM-768";
              key_ops: readonly [];
              kty: "AKP";
              use: "enc";
              x: string;
          }

      Returns Promise<{ cipherKey: CipherKey; keyOffer: { ciphertext: Uint8Array } }>

      The key offer and the locally reconstructed cipher key.