Polkadot Apps
    Preparing search index...

    Function sealedBoxDecrypt

    • Sealed box decrypt: extract ephemeral public key and nonce, then open with recipient's secret key.

      Input format: ephemeralPubKey(32) || nonce(24) || ciphertext.

      Parameters

      • sealed: Uint8Array

        The sealed message produced by sealedBoxEncrypt.

      • recipientSecretKey: Uint8Array

        The recipient's 32-byte Curve25519 secret key.

      Returns Uint8Array

      The decrypted plaintext bytes.

      If the sealed data is too short, or decryption/authentication fails.