• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Java GMSSRandom类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中org.bouncycastle.pqc.crypto.gmss.util.GMSSRandom的典型用法代码示例。如果您正苦于以下问题:Java GMSSRandom类的具体用法?Java GMSSRandom怎么用?Java GMSSRandom使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



GMSSRandom类属于org.bouncycastle.pqc.crypto.gmss.util包,在下文中一共展示了GMSSRandom类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: GMSSSigner

import org.bouncycastle.pqc.crypto.gmss.util.GMSSRandom; //导入依赖的package包/类
/**
 * The standard constructor tries to generate the MerkleTree Algorithm
 * identifier with the corresponding OID.
 *
 * @param digest     the digest to use
 */
// TODO
public GMSSSigner(GMSSDigestProvider digest)
{
    digestProvider = digest;
    messDigestTrees = digest.get();
    messDigestOTS = messDigestTrees;
    mdLength = messDigestTrees.getDigestSize();
    gmssRandom = new GMSSRandom(messDigestTrees);
}
 
开发者ID:Appdome,项目名称:ipack,代码行数:16,代码来源:GMSSSigner.java


示例2: GMSSRootSig

import org.bouncycastle.pqc.crypto.gmss.util.GMSSRandom; //导入依赖的package包/类
/**
 * The constructor generates the PRNG and initializes some variables
 *
 * @param digest   an array of strings, containing the digest of the used hash
 *               function, the digest of the PRGN and the names of the
 *               corresponding providers
 * @param w      the winternitz parameter
 * @param height the heigth of the tree
 */
public GMSSRootSig(Digest digest, int w, int height)
{
    messDigestOTS = digest;
    gmssRandom = new GMSSRandom(messDigestOTS);

    this.mdsize = messDigestOTS.getDigestSize();
    this.w = w;
    this.height = height;

    this.k = (1 << w) - 1;

    int mdsizeBit = mdsize << 3;
    this.messagesize = (int)Math.ceil((double)(mdsizeBit) / (double)w);
}
 
开发者ID:Appdome,项目名称:ipack,代码行数:24,代码来源:GMSSRootSig.java


示例3: GMSSLeaf

import org.bouncycastle.pqc.crypto.gmss.util.GMSSRandom; //导入依赖的package包/类
/**
 * This constructor regenerates a prior GMSSLeaf object
 *
 * @param digest   an array of strings, containing the name of the used hash
 *                 function and PRNG and the name of the corresponding
 *                 provider
 * @param otsIndex status bytes
 * @param numLeafs status ints
 */
public GMSSLeaf(Digest digest, byte[][] otsIndex, int[] numLeafs)
{
    this.i = numLeafs[0];
    this.j = numLeafs[1];
    this.steps = numLeafs[2];
    this.w = numLeafs[3];

    messDigestOTS = digest;

    gmssRandom = new GMSSRandom(messDigestOTS);

    // calulate keysize for private key and the help array
    mdsize = messDigestOTS.getDigestSize();
    int mdsizeBit = mdsize << 3;
    int messagesize = (int)Math.ceil((double)(mdsizeBit) / (double)w);
    int checksumsize = getLog((messagesize << w) + 1);
    this.keysize = messagesize
        + (int)Math.ceil((double)checksumsize / (double)w);
    this.two_power_w = 1 << w;

    // calculate steps
    // ((2^w)-1)*keysize + keysize + 1 / (2^h -1)

    // initialize arrays
    this.privateKeyOTS = otsIndex[0];
    this.seed = otsIndex[1];
    this.concHashs = otsIndex[2];
    this.leaf = otsIndex[3];
}
 
开发者ID:Appdome,项目名称:ipack,代码行数:39,代码来源:GMSSLeaf.java


示例4: GMSSKeyPairGenerator

import org.bouncycastle.pqc.crypto.gmss.util.GMSSRandom; //导入依赖的package包/类
/**
 * The standard constructor tries to generate the GMSS algorithm identifier
 * with the corresponding OID.
 * <p/>
 *
 * @param digestProvider     provider for digest implementations.
 */
public GMSSKeyPairGenerator(GMSSDigestProvider digestProvider)
{
    this.digestProvider = digestProvider;
    messDigestTree = digestProvider.get();

    // set mdLength
    this.mdLength = messDigestTree.getDigestSize();
    // construct randomizer
    this.gmssRandom = new GMSSRandom(messDigestTree);

}
 
开发者ID:Appdome,项目名称:ipack,代码行数:19,代码来源:GMSSKeyPairGenerator.java


示例5: GMSSKeyPairGenerator

import org.bouncycastle.pqc.crypto.gmss.util.GMSSRandom; //导入依赖的package包/类
/**
 * The standard constructor tries to generate the GMSS algorithm identifier
 * with the corresponding OID.
 *
 * @param digestProvider     provider for digest implementations.
 */
public GMSSKeyPairGenerator(GMSSDigestProvider digestProvider)
{
    this.digestProvider = digestProvider;
    messDigestTree = digestProvider.get();

    // set mdLength
    this.mdLength = messDigestTree.getDigestSize();
    // construct randomizer
    this.gmssRandom = new GMSSRandom(messDigestTree);

}
 
开发者ID:ttt43ttt,项目名称:gwt-crypto,代码行数:18,代码来源:GMSSKeyPairGenerator.java



注:本文中的org.bouncycastle.pqc.crypto.gmss.util.GMSSRandom类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java ESuccess类代码示例发布时间:2022-05-22
下一篇:
Java CyServiceRegistrar类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap