API reference › @evolu/common › Crypto › createSlip21

function createSlip21(
  seed:
    | (Uint8Array<ArrayBufferLike> & Brand<"Entropy"> & Brand<"Length16">)
    | (Uint8Array<ArrayBufferLike> & Brand<"Entropy"> & Brand<"Length24">)
    | (Uint8Array<ArrayBufferLike> & Brand<"Entropy"> & Brand<"Length32">)
    | (Uint8Array<ArrayBufferLike> & Brand<"Entropy"> & Brand<"Length64">)
    | (Uint8Array<ArrayBufferLike> & Brand<"Entropy"> & Brand<"Length20">)
    | (Uint8Array<ArrayBufferLike> & Brand<"Entropy"> & Brand<"Length28">),
  path: readonly (string | number)[],
): Uint8Array<ArrayBufferLike> & Brand<"Entropy"> & Brand<"Length32">;

Defined in: packages/common/src/Crypto.ts:180

Derives a 32-byte key from a seed and a path using SLIP-21.

Derived keys are no stronger than the seed. A 16-byte seed gives 128 bits of security, or about 64 against a quantum computer, whatever the output length. Use a 32-byte random seed for keys that must stay safe against a quantum computer.