Browse Source

add travis

arnaucube 4 years ago
parent
commit
e6e21d177d
3 changed files with 26 additions and 3 deletions
  1. +8
    -0
      .travis.yml
  2. +2
    -1
      README.md
  3. +16
    -2
      paillier/paillier_test.go

+ 8
- 0
.travis.yml

@ -0,0 +1,8 @@
language: go
go:
- "1.12"
env:
- GO111MODULE=on

+ 2
- 1
README.md

@ -1,4 +1,5 @@
# cryptofun [![Go Report Card](https://goreportcard.com/badge/github.com/arnaucube/cryptofun)](https://goreportcard.com/report/github.com/arnaucube/cryptofun)
# cryptofun [![Go Report Card](https://goreportcard.com/badge/github.com/arnaucube/cryptofun)](https://goreportcard.com/report/github.com/arnaucube/cryptofun) [![Build Status](https://travis-ci.org/arnaucube/cryptofun.svg?branch=master)](https://travis-ci.org/arnaucube/cryptofun)
Crypto algorithms from scratch. Academic purposes only.

+ 16
- 2
paillier/paillier_test.go

@ -24,8 +24,22 @@ func TestEncryptDecrypt(t *testing.T) {
}
func TestHomomorphicAddition(t *testing.T) {
key, err := GenerateKeyPair()
assert.Nil(t, err)
// key, err := GenerateKeyPair()
// assert.Nil(t, err)
// key harcoded for tests
pubK := PublicKey{
N: big.NewInt(204223),
G: big.NewInt(24929195694),
}
privK := PrivateKey{
Lambda: big.NewInt(101660),
Mu: big.NewInt(117648),
}
key := Key{
PubK: pubK,
PrivK: privK,
}
n1 := big.NewInt(int64(110))
n2 := big.NewInt(int64(150))

Loading…
Cancel
Save