Coset is a developer community focused on driving innovation at the forefront of crypto technology.
Coset is a developer community focused on driving innovation at the forefront of crypto technology.

Subscribe to coset

Subscribe to coset
Share Dialog
Share Dialog
<100 subscribers
<100 subscribers
We've implemented a new approach to Schnorr signatures using Fully Homomorphic Encryption (FHE), allowing cryptographic signing while maintaining complete encryption of the private key throughout the entire process. This implementation leverages Zama.ai's TFHE-rs library, which enables computation on encrypted data.
Want to explore the implementation? Check out our code on GitHub.
The traditional cryptographic signing process requires access to unencrypted private keys during operations, creating potential security vulnerabilities. Our solution addresses this by:
Keeping the private key encrypted during signing operations
Maintaining compatibility with the BIP-340 Schnorr signature standard
This project isn't meant to solve an immediate practical problem - it's an exploration into the possibilities of Fully Homomorphic Encryption (FHE). While the current implementation may not be production-ready due to performance constraints, it serves as a proof of concept and learning tool.
Demonstrates practical application of FHE in cryptographic protocols
Shows how traditional algorithms can be adapted to work with encrypted data
Helps understand real-world limitations and challenges of FHE
Provides a starting point for others to build upon
The true value lies in its potential to inspire others. As FHE technology continues to evolve and become more efficient, explorations like this could serve as stepping stones for future practical applications. If this project inspires even one person to explore novel uses of FHE or think differently about cryptographic protocols, it will have served its purpose.
The project is structured into several key components:
Secp256k1 Implementation: An implementation of the secp256k1 elliptic curve focused on essential operations for Schnorr signatures.
Field Arithmetic: Implementation of finite field operations optimized for our use case.
BigUint Arithmetic: Custom BigUint implementation with FHE support for Secp256k1 point operations.
Schnorr Signatures: An implementation following the BIP-340 specification with FHE supported.
Using TFHE-rs, we're able to perform arithmetic operations on encrypted data. The private key remains encrypted throughout the entire signing process, significantly enhancing security and enable the outsource computation for private key.
FHE operations are computationally intensive. The entire signing time of Schnorr signature takes 4269 seconds (about 71 minutes). While this might seem long, it's important to note that this is a proof-of-concept implementation focusing on exploration rather than performance optimization.
To better understand the time breakdown, here are the single operations:
add: 25.965747001s
mul: 76.051254698s
shift: 45.566019345s
cast: 135.023µs
min: 25.71097148s
and: 6.418014644s
div: 1121.134781795s
decrypt: 186.764µs
decrypt div: 529.511µs
float div: 30ns
These measurements were taken on AWS c5.24xlarge (96 vCPU, 192 GB memory), providing a robust environment for FHE computations. Even with such powerful hardware, the operations remain time-intensive, highlighting both the current limitations and the potential for optimization in FHE technology.
Note we did not enable the configuration as Zama FHEVM paper did, so the timing is not as good as them.
This project wouldn't have been possible without TFHE-rs, the powerful Fully Homomorphic Encryption library developed by Zama.ai. Their implementation provides:
High-performance FHE operations
Easy-to-use Rust interface
Robust security guarantees
Excellent documentation and community support
While this implementation proves the concept, there are several areas for future improvement:
Performance optimization for FHE operations
Integration with GPU acceleration
Implementation of batch signing operations
Development of additional cryptographic primitives using FHE
FHE-Sign demonstrates that it's possible to perform cryptographic operations while maintaining the privacy of sensitive keys through homomorphic encryption. While the performance overhead is significant, the security benefits make this approach worth considering for high-security applications.
The code is available on GitHub, and we welcome contributions from the community. Special thanks again to Zama.ai for their excellent TFHE-rs library, which made this project possible.
This project is for educational purposes only. For production use, please conduct thorough security audits and performance testing.
Website:https://coset.io/
Twitter:https://twitter.com/coset_io
Telegram:https://t.me/coset_io
Youtube:www.youtube.com/@coset_io
Contact:emily@coset.io
We've implemented a new approach to Schnorr signatures using Fully Homomorphic Encryption (FHE), allowing cryptographic signing while maintaining complete encryption of the private key throughout the entire process. This implementation leverages Zama.ai's TFHE-rs library, which enables computation on encrypted data.
Want to explore the implementation? Check out our code on GitHub.
The traditional cryptographic signing process requires access to unencrypted private keys during operations, creating potential security vulnerabilities. Our solution addresses this by:
Keeping the private key encrypted during signing operations
Maintaining compatibility with the BIP-340 Schnorr signature standard
This project isn't meant to solve an immediate practical problem - it's an exploration into the possibilities of Fully Homomorphic Encryption (FHE). While the current implementation may not be production-ready due to performance constraints, it serves as a proof of concept and learning tool.
Demonstrates practical application of FHE in cryptographic protocols
Shows how traditional algorithms can be adapted to work with encrypted data
Helps understand real-world limitations and challenges of FHE
Provides a starting point for others to build upon
The true value lies in its potential to inspire others. As FHE technology continues to evolve and become more efficient, explorations like this could serve as stepping stones for future practical applications. If this project inspires even one person to explore novel uses of FHE or think differently about cryptographic protocols, it will have served its purpose.
The project is structured into several key components:
Secp256k1 Implementation: An implementation of the secp256k1 elliptic curve focused on essential operations for Schnorr signatures.
Field Arithmetic: Implementation of finite field operations optimized for our use case.
BigUint Arithmetic: Custom BigUint implementation with FHE support for Secp256k1 point operations.
Schnorr Signatures: An implementation following the BIP-340 specification with FHE supported.
Using TFHE-rs, we're able to perform arithmetic operations on encrypted data. The private key remains encrypted throughout the entire signing process, significantly enhancing security and enable the outsource computation for private key.
FHE operations are computationally intensive. The entire signing time of Schnorr signature takes 4269 seconds (about 71 minutes). While this might seem long, it's important to note that this is a proof-of-concept implementation focusing on exploration rather than performance optimization.
To better understand the time breakdown, here are the single operations:
add: 25.965747001s
mul: 76.051254698s
shift: 45.566019345s
cast: 135.023µs
min: 25.71097148s
and: 6.418014644s
div: 1121.134781795s
decrypt: 186.764µs
decrypt div: 529.511µs
float div: 30ns
These measurements were taken on AWS c5.24xlarge (96 vCPU, 192 GB memory), providing a robust environment for FHE computations. Even with such powerful hardware, the operations remain time-intensive, highlighting both the current limitations and the potential for optimization in FHE technology.
Note we did not enable the configuration as Zama FHEVM paper did, so the timing is not as good as them.
This project wouldn't have been possible without TFHE-rs, the powerful Fully Homomorphic Encryption library developed by Zama.ai. Their implementation provides:
High-performance FHE operations
Easy-to-use Rust interface
Robust security guarantees
Excellent documentation and community support
While this implementation proves the concept, there are several areas for future improvement:
Performance optimization for FHE operations
Integration with GPU acceleration
Implementation of batch signing operations
Development of additional cryptographic primitives using FHE
FHE-Sign demonstrates that it's possible to perform cryptographic operations while maintaining the privacy of sensitive keys through homomorphic encryption. While the performance overhead is significant, the security benefits make this approach worth considering for high-security applications.
The code is available on GitHub, and we welcome contributions from the community. Special thanks again to Zama.ai for their excellent TFHE-rs library, which made this project possible.
This project is for educational purposes only. For production use, please conduct thorough security audits and performance testing.
Website:https://coset.io/
Twitter:https://twitter.com/coset_io
Telegram:https://t.me/coset_io
Youtube:www.youtube.com/@coset_io
Contact:emily@coset.io
No activity yet