kernl API
    Preparing search index...

    Function createFallbackSubtle

    • Build a SubtleCrypto backed by audited pure-JS primitives, for a page the browser does not consider a secure context (plain HTTP over Tor or another overlay network), where crypto.subtle is undefined.

      Covers what the shell's dependencies call: digest (SHA-1/256/384/512); HMAC and Ed25519 sign/verify; AES-GCM (128-bit tag) and AES-CBC encrypt/decrypt; X25519 and HKDF deriveBits; Ed25519 and X25519 keys in raw, pkcs8 and jwk; AES and HMAC keys in raw and jwk. Anything else rejects with NotSupportedError.

      Returns SubtleCrypto

      A SubtleCrypto whose keys only work with this instance.

      const subtle = createFallbackSubtle();
      const hash = await subtle.digest('SHA-256', new TextEncoder().encode('kernl'));