void setNode(XMSSNode node) { tailNode = node; height = node.getHeight(); if (height == initialHeight) { finished = true; } }
protected XMSSNode clone() { return new XMSSNode(getHeight(), getValue()); } }
.withTreeAddress(hashTreeAddress.getTreeAddress()).withTreeIndex(indexLeaf) .withKeyAndMask(hashTreeAddress.getKeyAndMask()).build(); while (!stack.isEmpty() && stack.peek().getHeight() == node.getHeight()) int indexOnHeight = indexLeaf / (1 << node.getHeight()); if (indexOnHeight == 1) if (indexOnHeight == 3 && node.getHeight() < (treeHeight - k)) treeHashInstances.get(node.getHeight()).setNode(node.clone()); if (indexOnHeight >= 3 && (indexOnHeight & 1) == 1 && node.getHeight() >= (treeHeight - k) && node.getHeight() <= (treeHeight - 2)) if (retain.get(node.getHeight()) == null) retain.put(node.getHeight(), queue); retain.get(node.getHeight()).add(node.clone()); .withKeyAndMask(hashTreeAddress.getKeyAndMask()).build(); node = XMSSNodeUtil.randomizeHash(wotsPlus, stack.pop(), node, hashTreeAddress); node = new XMSSNode(node.getHeight() + 1, node.getValue()); hashTreeAddress = (HashTreeAddress)new HashTreeAddress.Builder() .withLayerAddress(hashTreeAddress.getLayerAddress())
XMSSNode node = XMSSNodeUtil.lTree(wotsPlus, wotsPlusPublicKey, lTreeAddress); while (!stack.isEmpty() && stack.peek().getHeight() == node.getHeight() && stack.peek().getHeight() != initialHeight) .withKeyAndMask(hashTreeAddress.getKeyAndMask()).build(); node = XMSSNodeUtil.randomizeHash(wotsPlus, stack.pop(), node, hashTreeAddress); node = new XMSSNode(node.getHeight() + 1, node.getValue()); hashTreeAddress = (HashTreeAddress)new HashTreeAddress.Builder() .withLayerAddress(hashTreeAddress.getLayerAddress()) if (tailNode.getHeight() == node.getHeight()) .withKeyAndMask(hashTreeAddress.getKeyAndMask()).build(); node = XMSSNodeUtil.randomizeHash(wotsPlus, tailNode, node, hashTreeAddress); node = new XMSSNode(tailNode.getHeight() + 1, node.getValue()); tailNode = node; hashTreeAddress = (HashTreeAddress)new HashTreeAddress.Builder() if (tailNode.getHeight() == initialHeight) height = node.getHeight(); nextIndex++;
node = new XMSSNode(node.getHeight() + 1, node.getValue()); authenticationPath.set(tau, node); keep.remove(tau - 1);
.withKeyAndMask(hashTreeAddress.getKeyAndMask()).build(); node[1] = XMSSNodeUtil.randomizeHash(wotsPlus, node[0], signature.getAuthPath().get(k), hashTreeAddress); node[1] = new XMSSNode(node[1].getHeight() + 1, node[1].getValue()); .withKeyAndMask(hashTreeAddress.getKeyAndMask()).build(); node[1] = XMSSNodeUtil.randomizeHash(wotsPlus, signature.getAuthPath().get(k), node[0], hashTreeAddress); node[1] = new XMSSNode(node[1].getHeight() + 1, node[1].getValue());