Package org.bouncycastle.mls.protocol
Class Group
java.lang.Object
org.bouncycastle.mls.protocol.Group
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
static class
class
class
static class
static class
class
class
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final short
static final short
static final short
static final short
-
Constructor Summary
ConstructorsConstructorDescriptionGroup()
Group
(byte[] initSk, org.bouncycastle.crypto.AsymmetricCipherKeyPair leafSk, byte[] sigSk, KeyPackage keyPackage, Welcome welcome, TreeKEMPublicKey treeIn, Map<Secret, byte[]> externalPsks, Map<Group.EpochRef, byte[]> resumptionPsks) Group
(byte[] groupID, MlsCipherSuite suite, org.bouncycastle.crypto.AsymmetricCipherKeyPair encSk, byte[] sigSk, LeafNode leafNode, List<Extension> extensions) Group
(org.bouncycastle.crypto.AsymmetricCipherKeyPair sigSk, GroupInfo groupInfo, TreeKEMPublicKey tree) -
Method Summary
Modifier and TypeMethodDescriptionadd
(KeyPackage keyPackage, Group.MessageOptions msgOptions) commit
(Secret leafSecret, Group.CommitOptions commitOptions, Group.MessageOptions msgOptions, Group.CommitParameters params) createBranch
(byte[] groupID, org.bouncycastle.crypto.AsymmetricCipherKeyPair encryptionKeyPair, org.bouncycastle.crypto.AsymmetricCipherKeyPair signatureKeyPair, LeafNode leafNode, List<Extension> extList, List<KeyPackage> keyPackages, byte[] leafSecret, Group.CommitOptions commitOptions) static Group.GroupWithMessage
externalJoin
(Secret leafSecret, org.bouncycastle.crypto.AsymmetricCipherKeyPair sigSk, KeyPackage keyPackage, GroupInfo groupInfo, TreeKEMPublicKey tree, Group.MessageOptions msgOptions, LeafIndex removePrior, Map<Secret, byte[]> psks) long
getEpoch()
byte[]
byte[]
getGroupInfo
(boolean inlineTree) getIndex()
getSuite()
getTree()
groupContextExtensions
(List<Extension> extensions, Group.MessageOptions msgOptions) handle
(byte[] mlsMessageBytes, Group cachedGroup, Group.CommitParameters expectedParams) handle
(AuthenticatedContent auth, Group cachedGroup, Group.CommitParameters expectedParams) handleBranch
(org.bouncycastle.crypto.AsymmetricCipherKeyPair initSk, org.bouncycastle.crypto.AsymmetricCipherKeyPair encSk, org.bouncycastle.crypto.AsymmetricCipherKeyPair sigSk, KeyPackage keyPackage, MLSMessage welcome, TreeKEMPublicKey tree) handleReinitCommit
(MLSMessage commitMessage) void
insertExternalPsk
(Secret pskID, byte[] pskSecret) static MLSMessage
newMemberAdd
(byte[] groupID, long epoch, KeyPackage newMember, org.bouncycastle.crypto.AsymmetricCipherKeyPair sigSk) preSharedKey
(byte[] groupID, long epoch, Group.MessageOptions msgOptions) preSharedKey
(byte[] externalPskId, Group.MessageOptions msgOptions) protect
(byte[] applicationData, byte[] pt, int paddingSize) reinit
(byte[] groupID, ProtocolVersion version, MlsCipherSuite suite, List<Extension> extList, Group.MessageOptions msgOptions) reinitCommit
(byte[] leafSecret, Group.CommitOptions commitOptions, Group.MessageOptions messageOptions) remove
(LeafIndex removeIndex, Group.MessageOptions msgOptions) byte[][]
unprotect
(MLSMessage ct) update
(Proposal update, Group.MessageOptions msgOptions) updateProposal
(org.bouncycastle.crypto.AsymmetricCipherKeyPair leafSk, Group.LeafNodeOptions leafOptions)
-
Field Details
-
NORMAL_COMMIT_PARAMS
public static final short NORMAL_COMMIT_PARAMS- See Also:
-
EXTERNAL_COMMIT_PARAMS
public static final short EXTERNAL_COMMIT_PARAMS- See Also:
-
RESTART_COMMIT_PARAMS
public static final short RESTART_COMMIT_PARAMS- See Also:
-
REINIT_COMMIT_PARAMS
public static final short REINIT_COMMIT_PARAMS- See Also:
-
-
Constructor Details
-
Group
public Group() -
Group
public Group(org.bouncycastle.crypto.AsymmetricCipherKeyPair sigSk, GroupInfo groupInfo, TreeKEMPublicKey tree) throws Exception - Throws:
Exception
-
Group
public Group(byte[] groupID, MlsCipherSuite suite, org.bouncycastle.crypto.AsymmetricCipherKeyPair encSk, byte[] sigSk, LeafNode leafNode, List<Extension> extensions) throws Exception - Throws:
Exception
-
Group
public Group(byte[] initSk, org.bouncycastle.crypto.AsymmetricCipherKeyPair leafSk, byte[] sigSk, KeyPackage keyPackage, Welcome welcome, TreeKEMPublicKey treeIn, Map<Secret, byte[]> externalPsks, Map<Group.EpochRef, throws Exceptionbyte[]> resumptionPsks) - Parameters:
initSk
- HPKE private keyleafSk
- HPKE private key for leaf nodesigSk
- signature private keykeyPackage
- key packagewelcome
- welcometreeIn
- public kem tree (optional)externalPsks
- map of external psksresumptionPsks
- map of resumptions psks- Throws:
Exception
-
-
Method Details
-
insertExternalPsk
-
getSuite
-
getExtensions
-
getKeySchedule
-
getTree
-
getEpoch
public long getEpoch() -
getGroupID
public byte[] getGroupID() -
getIndex
-
getGroupInfo
- Throws:
Exception
-
handle
- Throws:
Exception
-
handle
public Group handle(byte[] mlsMessageBytes, Group cachedGroup, Group.CommitParameters expectedParams) throws Exception - Throws:
Exception
-
handle
public Group handle(AuthenticatedContent auth, Group cachedGroup, Group.CommitParameters expectedParams) throws Exception - Throws:
Exception
-
createBranch
public Group.GroupWithMessage createBranch(byte[] groupID, org.bouncycastle.crypto.AsymmetricCipherKeyPair encryptionKeyPair, org.bouncycastle.crypto.AsymmetricCipherKeyPair signatureKeyPair, LeafNode leafNode, List<Extension> extList, List<KeyPackage> keyPackages, byte[] leafSecret, Group.CommitOptions commitOptions) throws Exception - Throws:
Exception
-
handleBranch
public Group handleBranch(org.bouncycastle.crypto.AsymmetricCipherKeyPair initSk, org.bouncycastle.crypto.AsymmetricCipherKeyPair encSk, org.bouncycastle.crypto.AsymmetricCipherKeyPair sigSk, KeyPackage keyPackage, MLSMessage welcome, TreeKEMPublicKey tree) throws Exception - Throws:
Exception
-
handleReinitCommit
- Throws:
Exception
-
externalJoin
public static Group.GroupWithMessage externalJoin(Secret leafSecret, org.bouncycastle.crypto.AsymmetricCipherKeyPair sigSk, KeyPackage keyPackage, GroupInfo groupInfo, TreeKEMPublicKey tree, Group.MessageOptions msgOptions, LeafIndex removePrior, Map<Secret, byte[]> psks) throws Exception- Throws:
Exception
-
commit
public Group.GroupWithMessage commit(Secret leafSecret, Group.CommitOptions commitOptions, Group.MessageOptions msgOptions, Group.CommitParameters params) throws Exception - Throws:
Exception
-
reinitCommit
public Group.TombstoneWithMessage reinitCommit(byte[] leafSecret, Group.CommitOptions commitOptions, Group.MessageOptions messageOptions) throws Exception - Throws:
Exception
-
newMemberAdd
public static MLSMessage newMemberAdd(byte[] groupID, long epoch, KeyPackage newMember, org.bouncycastle.crypto.AsymmetricCipherKeyPair sigSk) throws Exception - Throws:
Exception
-
protect
- Throws:
Exception
-
unprotect
- Throws:
Exception
-
add
- Throws:
Exception
-
update
- Throws:
Exception
-
groupContextExtensions
public MLSMessage groupContextExtensions(List<Extension> extensions, Group.MessageOptions msgOptions) throws Exception - Throws:
Exception
-
remove
- Throws:
Exception
-
reinit
public MLSMessage reinit(byte[] groupID, ProtocolVersion version, MlsCipherSuite suite, List<Extension> extList, Group.MessageOptions msgOptions) throws Exception - Throws:
Exception
-
updateProposal
public Proposal updateProposal(org.bouncycastle.crypto.AsymmetricCipherKeyPair leafSk, Group.LeafNodeOptions leafOptions) throws Exception - Throws:
Exception
-
getEpochAuthenticator
public byte[] getEpochAuthenticator()
-