What is FHE?
Fully Homomorphic Encryption (FHE) is a breakthrough in cryptography that allows computations on encrypted data without ever decrypting it.blockmsg uses Zama’s fhEVM to bring FHE to the blockchain.
The Encryption Process
1
Message Chunking
Your message is split into 32-bit segments in your browser
2
FHE Encryption
Each chunk is encrypted using
TFHE.asEuint32 - plaintext never leaves your device3
On-Chain Storage
Encrypted handles are stored on the Zama fhEVM blockchain
4
Recipient Decryption
Recipient signs with wallet → re-encryption → local decryption
Smart Contract Architecture
SecretCircles Contract
SecretCircles Contract
The main contract handles:
- Storing FHE-encrypted messages
- Managing DM channels between wallets
- Self-destruct timer logic
- Access control for decryption
Data Structure
Data Structure
Self-Destructing Messages
Set a timer on your messages. Once expired, the smart contract returns an empty array - the message becomes permanently unreadable.| Timer | Use Case |
|---|---|
| 5 minutes | Quick sensitive info |
| 1 hour | Short-term coordination |
| 12 hours | Day-limited conversations |
| 24 hours | Daily check-ins |
| 7 days | Weekly updates |
Technical Stack
fhEVM by Zama
Fully Homomorphic Encryption virtual machine
Solidity
Smart contracts for encrypted message management
Next.js
Frontend application framework
fhevmjs
Client-side FHE encryption library