diff --git a/broadcast/asymmetricClient.go b/broadcast/asymmetricClient.go index ab7b13a6b6ac386e92c6cf38dda60d325284d1a2..33050a3a507834c7d810843ea4311da0f819844c 100644 --- a/broadcast/asymmetricClient.go +++ b/broadcast/asymmetricClient.go @@ -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 { diff --git a/broadcast/interface.go b/broadcast/interface.go index 4b7e119d6167be5856282e1a1e06f083d976613f..aca75fd4668df29debee77984bd6d31450e3aa54 100644 --- a/broadcast/interface.go +++ b/broadcast/interface.go @@ -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 broadcasted payload. + // MaxSymmetricPayloadSize returns the maximum size for a symmetric broadcast payload. MaxSymmetricPayloadSize() int - // MaxAsymmetricPayloadSize returns the maximum size for an asymmetric broadcasted 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