mirror of
https://github.com/tuneinsight/lattigo.git
synced 2025-09-13 03:27:14 +00:00
set release date in CHANGELOG and tests cleaning
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
language: go
|
language: go
|
||||||
|
|
||||||
go:
|
go:
|
||||||
- 1.x
|
- 1.13.x
|
||||||
|
|
||||||
env:
|
env:
|
||||||
- GO111MODULE=on
|
- GO111MODULE=on
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ All notable changes to this project will be documented in this file.
|
|||||||
- Bootstrapping for CKKS.
|
- Bootstrapping for CKKS.
|
||||||
- Network layer implementation of protocols supporting Secure Multiparty Computation (SMC).
|
- Network layer implementation of protocols supporting Secure Multiparty Computation (SMC).
|
||||||
|
|
||||||
## [1.3.0] - 2019-12-01
|
## [1.3.0] - 2019-12-20
|
||||||
### Added
|
### Added
|
||||||
- All schemes : new switching-keys and key-switching algorithm based on the concept presented in https://eprint.iacr.org/2019/688.pdf.
|
- All schemes : new switching-keys and key-switching algorithm based on the concept presented in https://eprint.iacr.org/2019/688.pdf.
|
||||||
- All schemes : new marshaling interface for all structures.
|
- All schemes : new marshaling interface for all structures.
|
||||||
|
|||||||
@@ -714,8 +714,6 @@ func Test_Marshalling(t *testing.T) {
|
|||||||
//now we marshall it
|
//now we marshall it
|
||||||
data, err := KeyGenShareBefore.MarshalBinary()
|
data, err := KeyGenShareBefore.MarshalBinary()
|
||||||
|
|
||||||
fmt.Println("CPK Data (kB) :", len(data)/1000)
|
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Fatal("Could not marshal the CKGShare : ", err)
|
log.Fatal("Could not marshal the CKGShare : ", err)
|
||||||
|
|
||||||
@@ -752,7 +750,6 @@ func Test_Marshalling(t *testing.T) {
|
|||||||
KeySwitchProtocol.GenShare(sk.Get(), pk, Ciphertext, SwitchShare)
|
KeySwitchProtocol.GenShare(sk.Get(), pk, Ciphertext, SwitchShare)
|
||||||
|
|
||||||
data, err := SwitchShare.MarshalBinary()
|
data, err := SwitchShare.MarshalBinary()
|
||||||
fmt.Println("PCKS Data (kB) :", len(data)/1000)
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Print("Error on PCKSShare marshalling : ", err)
|
log.Print("Error on PCKSShare marshalling : ", err)
|
||||||
t.Fail()
|
t.Fail()
|
||||||
@@ -792,7 +789,6 @@ func Test_Marshalling(t *testing.T) {
|
|||||||
cksp.GenShare(skIn.Get(), skOut.Get(), Ciphertext, cksshare)
|
cksp.GenShare(skIn.Get(), skOut.Get(), Ciphertext, cksshare)
|
||||||
|
|
||||||
data, err := cksshare.MarshalBinary()
|
data, err := cksshare.MarshalBinary()
|
||||||
fmt.Println("CKS Data (kB) :", len(data)/1000)
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Print("Error on marshalling CKSShare : ", err)
|
log.Print("Error on marshalling CKSShare : ", err)
|
||||||
t.Fail()
|
t.Fail()
|
||||||
@@ -828,7 +824,6 @@ func Test_Marshalling(t *testing.T) {
|
|||||||
refreshproto.GenShares(sk.Get(), Ciphertext, crs, refreshshare)
|
refreshproto.GenShares(sk.Get(), Ciphertext, crs, refreshshare)
|
||||||
|
|
||||||
data, err := refreshshare.MarshalBinary()
|
data, err := refreshshare.MarshalBinary()
|
||||||
fmt.Println("Refresh Data (kB) :", len(data)/1000)
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Fatal("Could not marshal RefreshShare", err)
|
log.Fatal("Could not marshal RefreshShare", err)
|
||||||
}
|
}
|
||||||
@@ -868,7 +863,6 @@ func Test_Marshalling(t *testing.T) {
|
|||||||
rotProto.GenShare(1, 64, sk.Get(), crp, &rtgShare)
|
rotProto.GenShare(1, 64, sk.Get(), crp, &rtgShare)
|
||||||
|
|
||||||
data, err := rtgShare.MarshalBinary()
|
data, err := rtgShare.MarshalBinary()
|
||||||
fmt.Println("RTG Data (kB) :", len(data)/1000)
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Fatal("could not marshal RTGshare :", err)
|
log.Fatal("could not marshal RTGshare :", err)
|
||||||
}
|
}
|
||||||
@@ -925,12 +919,10 @@ func Test_Relin_Marshalling(t *testing.T) {
|
|||||||
rlk := NewEkgProtocol(params)
|
rlk := NewEkgProtocol(params)
|
||||||
u := rlk.NewEphemeralKey(1 / 3.0)
|
u := rlk.NewEphemeralKey(1 / 3.0)
|
||||||
sk := bfv.NewKeyGenerator(params).GenSecretKey()
|
sk := bfv.NewKeyGenerator(params).GenSecretKey()
|
||||||
log.Print("Starting to test marshalling for share one")
|
|
||||||
|
|
||||||
r1, r2, r3 := rlk.AllocateShares()
|
r1, r2, r3 := rlk.AllocateShares()
|
||||||
rlk.GenShareRoundOne(u, sk.Get(), crp, r1)
|
rlk.GenShareRoundOne(u, sk.Get(), crp, r1)
|
||||||
data, err := r1.MarshalBinary()
|
data, err := r1.MarshalBinary()
|
||||||
fmt.Println("RKG R1 Data (kB) :", len(data)/1000)
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Print("Error in marshalling round 1 key : ", err)
|
log.Print("Error in marshalling round 1 key : ", err)
|
||||||
t.Fail()
|
t.Fail()
|
||||||
@@ -943,8 +935,6 @@ func Test_Relin_Marshalling(t *testing.T) {
|
|||||||
t.Fail()
|
t.Fail()
|
||||||
}
|
}
|
||||||
|
|
||||||
log.Print("Now comparing keys for round 1 ")
|
|
||||||
|
|
||||||
for i := 0; i < (len(r1)); i++ {
|
for i := 0; i < (len(r1)); i++ {
|
||||||
a := r1[i]
|
a := r1[i]
|
||||||
b := (*r1After)[i]
|
b := (*r1After)[i]
|
||||||
@@ -956,13 +946,9 @@ func Test_Relin_Marshalling(t *testing.T) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
log.Print("Sucess : relin key round 1 ok ")
|
|
||||||
|
|
||||||
log.Print("Starting to test marshalling for share two")
|
|
||||||
rlk.GenShareRoundTwo(r1, sk.Get(), crp, r2)
|
rlk.GenShareRoundTwo(r1, sk.Get(), crp, r2)
|
||||||
|
|
||||||
data, err = r2.MarshalBinary()
|
data, err = r2.MarshalBinary()
|
||||||
fmt.Println("RKG R2 Data (kB) :", len(data)/1000)
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Print("Error on marshalling relin key round 2 : ", err)
|
log.Print("Error on marshalling relin key round 2 : ", err)
|
||||||
t.Fail()
|
t.Fail()
|
||||||
@@ -975,8 +961,6 @@ func Test_Relin_Marshalling(t *testing.T) {
|
|||||||
t.Fail()
|
t.Fail()
|
||||||
}
|
}
|
||||||
|
|
||||||
log.Print("Now comparing keys for round 2 ")
|
|
||||||
|
|
||||||
for i := 0; i < (len(r2)); i++ {
|
for i := 0; i < (len(r2)); i++ {
|
||||||
for idx := 0; idx < 2; idx++ {
|
for idx := 0; idx < 2; idx++ {
|
||||||
a := r2[i][idx]
|
a := r2[i][idx]
|
||||||
@@ -991,14 +975,9 @@ func Test_Relin_Marshalling(t *testing.T) {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
log.Print("Success : reling key round 2 ok ")
|
|
||||||
|
|
||||||
log.Print("Starting to test marshalling for share three")
|
|
||||||
|
|
||||||
rlk.GenShareRoundThree(r2, u, sk.Get(), r3)
|
rlk.GenShareRoundThree(r2, u, sk.Get(), r3)
|
||||||
|
|
||||||
data, err = r3.MarshalBinary()
|
data, err = r3.MarshalBinary()
|
||||||
fmt.Println("RKG R3 Data (kB) :", len(data)/1000)
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Print("Error in marshalling round 3 key : ", err)
|
log.Print("Error in marshalling round 3 key : ", err)
|
||||||
t.Fail()
|
t.Fail()
|
||||||
@@ -1011,8 +990,6 @@ func Test_Relin_Marshalling(t *testing.T) {
|
|||||||
t.Fail()
|
t.Fail()
|
||||||
}
|
}
|
||||||
|
|
||||||
log.Print("Now comparing keys for round 3 ")
|
|
||||||
|
|
||||||
for i := 0; i < (len(r3)); i++ {
|
for i := 0; i < (len(r3)); i++ {
|
||||||
a := r3[i]
|
a := r3[i]
|
||||||
b := (*r3After)[i]
|
b := (*r3After)[i]
|
||||||
@@ -1024,10 +1001,6 @@ func Test_Relin_Marshalling(t *testing.T) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
log.Print("Success : relin key for round 3 ok ")
|
|
||||||
|
|
||||||
log.Print("All marshalling is passed for relin keys")
|
|
||||||
})
|
})
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user