亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? any_elgamal_pkcs1signature.java

?? jpeg2000編解碼
?? JAVA
?? 第 1 頁 / 共 2 頁
字號:
// $Id: Any_ElGamal_PKCS1Signature.java,v 1.1.1.1 2002/08/27 12:32:10 grosbois Exp $//// $Log: Any_ElGamal_PKCS1Signature.java,v $// Revision 1.1.1.1  2002/08/27 12:32:10  grosbois// Add cryptix 3.2//// Revision 1.4  2000/08/17 11:40:54  edwin// java.* -> xjava.*//// Revision 1.3  1997/12/14 17:37:58  hopwood// + Committed changes below.//// Revision 1.2.1  1997/12/10  hopwood// + initInternal was checking p before it was set.// + Cosmetics.//// Revision 1.2  1997/12/10 01:17:46  raif// + documentation.// + use cryptix.util.core.BI to process BigIntegers while//   signing and verifying signatures. Needed to eliminate size//   uncertainties when converting BigInteger to/from byte arrays.// + added tests for null objects in initInternal() and engineInitSign()//   methods.// + changed the AlgId semantics to align with RSA implementations.//// Revision 1.1  1997/12/07 06:37:27  hopwood// + Major overhaul of ElGamal to match RSA.//// Revision 1.1.1.1.1  1997/11/22  hopwood// + Renamed this class to Any_RSA_PKCS1Signature from//   RawElGamalSignature.//// Revision 1.1.1.1  1997/11/03 22:36:56  hopwood// + Imported to CVS (tagged as 'start').//// $Endlog$/* * Copyright (c) 1997 Systemics Ltd * on behalf of the Cryptix Development Team.  All rights reserved. */package cryptix.provider.elgamal;import cryptix.CryptixException;import cryptix.util.core.BI;import cryptix.util.core.Debug;import cryptix.util.core.Hex;import java.io.ByteArrayInputStream;import java.io.ByteArrayOutputStream;import java.io.IOException;import java.io.PrintWriter;import java.math.BigInteger;import java.util.Random;import java.security.Signature;import java.security.MessageDigest;import java.security.SecureRandom;import java.security.PublicKey;import java.security.PrivateKey;import java.security.SignatureException;import java.security.InvalidKeyException;import java.security.InvalidParameterException;import xjava.security.interfaces.ElGamalPublicKey;import xjava.security.interfaces.ElGamalPrivateKey;/** * An abstract class to digest a message and sign/verify the resulting * hash value, using any JCA MessageDigest algorithm with the ElGamal * digital signature scheme, and formatting and padding conventions * based on PKCS#1. * <p> * <b>References:</b> * <ol> *   <li> <a href="mailto:schneier@counterpane.com">Bruce Schneier</a>, *        "Section 19.6 ElGamal," *        <cite>Applied Cryptography, 2nd edition</cite>, *        John Wiley &amp; Sons, 1996. *        <p> *   <li> PKCS#1 *        An RSA Laboratories Technical Note<br> *        Version 1.5<br> *        Revised November 1, 1993<br> *        An "RSA Data Security, Inc. Public-Key Cryptography Standard (PKCS)" * </ol> * <p> * <b>$Revision: 1.1.1.1 $</b> * @author David Hopwood * @since  Cryptix 2.2.2 * * @see java.security.interfaces.ElGamalKey * @see ElGamalCipher * @see java.security.Signature */public abstract class Any_ElGamal_PKCS1Signatureextends Signature{// Debugging methods and vars.//............................................................................    private static final boolean DEBUG = Debug.GLOBAL_DEBUG;    private static final int debuglevel =        DEBUG ? Debug.getLevel("ElGamal", "Any_ElGamal_PKCS1Signature") : 0;    private static final PrintWriter err = DEBUG ? Debug.getOutput() : null;    private static void debug(String s) { err.println("Any_ElGamal_PKCS1Signature: " + s); }// Constants and variables//............................................................................    /**     * The minimum length of <i>p</i> in bits.     */    private static final int MIN_BITLENGTH = 256;    private static final int POSITIVE = 1;    private static final BigInteger ZERO = BigInteger.valueOf(0);    private static final BigInteger ONE = BigInteger.valueOf(1);    private BigInteger p;    private BigInteger g;    private BigInteger x; // null if the state is ENCRYPT    private BigInteger y;    private int primeLen;    private Random rng;    private MessageDigest md;// Constructor//............................................................................    /**     * Constructor for an Any_ElGamal_PKCS1Signature.     *     * @param  mdAlgorithm  the standard JCA algorithm name of the message     *                      digest to be used.     */    protected Any_ElGamal_PKCS1Signature (String mdAlgorithm) {        super(mdAlgorithm + "/ElGamal/PKCS#1");        try { md = MessageDigest.getInstance(mdAlgorithm); }        catch (Exception e) {            throw new CryptixException(getAlgorithm() +                ": Unable to instantiate the " + mdAlgorithm +                " MessageDigest\n" + e);        }    }// Signature abstract methods implementation//............................................................................    /**     * <b>SPI</b>: Initializes the cipher for signing, using the     * given private key. The key object must implement     * java.security.interfaces.ElGamalPrivateKey.     * <p>     * The input to this algorithm will be padded on the left with random     * bits, up to the size of a block, before signing.     *     * @param key   the private key     * @exception InvalidKeyException if !(key instanceof     *          java.security.interfaces.ElGamalPrivateKey)     */    protected void engineInitSign(PrivateKey key) throws InvalidKeyException {        if (!(key instanceof ElGamalPrivateKey))            throw new InvalidKeyException("ElGamal: signing key does not implement java.security.interfaces.ElGamalPrivateKey");        ElGamalPrivateKey privateKey = (ElGamalPrivateKey) key;        BigInteger newX = privateKey.getX();        if (newX == null) throw new InvalidKeyException("ElGamal: getX() == null");        initInternal(privateKey.getP(), privateKey.getG(),                     newX, privateKey.getY());        if (rng == null)            rng = new SecureRandom();    }    /**     * <b>SPI</b>: Initializes the cipher for verification, using the     * given public key. The key object must implement     * java.security.interfaces.ElGamalPublicKey.     *     * @param key   the public key     * @exception InvalidKeyException if !(key instanceof     *          java.security.interfaces.ElGamalPublicKey)     */    protected void engineInitVerify(PublicKey key) throws InvalidKeyException {        if (!(key instanceof ElGamalPublicKey))            throw new InvalidKeyException("ElGamal: verification key does not implement java.security.interfaces.ElGamalPublicKey");        ElGamalPublicKey publicKey = (ElGamalPublicKey) key;        initInternal(publicKey.getP(), publicKey.getG(),                     null, publicKey.getY());        if (rng == null)            rng = new SecureRandom();    }    private void initInternal(BigInteger newP, BigInteger newG,                              BigInteger newX, BigInteger newY)            throws InvalidKeyException{        if (newP == null) throw new InvalidKeyException("ElGamal: getP() == null");        if (newG == null) throw new InvalidKeyException("ElGamal: getG() == null");        if (newY == null) throw new InvalidKeyException("ElGamal: getY() == null");        if (newP.bitLength() < MIN_BITLENGTH)            throw new InvalidKeyException("ElGamal: getP().bitLength() < " + MIN_BITLENGTH);        if (newP.compareTo(ONE) <= 0)            throw new InvalidKeyException("ElGamal: getP() < 2");        p = newP;        g = newG;        x = newX;        y = newY;        primeLen = (p.bitLength() + 7) / 8;        md.reset();    }    /**     * Updates the data to be signed or verified, using one byte.     *     * @param  b  the byte to use for the update process.     * @exception SignatureException if the engine is not initialised properly.     */    protected void engineUpdate (byte b)    throws SignatureException {        if (state != VERIFY && state != SIGN)            throw new SignatureException(getAlgorithm() + ": Not initialized");        md.update(b);    }    /**     * Updates the data to be signed or verified, using the specified     * sub-array of bytes, starting at the specified offset.     *     * @param  in      the array of bytes.     * @param  offset  the offset to start from in <i>in</i>.     * @param  length  the number of bytes to use, starting at <i>offset</i>.     * @exception SignatureException if the engine is not initialised properly.     */    protected void engineUpdate (byte[] in, int offset, int length)    throws SignatureException {        if (state != VERIFY && state != SIGN)            throw new SignatureException(getAlgorithm() + ": Not initialized");        md.update(in, offset, length);

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日韩精品中文字幕在线不卡尤物| 成人avav在线| 亚洲精品视频一区二区| 国产精品色眯眯| 国产人久久人人人人爽| 久久理论电影网| 久久亚洲欧美国产精品乐播| 久久久精品天堂| 欧美激情综合在线| 国产精品毛片高清在线完整版 | 亚洲精品美国一| 中文字幕中文字幕一区二区| 欧美国产日产图区| 国产精品久久久久久久裸模 | 成人免费毛片app| 成人午夜免费电影| 不卡av免费在线观看| 91福利国产成人精品照片| 91高清在线观看| 日韩精品一区二区三区中文不卡 | 中文字幕不卡的av| 国产精品国产三级国产普通话蜜臀 | 日韩欧美中文一区二区| 日韩一级免费一区| 欧美国产精品劲爆| 亚洲综合在线观看视频| 麻豆精品在线看| 成人综合激情网| 欧美高清性hdvideosex| 精品国产青草久久久久福利| 国产精品白丝在线| 不卡av在线免费观看| 色国产综合视频| 精品盗摄一区二区三区| 亚洲欧洲av另类| 久久91精品国产91久久小草| 91九色02白丝porn| 精品国产制服丝袜高跟| 亚洲免费电影在线| 国产精品中文字幕日韩精品 | 色综合久久中文字幕综合网 | 久久综合av免费| 亚洲精品一卡二卡| 国产乱子伦一区二区三区国色天香| aa级大片欧美| 久久久久久黄色| 日韩激情视频网站| 一本色道亚洲精品aⅴ| 久久精品视频在线免费观看| 亚洲成人av一区二区三区| 国产美女在线观看一区| 91精品国产综合久久蜜臀| 日本一区二区三区久久久久久久久不| 亚洲午夜精品在线| www.成人网.com| 久久久不卡网国产精品二区| 午夜精品久久久久久久久| 97精品国产97久久久久久久久久久久| 日韩欧美资源站| 午夜欧美视频在线观看| 91国内精品野花午夜精品| 欧美国产乱子伦| 国产成人精品亚洲777人妖| 日韩午夜三级在线| 日本麻豆一区二区三区视频| 色综合 综合色| 一区二区三区四区中文字幕| av爱爱亚洲一区| 中文字幕欧美一| 91在线观看免费视频| 国产目拍亚洲精品99久久精品| av电影在线不卡| 国产精品不卡一区| 色综合天天狠狠| 亚洲精品视频一区| 在线观看一区不卡| 亚洲成人免费影院| 欧美精品精品一区| 秋霞成人午夜伦在线观看| 欧美男生操女生| 日韩av成人高清| 91精品婷婷国产综合久久| 日韩电影网1区2区| 精品国产99国产精品| 黑人精品欧美一区二区蜜桃| 久久亚洲私人国产精品va媚药| 国产综合久久久久久鬼色| 久久久精品天堂| 成人免费毛片高清视频| 亚洲精品国产高清久久伦理二区| 91女人视频在线观看| 亚洲午夜免费福利视频| 欧美日本在线看| 久久99热99| 国产拍欧美日韩视频二区| 99国产麻豆精品| 亚洲成人手机在线| 久久蜜臀精品av| 97se亚洲国产综合自在线不卡| 亚洲一区二区三区四区在线观看 | 久久女同精品一区二区| 成人在线综合网| 亚洲一区在线免费观看| 欧美一二三四在线| 成人91在线观看| 亚洲图片一区二区| 2023国产精品| 91国内精品野花午夜精品| 久久精品久久久精品美女| 国产精品视频在线看| 欧美三区在线观看| 国产成人精品一区二区三区四区| 亚洲综合色网站| 久久久无码精品亚洲日韩按摩| 99re视频精品| 99久久国产综合精品色伊| 亚洲国产精品影院| 久久久久99精品一区| 精品视频资源站| 波多野结衣在线aⅴ中文字幕不卡| 亚洲第一成人在线| 国产精品短视频| 欧美mv日韩mv亚洲| 日本道精品一区二区三区| 国产中文字幕精品| 亚洲成人精品在线观看| 国产精品三级视频| 日韩欧美色电影| 在线观看成人小视频| 成人一道本在线| 韩国在线一区二区| 日韩高清不卡一区二区| 亚洲精品成人精品456| 国产欧美精品一区二区三区四区| 欧美一区二区久久久| 欧美自拍偷拍一区| 色噜噜狠狠一区二区三区果冻| 国产91精品一区二区麻豆亚洲| 青青草97国产精品免费观看 | 日韩电影在线观看网站| 一区二区国产盗摄色噜噜| 国产精品区一区二区三区| 精品1区2区在线观看| 亚洲精品一区二区三区影院| 欧美一区二区三区视频在线观看| 欧美日韩在线观看一区二区 | 视频一区视频二区中文字幕| 亚洲男人电影天堂| 亚洲人吸女人奶水| 一区在线中文字幕| 亚洲人成伊人成综合网小说| 国产精品久久久久影院老司| 中文字幕免费一区| 国产精品福利av| 自拍av一区二区三区| 亚洲女人小视频在线观看| 首页亚洲欧美制服丝腿| 亚洲成人av电影在线| 日韩高清在线观看| 九一九一国产精品| 国产精品一区一区三区| 丁香激情综合五月| 高清不卡一区二区| 91免费视频大全| 欧美日韩一区中文字幕| 日韩欧美久久一区| 国产日韩欧美精品一区| 国产精品不卡一区二区三区| 洋洋av久久久久久久一区| 天天做天天摸天天爽国产一区| 美女被吸乳得到大胸91| 国产美女精品一区二区三区| 成人免费电影视频| 欧美影院午夜播放| 91精品国产福利| 日本一区二区久久| 亚洲一区二区影院| 精品中文av资源站在线观看| 高潮精品一区videoshd| 色偷偷一区二区三区| 日韩欧美国产三级电影视频| 国产清纯在线一区二区www| 亚洲在线免费播放| 国内精品免费在线观看| 91在线精品一区二区| 欧美一区二区视频在线观看| 久久综合久久综合久久综合| 亚洲视频一二三区| 日本成人在线视频网站| 成人精品gif动图一区| 精品视频色一区| 国产精品美女久久久久高潮| 日日夜夜免费精品| 99久久婷婷国产综合精品 | 2022国产精品视频| 亚洲天堂网中文字| 琪琪久久久久日韩精品| 91免费视频网址| 亚洲精品在线观| 天天综合日日夜夜精品|