Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Fully Brakerski-Fan-Vercauteren Compliant Homomorphic Encryption Playground Supporting Polynomial Ring Operations, Noise Budgets, Document Indexing with an Encrypted Search Engine, FHE & Small (1024), Medium (2048) & Large (4096) Benchmark Profiles

Notifications You must be signed in to change notification settings

WillKirkmanM/encryption

Open more actions menu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Encryption

Fully Homomorphic Encryption Playground Supporting FHE, Search Engine & Benchmarks

Features

Core FHE Operations

  • BFV Scheme Implementation: Brakerski-Fan-Vercauteren homomorphic encryption
  • Key Generation: Secure public/private key pair generation
  • Homomorphic Operations: Addition and multiplication on encrypted data
  • Noise Management: Gaussian noise for security

Encrypted Search Engine

  • Private Search: Search encrypted documents without revealing queries
  • Term Indexing: Encrypted inverted index for efficient searches
  • Score Ranking: Relevance scoring on encrypted data

Performance Benchmarking

  • Multiple Parameter Sets: Compare different security levels
  • Operation Timing: Measure encryption, decryption, and computation times
  • Memory Usage: Monitor resource consumption

Quick Start

git clone https://github.com/WillKirkmanM/encryption
cd encryption
go run main.go

Architecture

FHE Context (pkg/fhe/context.go)

  • Polynomial ring operations
  • Modular arithmetic
  • Noise budget management
  • Key generation and management

Encrypted Search (pkg/search/encrypted_search.go)

  • Document indexing with encryption
  • Private information retrieval
  • Homomorphic query processing

Security Parameters

Parameter Set Poly Degree Security Level Performance
Small 1024 ~80 bits Fast
Medium 2048 ~128 bits Moderate
Large 4096 ~256 bits Slow

Applications Demonstrated

  1. Private Database Queries: Search without revealing search terms
  2. Secure Computation: Arithmetic on encrypted financial data
  3. Privacy-Preserving Analytics: Statistics on encrypted datasets

Extending the Playground

Adding New Schemes

// Implement different FHE schemes
type BGVContext struct { ... }
type CKKSContext struct { ... } // For approximate arithmetic

Custom Applications

// Add your own encrypted computations
func (ctx *BFVContext) CustomOperation(ct1, ct2 *Ciphertext) (*Ciphertext, error) {
    // Your homomorphic operation here
}

Performance Notes

  • Key Generation: Most expensive operation
  • Multiplication: Increases noise, requires key switching
  • Circuit Depth: Limited by noise budget
  • Parallelisation: Many operations can be vectorized

Integration with Production Libraries

For production use, consider integrating with:

  • Microsoft SEAL (C++ with Go bindings)
  • HElib (C++ library)
  • PALISADE (C++ framework)

Educational Resources

This playground demonstrates:

  • Ring Learning With Errors (RLWE) problem
  • Polynomial modular arithmetic
  • Noise growth in homomorphic operations
  • Trade-offs between security and performance

About

Fully Brakerski-Fan-Vercauteren Compliant Homomorphic Encryption Playground Supporting Polynomial Ring Operations, Noise Budgets, Document Indexing with an Encrypted Search Engine, FHE & Small (1024), Medium (2048) & Large (4096) Benchmark Profiles

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

Morty Proxy This is a proxified and sanitized view of the page, visit original site.