Skip to main content
The Privora client SDKs provide type-safe encryption using the network’s FHE public key.

Supported Types

TypeRangeCiphertext Size
u80-255~10KB
u320-4.2B~40KB
u640-18Q~80KB

Basic Encryption

let encryptor = privora.encryptor();

let encrypted_u8: ClientEncrypted<u8> = encryptor.encrypt(100u8)?;
let encrypted_u32: ClientEncrypted<u32> = encryptor.encrypt(10000u32)?;
let encrypted_u64: ClientEncrypted<u64> = encryptor.encrypt(1000000u64)?;

Batch Encryption

let values = vec![100u8, 200, 50, 75];
let encrypted: Vec<ClientEncrypted<u8>> = encryptor.encrypt_batch(&values)?;

With User Recovery

let encrypted = encryptor.encrypt(100u8)?;
let with_recovery = user_crypto.add_recovery(encrypted, &100u8.to_le_bytes())?;

Submitting Data

let hash: [u8; 32] = privora.submit(&encrypted).await?;

Best Practices

  • Use the smallest type that fits your data
  • Add user recovery for data users need to view locally
  • Batch encryption for multiple values