Class GroupSessionBuilder

  • All Implemented Interfaces:

    
    public class GroupSessionBuilder
    
                        

    GroupSessionBuilder is responsible for setting up group SenderKey encrypted sessions.

    Once a session has been established, org.signal.libsignal.protocol.groups.GroupCipher can be used to encrypt/decrypt messages in that session.

    The built sessions are unidirectional: they can be used either for sending or for receiving, but not both.

    Sessions are constructed per (senderName + deviceId) tuple, with sending additionally parameterized on a per-group distributionId. Remote logical users are identified by their senderName, and each logical user can have multiple physical devices.

    This class is not thread-safe.

    Author:

    Moxie Marlinspike

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Constructor Detail

      • GroupSessionBuilder

        GroupSessionBuilder(SenderKeyStore senderKeyStore)
    • Method Detail

      • process

         void process(SignalProtocolAddress sender, SenderKeyDistributionMessage senderKeyDistributionMessage)

        Construct a group session for receiving messages from sender.

        Parameters:
        sender - The address of the device that sent the message.
        senderKeyDistributionMessage - A received SenderKeyDistributionMessage.
      • create

         SenderKeyDistributionMessage create(SignalProtocolAddress sender, UUID distributionId)

        Construct a group session for sending messages.

        Parameters:
        sender - The address of the current client.
        distributionId - An opaque identifier that uniquely identifies the group (but isn't the group ID).
        Returns:

        A SenderKeyDistributionMessage that is individually distributed to each member of the group.