diff --git a/Makefile b/Makefile index f6f3f20df5836feb875bae0468d66e865fedde58..d5550fc19187f6127993251780520dc2b654b8ea 100644 --- a/Makefile +++ b/Makefile @@ -20,8 +20,8 @@ build: go mod tidy update_release: - GOFLAGS="" go get -u gitlab.com/elixxir/primitives@ben/newSwitchboard - GOFLAGS="" go get -u gitlab.com/elixxir/crypto@Optimus-E2E + GOFLAGS="" go get -u gitlab.com/elixxir/primitives@peppa/newClient + GOFLAGS="" go get -u gitlab.com/elixxir/crypto@peppa/newClient GOFLAGS="" go get -u gitlab.com/xx_network/crypto@release GOFLAGS="" go get -u gitlab.com/elixxir/comms@release GOFLAGS="" go get -u gitlab.com/xx_network/comms@release diff --git a/go.mod b/go.mod index a2317ff6ad983393775bb4f6c17e146daab7fd5e..deaa53cd4a7358d2952e01ae2ee7871b888919fc 100644 --- a/go.mod +++ b/go.mod @@ -15,10 +15,10 @@ require ( github.com/spf13/jwalterweatherman v1.1.0 github.com/spf13/pflag v1.0.5 // indirect github.com/spf13/viper v1.6.2 - gitlab.com/elixxir/comms v0.0.0-20200825195434-49150e0605d8 - gitlab.com/elixxir/crypto v0.0.0-20200826034538-c67fec536436 + gitlab.com/elixxir/comms v0.0.0-20200827170208-d1f872422b7e + gitlab.com/elixxir/crypto v0.0.0-20200827170914-14227f20900c gitlab.com/elixxir/ekv v0.0.0-20200729182028-159355ea5842 - gitlab.com/elixxir/primitives v0.0.0-20200826021242-53c364245a52 + gitlab.com/elixxir/primitives v0.0.0-20200827170420-5d50351f99b4 gitlab.com/xx_network/comms v0.0.0-20200825213037-f58fa7c0a641 gitlab.com/xx_network/crypto v0.0.0-20200812183430-c77a5281c686 gitlab.com/xx_network/primitives v0.0.0-20200812183720-516a65a4a9b2 diff --git a/go.sum b/go.sum index 2a3f307a1065ada55e7b522b2e20d085f57cc043..82f8a662ac7c0046625f9e8c364c386ed5587c10 100644 --- a/go.sum +++ b/go.sum @@ -167,6 +167,8 @@ gitlab.com/elixxir/comms v0.0.0-20200813225502-e879259ca741 h1:yIjgre8xSDpnhJkDz gitlab.com/elixxir/comms v0.0.0-20200813225502-e879259ca741/go.mod h1:hEi6dhcR1v6TGcp3tBy+QFuE25zux206xymuB+PpUqs= gitlab.com/elixxir/comms v0.0.0-20200825195434-49150e0605d8 h1:6kwb++vm3XUf+AoR18bDfqNsKR8qghFkDERYmVAlwsU= gitlab.com/elixxir/comms v0.0.0-20200825195434-49150e0605d8/go.mod h1:HW3Ige10aeJeyb2fcQ/YOBPiyzY/4jHau1Cj6/1WBHc= +gitlab.com/elixxir/comms v0.0.0-20200827170208-d1f872422b7e h1:BEBxLOW6yMdT53rBvxlDifsGSPYKA88K233DOpKY5Zw= +gitlab.com/elixxir/comms v0.0.0-20200827170208-d1f872422b7e/go.mod h1:HW3Ige10aeJeyb2fcQ/YOBPiyzY/4jHau1Cj6/1WBHc= gitlab.com/elixxir/crypto v0.0.0-20200804182833-984246dea2c4 h1:28ftZDeYEko7xptCZzeFWS1Iam95dj46TWFVVlKmw6A= gitlab.com/elixxir/crypto v0.0.0-20200804182833-984246dea2c4/go.mod h1:ucm9SFKJo+K0N2GwRRpaNr+tKXMIOVWzmyUD0SbOu2c= gitlab.com/elixxir/crypto v0.0.0-20200805174804-bdf909f2a16d/go.mod h1:cu6uNoANVLV0J6HyTL6KqVtVyh9SHU1RjJhytYlsbVQ= @@ -186,6 +188,8 @@ gitlab.com/elixxir/crypto v0.0.0-20200826022234-44afcd036724 h1:9QUjB0U+fuAhMFWd gitlab.com/elixxir/crypto v0.0.0-20200826022234-44afcd036724/go.mod h1:xELLVpaOMc4c14h6Lh3LlD++KYdEihWtRkHQI0FjjXc= gitlab.com/elixxir/crypto v0.0.0-20200826034538-c67fec536436 h1:NvymTKdu5Zjf1tMpI6/TDvfok3xJx6EIrI3ZMWzmWx0= gitlab.com/elixxir/crypto v0.0.0-20200826034538-c67fec536436/go.mod h1:xELLVpaOMc4c14h6Lh3LlD++KYdEihWtRkHQI0FjjXc= +gitlab.com/elixxir/crypto v0.0.0-20200827170914-14227f20900c h1:1vkxQ0Ol/Kr6szWaa8mMcJXW+Dqy73DOarJPswrzb3Q= +gitlab.com/elixxir/crypto v0.0.0-20200827170914-14227f20900c/go.mod h1:D65u4dPjMLSHiENn7fvnleWUcuuSeT48Ttw760Wt3xQ= gitlab.com/elixxir/ekv v0.0.0-20200729182028-159355ea5842 h1:m1zDQ6UadpuMnV7nvnyR+DUXE3AisRnVjajTb1xZE4c= gitlab.com/elixxir/ekv v0.0.0-20200729182028-159355ea5842/go.mod h1:bXY0kgbV5BHYda4YY5/hiG5bjimGK+R3PYub5yM9C/s= gitlab.com/elixxir/primitives v0.0.0-20200731184040-494269b53b4d h1:OKWTmYN5q8XVHo8JXThIH0TCuvl/fLXR7MGVacpqfRg= @@ -201,6 +205,8 @@ gitlab.com/elixxir/primitives v0.0.0-20200812191102-31c01f08b4dc h1:43innow2sbJL gitlab.com/elixxir/primitives v0.0.0-20200812191102-31c01f08b4dc/go.mod h1:pJx2DZk9s8vVMnLN7x0hIPngDjbNSdOP6kk3RLlRxHg= gitlab.com/elixxir/primitives v0.0.0-20200826021242-53c364245a52 h1:J+T7B6EurXrABFEWCRUPoJAXq93r1YCuv28RN0ICzaA= gitlab.com/elixxir/primitives v0.0.0-20200826021242-53c364245a52/go.mod h1:kNp47yPqja2lHSiS4DddTvFpB/4D9dB2YKnw5c+LJCE= +gitlab.com/elixxir/primitives v0.0.0-20200827170420-5d50351f99b4 h1:Vb8N4164sSk3qCtTiXieTXio3Lh9Rc2ObDE1eZgXcMk= +gitlab.com/elixxir/primitives v0.0.0-20200827170420-5d50351f99b4/go.mod h1:kNp47yPqja2lHSiS4DddTvFpB/4D9dB2YKnw5c+LJCE= gitlab.com/xx_network/comms v0.0.0-20200805174823-841427dd5023/go.mod h1:owEcxTRl7gsoM8c3RQ5KAm5GstxrJp5tn+6JfQ4z5Hw= gitlab.com/xx_network/comms v0.0.0-20200806235452-3a82720833ba h1:7nozLSNBX0CfP53DDiDNLJx9obhYGfGf5na0/c9rMso= gitlab.com/xx_network/comms v0.0.0-20200806235452-3a82720833ba/go.mod h1:idLzPGYig57XE7xuU93OlIF9s6NgSJj7OArQvsd5DjY= diff --git a/storage/cmix/roundKeys.go b/storage/cmix/roundKeys.go index 71888b095f9f2a15733704b9bedb1e5d762d36c2..96bfeccd1c8f375ca8743e59f8fd26b49fb058fc 100644 --- a/storage/cmix/roundKeys.go +++ b/storage/cmix/roundKeys.go @@ -1,6 +1,7 @@ package cmix import ( + jww "github.com/spf13/jwalterweatherman" "gitlab.com/elixxir/client/globals" "gitlab.com/elixxir/crypto/cmix" "gitlab.com/elixxir/crypto/cyclic" @@ -11,9 +12,14 @@ import ( type RoundKeys []*cyclic.Int // Encrypts the given message for CMIX -// Panics if the passed message format +// Panics if the passed message is not sized correctly for the group func (rk RoundKeys) Encrypt(grp *cyclic.Group, msg format.Message, - salt []byte) (format.Message, [][]byte, error) { + salt []byte) (format.Message, [][]byte) { + + if msg.GetPrimeByteLen() != grp.GetP().ByteLen() { + jww.FATAL.Panicf("Cannot encrypt message whose size does not " + + "align with the size of the prime") + } ecrMsg := cmix.ClientEncrypt(grp, msg, salt, rk) diff --git a/storage/cmix/roundKeys_test.go b/storage/cmix/roundKeys_test.go index d9e4b5b5a9a5c252fadaf3417194140f6ecc45c0..d64044e97168aabf8140a566b6512a4f46324ff2 100644 --- a/storage/cmix/roundKeys_test.go +++ b/storage/cmix/roundKeys_test.go @@ -1,7 +1,110 @@ package cmix -import "testing" +import ( + "bytes" + "gitlab.com/elixxir/crypto/csprng" + "gitlab.com/elixxir/crypto/cyclic" + "gitlab.com/elixxir/crypto/large" + "gitlab.com/elixxir/primitives/format" + "math/rand" + "reflect" + "testing" +) -func TestRoundKeys_Encrypt_Consistancy(t *testing.T) { +// tests that the encrypted paylaods and kmacs generated are consistent +func TestRoundKeys_Encrypt_Consistency(t *testing.T) { + const numKeys = 5 + expectedPayload := []byte{80, 118, 187, 96, 114, 221, 253, 46, 231, 113, + 200, 88, 90, 42, 236, 96, 82, 244, 197, 32, 147, 185, 33, 27, 55, 128, + 63, 247, 24, 218, 177, 8, 153, 34, 177, 57, 2, 153, 44, 134, 66, 57, + 212, 140, 254, 125, 34, 173, 58, 39, 130, 130, 12, 114, 81, 254, 120, + 194, 181, 159, 166, 167, 67, 172, 201, 191, 150, 161, 217, 178, 234, 65, + 31, 240, 120, 69, 195, 196, 80, 206, 119, 14, 233, 193, 9, 108, 212, + 157, 13, 160, 48, 171, 244, 106, 109, 48, 216, 117, 60, 98, 166, 26, 5, + 26, 98, 115, 184, 87, 123, 197, 69, 159, 136, 247, 43, 165, 86, 11, 27, + 7, 73, 189, 199, 68, 75, 34, 123, 245, 65, 169, 192, 46, 250, 47, 192, + 238, 211, 196, 26, 254, 33, 53, 92, 9, 138, 197, 34, 209, 102, 58, 170, + 119, 118, 73, 249, 235, 109, 81, 114, 186, 20, 247, 61, 94, 158, 50, 12, + 217, 207, 216, 175, 83, 34, 244, 48, 159, 9, 101, 149, 92, 21, 4, 135, + 91, 14, 142, 43, 5, 140, 197, 63, 216, 105, 20, 73, 38, 38, 250, 158, + 140, 149, 187, 166, 194, 59, 75, 92, 21, 91, 166, 245, 54, 37, 103, 27, + 168, 214, 252, 121, 175, 125, 190, 163, 178, 138, 1, 114, 247, 205, 105, + 14, 248, 177, 89, 190, 205, 10, 109, 193, 189, 73, 117, 239, 179, 10, + 164, 248, 251, 235, 232, 215, 56, 56, 250, 203, 114, 34, 208, 116, 94, + 204, 165, 70, 109, 26, 155, 11, 210, 64, 8, 37, 34, 84, 30, 106, 41, 98, + 135, 63, 62, 225, 212, 251, 245, 36, 238, 166, 142, 76, 192, 46, 169, + 18, 55, 87, 245, 101, 224, 213, 225, 164, 109, 248, 50, 142, 122, 14, + 76, 52, 179, 118, 95, 58, 86, 73, 12, 169, 85, 1, 19, 125, 190, 244, + 231, 233, 95, 72, 101, 178, 230, 107, 59, 109, 220, 114, 155, 138, 96, + 208, 167, 169, 143, 94, 145, 141, 24, 56, 167, 135, 128, 85, 147, 22, + 67, 199, 154, 127, 174, 220, 210, 220, 5, 237, 28, 225, 234, 187, 83, + 124, 215, 185, 38, 149, 87, 1, 29, 109, 31, 132, 145, 85, 90, 195, 226, + 252, 60, 113, 155, 82, 238, 120, 154, 185, 36, 164, 199, 4, 146, 76, 3, + 243, 19, 215, 192, 133, 159, 34, 27, 37, 138, 246, 45, 170, 99, 169, 46, + 253, 98, 203, 52, 242, 203, 106, 141, 75, 140, 90, 118, 38, 162, 107, + 182, 181, 6, 105, 208, 97, 66, 82, 72, 235, 56, 173, 242, 87, 241, 48, + 29, 191, 72, 89, 200, 163, 192, 252, 187, 181, 54, 144, 53, 173, 137, + 142, 19, 207, 3, 207, 169, 12, 148, 198, 225, 195, 118, 85, 153, 159, + 168, 245, 16, 229, 227, 89, 224, 30, 127, 217, 193, 212, 52, 211, 120, + 73, 204, 82, 82, 253, 238, 96, 186, 243, 26, 246, 157, 241, 120, 47, + 170, 83, 175, 58, 179} + + expectedKmacs := [][]byte{ + {241, 132, 2, 131, 104, 92, 89, 120, 177, 8, 201, + 194, 41, 63, 99, 30, 82, 44, 125, 204, 55, 145, 29, 62, 228, 57, + 55, 208, 221, 195, 73, 50}, + {108, 243, 239, 28, 162, 109, 196, 127, 8, 41, 134, 241, 44, 112, 225, + 90, 138, 107, 6, 41, 123, 210, 194, 241, 176, 240, 35, 70, 196, + 149, 48, 77}, + {102, 155, 236, 6, 96, 155, 93, 100, 25, 38, 132, 2, 109, 216, 56, 157, + 60, 100, 99, 226, 123, 181, 99, 157, 115, 215, 104, 243, 48, 161, + 220, 184}, + {154, 237, 87, 227, 221, 68, 206, 8, 163, 133, 253, 96, 96, 220, 215, + 167, 62, 5, 47, 209, 95, 125, 13, 244, 211, 184, 77, 78, 226, 26, + 24, 239}, + {211, 180, 44, 51, 228, 147, 142, 94, 48, 99, 224, 101, 48, 43, 223, 23, + 231, 0, 11, 229, 126, 247, 202, 97, 149, 163, 107, 68, 120, 251, 158, + 33}} + + cmixGrp := cyclic.NewGroup( + large.NewIntFromString("FFFFFFFFFFFFFFFFC90FDAA22168C234C4C6628B80DC1CD1"+ + "29024E088A67CC74020BBEA63B139B22514A08798E3404DD"+ + "EF9519B3CD3A431B302B0A6DF25F14374FE1356D6D51C245"+ + "E485B576625E7EC6F44C42E9A637ED6B0BFF5CB6F406B7ED"+ + "EE386BFB5A899FA5AE9F24117C4B1FE649286651ECE45B3D"+ + "C2007CB8A163BF0598DA48361C55D39A69163FA8FD24CF5F"+ + "83655D23DCA3AD961C62F356208552BB9ED529077096966D"+ + "670C354E4ABC9804F1746C08CA18217C32905E462E36CE3B"+ + "E39E772C180E86039B2783A2EC07A28FB5C55DF06F4C52C9"+ + "DE2BCBF6955817183995497CEA956AE515D2261898FA0510"+ + "15728E5A8AACAA68FFFFFFFFFFFFFFFF", 16), + large.NewIntFromString("2", 16)) + + prng := rand.New(rand.NewSource(42)) + + rk := RoundKeys(make([]*cyclic.Int, numKeys)) + + for i := 0; i < numKeys; i++ { + keyBytes, _ := csprng.GenerateInGroup(cmixGrp.GetPBytes(), cmixGrp.GetP().ByteLen(), prng) + rk[i] = cmixGrp.NewIntFromBytes(keyBytes) + } + + salt := make([]byte, 32) + prng.Read(salt) + + msg := format.NewMessage(cmixGrp.GetP().ByteLen()) + contents := make([]byte, msg.ContentsSize()) + prng.Read(contents) + msg.SetContents(contents) + + encMsg, kmacs := rk.Encrypt(cmixGrp, msg, salt) + + if !bytes.Equal(encMsg.GetData(), expectedPayload) { + t.Errorf("Encrypted messages do not match") + } + + if !reflect.DeepEqual(kmacs, expectedKmacs) { + t.Errorf("kmacs do not match") + } } diff --git a/storage/cmix/store.go b/storage/cmix/store.go index 21cd6b563adbfc377162c9983900178eb8a7c19f..1fdb4aff37233d6d39335f0b582f332cb1216de3 100644 --- a/storage/cmix/store.go +++ b/storage/cmix/store.go @@ -3,7 +3,6 @@ package cmix import ( "encoding/json" "github.com/pkg/errors" - "gitlab.com/elixxir/client/storage" "gitlab.com/elixxir/client/storage/versioned" "gitlab.com/elixxir/crypto/cyclic" "gitlab.com/xx_network/comms/connect" @@ -13,10 +12,15 @@ import ( ) const currentStoreVersion = 0 +const currentKeyStoreVersion = 0 const storeKey = "cmixKeyStore" +const pubKeyKey = "cmixDhPubKey" +const privKeyKey = "cmixDhPrivKey" type Store struct { - nodes map[id.ID]*key + nodes map[id.ID]*key + dhPrivateKey *cyclic.Int + dhPublicKey *cyclic.Int kv *versioned.KV @@ -24,16 +28,34 @@ type Store struct { } // returns a new cmix storage object -func NewStore(kv *versioned.KV) *Store { - return &Store{ - nodes: make(map[id.ID]*key), - kv: kv, +func NewStore(kv *versioned.KV, pub, priv *cyclic.Int) (*Store, error) { + s := &Store{ + nodes: make(map[id.ID]*key), + dhPrivateKey: priv, + dhPublicKey: priv, + kv: kv, + } + + err := storeDhKey(kv, pub, pubKeyKey) + if err != nil { + return nil, + errors.WithMessage(err, "Failed to store cmix DH public key") } + + err = storeDhKey(kv, priv, privKeyKey) + if err != nil { + return nil, errors.WithMessage(err, "Failed to store cmix DH private key") + } + + return s, s.save() } // loads the cmix storage object func LoadStore(kv *versioned.KV) (*Store, error) { - s := NewStore(kv) + s := &Store{ + nodes: make(map[id.ID]*key), + kv: kv, + } obj, err := kv.Get(storeKey) if err != nil { @@ -148,12 +170,52 @@ func (s *Store) unmarshal(b []byte) error { } for _, nid := range nodes { - k, err := loadKey(s.s, &nid) + k, err := loadKey(s.kv, &nid) if err != nil { return errors.WithMessagef(err, "could not load node key for %s", &nid) } s.nodes[nid] = k } + s.dhPrivateKey, err = loadDhKey(s.kv, privKeyKey) + if err != nil { + return errors.WithMessage(err, + "Failed to load cmix DH private key") + } + + s.dhPublicKey, err = loadDhKey(s.kv, pubKeyKey) + if err != nil { + return errors.WithMessage(err, + "Failed to load cmix DH public key") + } + return nil } + +func storeDhKey(kv *versioned.KV, dh *cyclic.Int, key string) error { + now := time.Now() + + data, err := dh.GobEncode() + if err != nil { + return err + } + + obj := versioned.Object{ + Version: currentKeyVersion, + Timestamp: now, + Data: data, + } + + return kv.Set(key, &obj) +} + +func loadDhKey(kv *versioned.KV, key string) (*cyclic.Int, error) { + vo, err := kv.Get(key) + if err != nil { + return nil, err + } + + dhKey := &cyclic.Int{} + + return dhKey, dhKey.GobDecode(vo.Data) +} \ No newline at end of file diff --git a/storage/e2e/session.go b/storage/e2e/session.go index f4cd7b20ea6884e3d6fe69c07d8e7774e09586b9..ce9fa1bb49018fd6de540623b2fe20247ec0abd9 100644 --- a/storage/e2e/session.go +++ b/storage/e2e/session.go @@ -304,7 +304,6 @@ func (s *Session) generate() { s.ttl = uint32(keysTTL) //create the new state vectors. This will cause disk operations storing them - s.keyState = newStateVector(s.manager.ctx, keyEKVPrefix, numKeys) //register keys for reception if this is a reception session diff --git a/storage/e2e/stateVector.go b/storage/e2e/stateVector.go index 491b205ae92e5ad59ea366eecc9a98a20a2a9e66..f93619700e94ee0b37c1c0d1837a86ddbf531835 100644 --- a/storage/e2e/stateVector.go +++ b/storage/e2e/stateVector.go @@ -34,7 +34,7 @@ type stateVectorDisk struct { Numkeys uint32 } -func newStateVector(ctx *context, key string, numkeys uint32) *stateVector { +func newStateVector(ctx *context, key string, numkeys uint32) (*stateVector, error) { numBlocks := (numkeys + 63) / 64 sv := &stateVector{ @@ -46,7 +46,7 @@ func newStateVector(ctx *context, key string, numkeys uint32) *stateVector { numkeys: numkeys, } - return sv + return sv, sv.save() } func loadStateVector(ctx *context, key string) (*stateVector, error) { diff --git a/storage/regStatus.go b/storage/regStatus.go new file mode 100644 index 0000000000000000000000000000000000000000..00b89539bfc56a3acdbe5ff1c547a6bbe81796f1 --- /dev/null +++ b/storage/regStatus.go @@ -0,0 +1,10 @@ +package storage + +type RegistrationStatus uint32 + +const ( + NotStarted RegistrationStatus = 0 // Set on session creation + KeyGenComplete RegistrationStatus = 10000 // Set upon generation of session information + PermissioningComplete RegistrationStatus = 20000 // Set upon completion of RegisterWithPermissioning + UDBComplete RegistrationStatus = 30000 // Set upon completion of RegisterWithUdb +) diff --git a/storage/session.go b/storage/session.go index 3639610b398ba49488064ba5a4265b80a88f6f8d..a541b5a8c8e47e5eeb92031d33b011c8902b36ed 100644 --- a/storage/session.go +++ b/storage/session.go @@ -12,6 +12,7 @@ import ( "bytes" "encoding/gob" "gitlab.com/elixxir/client/globals" + "gitlab.com/elixxir/client/storage/cmix" "gitlab.com/elixxir/client/storage/versioned" "gitlab.com/elixxir/client/user" "gitlab.com/elixxir/ekv" @@ -31,6 +32,9 @@ type Session struct { // Contacts controls contacts map[string]*Contact contactsLck sync.Mutex + + //keystores + cmixKeys cmix.Store } // Initialize a new Session object diff --git a/storage/userdata.go b/storage/userdata.go index c5845715f78396fa5ad7a3d56758cdfb16514590..f942a7a60aa1247292dc194533c18f4e095b057c 100644 --- a/storage/userdata.go +++ b/storage/userdata.go @@ -11,7 +11,7 @@ import ( "encoding/gob" "gitlab.com/elixxir/client/storage/versioned" "gitlab.com/elixxir/crypto/cyclic" - "gitlab.com/elixxir/crypto/signature/rsa" + "gitlab.com/xx_network/crypto/signature/rsa" "gitlab.com/xx_network/primitives/id" "time" ) diff --git a/storage/userdata_test.go b/storage/userdata_test.go index deb27edcfac15e617c669881cef05520b8b1f026..34741c6ab087eb89ac901ab3e46a74d549034a40 100644 --- a/storage/userdata_test.go +++ b/storage/userdata_test.go @@ -5,8 +5,8 @@ import ( "gitlab.com/elixxir/client/storage/versioned" "gitlab.com/elixxir/crypto/cyclic" "gitlab.com/elixxir/crypto/large" - "gitlab.com/elixxir/crypto/signature/rsa" "gitlab.com/elixxir/ekv" + "gitlab.com/xx_network/crypto/signature/rsa" "gitlab.com/xx_network/primitives/id" "math/rand" "reflect" diff --git a/user/session.go b/user/session.go index 43568d6d9ade8958459ce52eeefa2c0fd9c94dc8..92cac7d0979e8a3912b27a0112cac6e4fb73416e 100644 --- a/user/session.go +++ b/user/session.go @@ -18,9 +18,7 @@ import ( "gitlab.com/elixxir/client/globals" "gitlab.com/elixxir/client/keyStore" "gitlab.com/elixxir/crypto/cyclic" - "gitlab.com/elixxir/primitives/format" "gitlab.com/elixxir/primitives/switchboard" - "gitlab.com/xx_network/crypto/signature/rsa" "gitlab.com/xx_network/primitives/id" "io" "sync" @@ -108,9 +106,9 @@ func LoadSession(store globals.Storage, password string) (Session, error) { session.KeyMaps.ReconstructKeys(session.E2EGrp, session.CurrentUser) // Create switchboard - session.listeners = switchboard.New() + //session.listeners = switchboard.New() // Create quit channel for reception runner - session.quitReceptionRunner = make(chan struct{}) + //session.quitReceptionRunner = make(chan struct{}) // Set storage pointer session.store = store @@ -330,11 +328,11 @@ func (s *SessionObj) GetRekeyManager() *keyStore.RekeyManager { } func (s *SessionObj) GetSwitchboard() *switchboard.Switchboard { - return s.listeners + return nil //s.listeners } func (s *SessionObj) GetQuitChan() chan struct{} { - return s.quitReceptionRunner + return nil //s.quitReceptionRunner } func (s *SessionObj) getSessionData() ([]byte, error) {