Lattigo简介:Go语言的格基多方同态加密库

Lattigo

https://github.com/tuneinsight/lattigo

Lattigo: lattice-based multiparty homomorphic encryption library in Go

Lattigo实现了基于RLWE的同态加密方案以及基于同态加密的多方安全计算协议。Lattigo使用go语言实现。Lattigo 旨在支持分布式系统和微服务架构中的 HE,选用go是因为其并发模型和可移植性。

基于Lattice代数结构的Go同态加密库

Lattigo是一个Go软件包,实现了基于格的加密原语。该库功能:

  • 纯Go实施,带来代码简单性和易于构建。
  • 一个有效的多精度多项式算术层的公共接口。
  • 与最先进的C ++库可比的性能。

Lattigo的目标是通过利用Go的自然并发模型,实现基于分布式同态密码系统的安全多方计算解决方案的快速原型设计。

Lattigo是一个Go软件包,实现了基于Ring-Learning-With-Errors的同态加密基元和基于Multiparty-Homorphic-Encryption的安全协议。该库的特点是

  • 实现了全RNS的BFV、BGV和CKKS方案以及它们各自的多方版本。
  • 与最先进的C++库的性能相媲美。
  • 为全RNS CKKS提供密集密钥和稀疏密钥的高效和高精度引导程序。
  • 纯粹的Go实现,可以实现跨平台构建,包括为浏览器客户端进行WASM编译。

Lattigo旨在支持分布式系统和微服务架构中的HE,由于其自然的并发模型和可移植性,Go是一个常见的选择。

Library overview

该库包含以下子包:

  • lattigo/ring:RNS加速的多项式模块化算术运算,包括:RNS基数扩展;RNS重新缩放;数论变换(NTT); 均匀,高斯和三元采样。
  • lattigo/bfv:Brakerski的尺度不变同态加密方案的RNS加速Fan-Vercauteren版本。它提供了整数的模运算。
  • lattigo/ckks:RNS加速版的近似数字同态加密(HEAAN,又名CKKS)方案。它提供了复数的近似算术。
  • lattigo/dbfvlattigo/dckks:BFV和CKKS方案的分布式(或阈值)版本,可使用共享的秘密密钥实现安全的多方计算解决方案。
  • lattigo/examples:可执行的Go程序,演示了Lattigo库的用法。请注意,每个子包都包含测试文件,这些文件进一步演示了Lattigo基元的用法。
  • lattigo/utils:支持的结构和功能。

Lattigo is a Go module that implements Ring-Learning-With-Errors-based homomorphic-encryption primitives and Multiparty-Homomorphic-Encryption-based secure protocols. The library features:

  • An implementation of the full-RNS BFV, BGV and CKKS schemes and their respective multiparty versions.
  • Comparable performance to state-of-the-art C++ libraries.
  • Dense-key and sparse-key efficient and high-precision bootstrapping procedures for full-RNS CKKS.
  • A pure Go implementation that enables cross-platform builds, including WASM compilation for
    browser clients.

Lattigo is meant to support HE in distributed systems and microservices architectures, for which Go
is a common choice thanks to its natural concurrency model and portability.

Library overview

The library exposes the following packages:

  • lattigo/ring: Modular arithmetic operations for polynomials in the RNS basis, including: RNS
    basis extension; RNS rescaling; number theoretic transform (NTT); uniform, Gaussian and ternary
    sampling.

  • lattigo/bfv: The Full-RNS variant of the Brakerski-Fan-Vercauteren scale-invariant homomorphic
    encryption scheme. It provides modular arithmetic over the integers.

  • lattigo/bgv: The Full-RNS variant of the Brakerski-Gentry-Vaikuntanathan homomorphic
    encryption scheme. It provides modular arithmetic over the integers.

  • lattigo/ckks: The Full-RNS Homomorphic Encryption for Arithmetic for Approximate Numbers (HEAAN,
    a.k.a. CKKS) scheme. It provides approximate arithmetic over the complex numbers (in its classic
    variant) and over the real numbers (in its conjugate-invariant variant).

  • lattigo/dbfv, lattigo/dbgv and lattigo/dckks: Multiparty (a.k.a. distributed or threshold)
    versions of the BFV, BGV and CKKS schemes that enable secure multiparty computation solutions with
    secret-shared secret keys.

  • lattigo/rlwe and lattigo/drlwe: common base for generic RLWE-based multiparty homomorphic
    encryption. It is imported by the lattigo/bfv, lattigo/bgv and lattigo/ckks packages.

  • lattigo/examples: Executable Go programs that demonstrate the use of the Lattigo library. Each
    subpackage includes test files that further demonstrate the use of Lattigo
    primitives.

  • lattigo/utils: Supporting structures and functions.

  • 1
    点赞
  • 5
    收藏
    觉得还不错? 一键收藏
  • 2
    评论
gocryptfs 是一个使用 Go 开发的,加密的覆盖文件系统。gocryptfs 基于 go-fuse FUSE 和其 LoopbackFileSystem API 构建。gocryptfs 灵感来源于 EncFS,修复了其安全问题,提供更好的性能。gocryptfs 当前只支持 Linux 系统,以后会继续支持 OS X。安装:$ go get github.com/rfjakob/gocryptfs使用:$ mkdir cipher plain $ $GOPATH/bin/gocryptfs --init cipher   [...] $ $GOPATH/bin/gocryptfs cipher plain   [...] $ echo test > plain/test.txt $ ls -l cipher   total 8   -rw-rw-r--. 1 user  user   33  7. Okt 23:23 0ao8Hyyf1A-A88sfNvkUxA==   -rw-rw-r--. 1 user  user  233  7. Okt 23:23 gocryptfs.conf $ fusermount -u plain性能:./benchmark.bash gocryptfs v0.3.1-30-gd69e0df-dirty; on-disk format 2 PASS BenchmarkStreamWrite-2       100      12246070 ns/op      85.63 MB/s BenchmarkStreamRead-2        200       9125990 ns/op     114.90 MB/s BenchmarkCreate0B-2        10000        101284 ns/op BenchmarkCreate1B-2        10000        178356 ns/op       0.01 MB/s BenchmarkCreate100B-2       5000        361014 ns/op       0.28 MB/s BenchmarkCreate4kB-2        5000        375035 ns/op      10.92 MB/s BenchmarkCreate10kB-2       3000        491071 ns/op      20.85 MB/s ok      github.com/rfjakob/gocryptfs/integration_tests  17.216s 标签:文件加密
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值