Top Fields Constructors Methods
org.bouncycastle.mls.TreeKEM

public Class LeafNode

extends Object
implements Readable, Writable
Class Inheritance
All Implemented Interfaces
org.bouncycastle.mls.codec.MLSOutputStream.Writable, org.bouncycastle.mls.codec.MLSInputStream.Readable
Imports
java.io.IOException, java.util.ArrayList, .Arrays, .List, org.bouncycastle.mls.codec.Capabilities, .Credential, .CredentialType, .Extension, .MLSInputStream, .MLSOutputStream, org.bouncycastle.mls.crypto.MlsCipherSuite, org.bouncycastle.mls.protocol.Group

Field Summary

Modifier and TypeField and Description
pack-priv Capabilities
pack-priv Credential
pack-priv byte[]
pack-priv List<Extension>
pack-priv LeafNodeSource
pack-priv LifeTime
pack-priv byte[]
pack-priv byte[]
pack-priv byte[]
pack-priv MlsCipherSuite

Constructor Summary

AccessConstructor and Description
public
LeafNode(MlsCipherSuite suite, byte[] encryption_key, byte[] signature_key, Credential credential, Capabilities capabilities, LifeTime lifeTime, List<Extension> extensions, byte[] sigSk)

public
public

Method Summary

Modifier and TypeMethod and Description
public LeafNode
copy(byte[] encKeyIn)

public LeafNode
copyWithOptions(byte[] encKeyIn, Group.LeafNodeOptions options)

public boolean
equals(Object
the reference object with which to compare.
o
)

Overrides java.lang.Object.equals.

Indicates whether some other object is "equal to" this one.

public LeafNode
forCommit(MlsCipherSuite suite, byte[] groupId, LeafIndex leafIndex, byte[] encKeyIn, byte[] parentHash, Group.LeafNodeOptions options, byte[] sigPriv)

public LeafNode
forUpdate(MlsCipherSuite suite, byte[] groupId, LeafIndex leafIndex, byte[] encKeyIn, Group.LeafNodeOptions options, byte[] sigPriv)

public Capabilities
public Credential
public CredentialType
public byte[]
public List<Extension>
public LifeTime
public byte[]
public LeafNodeSource
public MlsCipherSuite
private void
sign(MlsCipherSuite suite, byte[] sigPriv, byte[] tbs)

public byte[]
toBeSigned(byte[] groupId, int leafIndex)

public boolean
verify(MlsCipherSuite suite, byte[] tbs)

public boolean
public boolean
public void
Inherited from java.lang.Object:
clonefinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

capabilitiesback to summary
pack-priv Capabilities capabilities
credentialback to summary
pack-priv Credential credential
encryption_keyback to summary
pack-priv byte[] encryption_key
extensionsback to summary
pack-priv List<Extension> extensions
leaf_node_sourceback to summary
pack-priv LeafNodeSource leaf_node_source
lifeTimeback to summary
pack-priv LifeTime lifeTime
parent_hashback to summary
pack-priv byte[] parent_hash
signatureback to summary
pack-priv byte[] signature
signature_keyback to summary
pack-priv byte[] signature_key
suiteback to summary
pack-priv MlsCipherSuite suite

Constructor Detail

LeafNodeback to summary
public LeafNode(MlsCipherSuite suite, byte[] encryption_key, byte[] signature_key, Credential credential, Capabilities capabilities, LifeTime lifeTime, List<Extension> extensions, byte[] sigSk) throws Exception
LeafNodeback to summary
public LeafNode()
LeafNodeback to summary
public LeafNode(MLSInputStream stream) throws IOException

Method Detail

copyback to summary
public LeafNode copy(byte[] encKeyIn)
copyWithOptionsback to summary
public LeafNode copyWithOptions(byte[] encKeyIn, Group.LeafNodeOptions options)
equalsback to summary
public boolean equals(Object o)

Overrides java.lang.Object.equals.

Doc from java.lang.Object.equals.

Indicates whether some other object is "equal to" this one.

The equals method implements an equivalence relation on non-null object references:

  • It is reflexive: for any non-null reference value x, x.equals(x) should return true.
  • It is symmetric: for any non-null reference values x and y, x.equals(y) should return true if and only if y.equals(x) returns true.
  • It is transitive: for any non-null reference values x, y, and z, if x.equals(y) returns true and y.equals(z) returns true, then x.equals(z) should return true.
  • It is consistent: for any non-null reference values x and y, multiple invocations of x.equals(y) consistently return true or consistently return false, provided no information used in equals comparisons on the objects is modified.
  • For any non-null reference value x, x.equals(null) should return false.

An equivalence relation partitions the elements it operates on into equivalence classes; all the members of an equivalence class are equal to each other. Members of an equivalence class are substitutable for each other, at least for some purposes.

Parameters
o:Object

the reference object with which to compare.

Returns:boolean

true if this object is the same as the obj argument; false otherwise.

Annotations
@Override
forCommitback to summary
public LeafNode forCommit(MlsCipherSuite suite, byte[] groupId, LeafIndex leafIndex, byte[] encKeyIn, byte[] parentHash, Group.LeafNodeOptions options, byte[] sigPriv) throws Exception
forUpdateback to summary
public LeafNode forUpdate(MlsCipherSuite suite, byte[] groupId, LeafIndex leafIndex, byte[] encKeyIn, Group.LeafNodeOptions options, byte[] sigPriv) throws Exception
getCapabilitiesback to summary
public Capabilities getCapabilities()
getCredentialback to summary
public Credential getCredential()
getCredentialTypeback to summary
public CredentialType getCredentialType()
getEncryptionKeyback to summary
public byte[] getEncryptionKey()
getExtensionsback to summary
public List<Extension> getExtensions()
getLifeTimeback to summary
public LifeTime getLifeTime()
getSignatureKeyback to summary
public byte[] getSignatureKey()
getSourceback to summary
public LeafNodeSource getSource()
getSuiteback to summary
public MlsCipherSuite getSuite()
signback to summary
private void sign(MlsCipherSuite suite, byte[] sigPriv, byte[] tbs) throws Exception
toBeSignedback to summary
public byte[] toBeSigned(byte[] groupId, int leafIndex) throws IOException
verifyback to summary
public boolean verify(MlsCipherSuite suite, byte[] tbs) throws IOException
verifyExtensionSupportback to summary
public boolean verifyExtensionSupport(List<Extension> extensions)
verifyLifetimeback to summary
public boolean verifyLifetime()
writeToback to summary
public void writeTo(MLSOutputStream stream) throws IOException

Implements org.bouncycastle.mls.codec.MLSOutputStream.Writable.writeTo.

Annotations
@Override