Top Fields Constructors Methods
org.bouncycastle.mls.TreeKEM

public Class TreeKEMPublicKey

Additional top-level class in compilation unit: FilteredDirectPath.

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.security.InvalidParameterException, java.util.ArrayList, .Arrays, .Collections, .HashMap, .List, .Map, org.bouncycastle.crypto.AsymmetricCipherKeyPair, org.bouncycastle.mls.TreeSize, org.bouncycastle.mls.codec.HPKECiphertext, .MLSInputStream, .MLSOutputStream, .UpdatePath, .UpdatePathNode, org.bouncycastle.mls.crypto.MlsCipherSuite, .Secret, org.bouncycastle.mls.protocol.Group, org.bouncycastle.util.Strings, org.bouncycastle.util.encoders.Hex

Field Summary

Modifier and TypeField and Description
private final Map<NodeIndex, Integer>
pack-priv Map<NodeIndex, byte[]>
pack-priv ArrayList<OptionalNode>
pack-priv TreeSize
pack-priv MlsCipherSuite
private final Map<NodeIndex, byte[]>

Constructor Summary

AccessConstructor and Description
public
public

Method Summary

Modifier and TypeMethod and Description
public LeafIndex
public LeafIndex
public void
private void
public static TreeKEMPublicKey
public String
dump()

public String
public UpdatePath
encap(TreeKEMPrivateKey priv, byte[] context, List<LeafIndex> except)

public int
find(LeafNode leaf)

protected FilteredDirectPath
protected FilteredDirectPath
public byte[]
public LeafNode
private byte[]
public byte[]
public TreeSize
public MlsCipherSuite
public boolean
private boolean
hasParentHash(NodeIndex child, byte[] targetParentHash)

public void
private OptionalNode
pack-priv OptionalNode
private byte[]
private byte[]
originalTreeHash(NodeIndex index, List<LeafIndex> parentExcept)

private byte[][]
public ArrayList<NodeIndex>
public void
public void
public void
public TreeKEMPrivateKey
update(LeafIndex from, Secret leafSecret, byte[] groupId, byte[] sigPriv, Group.LeafNodeOptions options)

public void
pack-priv int
public boolean
public boolean
public void
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

exceptCacheback to summary
private final Map<NodeIndex, Integer> exceptCache
hashesback to summary
pack-priv Map<NodeIndex, byte[]> hashes
nodesback to summary
pack-priv ArrayList<OptionalNode> nodes
sizeback to summary
pack-priv TreeSize size
suiteback to summary
pack-priv MlsCipherSuite suite
treeHashCacheback to summary
private final Map<NodeIndex, byte[]> treeHashCache

Constructor Detail

TreeKEMPublicKeyback to summary
public TreeKEMPublicKey(MlsCipherSuite suite) throws IOException
TreeKEMPublicKeyback to summary
public TreeKEMPublicKey(MLSInputStream stream) throws IOException
Annotations
@SuppressWarnings:unused

Method Detail

addLeafback to summary
public LeafIndex addLeaf(LeafNode leaf)
allocateLeafback to summary
public LeafIndex allocateLeaf()
blankPathback to summary
public void blankPath(LeafIndex index)
clearHashPathback to summary
private void clearHashPath(LeafIndex index)
cloneback to summary
public static TreeKEMPublicKey clone(TreeKEMPublicKey other) throws IOException
dumpback to summary
public String dump()
dumpHashesback to summary
public String dumpHashes()
encapback to summary
public UpdatePath encap(TreeKEMPrivateKey priv, byte[] context, List<LeafIndex> except) throws Exception
findback to summary
public int find(LeafNode leaf)
getFilteredCommonDirectPathback to summary
protected FilteredDirectPath getFilteredCommonDirectPath(LeafIndex leaf1, LeafIndex leaf2) throws Exception
getFilteredDirectPathback to summary
protected FilteredDirectPath getFilteredDirectPath(NodeIndex index) throws Exception
getHashback to summary
public byte[] getHash(NodeIndex index) throws IOException
getLeafNodeback to summary
public LeafNode getLeafNode(LeafIndex index)
getParentHashback to summary
private byte[] getParentHash(ParentNode parent, NodeIndex cpChild) throws Exception
getRootHashback to summary
public byte[] getRootHash() throws Exception
getSizeback to summary
public TreeSize getSize()
getSuiteback to summary
public MlsCipherSuite getSuite()
hasLeafback to summary
public boolean hasLeaf(LeafIndex index)
hasParentHashback to summary
private boolean hasParentHash(NodeIndex child, byte[] targetParentHash)
mergeback to summary
public void merge(LeafIndex from, UpdatePath path) throws Exception
nodeAtback to summary
private OptionalNode nodeAt(LeafIndex n)
nodeAtback to summary
pack-priv OptionalNode nodeAt(NodeIndex n)
originalParentHashback to summary
private byte[] originalParentHash(NodeIndex parent, NodeIndex sibling) throws IOException
originalTreeHashback to summary
private byte[] originalTreeHash(NodeIndex index, List<LeafIndex> parentExcept) throws IOException
parentHashesback to summary
private byte[][] parentHashes(LeafIndex from, FilteredDirectPath fdp, List<UpdatePathNode> nodes) throws Exception
resolveback to summary
public ArrayList<NodeIndex> resolve(NodeIndex index)
setHashAllback to summary
public void setHashAll() throws IOException
setSuiteback to summary
public void setSuite(MlsCipherSuite suite)
truncateback to summary
public void truncate()
updateback to summary
public TreeKEMPrivateKey update(LeafIndex from, Secret leafSecret, byte[] groupId, byte[] sigPriv, Group.LeafNodeOptions options) throws Exception
updateLeafback to summary
public void updateLeaf(LeafIndex index, LeafNode leaf)
upperBoundback to summary
pack-priv int upperBound(List<LeafIndex> list, LeafIndex index)
verifyParentHashback to summary
public boolean verifyParentHash(LeafIndex from, UpdatePath path) throws Exception
verifyParentHashback to summary
public boolean verifyParentHash() throws IOException
writeToback to summary
public void writeTo(MLSOutputStream stream) throws IOException

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

Annotations
@Override