Skip to main content

Module nip44

Module nip44 

Source
Expand description

NIP-44 encryption using a raw ECDH shared secret.

This module implements NIP-44 v2 encryption/decryption for use with threshold ECDH, where the shared secret is computed via distributed key operations rather than from a single private key.

Functions§

decrypt
Decrypt a NIP-44 v2 payload using a raw ECDH shared secret.
decrypt_v3
Decrypt a NIP-44 v3 payload, verifying the (kind, scope) context binds to the caller’s expectations. Returns the plaintext.
encrypt
Encrypt plaintext using NIP-44 v2 with a raw ECDH shared secret.
encrypt_v3
Encrypt with NIP-44 v3 using a raw ECDH shared secret. kind/scope are authenticated into the payload. Returns the raw payload (pre-base64).