Skip to content
Snippets Groups Projects
Commit 50bce5b8 authored by Benjamin Wenger's avatar Benjamin Wenger
Browse files

in progress

parent be42c255
No related branches found
No related tags found
No related merge requests found
......@@ -21,7 +21,7 @@ build:
update_release:
GOFLAGS="" go get -u gitlab.com/elixxir/primitives@release
GOFLAGS="" go get -u gitlab.com/elixxir/crypto@ben/newE2E
GOFLAGS="" go get -u gitlab.com/elixxir/crypto@Optimus/e2e
GOFLAGS="" go get -u gitlab.com/elixxir/comms@release
GOFLAGS="" go get -u gitlab.com/xx_network/comms@release
GOFLAGS="" go get -u gitlab.com/xx_network/primitives@release
......
......@@ -6,26 +6,29 @@ require (
github.com/golang-collections/collections v0.0.0-20130729185459-604e922904d3
github.com/golang/protobuf v1.4.2
github.com/gopherjs/gopherjs v0.0.0-20200217142428-fce0ec30dd00 // indirect
github.com/pelletier/go-toml v1.6.0 // indirect
github.com/mitchellh/mapstructure v1.3.3 // indirect
github.com/pelletier/go-toml v1.8.0 // indirect
github.com/pkg/errors v0.9.1
github.com/smartystreets/assertions v1.0.1 // indirect
github.com/spf13/afero v1.2.2 // indirect
github.com/spf13/afero v1.3.4 // indirect
github.com/spf13/cast v1.3.1 // indirect
github.com/spf13/cobra v1.0.0
github.com/spf13/jwalterweatherman v1.1.0
github.com/spf13/pflag v1.0.5 // indirect
github.com/spf13/viper v1.6.2
github.com/spf13/viper v1.7.1
gitlab.com/elixxir/comms v0.0.0-20200813225502-e879259ca741
gitlab.com/elixxir/crypto v0.0.0-20200811195343-de268a55c7c4
gitlab.com/elixxir/crypto v0.0.0-20200819213855-8d13b999bd00
gitlab.com/elixxir/ekv v0.1.1
gitlab.com/elixxir/primitives v0.0.0-20200812191102-31c01f08b4dc
gitlab.com/xx_network/comms v0.0.0-20200812204124-8dc2a2a1b9ca
gitlab.com/xx_network/comms v0.0.0-20200818182121-732dd75b1947
gitlab.com/xx_network/crypto v0.0.0-20200806235322-ede3c15881ce
gitlab.com/xx_network/primitives v0.0.0-20200812183720-516a65a4a9b2
gitlab.com/xx_network/ring v0.0.2
golang.org/x/crypto v0.0.0-20200728195943-123391ffb6de
golang.org/x/sys v0.0.0-20200806125547-5acd03effb82 // indirect
gopkg.in/ini.v1 v1.52.0 // indirect
golang.org/x/net v0.0.0-20200813134508-3edf25e44fcc // indirect
golang.org/x/sys v0.0.0-20200819171115-d785dc25833f // indirect
google.golang.org/genproto v0.0.0-20200815001618-f69a88009b70 // indirect
gopkg.in/ini.v1 v1.60.0 // indirect
)
replace google.golang.org/grpc => github.com/grpc/grpc-go v1.27.1
This diff is collapsed.
......@@ -2,6 +2,7 @@ package key
import (
"encoding/json"
"github.com/pkg/errors"
"gitlab.com/elixxir/client/storage"
"gitlab.com/elixxir/crypto/cyclic"
"gitlab.com/elixxir/crypto/diffieHellman"
......@@ -288,7 +289,7 @@ func (s *Session) useReKey(keynum uint32) error {
}
// generates keys from the base data stored in the session object.
// required fields: partnerPubKey, confirmed, manager, grp
// required fields: partnerPubKey, manager
// myPrivKey, baseKey, keyState, and ReKeyState will be
// created/calculated if not present
// if keyState is not present lastKey will be ignored and set to zero
......@@ -297,9 +298,18 @@ func (s *Session) generateKeys() error {
s.mux.Lock()
defer s.mux.Unlock()
//if not private key is present, generate one
/*check required fields*/
if s.partnerPubKey == nil {
return errors.New("Session must have a partner public key")
}
if s.manager == nil {
return errors.New("Session must have a manager")
}
/*generate optional fields if not present*/
if s.myPrivKey == nil {
s.myPrivKey, diffieHellman
s.myPrivKey, diffieHellman.
}
return nil
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment