本文整理汇总了Java中org.bouncycastle.pqc.crypto.gmss.GMSSParameters类的典型用法代码示例。如果您正苦于以下问题:Java GMSSParameters类的具体用法?Java GMSSParameters怎么用?Java GMSSParameters使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
GMSSParameters类属于org.bouncycastle.pqc.crypto.gmss包,在下文中一共展示了GMSSParameters类的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: GMSSPrivateKey
import org.bouncycastle.pqc.crypto.gmss.GMSSParameters; //导入依赖的package包/类
public GMSSPrivateKey(int[] index, byte[][] currentSeed,
byte[][] nextNextSeed, byte[][][] currentAuthPath,
byte[][][] nextAuthPath, Treehash[][] currentTreehash,
Treehash[][] nextTreehash, Vector[] currentStack,
Vector[] nextStack, Vector[][] currentRetain,
Vector[][] nextRetain, byte[][][] keep, GMSSLeaf[] nextNextLeaf,
GMSSLeaf[] upperLeaf, GMSSLeaf[] upperTreehashLeaf,
int[] minTreehash, byte[][] nextRoot, GMSSRootCalc[] nextNextRoot,
byte[][] currentRootSig, GMSSRootSig[] nextRootSig,
GMSSParameters gmssParameterset, AlgorithmIdentifier digestAlg)
{
AlgorithmIdentifier[] names = new AlgorithmIdentifier[] { digestAlg };
this.primitive = encode(index, currentSeed, nextNextSeed, currentAuthPath, nextAuthPath, keep, currentTreehash, nextTreehash, currentStack, nextStack, currentRetain, nextRetain, nextNextLeaf, upperLeaf, upperTreehashLeaf, minTreehash, nextRoot, nextNextRoot, currentRootSig, nextRootSig, gmssParameterset, names);
}
开发者ID:Appdome,项目名称:ipack,代码行数:15,代码来源:GMSSPrivateKey.java
示例2: GMSSPrivateKeySpec
import org.bouncycastle.pqc.crypto.gmss.GMSSParameters; //导入依赖的package包/类
/**
* @param index tree indices
* @param currentSeed seed for the generation of private OTS keys for the
* current subtrees (TREE)
* @param nextNextSeed seed for the generation of private OTS keys for the
* subtrees after next (TREE++)
* @param currentAuthPath array of current authentication paths (AUTHPATH)
* @param nextAuthPath array of next authentication paths (AUTHPATH+)
* @param keep keep array for the authPath algorithm
* @param currentTreehash treehash for authPath algorithm of current tree
* @param nextTreehash treehash for authPath algorithm of next tree (TREE+)
* @param currentStack shared stack for authPath algorithm of current tree
* @param nextStack shared stack for authPath algorithm of next tree (TREE+)
* @param currentRetain retain stack for authPath algorithm of current tree
* @param nextRetain retain stack for authPath algorithm of next tree (TREE+)
* @param nextNextLeaf array of upcoming leafs of the tree after next (LEAF++) of
* each layer
* @param upperLeaf needed for precomputation of upper nodes
* @param upperTreehashLeaf needed for precomputation of upper treehash nodes
* @param minTreehash index of next treehash instance to receive an update
* @param nextRoot the roots of the next trees (ROOT+)
* @param nextNextRoot the roots of the tree after next (ROOT++)
* @param currentRootSig array of signatures of the roots of the current subtrees
* (SIG)
* @param nextRootSig array of signatures of the roots of the next subtree
* (SIG+)
* @param gmssParameterset the GMSS Parameterset
*/
public GMSSPrivateKeySpec(int[] index, byte[][] currentSeed,
byte[][] nextNextSeed, byte[][][] currentAuthPath,
byte[][][] nextAuthPath, Treehash[][] currentTreehash,
Treehash[][] nextTreehash, Vector[] currentStack,
Vector[] nextStack, Vector[][] currentRetain,
Vector[][] nextRetain, byte[][][] keep, GMSSLeaf[] nextNextLeaf,
GMSSLeaf[] upperLeaf, GMSSLeaf[] upperTreehashLeaf,
int[] minTreehash, byte[][] nextRoot, GMSSRootCalc[] nextNextRoot,
byte[][] currentRootSig, GMSSRootSig[] nextRootSig,
GMSSParameters gmssParameterset)
{
this.index = index;
this.currentSeed = currentSeed;
this.nextNextSeed = nextNextSeed;
this.currentAuthPath = currentAuthPath;
this.nextAuthPath = nextAuthPath;
this.currentTreehash = currentTreehash;
this.nextTreehash = nextTreehash;
this.currentStack = currentStack;
this.nextStack = nextStack;
this.currentRetain = currentRetain;
this.nextRetain = nextRetain;
this.keep = keep;
this.nextNextLeaf = nextNextLeaf;
this.upperLeaf = upperLeaf;
this.upperTreehashLeaf = upperTreehashLeaf;
this.minTreehash = minTreehash;
this.nextRoot = nextRoot;
this.nextNextRoot = nextNextRoot;
this.currentRootSig = currentRootSig;
this.nextRootSig = nextRootSig;
this.gmssPS = gmssParameterset;
}
开发者ID:Appdome,项目名称:ipack,代码行数:62,代码来源:GMSSPrivateKeySpec.java
示例3: GMSSPublicKeySpec
import org.bouncycastle.pqc.crypto.gmss.GMSSParameters; //导入依赖的package包/类
/**
* The constructor.
*
* @param key a raw GMSS public key
* @param gmssParameterSet an instance of GMSSParameterSet
*/
public GMSSPublicKeySpec(byte[] key, GMSSParameters gmssParameterSet)
{
super(gmssParameterSet);
this.gmssPublicKey = key;
}
开发者ID:Appdome,项目名称:ipack,代码行数:13,代码来源:GMSSPublicKeySpec.java
示例4: getGmssPS
import org.bouncycastle.pqc.crypto.gmss.GMSSParameters; //导入依赖的package包/类
public GMSSParameters getGmssPS()
{
return gmssPS;
}
开发者ID:Appdome,项目名称:ipack,代码行数:5,代码来源:GMSSPrivateKeySpec.java
示例5: GMSSKeySpec
import org.bouncycastle.pqc.crypto.gmss.GMSSParameters; //导入依赖的package包/类
protected GMSSKeySpec(GMSSParameters gmssParameterSet)
{
this.gmssParameterSet = gmssParameterSet;
}
开发者ID:Appdome,项目名称:ipack,代码行数:5,代码来源:GMSSKeySpec.java
示例6: getParameterSet
import org.bouncycastle.pqc.crypto.gmss.GMSSParameters; //导入依赖的package包/类
/**
* @return The GMSS Parameterset
*/
public GMSSParameters getParameterSet()
{
return gmssParameterSet;
}
开发者ID:Appdome,项目名称:ipack,代码行数:8,代码来源:BCGMSSPublicKey.java
示例7: performTest
import org.bouncycastle.pqc.crypto.gmss.GMSSParameters; //导入依赖的package包/类
public void performTest()
throws Exception
{
GMSSParameters params = new GMSSParameters(3,
new int[]{15, 15, 10}, new int[]{5, 5, 4}, new int[]{3, 3, 2});
GMSSDigestProvider digProvider = new GMSSDigestProvider()
{
public Digest get()
{
return new SHA224Digest();
}
};
GMSSKeyPairGenerator gmssKeyGen = new GMSSKeyPairGenerator(digProvider);
GMSSKeyGenerationParameters genParam = new GMSSKeyGenerationParameters(keyRandom, params);
gmssKeyGen.init(genParam);
AsymmetricCipherKeyPair pair = gmssKeyGen.generateKeyPair();
ParametersWithRandom param = new ParametersWithRandom(pair.getPrivate(), keyRandom);
// TODO
Signer gmssSigner = new DigestingMessageSigner(new GMSSSigner(digProvider), new SHA224Digest());
gmssSigner.init(true, param);
byte[] message = BigIntegers.asUnsignedByteArray(new BigInteger("968236873715988614170569073515315707566766479517"));
gmssSigner.update(message, 0, message.length);
byte[] sig = gmssSigner.generateSignature();
gmssSigner.init(false, pair.getPublic());
gmssSigner.update(message, 0, message.length);
if (!gmssSigner.verifySignature(sig))
{
fail("verification fails");
}
if (!((GMSSPrivateKeyParameters)pair.getPrivate()).isUsed())
{
fail("private key not marked as used");
}
}
开发者ID:credentials,项目名称:irma_future_id,代码行数:47,代码来源:GMSSSignerTest.java
示例8: getParameters
import org.bouncycastle.pqc.crypto.gmss.GMSSParameters; //导入依赖的package包/类
/**
* Returns the GMSS parameter set
*
* @return The GMSS parameter set
*/
public GMSSParameters getParameters()
{
return gmssParameterSet;
}
开发者ID:Appdome,项目名称:ipack,代码行数:10,代码来源:GMSSKeySpec.java
示例9: BCGMSSPublicKey
import org.bouncycastle.pqc.crypto.gmss.GMSSParameters; //导入依赖的package包/类
/**
* The constructor
*
* @param pub a raw GMSS public key
* @param gmssParameterSet an instance of GMSS Parameterset
* @see org.bouncycastle.pqc.crypto.gmss.GMSSKeyPairGenerator
*/
public BCGMSSPublicKey(byte[] pub, GMSSParameters gmssParameterSet)
{
this.gmssParameterSet = gmssParameterSet;
this.publicKeyBytes = pub;
}
开发者ID:Appdome,项目名称:ipack,代码行数:13,代码来源:BCGMSSPublicKey.java
注:本文中的org.bouncycastle.pqc.crypto.gmss.GMSSParameters类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论