text stringlengths 3 1.18M |
|---|
package org.sandrob.bouncycastle.jce.provider;
import org.sandrob.bouncycastle.asn1.ASN1Sequence;
import org.sandrob.bouncycastle.asn1.DERObjectIdentifier;
import org.sandrob.bouncycastle.asn1.DEROctetString;
import org.sandrob.bouncycastle.asn1.cryptopro.CryptoProObjectIdentifiers;
import org.sandrob.bouncycastle.asn... |
package org.sandrob.bouncycastle.jce.provider;
import org.sandrob.bouncycastle.asn1.x509.ReasonFlags;
/**
* This class helps to handle CRL revocation reasons mask. Each CRL handles a
* certain set of revocation reasons.
*/
class ReasonsMask
{
private int _reasons;
/**
* Constructs are reason mask wit... |
package org.sandrob.bouncycastle.jce.provider;
import org.sandrob.bouncycastle.asn1.DEROctetString;
import java.io.IOException;
import java.security.AlgorithmParametersSpi;
import java.security.spec.AlgorithmParameterSpec;
import java.security.spec.InvalidParameterSpecException;
public abstract class JDKECDSAAlgPara... |
package org.sandrob.bouncycastle.jce.provider;
import java.security.AlgorithmParameters;
import java.security.InvalidAlgorithmParameterException;
import java.security.InvalidKeyException;
import java.security.Key;
import java.security.KeyFactory;
import java.security.NoSuchAlgorithmException;
import java.security.NoSu... |
package org.sandrob.bouncycastle.jce.provider;
import java.security.AlgorithmParameters;
import java.security.InvalidAlgorithmParameterException;
import java.security.InvalidKeyException;
import java.security.Key;
import java.security.KeyFactory;
import java.security.NoSuchAlgorithmException;
import java.security.NoSu... |
package org.sandrob.bouncycastle.jce.provider;
import org.sandrob.bouncycastle.crypto.DataLengthException;
import org.sandrob.bouncycastle.crypto.DerivationFunction;
import org.sandrob.bouncycastle.crypto.DerivationParameters;
import org.sandrob.bouncycastle.crypto.Digest;
import org.sandrob.bouncycastle.crypto.params... |
package org.sandrob.bouncycastle.jce.provider;
import org.sandrob.bouncycastle.jce.X509LDAPCertStoreParameters;
import org.sandrob.bouncycastle.util.Selector;
import org.sandrob.bouncycastle.util.StoreException;
import org.sandrob.bouncycastle.x509.X509AttributeCertStoreSelector;
import org.sandrob.bouncycastle.x509.X... |
package org.sandrob.bouncycastle.jce.provider;
import org.sandrob.bouncycastle.asn1.ASN1InputStream;
import org.sandrob.bouncycastle.asn1.ASN1Sequence;
import org.sandrob.bouncycastle.asn1.ASN1Set;
import org.sandrob.bouncycastle.asn1.ASN1TaggedObject;
import org.sandrob.bouncycastle.asn1.DERObjectIdentifier;
import o... |
package org.sandrob.bouncycastle.jce.provider;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Map;
import java.util.Set;
import org.sandrob.bouncycastle.asn1.DERObjectIdentifier;
import org.sandrob.bouncycastle.asn1.nist.NISTObjectIdentifiers;
import org.sandrob.bouncycastle.asn1.oiw.OIWObjectId... |
package org.sandrob.bouncycastle.jce.provider;
import java.io.IOException;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
import java.math.BigInteger;
import javax.crypto.interfaces.DHPublicKey;
import javax.crypto.spec.DHParameterSpec;
import javax.crypto.spec.DHPublicKeySpec;
import org.sandr... |
package org.sandrob.bouncycastle.jce.provider;
import org.sandrob.bouncycastle.util.CollectionStore;
import org.sandrob.bouncycastle.util.Selector;
import org.sandrob.bouncycastle.x509.X509CollectionStoreParameters;
import org.sandrob.bouncycastle.x509.X509StoreParameters;
import org.sandrob.bouncycastle.x509.X509Stor... |
package org.sandrob.bouncycastle.jce.provider;
import org.sandrob.bouncycastle.asn1.ASN1Sequence;
import org.sandrob.bouncycastle.asn1.DEREncodable;
import org.sandrob.bouncycastle.asn1.DERInteger;
import org.sandrob.bouncycastle.asn1.DERObjectIdentifier;
import org.sandrob.bouncycastle.asn1.pkcs.PrivateKeyInfo;
impor... |
package org.sandrob.bouncycastle.jce.provider;
import java.security.AlgorithmParameterGeneratorSpi;
import java.security.AlgorithmParameters;
import java.security.InvalidAlgorithmParameterException;
import java.security.InvalidParameterException;
import java.security.SecureRandom;
import java.security.spec.AlgorithmPa... |
package org.sandrob.bouncycastle.jce.provider;
import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.security.InvalidAlgorithmParameterException;
import java.security.cert.CRL;
import java.security.cert.CRLSelector;
import java.security.cert.CertSelector;
import java.security.cert.CertStoreExcep... |
package org.sandrob.bouncycastle.jce.provider;
import org.sandrob.bouncycastle.jce.MultiCertStoreParameters;
import java.security.InvalidAlgorithmParameterException;
import java.security.cert.CRLSelector;
import java.security.cert.CertSelector;
import java.security.cert.CertStore;
import java.security.cert.CertStoreE... |
package org.sandrob.bouncycastle.jce.provider;
import java.io.IOException;
import java.security.InvalidAlgorithmParameterException;
import java.security.NoSuchAlgorithmException;
import java.security.NoSuchProviderException;
import java.security.Principal;
import java.security.PublicKey;
import java.security.cert.Cert... |
package org.sandrob.bouncycastle.jce.provider;
import org.sandrob.bouncycastle.jce.X509LDAPCertStoreParameters;
import org.sandrob.bouncycastle.util.Selector;
import org.sandrob.bouncycastle.util.StoreException;
import org.sandrob.bouncycastle.x509.X509CRLStoreSelector;
import org.sandrob.bouncycastle.x509.X509StorePa... |
package org.sandrob.bouncycastle.jce.provider;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.math.BigInteger;
import java.security.InvalidKeyException;
import java.security.NoSuchAlgorithmException;
import java.security.NoSuchProviderException;
import java.security.Principal;
import jav... |
package org.sandrob.bouncycastle.jce.provider.symmetric;
import java.util.HashMap;
import org.sandrob.bouncycastle.crypto.CipherKeyGenerator;
import org.sandrob.bouncycastle.crypto.engines.CAST6Engine;
import org.sandrob.bouncycastle.jce.provider.JCEBlockCipher;
import org.sandrob.bouncycastle.jce.provider.JCEKeyGene... |
package org.sandrob.bouncycastle.jce.provider.symmetric;
import java.util.HashMap;
import org.sandrob.bouncycastle.crypto.CipherKeyGenerator;
import org.sandrob.bouncycastle.crypto.engines.TwofishEngine;
import org.sandrob.bouncycastle.jce.provider.JCEBlockCipher;
import org.sandrob.bouncycastle.jce.provider.JCEKeyGe... |
package org.sandrob.bouncycastle.jce.provider.symmetric;
import java.security.AlgorithmParameters;
import java.security.InvalidAlgorithmParameterException;
import java.security.SecureRandom;
import java.security.spec.AlgorithmParameterSpec;
import java.util.HashMap;
import javax.crypto.spec.IvParameterSpec;
import o... |
package org.sandrob.bouncycastle.jce.provider.symmetric;
import java.security.AlgorithmParameters;
import java.security.InvalidAlgorithmParameterException;
import java.security.SecureRandom;
import java.security.spec.AlgorithmParameterSpec;
import java.util.HashMap;
import javax.crypto.spec.IvParameterSpec;
import o... |
package org.sandrob.bouncycastle.jce.provider.symmetric;
import java.util.HashMap;
import org.sandrob.bouncycastle.crypto.CipherKeyGenerator;
import org.sandrob.bouncycastle.crypto.engines.VMPCEngine;
import org.sandrob.bouncycastle.crypto.macs.VMPCMac;
import org.sandrob.bouncycastle.jce.provider.JCEKeyGenerator;
im... |
package org.sandrob.bouncycastle.jce.provider.symmetric;
import java.util.HashMap;
import org.sandrob.bouncycastle.crypto.CipherKeyGenerator;
import org.sandrob.bouncycastle.crypto.engines.RijndaelEngine;
import org.sandrob.bouncycastle.jce.provider.JCEBlockCipher;
import org.sandrob.bouncycastle.jce.provider.JCEKeyG... |
package org.sandrob.bouncycastle.jce.provider.symmetric;
import java.security.AlgorithmParameters;
import java.security.InvalidAlgorithmParameterException;
import java.security.SecureRandom;
import java.security.spec.AlgorithmParameterSpec;
import java.util.HashMap;
import javax.crypto.spec.IvParameterSpec;
import o... |
package org.sandrob.bouncycastle.jce.provider.symmetric;
import java.util.HashMap;
import org.sandrob.bouncycastle.crypto.CipherKeyGenerator;
import org.sandrob.bouncycastle.crypto.engines.SerpentEngine;
import org.sandrob.bouncycastle.jce.provider.JCEBlockCipher;
import org.sandrob.bouncycastle.jce.provider.JCEKeyGe... |
package org.sandrob.bouncycastle.jce.provider.symmetric;
import java.security.AlgorithmParameters;
import java.security.InvalidAlgorithmParameterException;
import java.security.SecureRandom;
import java.security.spec.AlgorithmParameterSpec;
import java.util.HashMap;
import javax.crypto.spec.IvParameterSpec;
import o... |
package org.sandrob.bouncycastle.jce.provider.symmetric;
import java.util.HashMap;
import org.sandrob.bouncycastle.crypto.CipherKeyGenerator;
import org.sandrob.bouncycastle.crypto.engines.BlowfishEngine;
import org.sandrob.bouncycastle.crypto.modes.CBCBlockCipher;
import org.sandrob.bouncycastle.jce.provider.JCEBloc... |
package org.sandrob.bouncycastle.jce.provider.symmetric;
import java.util.HashMap;
import org.sandrob.bouncycastle.crypto.CipherKeyGenerator;
import org.sandrob.bouncycastle.crypto.engines.TEAEngine;
import org.sandrob.bouncycastle.jce.provider.JCEBlockCipher;
import org.sandrob.bouncycastle.jce.provider.JCEKeyGenera... |
package org.sandrob.bouncycastle.jce.provider.symmetric;
import java.util.HashMap;
import org.sandrob.bouncycastle.crypto.CipherKeyGenerator;
import org.sandrob.bouncycastle.crypto.engines.Grain128Engine;
import org.sandrob.bouncycastle.jce.provider.JCEKeyGenerator;
import org.sandrob.bouncycastle.jce.provider.JCEStr... |
package org.sandrob.bouncycastle.jce.provider.symmetric;
import java.util.HashMap;
import org.sandrob.bouncycastle.crypto.CipherKeyGenerator;
import org.sandrob.bouncycastle.crypto.engines.HC128Engine;
import org.sandrob.bouncycastle.jce.provider.JCEKeyGenerator;
import org.sandrob.bouncycastle.jce.provider.JCEStream... |
package org.sandrob.bouncycastle.jce.provider.symmetric;
import java.security.AlgorithmParameters;
import java.security.InvalidAlgorithmParameterException;
import java.security.SecureRandom;
import java.security.spec.AlgorithmParameterSpec;
import java.util.HashMap;
import javax.crypto.spec.IvParameterSpec;
import o... |
package org.sandrob.bouncycastle.jce.provider.symmetric;
import java.io.IOException;
import java.security.AlgorithmParameters;
import java.security.InvalidAlgorithmParameterException;
import java.security.SecureRandom;
import java.security.spec.AlgorithmParameterSpec;
import java.security.spec.InvalidParameterSpecExce... |
package org.sandrob.bouncycastle.jce.provider.symmetric;
import java.util.HashMap;
import org.sandrob.bouncycastle.crypto.CipherKeyGenerator;
import org.sandrob.bouncycastle.crypto.engines.SkipjackEngine;
import org.sandrob.bouncycastle.crypto.macs.CBCBlockCipherMac;
import org.sandrob.bouncycastle.crypto.macs.CFBBlo... |
package org.sandrob.bouncycastle.jce.provider.symmetric;
import java.util.HashMap;
import org.sandrob.bouncycastle.crypto.CipherKeyGenerator;
import org.sandrob.bouncycastle.crypto.engines.XTEAEngine;
import org.sandrob.bouncycastle.jce.provider.JCEBlockCipher;
import org.sandrob.bouncycastle.jce.provider.JCEKeyGener... |
package org.sandrob.bouncycastle.jce.provider.symmetric;
import java.util.HashMap;
import org.sandrob.bouncycastle.crypto.CipherKeyGenerator;
import org.sandrob.bouncycastle.crypto.engines.HC256Engine;
import org.sandrob.bouncycastle.jce.provider.JCEKeyGenerator;
import org.sandrob.bouncycastle.jce.provider.JCEStream... |
package org.sandrob.bouncycastle.jce.provider.symmetric;
import java.io.IOException;
import java.security.AlgorithmParameters;
import java.security.InvalidAlgorithmParameterException;
import java.security.SecureRandom;
import java.security.spec.AlgorithmParameterSpec;
import java.security.spec.InvalidParameterSpecExce... |
package org.sandrob.bouncycastle.jce.provider.symmetric;
import java.util.HashMap;
import org.sandrob.bouncycastle.crypto.CipherKeyGenerator;
import org.sandrob.bouncycastle.crypto.engines.Grainv1Engine;
import org.sandrob.bouncycastle.jce.provider.JCEKeyGenerator;
import org.sandrob.bouncycastle.jce.provider.JCEStre... |
package org.sandrob.bouncycastle.jce.provider.symmetric;
import java.security.SecureRandom;
import java.security.spec.InvalidKeySpecException;
import java.security.spec.KeySpec;
import java.util.HashMap;
import javax.crypto.SecretKey;
import javax.crypto.spec.DESedeKeySpec;
import javax.crypto.spec.SecretKeySpec;
im... |
package org.sandrob.bouncycastle.jce.provider.symmetric;
import java.util.HashMap;
import org.sandrob.bouncycastle.crypto.CipherKeyGenerator;
import org.sandrob.bouncycastle.crypto.engines.RC4Engine;
import org.sandrob.bouncycastle.jce.provider.JCEKeyGenerator;
import org.sandrob.bouncycastle.jce.provider.JCEStreamCi... |
package org.sandrob.bouncycastle.jce.provider.symmetric;
import java.util.HashMap;
import org.sandrob.bouncycastle.crypto.CipherKeyGenerator;
import org.sandrob.bouncycastle.crypto.engines.Salsa20Engine;
import org.sandrob.bouncycastle.jce.provider.JCEKeyGenerator;
import org.sandrob.bouncycastle.jce.provider.JCEStre... |
package org.sandrob.bouncycastle.jce.provider.symmetric;
import java.security.AlgorithmParameters;
import java.security.InvalidAlgorithmParameterException;
import java.security.SecureRandom;
import java.security.spec.AlgorithmParameterSpec;
import java.util.HashMap;
import javax.crypto.spec.IvParameterSpec;
import o... |
package org.sandrob.bouncycastle.jce.provider.symmetric;
import java.util.HashMap;
import org.sandrob.bouncycastle.crypto.CipherKeyGenerator;
import org.sandrob.bouncycastle.crypto.engines.VMPCKSA3Engine;
import org.sandrob.bouncycastle.jce.provider.JCEKeyGenerator;
import org.sandrob.bouncycastle.jce.provider.JCEStr... |
package org.sandrob.bouncycastle.jce.provider;
import org.sandrob.bouncycastle.asn1.DEREncodable;
import org.sandrob.bouncycastle.asn1.DERObjectIdentifier;
import org.sandrob.bouncycastle.asn1.DERNull;
import org.sandrob.bouncycastle.asn1.x509.AlgorithmIdentifier;
import org.sandrob.bouncycastle.asn1.pkcs.PrivateKeyIn... |
package org.sandrob.bouncycastle.jce.provider;
import org.sandrob.bouncycastle.jce.X509LDAPCertStoreParameters;
import org.sandrob.bouncycastle.util.Selector;
import org.sandrob.bouncycastle.util.StoreException;
import org.sandrob.bouncycastle.x509.X509CertPairStoreSelector;
import org.sandrob.bouncycastle.x509.X509St... |
package org.sandrob.bouncycastle.jce.provider.test;
public class PEMData
{
public static String CERTIFICATE_1 =
"-----BEGIN X509 CERTIFICATE-----\r"
+ "MIIDXjCCAsegAwIBAgIBBzANBgkqhkiG9w0BAQQFADCBtzELMAkGA1UEBhMCQVUx\r"
+ "ETAPBgNVBAgTCFZpY3RvcmlhMRgwFgYDVQQHEw9Tb3V0aCBNZWxib3VybmUxGjAY\r"
+ ... |
package org.sandrob.bouncycastle.jce;
import org.sandrob.bouncycastle.asn1.ASN1Encodable;
import org.sandrob.bouncycastle.asn1.DERObject;
import org.sandrob.bouncycastle.asn1.x509.KeyUsage;
/**
* A holding class for constructing an X509 Key Usage extension.
*
* <pre>
* id-ce-keyUsage OBJECT IDENTIFIER ::= { i... |
package org.sandrob.bouncycastle.jce.examples;
import java.io.FileOutputStream;
import java.math.BigInteger;
import java.security.KeyFactory;
import java.security.KeyStore;
import java.security.PrivateKey;
import java.security.PublicKey;
import java.security.Security;
import java.security.cert.Certificate;
import java... |
package org.sandrob.bouncycastle.jce;
import java.security.spec.ECFieldF2m;
import java.security.spec.ECFieldFp;
import java.security.spec.ECPoint;
import java.security.spec.EllipticCurve;
import org.sandrob.bouncycastle.math.ec.ECCurve;
/**
* Utility class for handling EC point decoding.
*/
public class ECPointUt... |
package org.sandrob.bouncycastle.jce;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import javax.crypto.Mac;
import javax.crypto.SecretKey;
import javax.crypto.SecretKeyFactory;
import javax.crypto.spec.PBEKeySpec;
import javax.crypto.spec.PBEParameterSpec;
import org.sandrob.bouncycastle.asn1.AS... |
package org.sandrob.bouncycastle.jce.netscape;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.security.InvalidKeyException;
import java.security.KeyFactory;
import java.security.NoSuchAlgorithmException;
import java.security.NoSuchProviderException;
i... |
package org.sandrob.bouncycastle.jce.spec;
import java.security.spec.AlgorithmParameterSpec;
/**
* Parameter spec for an integrated encryptor, as in IEEE P1363a
*/
public class IESParameterSpec
implements AlgorithmParameterSpec
{
private byte[] derivation;
private byte[] encoding;
private int ... |
package org.sandrob.bouncycastle.jce.spec;
import java.math.BigInteger;
/**
* ParameterSpec for a GOST 3410-94 key parameters.
*/
public class GOST3410PublicKeyParameterSetSpec
{
private BigInteger p;
private BigInteger q;
private BigInteger a;
/**
* Creates a new GOST3410ParameterSpec wit... |
package org.sandrob.bouncycastle.jce.spec;
import java.security.spec.AlgorithmParameterSpec;
import org.sandrob.bouncycastle.asn1.DERObjectIdentifier;
import org.sandrob.bouncycastle.asn1.cryptopro.CryptoProObjectIdentifiers;
import org.sandrob.bouncycastle.asn1.cryptopro.GOST3410NamedParameters;
import org.sandrob.b... |
package org.sandrob.bouncycastle.jce.spec;
import java.math.BigInteger;
import java.security.spec.AlgorithmParameterSpec;
public class ElGamalParameterSpec
implements AlgorithmParameterSpec
{
private BigInteger p;
private BigInteger g;
/**
* Constructs a parameter set for Diffie-Hellman, using... |
package org.sandrob.bouncycastle.jce.spec;
import java.math.BigInteger;
import java.security.spec.KeySpec;
/**
* This class specifies a GOST3410-94 public key with its associated parameters.
*/
public class GOST3410PublicKeySpec
implements KeySpec
{
private BigInteger y;
private BigInteger p;
priv... |
package org.sandrob.bouncycastle.jce.spec;
import java.math.BigInteger;
import org.sandrob.bouncycastle.math.ec.ECCurve;
import org.sandrob.bouncycastle.math.ec.ECPoint;
/**
* specification signifying that the curve parameters can also be
* refered to by name.
* <p>
* If you are using JDK 1.5 you should be looki... |
package org.sandrob.bouncycastle.jce.spec;
import java.math.BigInteger;
import java.security.spec.ECFieldF2m;
import java.security.spec.ECFieldFp;
import java.security.spec.ECPoint;
import java.security.spec.EllipticCurve;
import org.sandrob.bouncycastle.math.ec.ECCurve;
/**
* specification signifying that the curv... |
package org.sandrob.bouncycastle.jce.spec;
import java.security.PublicKey;
import java.security.spec.KeySpec;
import org.sandrob.bouncycastle.jce.interfaces.MQVPublicKey;
/**
* Static/ephemeral public key pair for use with ECMQV key agreement
*/
public class MQVPublicKeySpec
implements KeySpec, MQVPublicKey
{
... |
package org.sandrob.bouncycastle.jce.spec;
import java.math.BigInteger;
/**
* Elliptic Curve private key specification.
*/
public class ECPrivateKeySpec
extends ECKeySpec
{
private BigInteger d;
/**
* base constructor
*
* @param d the private number for the key.
* @param spec the... |
package org.sandrob.bouncycastle.jce.spec;
import java.security.spec.AlgorithmParameterSpec;
import org.sandrob.bouncycastle.crypto.engines.GOST28147Engine;
/**
* A parameter spec for the GOST-28147 cipher.
*/
public class GOST28147ParameterSpec
implements AlgorithmParameterSpec
{
private byte[] iv = null... |
package org.sandrob.bouncycastle.jce.spec;
import org.sandrob.bouncycastle.math.ec.ECPoint;
/**
* Elliptic Curve public key specification
*/
public class ECPublicKeySpec
extends ECKeySpec
{
private ECPoint q;
/**
* base constructor
*
* @param q the public point on the curve.
* @p... |
package org.sandrob.bouncycastle.jce.spec;
import java.math.BigInteger;
import java.security.spec.KeySpec;
/**
* This class specifies a GOST3410-94 private key with its associated parameters.
*/
public class GOST3410PrivateKeySpec
implements KeySpec
{
private BigInteger x;
private BigInteger p;
pri... |
package org.sandrob.bouncycastle.jce.spec;
import java.security.spec.KeySpec;
/**
* base class for an Elliptic Curve Key Spec
*/
public class ECKeySpec
implements KeySpec
{
private ECParameterSpec spec;
protected ECKeySpec(
ECParameterSpec spec)
{
this.spec = spec;
}
/*... |
package org.sandrob.bouncycastle.jce.spec;
import java.security.spec.KeySpec;
public class ElGamalKeySpec
implements KeySpec
{
private ElGamalParameterSpec spec;
public ElGamalKeySpec(
ElGamalParameterSpec spec)
{
this.spec = spec;
}
public ElGamalParameterSpec getParams()
... |
package org.sandrob.bouncycastle.jce.spec;
import org.sandrob.bouncycastle.math.ec.ECCurve;
import org.sandrob.bouncycastle.math.ec.ECPoint;
import java.math.BigInteger;
import java.security.spec.AlgorithmParameterSpec;
/**
* basic domain parameters for an Elliptic Curve public or private key.
*/
public class ECPa... |
package org.sandrob.bouncycastle.jce.spec;
import java.security.PrivateKey;
import java.security.PublicKey;
import java.security.spec.KeySpec;
import org.sandrob.bouncycastle.jce.interfaces.IESKey;
/**
* key pair for use with an integrated encryptor - together
* they provide what's required to generate the message... |
package org.sandrob.bouncycastle.jce.spec;
import java.security.spec.AlgorithmParameterSpec;
public class ElGamalGenParameterSpec
implements AlgorithmParameterSpec
{
private int primeSize;
/*
* @param primeSize the size (in bits) of the prime modulus.
*/
public ElGamalGenParameterSpec(
... |
package org.sandrob.bouncycastle.jce.spec;
import java.math.BigInteger;
/**
* This class specifies an ElGamal public key with its associated parameters.
*
* @see ElGamalPrivateKeySpec
*/
public class ElGamalPublicKeySpec
extends ElGamalKeySpec
{
private BigInteger y;
public ElGamalPublicKeySpec(
... |
package org.sandrob.bouncycastle.jce.spec;
import java.math.BigInteger;
/**
* This class specifies an ElGamal private key with its associated parameters.
*
* @see ElGamalPublicKeySpec
*/
public class ElGamalPrivateKeySpec
extends ElGamalKeySpec
{
private BigInteger x;
public ElGamalPrivateKeySpec(
... |
package org.sandrob.bouncycastle.jce.spec;
import java.security.PrivateKey;
import java.security.PublicKey;
import java.security.spec.KeySpec;
import org.sandrob.bouncycastle.jce.interfaces.MQVPrivateKey;
/**
* Static/ephemeral private key (pair) for use with ECMQV key agreement
* (Optionally provides the ephemera... |
package org.sandrob.bouncycastle.jce;
import java.security.cert.CertStoreParameters;
import java.util.Collection;
public class MultiCertStoreParameters
implements CertStoreParameters
{
private Collection certStores;
private boolean searchAllStores;
/**
* Create a parameters object which specifie... |
package org.sandrob.bouncycastle.jce;
import org.sandrob.bouncycastle.x509.X509StoreParameters;
import java.security.cert.CertStoreParameters;
import java.security.cert.LDAPCertStoreParameters;
/**
* An expanded set of parameters for an LDAPCertStore
*/
public class X509LDAPCertStoreParameters
implements X509S... |
package org.sandrob.bouncycastle.jce;
import java.io.*;
import java.security.cert.*;
import org.sandrob.bouncycastle.asn1.*;
import org.sandrob.bouncycastle.asn1.x509.*;
/**
* a utility class that will extract X509Principal objects from X.509 certificates.
* <p>
* Use this in preference to trying to recreate a pr... |
package org.sandrob.bouncycastle;
/**
* The Bouncy Castle License
*
* Copyright (c) 2000-2008 The Legion Of The Bouncy Castle (http://www.bouncycastle.org)
* <p>
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software
* and associated documentation files (the "Software"),... |
package org.sandrob.bouncycastle.math.ec;
import java.math.BigInteger;
import java.util.Random;
/**
* base class for an elliptic curve
*/
public abstract class ECCurve
{
ECFieldElement a, b;
public abstract int getFieldSize();
public abstract ECFieldElement fromBigInteger(BigInteger x);
public ab... |
package org.sandrob.bouncycastle.math.ec;
import java.math.BigInteger;
/**
* Class holding methods for point multiplication based on the window
* τ-adic nonadjacent form (WTNAF). The algorithms are based on the
* paper "Improved Algorithms for Arithmetic on Anomalous Binary Curves"
* by Jerome A. Solinas. The... |
package org.sandrob.bouncycastle.math.ec;
import java.math.BigInteger;
public class ECAlgorithms
{
public static ECPoint sumOfTwoMultiplies(ECPoint P, BigInteger a,
ECPoint Q, BigInteger b)
{
ECCurve c = P.getCurve();
if (!c.equals(Q.getCurve()))
{
throw new Illegal... |
package org.sandrob.bouncycastle.math.ec;
/**
* Interface for classes storing precomputation data for multiplication
* algorithms. Used as a Memento (see GOF patterns) for
* <code>WNafMultiplier</code>.
*/
interface PreCompInfo
{
}
|
package org.sandrob.bouncycastle.math.ec;
import java.math.BigInteger;
import org.sandrob.bouncycastle.asn1.x9.X9IntegerConverter;
/**
* base class for points on elliptic curves.
*/
public abstract class ECPoint
{
ECCurve curve;
ECFieldElement x;
ECFieldElement y;
protected boolean withComp... |
package org.sandrob.bouncycastle.math.ec;
import java.math.BigInteger;
class ReferenceMultiplier implements ECMultiplier
{
/**
* Simple shift-and-add multiplication. Serves as reference implementation
* to verify (possibly faster) implementations in
* {@link org.bouncycastle.math.ec.ECPoint ECPoint... |
package org.sandrob.bouncycastle.math.ec;
import java.math.BigInteger;
/**
* Class representing a simple version of a big decimal. A
* <code>SimpleBigDecimal</code> is basically a
* {@link java.math.BigInteger BigInteger} with a few digits on the right of
* the decimal point. The number of (binary) digits on the ... |
package org.sandrob.bouncycastle.math.ec;
import java.math.BigInteger;
/**
* Class implementing the WTNAF (Window
* <code>τ</code>-adic Non-Adjacent Form) algorithm.
*/
class WTauNafMultiplier implements ECMultiplier
{
/**
* Multiplies a {@link org.bouncycastle.math.ec.ECPoint.F2m ECPoint.F2m}
* ... |
package org.sandrob.bouncycastle.math.ec;
import java.math.BigInteger;
/**
* Interface for classes encapsulating a point multiplication algorithm
* for <code>ECPoint</code>s.
*/
interface ECMultiplier
{
/**
* Multiplies the <code>ECPoint p</code> by <code>k</code>, i.e.
* <code>p</code> is added <cod... |
package org.sandrob.bouncycastle.math.ec;
import java.math.BigInteger;
import java.util.Random;
public abstract class ECFieldElement
implements ECConstants
{
public abstract BigInteger toBigInteger();
public abstract String getFieldName();
public abstract int getFieldSize();
... |
package org.sandrob.bouncycastle.math.ec;
import java.math.BigInteger;
public interface ECConstants
{
public static final BigInteger ZERO = BigInteger.valueOf(0);
public static final BigInteger ONE = BigInteger.valueOf(1);
public static final BigInteger TWO = BigInteger.valueOf(2);
public static final... |
package org.sandrob.bouncycastle.math.ec;
/**
* Class holding precomputation data for the WNAF (Window Non-Adjacent Form)
* algorithm.
*/
class WNafPreCompInfo implements PreCompInfo
{
/**
* Array holding the precomputed <code>ECPoint</code>s used for the Window
* NAF multiplication in <code>
* {... |
package org.sandrob.bouncycastle.math.ec;
import org.sandrob.bouncycastle.util.Arrays;
import java.math.BigInteger;
class IntArray
{
// TODO make m fixed for the IntArray, and hence compute T once and for all
private int[] m_ints;
public IntArray(int intLen)
{
m_ints = new int[intLen];
... |
package org.sandrob.bouncycastle.math.ec;
import java.math.BigInteger;
/**
* Class implementing the WNAF (Window Non-Adjacent Form) multiplication
* algorithm.
*/
class WNafMultiplier implements ECMultiplier
{
/**
* Computes the Window NAF (non-adjacent Form) of an integer.
* @param width The width <... |
package org.sandrob.bouncycastle.math.ec;
import java.math.BigInteger;
/**
* Class representing an element of <code><b>Z</b>[τ]</code>. Let
* <code>λ</code> be an element of <code><b>Z</b>[τ]</code>. Then
* <code>λ</code> is given as <code>λ = u + vτ</code>. The
* components <code... |
package org.sandrob.bouncycastle.math.ec;
import java.math.BigInteger;
/**
* Class implementing the NAF (Non-Adjacent Form) multiplication algorithm.
*/
class FpNafMultiplier implements ECMultiplier
{
/**
* D.3.2 pg 101
* @see org.bouncycastle.math.ec.ECMultiplier#multiply(org.bouncycastle.math.ec.ECP... |
package org.sandrob.bouncycastle.math.ec;
/**
* Class holding precomputation data for the WTNAF (Window
* <code>τ</code>-adic Non-Adjacent Form) algorithm.
*/
class WTauNafPreCompInfo implements PreCompInfo
{
/**
* Array holding the precomputed <code>ECPoint.F2m</code>s used for the
* WTNAF multip... |
package org.sandrob.bouncycastle.openssl;
import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.io.Reader;
import java.security.AlgorithmParameters;
import java.security.KeyFactory;
import java.security.KeyPair;
import java.security.NoSuchAlgorithmException;
import java.security.NoSuchProviderEx... |
package org.sandrob.bouncycastle.openssl;
import java.io.IOException;
import java.security.AlgorithmParameterGenerator;
import java.security.AlgorithmParameters;
import java.security.GeneralSecurityException;
import java.security.NoSuchAlgorithmException;
import java.security.NoSuchProviderException;
import java.secur... |
package org.sandrob.bouncycastle.openssl;
import java.io.IOException;
import java.io.Writer;
import java.security.NoSuchProviderException;
import java.security.SecureRandom;
import org.sandrob.bouncycastle.util.io.pem.PemGenerationException;
import org.sandrob.bouncycastle.util.io.pem.PemObjectGenerator;
import org.s... |
package org.sandrob.bouncycastle.openssl;
import java.io.IOException;
public class PasswordException
extends IOException
{
public PasswordException(String msg)
{
super(msg);
}
}
|
package org.sandrob.bouncycastle.openssl;
import java.io.IOException;
import java.math.BigInteger;
import java.security.Key;
import java.security.KeyPair;
import java.security.NoSuchProviderException;
import java.security.PrivateKey;
import java.security.Provider;
import java.security.PublicKey;
import java.security.S... |
package org.sandrob.bouncycastle.openssl;
import java.io.IOException;
public class EncryptionException
extends IOException
{
private Throwable cause;
public EncryptionException(String msg)
{
super(msg);
}
public EncryptionException(String msg, Throwable ex)
{
super(msg);
... |
package org.sandrob.bouncycastle.openssl;
import java.io.IOException;
public class PEMException
extends IOException
{
Exception underlying;
public PEMException(
String message)
{
super(message);
}
public PEMException(
String message,
Exception ... |
package org.sandrob.bouncycastle.openssl;
/**
* call back to allow a password to be fetched when one is requested.
*/
public interface PasswordFinder
{
public char[] getPassword();
}
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.