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
eac9db5c
Commit
eac9db5c
authored
2 years ago
by
Jonah Husson
Browse files
Options
Downloads
Patches
Plain Diff
Update comments
parent
e3837851
No related branches found
No related tags found
Loading
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
broadcast/asymmetricClient.go
+2
-0
2 additions, 0 deletions
broadcast/asymmetricClient.go
broadcast/interface.go
+3
-2
3 additions, 2 deletions
broadcast/interface.go
with
5 additions
and
2 deletions
broadcast/asymmetricClient.go
+
2
−
0
View file @
eac9db5c
...
...
@@ -30,6 +30,8 @@ func (bc *broadcastClient) MaxAsymmetricPayloadSize() int {
// BroadcastAsymmetric broadcasts the payload to the channel. Requires a healthy network state to send
// Payload must be equal to bc.MaxAsymmetricPayloadSize, and the channel PrivateKey must be passed in
// Broadcast method must be set to asymmetric
// When a payload is sent, it is split into partitons of size bc.channel.MaxAsymmetricPayloadSize
// which are each encrypted using multicastRSA
func
(
bc
*
broadcastClient
)
BroadcastAsymmetric
(
pk
multicastRSA
.
PrivateKey
,
payload
[]
byte
,
cMixParams
cmix
.
CMIXParams
)
(
id
.
Round
,
ephemeral
.
Id
,
error
)
{
if
bc
.
param
.
Method
!=
Asymmetric
{
...
...
This diff is collapsed.
Click to expand it.
broadcast/interface.go
+
3
−
2
View file @
eac9db5c
...
...
@@ -26,12 +26,13 @@ type ListenerFunc func(payload []byte,
receptionID
receptionID
.
EphemeralIdentity
,
round
rounds
.
Round
)
type
Channel
interface
{
// MaxSymmetricPayloadSize returns the maximum size for a symmetric broadcast
ed
payload.
// MaxSymmetricPayloadSize returns the maximum size for a symmetric broadcast payload.
MaxSymmetricPayloadSize
()
int
// MaxAsymmetricPayloadSize returns the maximum size for an asymmetric broadcast
ed
payload.
// MaxAsymmetricPayloadSize returns the maximum size for an asymmetric broadcast payload.
MaxAsymmetricPayloadSize
()
int
// Get returns the underlying crypto.Channel
Get
()
crypto
.
Channel
// Broadcast broadcasts the payload to the channel. The payload size must be
...
...
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