Class GroupCipher

  • All Implemented Interfaces:

    
    public class GroupCipher
    
                        

    The main entry point for Signal Protocol group encrypt/decrypt operations.

    Once a session has been established with and a has been distributed to each member of the group, this class can be used for all subsequent encrypt/decrypt operations within that session (ie: until group membership changes).

    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
    • Method Summary

      Modifier and Type Method Description
      CiphertextMessage encrypt(UUID distributionId, Array<byte> paddedPlaintext) Encrypt a message.
      Array<byte> decrypt(Array<byte> senderKeyMessageBytes) Decrypt a SenderKey group message.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • encrypt

         CiphertextMessage encrypt(UUID distributionId, Array<byte> paddedPlaintext)

        Encrypt a message.

        Parameters:
        paddedPlaintext - The plaintext message bytes, optionally padded.
        Returns:

        Ciphertext.

      • decrypt

         Array<byte> decrypt(Array<byte> senderKeyMessageBytes)

        Decrypt a SenderKey group message.

        Parameters:
        senderKeyMessageBytes - The received ciphertext.
        Returns:

        Plaintext