Skip to content

Commit 0a0308a

Browse files
chore: cleanup around
1 parent 421f3bc commit 0a0308a

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22

33
Repository is currently maintained by current user (transfer from my old to new account)
44

5-
**Gomorph** tries to implement a set of Homomorphic Crypto systems in pure Go-lang
5+
**Gomorph** tries to implement a set of Homomorphic Crypto systems in pure Go-lang
66

7-
* Gaillier is a Golang implementation of [Paillier Cryptosystem](https://www.wikiwand.com/en/Paillier_cryptosystem)
7+
- Gaillier is a Golang implementation of [Paillier Cryptosystem](https://www.wikiwand.com/en/Paillier_cryptosystem)
88

99
## For citations
1010

gaillier/gaillier.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ import (
3030
// The Paillier crypto system picks two keys p & q and denotes n = p*q
3131
// Messages have to be in the ring Z/nZ (integers modulo n)
3232
// Therefore a Message can't be bigger than n
33-
var ErrLongMessage = errors.New("Message is too long for The Public-Key Size \n Message should be smaller than Key size you choose")
33+
var ErrLongMessage = errors.New("message should be smaller than choosen public key size")
3434

3535
var one = big.NewInt(1)
3636

gaillier_test.go renamed to gaillier/gaillier_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package main
1+
package gaillier_test
22

33
import (
44
"crypto/rand"
@@ -151,12 +151,12 @@ func TestMul(t *testing.T) {
151151
}
152152

153153
func BenchmarkEncrypt(b *testing.B) {
154-
pubKey, _, _ := GenerateKeyPair(rand.Reader, 2048)
154+
pubKey, _, _ := gaillier.GenerateKeyPair(rand.Reader, 2048)
155155
val := new(big.Int).SetInt64(int64(1234)).Bytes()
156156

157157
b.ResetTimer()
158158
for i := 0; i < b.N; i++ {
159-
_, err := Encrypt(pubKey, val)
159+
_, err := gaillier.Encrypt(pubKey, val)
160160
if err != nil {
161161
b.Fail()
162162
}

0 commit comments

Comments
 (0)