Class GroupSendEndorsementsResponse
-
- All Implemented Interfaces:
public final class GroupSendEndorsementsResponse extends ByteArray
A set of endorsements of the members in a group, along with a proof of their validity.
Issued by the group server based on the group's member ciphertexts. The endorsements will eventually be verified by the chat server in the form of GroupSendFullTokens. See for a full description of the endorsement flow from the client's perspective.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public final classGroupSendEndorsementsResponse.ReceivedEndorsementsA collection of endorsements known to be valid.
The result of the
receiveoperations on GroupSendEndorsementsResponse. Contains an endorsement for each member of the group, in the same order they were originally provided, plus a combined endorsement for "everyone but me", intended for multi-recipient sends.
-
Field Summary
Fields Modifier and Type Field Description public final static ByteArray.UncheckedAndUnclonedUNCHECKED_AND_UNCLONED
-
Constructor Summary
Constructors Constructor Description GroupSendEndorsementsResponse(Array<byte> contents)
-
Method Summary
Modifier and Type Method Description static GroupSendEndorsementsResponseissue(Collection<UuidCiphertext> groupMembers, GroupSendDerivedKeyPair keyPair)Issues a new set of endorsements for groupMembers.static GroupSendEndorsementsResponseissue(Collection<UuidCiphertext> groupMembers, GroupSendDerivedKeyPair keyPair, SecureRandom secureRandom)Issues a new set of endorsements for groupMembers.InstantgetExpiration()Returns the expiration for the contained endorsements. GroupSendEndorsementsResponse.ReceivedEndorsementsreceive(List<ServiceId> groupMembers, ServiceId.Aci localUser, GroupSecretParams groupParams, ServerPublicParams serverParams)Receives, validates, and extracts the endorsements from a response. GroupSendEndorsementsResponse.ReceivedEndorsementsreceive(List<ServiceId> groupMembers, ServiceId.Aci localUser, Instant now, GroupSecretParams groupParams, ServerPublicParams serverPublicParams)Receives, validates, and extracts the endorsements from a response, assuming a specific current time. GroupSendEndorsementsResponse.ReceivedEndorsementsreceive(List<UuidCiphertext> groupMembers, UuidCiphertext localUser, ServerPublicParams serverParams)Receives, validates, and extracts the endorsements from a response. GroupSendEndorsementsResponse.ReceivedEndorsementsreceive(List<UuidCiphertext> groupMembers, UuidCiphertext localUser, Instant now, ServerPublicParams serverPublicParams)Receives, validates, and extracts the endorsements from a response, assuming a specific current time. -
-
Constructor Detail
-
GroupSendEndorsementsResponse
GroupSendEndorsementsResponse(Array<byte> contents)
-
-
Method Detail
-
issue
static GroupSendEndorsementsResponse issue(Collection<UuidCiphertext> groupMembers, GroupSendDerivedKeyPair keyPair)
Issues a new set of endorsements for
groupMembers.groupMembersshould includerequestingUseras well.
-
issue
static GroupSendEndorsementsResponse issue(Collection<UuidCiphertext> groupMembers, GroupSendDerivedKeyPair keyPair, SecureRandom secureRandom)
Issues a new set of endorsements for
groupMembers.groupMembersshould includerequestingUseras well.
-
getExpiration
Instant getExpiration()
Returns the expiration for the contained endorsements.
-
receive
GroupSendEndorsementsResponse.ReceivedEndorsements receive(List<ServiceId> groupMembers, ServiceId.Aci localUser, GroupSecretParams groupParams, ServerPublicParams serverParams)
Receives, validates, and extracts the endorsements from a response.
Note that the
receiveoperation is provided for both ServiceIds and s. If you already have the ciphertexts for the group members available, receive should be faster; if you don't, this method is faster than generating the ciphertexts and throwing them away afterwards.localUsershould be included ingroupMembers.groupMembersusesListrather thanCollectionbecause the resulting endorsements are returned in the same order, and thus the order of iteration must be fixed.
-
receive
GroupSendEndorsementsResponse.ReceivedEndorsements receive(List<ServiceId> groupMembers, ServiceId.Aci localUser, Instant now, GroupSecretParams groupParams, ServerPublicParams serverPublicParams)
Receives, validates, and extracts the endorsements from a response, assuming a specific current time.
This should only be used for testing purposes.
-
receive
GroupSendEndorsementsResponse.ReceivedEndorsements receive(List<UuidCiphertext> groupMembers, UuidCiphertext localUser, ServerPublicParams serverParams)
Receives, validates, and extracts the endorsements from a response.
Note that the
receiveoperation is provided for both ServiceIds and s. If you already have the ciphertexts for the group members available, this method should be faster; if you don't, receive is faster than generating the ciphertexts and throwing them away afterwards.localUsershould be included ingroupMembers.groupMembersusesListrather thanCollectionbecause the resulting endorsements are returned in the same order, and thus the order of iteration must be fixed.
-
receive
GroupSendEndorsementsResponse.ReceivedEndorsements receive(List<UuidCiphertext> groupMembers, UuidCiphertext localUser, Instant now, ServerPublicParams serverPublicParams)
Receives, validates, and extracts the endorsements from a response, assuming a specific current time.
This should only be used for testing purposes.
-
-
-
-