LTreeAddress lTreeAddress = (LTreeAddress)new LTreeAddress.Builder() .withLayerAddress(otsHashAddress.getLayerAddress()).withTreeAddress(otsHashAddress.getTreeAddress()) .build(); HashTreeAddress hashTreeAddress = (HashTreeAddress)new HashTreeAddress.Builder() .withLayerAddress(otsHashAddress.getLayerAddress()).withTreeAddress(otsHashAddress.getTreeAddress()) lTreeAddress = (LTreeAddress)new LTreeAddress.Builder().withLayerAddress(lTreeAddress.getLayerAddress()) .withTreeAddress(lTreeAddress.getTreeAddress()).withLTreeAddress(index) .withTreeHeight(lTreeAddress.getTreeHeight()).withTreeIndex(lTreeAddress.getTreeIndex()) .withKeyAndMask(lTreeAddress.getKeyAndMask()).build(); XMSSNode node = XMSSNodeUtil.lTree(wotsPlus, wotsPlusPublicKey, lTreeAddress); authenticationPath.set(0, node);
address = (LTreeAddress)new LTreeAddress.Builder().withLayerAddress(tmpAddress.getLayerAddress()) .withTreeAddress(tmpAddress.getTreeAddress()).withLTreeAddress(tmpAddress.getLTreeAddress()) .withTreeHeight(tmpAddress.getTreeHeight()).withTreeIndex(tmpAddress.getTreeIndex()) .withKeyAndMask(0).build(); address = (LTreeAddress)new LTreeAddress.Builder().withLayerAddress(tmpAddress.getLayerAddress()) .withTreeAddress(tmpAddress.getTreeAddress()).withLTreeAddress(tmpAddress.getLTreeAddress()) .withTreeHeight(tmpAddress.getTreeHeight()).withTreeIndex(tmpAddress.getTreeIndex()) .withKeyAndMask(1).build(); address = (LTreeAddress)new LTreeAddress.Builder().withLayerAddress(tmpAddress.getLayerAddress()) .withTreeAddress(tmpAddress.getTreeAddress()).withLTreeAddress(tmpAddress.getLTreeAddress()) .withTreeHeight(tmpAddress.getTreeHeight()).withTreeIndex(tmpAddress.getTreeIndex()) .withKeyAndMask(2).build();
LTreeAddress lTreeAddress = (LTreeAddress)new LTreeAddress.Builder() .withLayerAddress(otsHashAddress.getLayerAddress()).withTreeAddress(otsHashAddress.getTreeAddress()) .build(); HashTreeAddress hashTreeAddress = (HashTreeAddress)new HashTreeAddress.Builder() .withLayerAddress(otsHashAddress.getLayerAddress()).withTreeAddress(otsHashAddress.getTreeAddress()) lTreeAddress = (LTreeAddress)new LTreeAddress.Builder().withLayerAddress(lTreeAddress.getLayerAddress()) .withTreeAddress(lTreeAddress.getTreeAddress()).withLTreeAddress(indexLeaf) .withTreeHeight(lTreeAddress.getTreeHeight()).withTreeIndex(lTreeAddress.getTreeIndex()) .withKeyAndMask(lTreeAddress.getKeyAndMask()).build(); XMSSNode node = XMSSNodeUtil.lTree(wotsPlus, wotsPlusPublicKey, lTreeAddress);
.withHashAddress(otsHashAddress.getHashAddress()).withKeyAndMask(otsHashAddress.getKeyAndMask()) .build(); LTreeAddress lTreeAddress = (LTreeAddress)new LTreeAddress.Builder() .withLayerAddress(otsHashAddress.getLayerAddress()).withTreeAddress(otsHashAddress.getTreeAddress()) .withLTreeAddress(nextIndex).build(); HashTreeAddress hashTreeAddress = (HashTreeAddress)new HashTreeAddress.Builder() .withLayerAddress(otsHashAddress.getLayerAddress()).withTreeAddress(otsHashAddress.getTreeAddress())
LTreeAddress lTreeAddress = (LTreeAddress)new LTreeAddress.Builder() .withLayerAddress(otsHashAddress.getLayerAddress()).withTreeAddress(otsHashAddress.getTreeAddress()) .withLTreeAddress(otsHashAddress.getOTSAddress()).build(); HashTreeAddress hashTreeAddress = (HashTreeAddress)new HashTreeAddress.Builder() .withLayerAddress(otsHashAddress.getLayerAddress()).withTreeAddress(otsHashAddress.getTreeAddress())
address = (LTreeAddress)new LTreeAddress.Builder().withLayerAddress(address.getLayerAddress()) .withTreeAddress(address.getTreeAddress()).withLTreeAddress(address.getLTreeAddress()).withTreeHeight(0) .withTreeIndex(address.getTreeIndex()).withKeyAndMask(address.getKeyAndMask()).build(); while (len > 1) address = (LTreeAddress)new LTreeAddress.Builder().withLayerAddress(address.getLayerAddress()) .withTreeAddress(address.getTreeAddress()).withLTreeAddress(address.getLTreeAddress()) .withTreeHeight(address.getTreeHeight()).withTreeIndex(i) .withKeyAndMask(address.getKeyAndMask()).build(); publicKeyNodes[i] = randomizeHash(wotsPlus, publicKeyNodes[2 * i], publicKeyNodes[(2 * i) + 1], address); address = (LTreeAddress)new LTreeAddress.Builder().withLayerAddress(address.getLayerAddress()) .withTreeAddress(address.getTreeAddress()).withLTreeAddress(address.getLTreeAddress()) .withTreeHeight(address.getTreeHeight() + 1).withTreeIndex(address.getTreeIndex()) .withKeyAndMask(address.getKeyAndMask()).build();