The blindfold library provides functions for encrypting/decrypting and secret sharing data stored in individual nilDB nodes and nilDB clusters. Blindfold supports store, match, and sum operations across single-node and multi-node configurations with various cryptographic implementations.

LIBRARY IMPLEMENTATIONS

TSTypeScript / JavaScript

npm install @nillion/blindfold

PYPython

pip install blindfold

Demos

42
Encrypt
ajewifoj=
mowfxiwf=
utqowflx=
Decrypt
42

STORE

Encrypt data for secure storage on cluster nodes using authenticated encryption or secret sharing.

TRY IT
Input 1: "gm"
Hash 1
ajewifoj=
mowfxiwf=
utqowflx=
Input 2: "gm"
Hash 2
ajewifoj=
mowfxiwf=
utqowflx=
✓ MATCH

MATCH

Generate deterministic hashes for privacy-preserving search and matching operations.

TRY IT
5
Encrypt →
1879330110
1165721168
3496398601
+
3
Encrypt →
3992899977
419004669
926699802
Encrypted Sum
Node 1 Sum:
1577262776
Node 2 Sum:
1584725837
Node 3 Sum:
128131092
DECRYPTED SUM
8

SUM

Perform secure addition on encrypted integers using homomorphic encryption or secret sharing.

TRY IT

OPERATION REFERENCE

NODESCLUSTEROPERATIONIMPLEMENTATIONSUPPORTED TYPES
single nodestoreXSalsa20 stream cipher + Poly1305 MAC32-bit signed integer; UTF-8 string (4096 bytes)
multiple nodesstoreXOR-based secret sharing32-bit signed integer; UTF-8 string (4096 bytes)
single nodematchdeterministic salted hashing via SHA-51232-bit signed integer; UTF-8 string (4096 bytes)
multiple nodesmatchdeterministic salted hashing via SHA-51232-bit signed integer; UTF-8 string (4096 bytes)
single nodesumnon-deterministic Paillier with 2048-bit primes32-bit signed integer
multiple nodessumadditive secret sharing (no threshold; prime modulus 2^32 + 15)32-bit signed integer
multiple nodessumShamir's secret sharing (with threshold; prime modulus 2^32 + 15)32-bit signed integer

KEY MANAGEMENT

SecretKey

Contains blinding masks for exclusive access control. Requires deterministic seed for reproducible key generation.

ClusterKey

Coordination key without cryptographic material. Used for cluster management and node coordination.