All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.bouncycastle.pqc.jcajce.spec.SPHINCS256KeyGenParameterSpec Maven / Gradle / Ivy

Go to download

The Bouncy Castle Crypto package is a Java implementation of cryptographic algorithms. This jar contains JCE provider and lightweight API for the Bouncy Castle Cryptography APIs for JDK 1.5 to JDK 1.8. Note: this package includes the NTRU encryption algorithms.

There is a newer version: 1.70
Show newest version
package org.bouncycastle.pqc.jcajce.spec;

import java.security.spec.AlgorithmParameterSpec;

/**
 * Key generation spec for SPHINCS-256 to allow specifying of tree hash.
 */
public class SPHINCS256KeyGenParameterSpec
    implements AlgorithmParameterSpec
{
    /**
     * Use SHA512-256 for the tree generation function.
     */
    public static final String SHA512_256 = "SHA512-256";

    /**
     * Use SHA3-256 for the tree generation function.
     */
    public static final String SHA3_256 = "SHA3-256";

    private final String treeHash;

    /**
     * Default constructor SHA512-256
     */
    public SPHINCS256KeyGenParameterSpec()
    {
        this(SHA512_256);
    }

    /**
     * Specify the treehash, one of SHA512-256, or SHA3-256.
     *
     * @param treeHash the hash for building the public key tree.
     */
    public SPHINCS256KeyGenParameterSpec(String treeHash)
    {
        this.treeHash = treeHash;
    }

    public String getTreeDigest()
    {
        return treeHash;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy