forked from tuneinsight/lattigo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
dckks.go
39 lines (33 loc) · 1.8 KB
/
dckks.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
// Package dckks implements a distributed (or threshold) version of the CKKS scheme that
// enables secure multiparty computation solutions.
// See `drlwe/README.md` for additional information on multiparty schemes.
package dckks
import (
"github.com/jzhchu/lattigo/ckks"
"github.com/jzhchu/lattigo/drlwe"
)
// NewCKGProtocol creates a new drlwe.CKGProtocol instance from the CKKS parameters.
// The returned protocol instance is generic and can be used in other multiparty schemes.
func NewCKGProtocol(params ckks.Parameters) *drlwe.CKGProtocol {
return drlwe.NewCKGProtocol(params.Parameters)
}
// NewRKGProtocol creates a new drlwe.RKGProtocol instance from the CKKS parameters.
// The returned protocol instance is generic and can be used in other multiparty schemes.
func NewRKGProtocol(params ckks.Parameters) *drlwe.RKGProtocol {
return drlwe.NewRKGProtocol(params.Parameters)
}
// NewRTGProtocol creates a new drlwe.RTGProtocol instance from the CKKS parameters.
// The returned protocol instance is generic and can be used in other multiparty schemes.
func NewRTGProtocol(params ckks.Parameters) *drlwe.RTGProtocol {
return drlwe.NewRTGProtocol(params.Parameters)
}
// NewCKSProtocol creates a new drlwe.CKSProtocol instance from the CKKS parameters.
// The returned protocol instance is generic and can be used in other multiparty schemes.
func NewCKSProtocol(params ckks.Parameters, sigmaSmudging float64) *drlwe.CKSProtocol {
return drlwe.NewCKSProtocol(params.Parameters, sigmaSmudging)
}
// NewPCKSProtocol creates a new drlwe.PCKSProtocol instance from the CKKS paramters.
// The returned protocol instance is generic and can be used in other multiparty schemes.
func NewPCKSProtocol(params ckks.Parameters, sigmaSmudging float64) *drlwe.PCKSProtocol {
return drlwe.NewPCKSProtocol(params.Parameters, sigmaSmudging)
}