{"id":47804093,"url":"https://github.com/dozyio/openfhe-go","last_synced_at":"2026-04-03T17:23:55.733Z","repository":{"id":322164060,"uuid":"1083147806","full_name":"dozyio/openfhe-go","owner":"dozyio","description":"Unofficial Go wrapper for OpenFHE","archived":false,"fork":false,"pushed_at":"2025-12-05T23:58:46.000Z","size":482,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-12-07T22:54:58.609Z","etag":null,"topics":["golang","homomorphic-encryption"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dozyio.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-10-25T12:48:36.000Z","updated_at":"2025-12-05T23:58:49.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/dozyio/openfhe-go","commit_stats":null,"previous_names":["dozyio/openfhe-go"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/dozyio/openfhe-go","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dozyio%2Fopenfhe-go","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dozyio%2Fopenfhe-go/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dozyio%2Fopenfhe-go/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dozyio%2Fopenfhe-go/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dozyio","download_url":"https://codeload.github.com/dozyio/openfhe-go/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dozyio%2Fopenfhe-go/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31365803,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-03T17:13:05.644Z","status":"ssl_error","status_checked_at":"2026-04-03T17:13:04.413Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["golang","homomorphic-encryption"],"created_at":"2026-04-03T17:23:55.110Z","updated_at":"2026-04-03T17:23:55.677Z","avatar_url":"https://github.com/dozyio.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# openfhe-go - unofficial Go wrapper for OpenFHE C++\n\nTarget: OpenFHE v1.4.2\n\n## Features\n\n### Supported Schemes\n- **CKKS**: Approximate arithmetic on encrypted real/complex numbers\n- **BFV**: Exact arithmetic on encrypted integers\n- **BGV**: Exact arithmetic on encrypted integers (SIMD)\n- **BinFHE**: Boolean operations on encrypted bits\n- **Scheme Switching**: Switch between CKKS and FHEW for hybrid operations\n\n### Advanced Operations\n- **Proxy Re-Encryption (PRE)**: Delegate decryption rights without revealing keys\n- **Comparison Operations**: Find min/max values and argmin/argmax indices via scheme switching\n- **Bootstrapping**: CKKS and BinFHE bootstrapping for unlimited depth computations\n- **Function Evaluation**: Evaluate arbitrary smooth functions on encrypted data using Chebyshev approximation\n  - Pre-defined functions: `EvalLogistic`, `EvalSin`, `EvalCos`, `EvalDivide`\n  - Custom functions: `EvalChebyshevFunction` with Go callbacks (any `func(float64) float64`)\n  - Batch optimization: `EvalChebyshevCoefficients` + `EvalChebyshevSeries` for reusing coefficients\n\n## Build\n\n### Quick Start\n\n```bash\n# Development build (fast, uses shared libraries)\nmake build\n\n# Production build (static binary, slower)\nmake build-static\n```\n\n### Build Details\n\nThe project supports two build modes:\n\n#### Development Mode (Default - Shared Libraries)\nFast iteration with shared libraries - ideal for development and testing.\n\n```bash\nmake build          # Build with shared libraries\nmake test           # Run tests\nmake run-examples   # Run all examples\n```\n\n**Build times:**\n- **First-time OpenFHE build**: 3-5 minutes (builds C++ OpenFHE library)\n- **First-time C++ wrapper compilation**: ~2 minutes (CGO compiles C++ wrapper files)\n- **Subsequent Go builds/tests**: \u003c0.1 seconds (Go build cache)\n- **After C++ wrapper changes**: ~2 minutes (only recompiles changed C++ files)\n- **After Go code changes**: \u003c0.1 seconds (doesn't recompile C++)\n- **OpenFHE only**: `make build_openfhe` (builds shared libraries only)\n\nCGO automatically handles compiling the C++ wrapper files and **intelligently caches** them. The cache only invalidates when C++ files actually change, not when Go code changes, providing very fast iteration.\n\n#### Production Mode (Static Libraries)\nStandalone binaries with statically linked OpenFHE - ideal for deployment.\n\n```bash\nmake build-static    # Build with static libraries\n```\n\n**Build times:**\n- **First-time static build**: 3-5 minutes (builds C++ OpenFHE static libraries)\n- **Subsequent static builds**: 30-120 seconds (relinks all static `.a` files)\n- **Static libs only**: `make build_openfhe_static`\n\nStatic builds produce self-contained binaries but are slower due to relinking all libraries on each build.\n\n### Switching Between Build Modes\n\nTo switch from one mode to another, clean the OpenFHE installation:\n\n```bash\nmake clean_openfhe   # Remove OpenFHE build artifacts\nmake build           # Rebuild with desired mode\n```\n\n### Build Requirements\n\nThe Makefile automatically handles:\n- Cloning OpenFHE v1.4.2 source\n- Building and installing OpenFHE C++ libraries\n- Setting appropriate CGO flags for linking\n\nNo additional tools or manual configuration required.\n\n## Run tests\n\n```bash\nmake test\n```\n\n## Run examples\n\n```\nmake run-examples\n```\n\nSee examples and tests for usage\n\n## Examples\n\n### Boolean FHE\n- [x] boolean-ap\n- [x] boolean-lmkcdey\n- [x] boolean-truth-tables\n- [x] boolean\n\n### PKE FHE\n- [x] advanced-real-numbers-128\n- [x] advanced-real-numbers\n- [x] comparison-argmin (min/max with argmin/argmax via scheme switching)\n- [x] function-evaluation (logistic, sin, cos, custom functions, batch optimization)\n- [x] inner-product\n- [x] interactive-bootstrapping\n- [x] iterative-ckks-bootstrapping\n- [x] linearwsum-evaluation\n- [x] plaintext-operations\n- [x] polynomial-evaluation\n- [x] pre-buffer\n- [x] pre-hra-secure\n- [x] rotation\n- [x] scheme-switching\n- [x] simple-ckks-bootstrapping\n- [x] simple-complex-numbers (complex number operations and bootstrapping)\n- [x] simple-integers-bgvrns\n- [x] simple-integers-serial-bgvrns\n- [x] simple-integers-serial\n- [x] simple-integers\n- [x] simple-real-numbers-serial\n- [x] simple-real-numbers\n- [x] tckks-interactive-mp-bootstrapping-Chebyschev\n- [x] tckks-interactive-mp-bootstrapping\n- [x] threshold-fhe-5p\n- [x] threshold-fhe\n\n## Links\n\n* https://openfhe.org/\n* https://github.com/openfheorg/openfhe-development\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdozyio%2Fopenfhe-go","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdozyio%2Fopenfhe-go","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdozyio%2Fopenfhe-go/lists"}