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
b274f043
Commit
b274f043
authored
Sep 30, 2021
by
Benjamin Wenger
Browse files
Options
Downloads
Patches
Plain Diff
printed single use keys on creation and on use to figure out why they are broken
parent
d01ba446
No related branches found
No related tags found
2 merge requests
!53
Release
,
!31
Test/print single use keys
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
single/reception.go
+3
-0
3 additions, 0 deletions
single/reception.go
single/transmission.go
+3
-0
3 additions, 0 deletions
single/transmission.go
single/transmitMessage.go
+10
-0
10 additions, 0 deletions
single/transmitMessage.go
with
16 additions
and
0 deletions
single/reception.go
+
3
−
0
View file @
b274f043
...
@@ -108,5 +108,8 @@ func (m *Manager) processTransmission(msg format.Message,
...
@@ -108,5 +108,8 @@ func (m *Manager) processTransmission(msg format.Message,
c
:=
NewContact
(
payload
.
GetRID
(
transmitMsg
.
GetPubKey
(
grp
)),
c
:=
NewContact
(
payload
.
GetRID
(
transmitMsg
.
GetPubKey
(
grp
)),
transmitMsg
.
GetPubKey
(
grp
),
dhKey
,
payload
.
GetTagFP
(),
payload
.
GetMaxParts
())
transmitMsg
.
GetPubKey
(
grp
),
dhKey
,
payload
.
GetTagFP
(),
payload
.
GetMaxParts
())
jww
.
INFO
.
Printf
(
"generated by singe use receiver reception id for single use: %s, "
+
"ephId: %d, pubkey: %x, msg: %s"
,
c
.
partner
,
"unknown:"
,
transmitMsg
.
GetPubKey
(
grp
),
msg
)
return
payload
.
GetContents
(),
c
,
nil
return
payload
.
GetContents
(),
c
,
nil
}
}
This diff is collapsed.
Click to expand it.
single/transmission.go
+
3
−
0
View file @
b274f043
...
@@ -289,5 +289,8 @@ func makeIDs(msg *transmitMessagePayload, publicKey *cyclic.Int,
...
@@ -289,5 +289,8 @@ func makeIDs(msg *transmitMessagePayload, publicKey *cyclic.Int,
jww
.
DEBUG
.
Printf
(
"ephemeral.GetId(%s, %d, %d) = %d"
,
rid
,
addressSize
,
timeNow
.
UnixNano
(),
ephID
.
Int64
())
jww
.
DEBUG
.
Printf
(
"ephemeral.GetId(%s, %d, %d) = %d"
,
rid
,
addressSize
,
timeNow
.
UnixNano
(),
ephID
.
Int64
())
}
}
jww
.
INFO
.
Printf
(
"generated by singe use sender reception id for single use: %s, "
+
"ephId: %d, pubkey: %x, msg: %s"
,
rid
,
ephID
.
Int64
(),
publicKey
.
Bytes
(),
msg
)
return
rid
,
ephID
,
nil
return
rid
,
ephID
,
nil
}
}
This diff is collapsed.
Click to expand it.
single/transmitMessage.go
+
10
−
0
View file @
b274f043
...
@@ -9,6 +9,7 @@ package single
...
@@ -9,6 +9,7 @@ package single
import
(
import
(
"encoding/binary"
"encoding/binary"
"fmt"
"github.com/pkg/errors"
"github.com/pkg/errors"
jww
"github.com/spf13/jwalterweatherman"
jww
"github.com/spf13/jwalterweatherman"
"gitlab.com/elixxir/crypto/cyclic"
"gitlab.com/elixxir/crypto/cyclic"
...
@@ -246,3 +247,12 @@ func (mp transmitMessagePayload) SetContents(contents []byte) {
...
@@ -246,3 +247,12 @@ func (mp transmitMessagePayload) SetContents(contents []byte) {
copy
(
mp
.
contents
,
contents
)
copy
(
mp
.
contents
,
contents
)
}
}
// String returns the contents for printing adhering to the stringer interface.
func
(
mp
transmitMessagePayload
)
String
()
string
{
return
fmt
.
Sprintf
(
"Data: %x [tagFP: %x, nonce: %x, "
+
"maxParts: %x, size: %x, content: %x]"
,
mp
.
data
,
mp
.
tagFP
,
mp
.
nonce
,
mp
.
maxParts
,
mp
.
size
,
mp
.
contents
)
}
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