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
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
elixxir
client
Commits
ee075055
Commit
ee075055
authored
2 years ago
by
Benjamin Wenger
Browse files
Options
Downloads
Patches
Plain Diff
fixed some more stuff in channels
parent
44e723e6
No related branches found
No related tags found
4 merge requests
!510
Release
,
!419
rewrote the health tracker to both consider if there are waiting rounds and...
,
!386
Channels restructure
,
!340
Project/channels
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
channels/interface.go
+2
-2
2 additions, 2 deletions
channels/interface.go
channels/joinedChannel_test.go
+3
-24
3 additions, 24 deletions
channels/joinedChannel_test.go
with
5 additions
and
26 deletions
channels/interface.go
+
2
−
2
View file @
ee075055
...
...
@@ -12,7 +12,7 @@ import (
"gitlab.com/elixxir/client/cmix/rounds"
cryptoBroadcast
"gitlab.com/elixxir/crypto/broadcast"
cryptoChannel
"gitlab.com/elixxir/crypto/channel"
"gitlab.com/
xx_network/crypto/signature
/rsa"
"gitlab.com/
elixxir/crypto
/rsa"
"gitlab.com/xx_network/primitives/id"
"gitlab.com/xx_network/primitives/id/ephemeral"
"math"
...
...
@@ -51,7 +51,7 @@ type Manager interface {
// should be wrapped in a function which defines the wire protocol
// If the final message, before being sent over the wire, is too long, this will
// return an error. The message must be at most 510 bytes long.
SendAdminGeneric
(
privKey
*
rsa
.
PrivateKey
,
channelID
*
id
.
ID
,
SendAdminGeneric
(
privKey
rsa
.
PrivateKey
,
channelID
*
id
.
ID
,
messageType
MessageType
,
msg
[]
byte
,
validUntil
time
.
Duration
,
params
cmix
.
CMIXParams
)
(
cryptoChannel
.
MessageID
,
rounds
.
Round
,
ephemeral
.
Id
,
error
)
...
...
This diff is collapsed.
Click to expand it.
channels/joinedChannel_test.go
+
3
−
24
View file @
ee075055
...
...
@@ -17,7 +17,6 @@ import (
"gitlab.com/elixxir/client/storage/versioned"
cryptoBroadcast
"gitlab.com/elixxir/crypto/broadcast"
cryptoChannel
"gitlab.com/elixxir/crypto/channel"
"gitlab.com/elixxir/crypto/cmix"
"gitlab.com/elixxir/crypto/fastRNG"
"gitlab.com/elixxir/crypto/rsa"
"gitlab.com/elixxir/ekv"
...
...
@@ -446,29 +445,9 @@ func Test_makeJoinedChannelKey_Consistency(t *testing.T) {
// cryptoBroadcast.NewChannel does but with a smaller RSA key and salt to make
// tests run quicker.
func
newTestChannel
(
name
,
description
string
,
rng
csprng
.
Source
)
(
*
cryptoBroadcast
.
Channel
,
*
rsa
.
PrivateKey
,
error
)
{
// Uses 128 bits instead of 4096 bits
pk
,
err
:=
rsa
.
GenerateKey
(
rng
,
128
)
if
err
!=
nil
{
return
nil
,
nil
,
err
}
// Uses 16 bits instead of 512 bits
salt
:=
cmix
.
NewSalt
(
rng
,
16
)
channelID
,
err
:=
cryptoBroadcast
.
NewChannelID
(
name
,
description
,
salt
,
rsa
.
CreatePublicKeyPem
(
pk
.
GetPublic
()))
if
err
!=
nil
{
return
nil
,
nil
,
err
}
return
&
cryptoBroadcast
.
Channel
{
ReceptionID
:
channelID
,
Name
:
name
,
Description
:
description
,
Salt
:
salt
,
RsaPubKey
:
pk
.
GetPublic
(),
},
pk
,
nil
*
cryptoBroadcast
.
Channel
,
rsa
.
PrivateKey
,
error
)
{
c
,
pk
,
err
:=
cryptoBroadcast
.
NewChannel
(
name
,
description
,
1000
,
rng
)
return
c
,
pk
,
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