Crate fhe_dksap

Source
Expand description

§FHE-DKSAP: Fully Homomorphic Encryption Dual-Key Stealth Address Protocol

This library implements a privacy-preserving stealth address protocol for Ethereum using Fully Homomorphic Encryption (FHE). The protocol allows senders to create stealth addresses that only the intended receiver can spend from, while maintaining privacy of both parties.

§Overview

The FHE-DKSAP protocol combines:

  • Dual-Key Stealth Address Protocol (DKSAP): A privacy-preserving address generation scheme
  • Fully Homomorphic Encryption (FHE): Enables computation on encrypted data without decryption
  • secp256k1: The elliptic curve used by Ethereum for key generation and signing

§Dependencies

  • tfhe: Fully Homomorphic Encryption library
  • secp256k1: Elliptic curve cryptography for Ethereum compatibility
  • sha3: Cryptographic hash functions for address generation

§Performance Considerations

FHE operations are computationally expensive. The library is designed for privacy-critical applications where the computational overhead is acceptable for enhanced privacy guarantees.

§Security Notes

  • FHE keys should be generated with appropriate security parameters
  • New Stealth Addresses should be generated for each transaction basis

Modules§

utils

Structs§

EthereumKeyPair
A pair of secp256k1 keys for Ethereum operations.
FheKeyPair
A pair of FHE keys for encrypted operations.
StealthAddress
A stealth address with associated encrypted data.

Enums§

FheDKSAPError
Errors that can occur during FHE-DKSAP operations.

Functions§

combine_public_keys
Combines two secp256k1 public keys using elliptic curve point addition.
encrypt_secret_key
Encrypts a secp256k1 secret key using FHE.
generate_ethereum_key_pair
Generates a new secp256k1 key pair for Ethereum operations.
generate_fhe_key_pair
Generates a new FHE key pair for encrypted operations.
generate_stealth_address
Generates a stealth address for a receiver using their public keys.
recover_secret_key
Recovers the private key for a stealth address using FHE operations.

Type Aliases§

FheDKSAPResult
Result type for FHE-DKSAP operations.