/** * Set up constructor. * * @param params tree parameters * @param publicSeed public seed for tree * @param secretKeySeed secret seed for tree * @param otsHashAddress hash address */ BDS(XMSSParameters params, byte[] publicSeed, byte[] secretKeySeed, OTSHashAddress otsHashAddress) { this(params.getWOTSPlus(), params.getHeight(), params.getK()); this.initialize(publicSeed, secretKeySeed, otsHashAddress); }
/** * Set up constructor for a tree where the original BDS state was lost. * * @param params tree parameters * @param publicSeed public seed for tree * @param secretKeySeed secret seed for tree * @param otsHashAddress hash address * @param index index counter for the state to be at. */ BDS(XMSSParameters params, byte[] publicSeed, byte[] secretKeySeed, OTSHashAddress otsHashAddress, int index) { this(params.getWOTSPlus(), params.getHeight(), params.getK()); this.initialize(publicSeed, secretKeySeed, otsHashAddress); while (this.index < index) { this.nextAuthenticationPath(publicSeed, secretKeySeed, otsHashAddress); this.used = false; } }