Imagine if everything you did online was completely translucent and publicly available. Your bank account balance, health records, text messages–all readable to anyone with an internet connection.
Sounds crazy, but that’s how Ethereum currently works.
CoFHE is a privacy tool for Ethereum that lets you add encrypted data handling to your smart contracts with just one Solidity import. It operates off-chain for scalable performance and works seamlessly on any EVM-compatible network.
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.18;
contract SimpleCounter {
address owner;
uint256 counter;
modifier onlyOwner() {
require(msg.sender == owner, "Only the owner can increment or decrement the counter");
_;
}
constructor(uint initial_value) {
owner = msg.sender;
counter = initial_value;
}
modifier onlyOwner() {
require(msg.sender == owner, "Only the owner can increment or decrement the counter");
_;
}
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.18;
import {FHE, euint64, InEuint64} from "@fhenixprotocol/cofhe-contracts/FHE.sol";
contract SimpleCounter {
address owner;
euint64 counter;
euint64 lastDecryptedCounter;
euint64 step;
modifier onlyOwner() {
require(msg.sender == owner, "Only the owner can access that function");
_;
}
constructor(uint64 initial_value) {
owner = msg.sender;
counter = FHE.asEuint64(initial_value);
FHE.allowThis(counter);
// Encrypt the value 1 only once instead of every value change
step = FHE.asEuint64(1);
FHE.allowThis(step);
}
function increment_counter() external onlyOwner {
counter = FHE.add(counter, step);
FHE.allowThis(counter);
}
function decrement_counter() external onlyOwner {
counter = FHE.sub(counter, step);
FHE.allowThis(counter);
}
function decrypt_counter() external onlyOwner {
lastDecryptedCounter = counter;
FHE.decrypt(lastDecryptedCounter);
}
function get_counter_value() external view returns(uint256) {
(uint256 value, bool decrypted) = FHE.getDecryptResultSafe(lastDecryptedCounter);
if (!decrypted)
revert("Value is not ready");
return value;
}
}
Keep transaction details completely private while preserving verifiable correctness on-chain
FHE locks game logic so no player can reverse-engineer or manipulate data, ensuring a level playing field.
Train Al models on sensitive datasets without revealing a single byte of raw data, or risking detrimental data leaks
Fully Homomorphic Encryption (FHE) is an advanced cryptographic method that allows computations to be performed directly on encrypted data. The results of these computations remain encrypted and can only be decrypted by an authorized party. This enables privacy-preserving applications where data confidentiality is critical, such as private smart contracts, confidential transactions, and secure AI processing.
Fhenix is an FHE research and development company building scalable, real-world applications of Fully Homomorphic Encryption (FHE) for Ethereum. Our mission is to make encrypted computation feel native to Web3 developers — no cryptography PhD required.
At the core, we’re taking groundbreaking cryptographic research and packaging it into practical infrastructure: from Solidity libraries for encrypted variables, to an FHE Coprocessor that handles private computation off-chain.
The FHE Coprocessor (CoFHE) is an off-chain computation layer designed to process encrypted data securely. It offloads heavy cryptographic operations from the main blockchain (e.g., Ethereum or Layer 2 solutions) to enhance efficiency, scalability, and privacy without compromising decentralization.
Traditional smart contracts require all data to be public on-chain, which limits their ability to handle sensitive information. FHE changes this paradigm by allowing decentralized applications to process private data, unlocking new use cases in finance, healthcare, AI, and beyond.
Yes! CoFHE is designed to be EVM-compatible, allowing developers to integrate it seamlessly with Ethereu, Layer 2, and Layer 3 rollups. It provides Solidity support and is built to work with existing smart contract infrastructure.
ZK lets you prove something is true without revealing the underlying data — it’s built for verification. But when you need to actually use the data (like add it, compare it, or run logic on it), ZK hits a limit.
FHE is built for computation. It lets you perform operations directly on encrypted data, so the data stays private the entire time — not just during proof, but throughout the entire process. Think of it this way: ZK says “I know the answer.” FHE says “I can compute the answer, without ever seeing the question.”