Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
client
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Terraform modules
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
elixxir
client
Commits
7a3d519f
Commit
7a3d519f
authored
Jul 19, 2019
by
Benjamin Wenger
Browse files
Options
Downloads
Patches
Plain Diff
made salt 256 bits
parent
03b3a596
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
io/messaging.go
+7
-3
7 additions, 3 deletions
io/messaging.go
with
7 additions
and
3 deletions
io/messaging.go
+
7
−
3
View file @
7a3d519f
...
...
@@ -175,7 +175,7 @@ func (m *Messaging) send(session user.Session, topology *circuit.Circuit,
}
// CMIX Encryption
salt
:=
cmix
.
NewSalt
(
csprng
.
Source
(
&
csprng
.
SystemRNG
{}),
16
)
salt
:=
cmix
.
NewSalt
(
csprng
.
Source
(
&
csprng
.
SystemRNG
{}),
32
)
encMsg
:=
crypto
.
CMIXEncrypt
(
session
,
topology
,
salt
,
message
)
msgPacket
:=
&
pb
.
Slot
{
...
...
@@ -301,7 +301,7 @@ func handleE2EReceiving(session user.Session,
rekey
:=
false
if
recpKey
==
nil
{
// TODO Handle sending error message to SW
return
rekey
,
fmt
.
Errorf
(
"E2EKey for matching fingerprint not found, can't process message"
)
return
false
,
fmt
.
Errorf
(
"E2EKey for matching fingerprint not found, can't process message"
)
}
else
if
recpKey
.
GetOuterType
()
==
parse
.
Rekey
{
// If key type is rekey, the message is a rekey from partner
rekey
=
true
...
...
@@ -414,7 +414,11 @@ func (m *Messaging) receiveMessagesFromGateway(session user.Session,
"Adding message ID %v to received message IDs"
,
messageID
)
m
.
ReceivedMessages
[
messageID
]
=
struct
{}{}
session
.
SetLastMessageID
(
messageID
)
session
.
StoreSession
()
err
=
session
.
StoreSession
()
if
err
!=
nil
{
globals
.
Log
.
ERROR
.
Printf
(
"Could not store session "
+
"after message recieved from gateway: %+v"
,
err
)
}
}
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment