text
stringlengths
3
1.18M
package org.sandrob.bouncycastle.crypto.tls; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import java.math.BigInteger; import org.sandrob.bouncycastle.asn1.x509.KeyUsage; import org.sandrob.bouncycastle.asn1.x509.SubjectPublicKeyInfo; import org.sandrob.bouncycastle.asn1.x509.X...
package org.sandrob.bouncycastle.crypto.tls; import org.sandrob.bouncycastle.asn1.x509.X509CertificateStructure; /** * A certificate verifyer, that will always return true. * * <pre> * DO NOT USE THIS FILE UNLESS YOU KNOW EXACTLY WHAT YOU ARE DOING. * </pre> * * @deprecated Perform certificate verification i...
package org.sandrob.bouncycastle.crypto.tls; import org.sandrob.bouncycastle.crypto.DSA; import org.sandrob.bouncycastle.crypto.params.AsymmetricKeyParameter; import org.sandrob.bouncycastle.crypto.params.DSAPublicKeyParameters; import org.sandrob.bouncycastle.crypto.signers.DSASigner; class TlsDSSSigner extends TlsD...
package org.sandrob.bouncycastle.crypto.tls; import org.sandrob.bouncycastle.crypto.Digest; import org.sandrob.bouncycastle.crypto.digests.MD5Digest; import org.sandrob.bouncycastle.crypto.digests.SHA1Digest; /** * A combined hash, which implements md5(m) || sha1(m). */ class CombinedHash implements Digest { pr...
package org.sandrob.bouncycastle.crypto.tls; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import java.math.BigInteger; import org.sandrob.bouncycastle.asn1.x509.KeyUsage; import org.sandrob.bouncycastle.asn1.x509.SubjectPublicKeyInfo; import org.sandrob.bouncycastle.asn1.x509.X...
package org.sandrob.bouncycastle.crypto.tls; /** * RFC 2246 7.2 */ public class AlertLevel { public static final short warning = 1; public static final short fatal = 2; }
package org.sandrob.bouncycastle.crypto.tls; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import org.sandrob.bouncycastle.asn1.x509.KeyUsage; import org.sandrob.bouncycastle.asn1.x509.SubjectPublicKeyInfo; import org.sandrob.bouncycastle.asn1.x509.X509CertificateStructure; impo...
package org.sandrob.bouncycastle.crypto.tls; import java.io.OutputStream; public interface TlsCompression { OutputStream compress(OutputStream output); OutputStream decompress(OutputStream output); }
package org.sandrob.bouncycastle.crypto.tls; import java.security.SecureRandom; import org.sandrob.bouncycastle.crypto.CryptoException; import org.sandrob.bouncycastle.crypto.DSA; import org.sandrob.bouncycastle.crypto.Signer; import org.sandrob.bouncycastle.crypto.digests.NullDigest; import org.sandrob.bouncycastle....
package org.sandrob.bouncycastle.crypto.tls; import java.util.Vector; public class CertificateRequest { private short[] certificateTypes; private Vector certificateAuthorities; public CertificateRequest(short[] certificateTypes, Vector certificateAuthorities) { this.certificateTypes = certifi...
package org.sandrob.bouncycastle.crypto.tls; import java.io.OutputStream; public class TlsNullCompression implements TlsCompression { public OutputStream compress(OutputStream output) { return output; } public OutputStream decompress(OutputStream output) { return output; } }
package org.sandrob.bouncycastle.crypto.tls; import java.io.ByteArrayInputStream; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import java.util.Vector; import org.sandrob.bouncycastle.asn1.ASN1Encodable; import org.sandrob.bouncycastle.asn1.ASN1InputStream; import org.sandrob.b...
package org.sandrob.bouncycastle.crypto.engines; import org.sandrob.bouncycastle.crypto.BlockCipher; import org.sandrob.bouncycastle.crypto.CipherParameters; import org.sandrob.bouncycastle.crypto.DataLengthException; import org.sandrob.bouncycastle.crypto.params.KeyParameter; /** * An RC6 engine. */ public class R...
package org.sandrob.bouncycastle.crypto.engines; /** * A class that provides CAST6 key encryption operations, * such as encoding data and generating keys. * * All the algorithms herein are from the Internet RFC * * RFC2612 - CAST6 (128bit block, 128-256bit key) * * and implement a simplified cryptography inte...
package org.sandrob.bouncycastle.crypto.engines; import java.math.BigInteger; import java.util.Vector; import org.sandrob.bouncycastle.util.Arrays; import org.sandrob.bouncycastle.crypto.AsymmetricBlockCipher; import org.sandrob.bouncycastle.crypto.CipherParameters; import org.sandrob.bouncycastle.crypto.DataLengthEx...
package org.sandrob.bouncycastle.crypto.engines; import org.sandrob.bouncycastle.crypto.BlockCipher; import org.sandrob.bouncycastle.crypto.CipherParameters; import org.sandrob.bouncycastle.crypto.DataLengthException; import org.sandrob.bouncycastle.crypto.params.KeyParameter; /** * Camellia - based on RFC 3713. */...
package org.sandrob.bouncycastle.crypto.engines; import org.sandrob.bouncycastle.crypto.CipherParameters; import org.sandrob.bouncycastle.crypto.DataLengthException; import org.sandrob.bouncycastle.crypto.StreamCipher; import org.sandrob.bouncycastle.crypto.params.KeyParameter; import org.sandrob.bouncycastle.crypto.p...
package org.sandrob.bouncycastle.crypto.engines; import org.sandrob.bouncycastle.crypto.BlockCipher; import org.sandrob.bouncycastle.crypto.CipherParameters; import org.sandrob.bouncycastle.crypto.DataLengthException; import org.sandrob.bouncycastle.crypto.params.KeyParameter; /** * an implementation of Rijndael, ba...
package org.sandrob.bouncycastle.crypto.engines; import org.sandrob.bouncycastle.crypto.BlockCipher; import org.sandrob.bouncycastle.crypto.CipherParameters; import org.sandrob.bouncycastle.crypto.DataLengthException; import org.sandrob.bouncycastle.crypto.params.KeyParameter; /** * a class that provides a basic DES...
package org.sandrob.bouncycastle.crypto.engines; import org.sandrob.bouncycastle.crypto.BlockCipher; import org.sandrob.bouncycastle.crypto.CipherParameters; import org.sandrob.bouncycastle.crypto.DataLengthException; /** * The no-op engine that just copies bytes through, irrespective of whether encrypting and decry...
package org.sandrob.bouncycastle.crypto.engines; import org.sandrob.bouncycastle.crypto.BlockCipher; import org.sandrob.bouncycastle.crypto.CipherParameters; import org.sandrob.bouncycastle.crypto.params.RC5Parameters; /** * The specification for RC5 came from the <code>RC5 Encryption Algorithm</code> * publication...
package org.sandrob.bouncycastle.crypto.engines; import org.sandrob.bouncycastle.crypto.BlockCipher; import org.sandrob.bouncycastle.crypto.CipherParameters; import org.sandrob.bouncycastle.crypto.DataLengthException; import org.sandrob.bouncycastle.crypto.params.KeyParameter; /** * A class that provides Blowfish ke...
package org.sandrob.bouncycastle.crypto.engines; import org.sandrob.bouncycastle.crypto.BlockCipher; import org.sandrob.bouncycastle.crypto.CipherParameters; import org.sandrob.bouncycastle.crypto.DataLengthException; import org.sandrob.bouncycastle.crypto.params.KeyParameter; /** * Camellia - based on RFC 3713, sma...
package org.sandrob.bouncycastle.crypto.engines; import org.sandrob.bouncycastle.crypto.CipherParameters; import org.sandrob.bouncycastle.crypto.DataLengthException; import org.sandrob.bouncycastle.crypto.StreamCipher; import org.sandrob.bouncycastle.crypto.params.KeyParameter; import org.sandrob.bouncycastle.crypto.p...
package org.sandrob.bouncycastle.crypto.engines; import org.sandrob.bouncycastle.crypto.CipherParameters; import org.sandrob.bouncycastle.crypto.DataLengthException; import org.sandrob.bouncycastle.crypto.StreamCipher; import org.sandrob.bouncycastle.crypto.params.KeyParameter; /** * Implementation of Bob Jenkin's I...
package org.sandrob.bouncycastle.crypto.engines; import org.sandrob.bouncycastle.crypto.BlockCipher; import org.sandrob.bouncycastle.crypto.CipherParameters; import org.sandrob.bouncycastle.crypto.DataLengthException; import org.sandrob.bouncycastle.crypto.params.KeyParameter; /** * a class that provides a basic SKI...
package org.sandrob.bouncycastle.crypto.engines; import org.sandrob.bouncycastle.crypto.BlockCipher; import org.sandrob.bouncycastle.crypto.CipherParameters; import org.sandrob.bouncycastle.crypto.DataLengthException; import org.sandrob.bouncycastle.crypto.params.KeyParameter; /** * an implementation of the AES (Rij...
package org.sandrob.bouncycastle.crypto.engines; import org.sandrob.bouncycastle.crypto.CipherParameters; import org.sandrob.bouncycastle.crypto.DataLengthException; import org.sandrob.bouncycastle.crypto.params.ParametersWithRandom; import org.sandrob.bouncycastle.crypto.params.RSAKeyParameters; import org.sandrob.bo...
package org.sandrob.bouncycastle.crypto.engines; import org.sandrob.bouncycastle.crypto.BlockCipher; import org.sandrob.bouncycastle.crypto.CipherParameters; import org.sandrob.bouncycastle.crypto.DataLengthException; import org.sandrob.bouncycastle.crypto.params.KeyParameter; /** * A class that provides a basic Int...
package org.sandrob.bouncycastle.crypto.engines; import org.sandrob.bouncycastle.crypto.BlockCipher; import org.sandrob.bouncycastle.crypto.CipherParameters; import org.sandrob.bouncycastle.crypto.DataLengthException; import org.sandrob.bouncycastle.crypto.params.KeyParameter; /** * Implementation of the SEED algori...
package org.sandrob.bouncycastle.crypto.engines; import org.sandrob.bouncycastle.crypto.CipherParameters; import org.sandrob.bouncycastle.crypto.DataLengthException; import org.sandrob.bouncycastle.crypto.MaxBytesExceededException; import org.sandrob.bouncycastle.crypto.StreamCipher; import org.sandrob.bouncycastle.cr...
package org.sandrob.bouncycastle.crypto.engines; import org.sandrob.bouncycastle.crypto.BlockCipher; import org.sandrob.bouncycastle.crypto.CipherParameters; import org.sandrob.bouncycastle.crypto.DataLengthException; import org.sandrob.bouncycastle.crypto.params.KeyParameter; /** * A Noekeon engine, using direct-ke...
package org.sandrob.bouncycastle.crypto.engines; import org.sandrob.bouncycastle.crypto.AsymmetricBlockCipher; import org.sandrob.bouncycastle.crypto.CipherParameters; import org.sandrob.bouncycastle.crypto.DataLengthException; import org.sandrob.bouncycastle.crypto.params.ElGamalKeyParameters; import org.sandrob.boun...
package org.sandrob.bouncycastle.crypto.engines; import org.sandrob.bouncycastle.crypto.BlockCipher; import org.sandrob.bouncycastle.crypto.CipherParameters; import org.sandrob.bouncycastle.crypto.DataLengthException; import org.sandrob.bouncycastle.crypto.params.KeyParameter; /** * An TEA engine. */ public class T...
package org.sandrob.bouncycastle.crypto.engines; import org.sandrob.bouncycastle.crypto.CipherParameters; import org.sandrob.bouncycastle.crypto.DataLengthException; import org.sandrob.bouncycastle.crypto.StreamCipher; import org.sandrob.bouncycastle.crypto.params.KeyParameter; import org.sandrob.bouncycastle.crypto.p...
package org.sandrob.bouncycastle.crypto.engines; import java.util.Hashtable; import org.sandrob.bouncycastle.crypto.BlockCipher; import org.sandrob.bouncycastle.crypto.CipherParameters; import org.sandrob.bouncycastle.crypto.DataLengthException; import org.sandrob.bouncycastle.crypto.params.KeyParameter; import org.s...
package org.sandrob.bouncycastle.crypto.engines; import org.sandrob.bouncycastle.crypto.CipherParameters; import org.sandrob.bouncycastle.crypto.DataLengthException; import org.sandrob.bouncycastle.crypto.StreamCipher; import org.sandrob.bouncycastle.crypto.params.KeyParameter; import org.sandrob.bouncycastle.crypto.p...
package org.sandrob.bouncycastle.crypto.engines; import org.sandrob.bouncycastle.crypto.CipherParameters; import org.sandrob.bouncycastle.crypto.DataLengthException; import org.sandrob.bouncycastle.crypto.StreamCipher; import org.sandrob.bouncycastle.crypto.params.KeyParameter; import org.sandrob.bouncycastle.crypto.p...
package org.sandrob.bouncycastle.crypto.engines; import org.sandrob.bouncycastle.crypto.BlockCipher; import org.sandrob.bouncycastle.crypto.CipherParameters; import org.sandrob.bouncycastle.crypto.DataLengthException; import org.sandrob.bouncycastle.crypto.params.KeyParameter; /** * Serpent is a 128-bit 32-round blo...
package org.sandrob.bouncycastle.crypto.engines; import org.sandrob.bouncycastle.crypto.BlockCipher; import org.sandrob.bouncycastle.crypto.CipherParameters; import org.sandrob.bouncycastle.crypto.DataLengthException; import org.sandrob.bouncycastle.crypto.params.KeyParameter; /** * A class that provides Twofish enc...
package org.sandrob.bouncycastle.crypto.engines; import org.sandrob.bouncycastle.crypto.AsymmetricBlockCipher; import org.sandrob.bouncycastle.crypto.CipherParameters; import org.sandrob.bouncycastle.crypto.DataLengthException; /** * this does your basic RSA algorithm. */ public class RSAEngine implements Asymm...
package org.sandrob.bouncycastle.crypto.engines; /** * an implementation of the AES Key Wrapper from the NIST Key Wrap * Specification. * <p> * For further details see: <a href="http://csrc.nist.gov/encryption/kms/key-wrap.pdf">http://csrc.nist.gov/encryption/kms/key-wrap.pdf</a>. */ public class AESWrapEngine ...
package org.sandrob.bouncycastle.crypto.engines; import java.security.SecureRandom; import org.sandrob.bouncycastle.crypto.CipherParameters; import org.sandrob.bouncycastle.crypto.Digest; import org.sandrob.bouncycastle.crypto.InvalidCipherTextException; import org.sandrob.bouncycastle.crypto.Wrapper; import org.sand...
package org.sandrob.bouncycastle.crypto.engines; import org.sandrob.bouncycastle.crypto.CipherParameters; import org.sandrob.bouncycastle.crypto.DataLengthException; import org.sandrob.bouncycastle.crypto.params.KeyParameter; /** * a class that provides a basic DESede (or Triple DES) engine. */ public class DESedeE...
package org.sandrob.bouncycastle.crypto.engines; import org.sandrob.bouncycastle.crypto.BlockCipher; import org.sandrob.bouncycastle.crypto.CipherParameters; import org.sandrob.bouncycastle.crypto.InvalidCipherTextException; import org.sandrob.bouncycastle.crypto.Wrapper; import org.sandrob.bouncycastle.crypto.modes.C...
package org.sandrob.bouncycastle.crypto.engines; import org.sandrob.bouncycastle.crypto.BlockCipher; import org.sandrob.bouncycastle.crypto.CipherParameters; import org.sandrob.bouncycastle.crypto.DataLengthException; import org.sandrob.bouncycastle.crypto.InvalidCipherTextException; import org.sandrob.bouncycastle.cr...
package org.sandrob.bouncycastle.crypto.engines; import org.sandrob.bouncycastle.crypto.CipherParameters; import org.sandrob.bouncycastle.crypto.DataLengthException; import org.sandrob.bouncycastle.crypto.StreamCipher; import org.sandrob.bouncycastle.crypto.params.KeyParameter; public class RC4Engine implements Strea...
package org.sandrob.bouncycastle.crypto.engines; import org.sandrob.bouncycastle.crypto.BlockCipher; import org.sandrob.bouncycastle.crypto.CipherParameters; import org.sandrob.bouncycastle.crypto.DataLengthException; import org.sandrob.bouncycastle.crypto.params.KeyParameter; /** * An XTEA engine. */ public class ...
package org.sandrob.bouncycastle.crypto.engines; import org.sandrob.bouncycastle.crypto.AsymmetricBlockCipher; import org.sandrob.bouncycastle.crypto.CipherParameters; import org.sandrob.bouncycastle.crypto.DataLengthException; import org.sandrob.bouncycastle.crypto.params.ParametersWithRandom; import org.sandrob.boun...
package org.sandrob.bouncycastle.crypto.engines; import org.sandrob.bouncycastle.crypto.BlockCipher; import org.sandrob.bouncycastle.crypto.CipherParameters; import org.sandrob.bouncycastle.crypto.DataLengthException; import org.sandrob.bouncycastle.crypto.params.KeyParameter; import org.sandrob.bouncycastle.crypto.pa...
package org.sandrob.bouncycastle.crypto.engines; import org.sandrob.bouncycastle.crypto.BasicAgreement; import org.sandrob.bouncycastle.crypto.BufferedBlockCipher; import org.sandrob.bouncycastle.crypto.CipherParameters; import org.sandrob.bouncycastle.crypto.DerivationFunction; import org.sandrob.bouncycastle.crypto....
package org.sandrob.bouncycastle.crypto.engines; /** * An implementation of the SEED key wrapper based on RFC 4010/RFC 3394. * <p> * For further details see: <a href="http://www.ietf.org/rfc/rfc4010.txt">http://www.ietf.org/rfc/rfc4010.txt</a>. */ public class SEEDWrapEngine extends RFC3394WrapEngine { pub...
package org.sandrob.bouncycastle.crypto.engines; import java.security.SecureRandom; import org.sandrob.bouncycastle.crypto.CipherParameters; import org.sandrob.bouncycastle.crypto.Digest; import org.sandrob.bouncycastle.crypto.InvalidCipherTextException; import org.sandrob.bouncycastle.crypto.Wrapper; import org.sand...
package org.sandrob.bouncycastle.crypto.engines; import org.sandrob.bouncycastle.crypto.BlockCipher; import org.sandrob.bouncycastle.crypto.CipherParameters; import org.sandrob.bouncycastle.crypto.DataLengthException; import org.sandrob.bouncycastle.crypto.params.KeyParameter; /** * A class that provides CAST key en...
package org.sandrob.bouncycastle.crypto.engines; import org.sandrob.bouncycastle.crypto.AsymmetricBlockCipher; import org.sandrob.bouncycastle.crypto.CipherParameters; import org.sandrob.bouncycastle.crypto.DataLengthException; import org.sandrob.bouncycastle.crypto.params.ParametersWithRandom; import org.sandrob.boun...
package org.sandrob.bouncycastle.crypto.engines; import org.sandrob.bouncycastle.crypto.BlockCipher; import org.sandrob.bouncycastle.crypto.CipherParameters; import org.sandrob.bouncycastle.crypto.DataLengthException; import org.sandrob.bouncycastle.crypto.params.KeyParameter; /** * an implementation of the AES (Rij...
package org.sandrob.bouncycastle.crypto.engines; public class VMPCKSA3Engine extends VMPCEngine { public String getAlgorithmName() { return "VMPC-KSA3"; } protected void initKey(byte[] keyBytes, byte[] ivBytes) { s = 0; P = new byte[256]; for (int i = 0; i < 256; i+...
package org.sandrob.bouncycastle.crypto.engines; import org.sandrob.bouncycastle.crypto.BlockCipher; import org.sandrob.bouncycastle.crypto.CipherParameters; import org.sandrob.bouncycastle.crypto.params.KeyParameter; import org.sandrob.bouncycastle.crypto.params.RC5Parameters; /** * The specification for RC5 came f...
package org.sandrob.bouncycastle.crypto.engines; import org.sandrob.bouncycastle.crypto.BlockCipher; import org.sandrob.bouncycastle.crypto.CipherParameters; import org.sandrob.bouncycastle.crypto.DataLengthException; import org.sandrob.bouncycastle.crypto.params.KeyParameter; /** * an implementation of the AES (Rij...
package org.sandrob.bouncycastle.crypto.engines; /** * An implementation of the Camellia key wrapper based on RFC 3657/RFC 3394. * <p> * For further details see: <a href="http://www.ietf.org/rfc/rfc3657.txt">http://www.ietf.org/rfc/rfc3657.txt</a>. */ public class CamelliaWrapEngine extends RFC3394WrapEngine {...
package org.sandrob.bouncycastle.crypto; /** * this exception is thrown whenever we find something we don't expect in a * message. */ public class InvalidCipherTextException extends CryptoException { /** * base constructor. */ public InvalidCipherTextException() { } /** * cr...
package org.sandrob.bouncycastle.crypto; /** * The base interface for implementations of message authentication codes (MACs). */ public interface Mac { /** * Initialise the MAC. * * @param params the key and other data required by the MAC. * @exception IllegalArgumentException if the params ...
package org.sandrob.bouncycastle.crypto; /** * Signer with message recovery. */ public interface SignerWithRecovery extends Signer { /** * Returns true if the signer has recovered the full message as * part of signature verification. * * @return true if full message recovered. */ ...
package org.sandrob.bouncycastle.crypto; /** * this exception is thrown if a buffer that is meant to have output * copied into it turns out to be too short, or if we've been given * insufficient input. In general this exception will get thrown rather * than an ArrayOutOfBounds exception. */ public class DataLeng...
package org.sandrob.bouncycastle.crypto.paddings; import java.security.SecureRandom; import org.sandrob.bouncycastle.crypto.InvalidCipherTextException; /** * A padder that adds Trailing-Bit-Compliment padding to a block. * <p> * This padding pads the block out with the compliment of the last bit * of the plain t...
package org.sandrob.bouncycastle.crypto.paddings; import java.security.SecureRandom; import org.sandrob.bouncycastle.crypto.InvalidCipherTextException; /** * A padder that adds the padding according to the scheme referenced in * ISO 7814-4 - scheme 2 from ISO 9797-1. The first byte is 0x80, rest is 0x00 */ public...
package org.sandrob.bouncycastle.crypto.paddings; import java.security.SecureRandom; import org.sandrob.bouncycastle.crypto.InvalidCipherTextException; /** * A padder that adds PKCS7/PKCS5 padding to a block. */ public class PKCS7Padding implements BlockCipherPadding { /** * Initialise the padder. ...
package org.sandrob.bouncycastle.crypto.paddings; import java.security.SecureRandom; import org.sandrob.bouncycastle.crypto.InvalidCipherTextException; /** * A padder that adds X9.23 padding to a block - if a SecureRandom is * passed in random padding is assumed, otherwise padding with zeros is used. */ public cl...
package org.sandrob.bouncycastle.crypto.paddings; import org.sandrob.bouncycastle.crypto.BlockCipher; import org.sandrob.bouncycastle.crypto.BufferedBlockCipher; import org.sandrob.bouncycastle.crypto.CipherParameters; import org.sandrob.bouncycastle.crypto.DataLengthException; import org.sandrob.bouncycastle.crypto.I...
package org.sandrob.bouncycastle.crypto.paddings; import java.security.SecureRandom; import org.sandrob.bouncycastle.crypto.InvalidCipherTextException; /** * Block cipher padders are expected to conform to this interface */ public interface BlockCipherPadding { /** * Initialise the padder. * * @...
package org.sandrob.bouncycastle.crypto.paddings; import java.security.SecureRandom; import org.sandrob.bouncycastle.crypto.InvalidCipherTextException; /** * A padder that adds ISO10126-2 padding to a block. */ public class ISO10126d2Padding implements BlockCipherPadding { SecureRandom random; /** ...
package org.sandrob.bouncycastle.crypto.paddings; import java.security.SecureRandom; import org.sandrob.bouncycastle.crypto.InvalidCipherTextException; /** * A padder that adds NULL byte padding to a block. */ public class ZeroBytePadding implements BlockCipherPadding { /** * Initialise the padder. ...
package org.sandrob.bouncycastle.crypto.agreement; import java.math.BigInteger; import org.sandrob.bouncycastle.math.ec.ECPoint; import org.sandrob.bouncycastle.crypto.BasicAgreement; import org.sandrob.bouncycastle.crypto.CipherParameters; import org.sandrob.bouncycastle.crypto.params.ECPublicKeyParameters; import ...
package org.sandrob.bouncycastle.crypto.agreement; import java.math.BigInteger; import org.sandrob.bouncycastle.crypto.BasicAgreement; import org.sandrob.bouncycastle.crypto.CipherParameters; import org.sandrob.bouncycastle.crypto.params.DHParameters; import org.sandrob.bouncycastle.crypto.params.DHPublicKeyParameter...
package org.sandrob.bouncycastle.crypto.agreement.kdf; import org.sandrob.bouncycastle.asn1.DERObjectIdentifier; import org.sandrob.bouncycastle.crypto.DerivationParameters; public class DHKDFParameters implements DerivationParameters { private final DERObjectIdentifier algorithm; private final int keySiz...
package org.sandrob.bouncycastle.crypto.agreement.kdf; import org.sandrob.bouncycastle.asn1.ASN1EncodableVector; import org.sandrob.bouncycastle.asn1.DERNull; import org.sandrob.bouncycastle.asn1.DERObjectIdentifier; import org.sandrob.bouncycastle.asn1.DEROctetString; import org.sandrob.bouncycastle.asn1.DERSequence;...
package org.sandrob.bouncycastle.crypto.agreement.kdf; import org.sandrob.bouncycastle.asn1.ASN1EncodableVector; import org.sandrob.bouncycastle.asn1.DERObjectIdentifier; import org.sandrob.bouncycastle.asn1.DEROctetString; import org.sandrob.bouncycastle.asn1.DERSequence; import org.sandrob.bouncycastle.asn1.DERTagge...
package org.sandrob.bouncycastle.crypto.agreement; import java.math.BigInteger; import java.security.SecureRandom; import org.sandrob.bouncycastle.crypto.AsymmetricCipherKeyPair; import org.sandrob.bouncycastle.crypto.CipherParameters; import org.sandrob.bouncycastle.crypto.generators.DHKeyPairGenerator; import org.s...
package org.sandrob.bouncycastle.crypto.agreement.srp; import java.math.BigInteger; import java.security.SecureRandom; import org.sandrob.bouncycastle.crypto.CryptoException; import org.sandrob.bouncycastle.crypto.Digest; /** * Implements the client side SRP-6a protocol. Note that this class is stateful, and theref...
package org.sandrob.bouncycastle.crypto.agreement.srp; import java.math.BigInteger; import org.sandrob.bouncycastle.crypto.Digest; /** * Generates new SRP verifier for user */ public class SRP6VerifierGenerator { protected BigInteger N; protected BigInteger g; protected Digest digest; public SRP6V...
package org.sandrob.bouncycastle.crypto.agreement.srp; import java.math.BigInteger; import java.security.SecureRandom; import org.sandrob.bouncycastle.crypto.CryptoException; import org.sandrob.bouncycastle.crypto.Digest; /** * Implements the server side SRP-6a protocol. Note that this class is stateful, and theref...
package org.sandrob.bouncycastle.crypto.agreement.srp; import java.math.BigInteger; import java.security.SecureRandom; import org.sandrob.bouncycastle.crypto.CryptoException; import org.sandrob.bouncycastle.crypto.Digest; import org.sandrob.bouncycastle.util.BigIntegers; public class SRP6Util { private static Bi...
package org.sandrob.bouncycastle.crypto.agreement; import java.math.BigInteger; import org.sandrob.bouncycastle.crypto.BasicAgreement; import org.sandrob.bouncycastle.crypto.CipherParameters; import org.sandrob.bouncycastle.crypto.params.ECDomainParameters; import org.sandrob.bouncycastle.crypto.params.ECPrivateKeyPa...
package org.sandrob.bouncycastle.crypto.agreement; import java.math.BigInteger; import org.sandrob.bouncycastle.math.ec.ECPoint; import org.sandrob.bouncycastle.crypto.BasicAgreement; import org.sandrob.bouncycastle.crypto.CipherParameters; import org.sandrob.bouncycastle.crypto.params.ECPublicKeyParameters; import ...
package org.sandrob.bouncycastle.crypto; public interface Wrapper { public void init(boolean forWrapping, CipherParameters param); /** * Return the name of the algorithm the wrapper implements. * * @return the name of the algorithm the wrapper implements. */ public String getAlgorithmN...
package org.sandrob.bouncycastle.crypto; /** * Block cipher engines are expected to conform to this interface. */ public interface BlockCipher { /** * Initialise the cipher. * * @param forEncryption if true the cipher is initialised for * encryption, if false for decryption. * @param p...
package org.sandrob.bouncycastle.crypto; /** * a holding class for public/private parameter pairs. */ public class AsymmetricCipherKeyPair { private CipherParameters publicParam; private CipherParameters privateParam; /** * basic constructor. * * @param publicParam a public key para...
package org.sandrob.bouncycastle.crypto.params; import org.sandrob.bouncycastle.crypto.CipherParameters; public class AEADParameters implements CipherParameters { private byte[] associatedText; private byte[] nonce; private KeyParameter key; private int macSize; /** * Base constructor. ...
package org.sandrob.bouncycastle.crypto.params; import org.sandrob.bouncycastle.crypto.CipherParameters; /** * Cipher parameters with a fixed salt value associated with them. */ public class ParametersWithSalt implements CipherParameters { private byte[] salt; private CipherParameters pa...
package org.sandrob.bouncycastle.crypto.params; public class DESedeParameters extends DESParameters { /* * DES-EDE Key length in bytes. */ static public final int DES_EDE_KEY_LENGTH = 24; public DESedeParameters( byte[] key) { super(key); if (isWeakKey(key, 0, k...
package org.sandrob.bouncycastle.crypto.params; import java.math.BigInteger; import java.security.SecureRandom; import org.sandrob.bouncycastle.crypto.KeyGenerationParameters; public class RSAKeyGenerationParameters extends KeyGenerationParameters { private BigInteger publicExponent; private int certaint...
package org.sandrob.bouncycastle.crypto.params; import java.security.SecureRandom; import org.sandrob.bouncycastle.crypto.KeyGenerationParameters; public class DHKeyGenerationParameters extends KeyGenerationParameters { private DHParameters params; public DHKeyGenerationParameters( SecureRand...
package org.sandrob.bouncycastle.crypto.params; import java.math.BigInteger; import org.sandrob.bouncycastle.crypto.CipherParameters; public class DSAParameters implements CipherParameters { private BigInteger g; private BigInteger q; private BigInteger p; p...
package org.sandrob.bouncycastle.crypto.params; public class GOST3410KeyParameters extends AsymmetricKeyParameter { private GOST3410Parameters params; public GOST3410KeyParameters( boolean isPrivate, GOST3410Parameters params) { super(isPrivate); this....
package org.sandrob.bouncycastle.crypto.params; import org.sandrob.bouncycastle.crypto.CipherParameters; /** * parameters for using an integrated cipher in stream mode. */ public class IESParameters implements CipherParameters { private byte[] derivation; private byte[] encoding; private int m...
package org.sandrob.bouncycastle.crypto.params; import java.security.SecureRandom; import org.sandrob.bouncycastle.crypto.KeyGenerationParameters; /** * Parameters for NaccacheStern public private key generation. For details on * this cipher, please see * * http://www.gemplus.com/smart/rd/publications/pdf/NS98p...
package org.sandrob.bouncycastle.crypto.params; import java.math.BigInteger; public class GOST3410PublicKeyParameters extends GOST3410KeyParameters { private BigInteger y; public GOST3410PublicKeyParameters( BigInteger y, GOST3410Parameters params) { super(fals...
package org.sandrob.bouncycastle.crypto.params; import java.math.BigInteger; public class DHPrivateKeyParameters extends DHKeyParameters { private BigInteger x; public DHPrivateKeyParameters( BigInteger x, DHParameters params) { super(true, params); this....
package org.sandrob.bouncycastle.crypto.params; import org.sandrob.bouncycastle.crypto.CipherParameters; import java.math.BigInteger; public class DHParameters implements CipherParameters { private static final int DEFAULT_MINIMUM_LENGTH = 160; // not final due to compiler bug in "simpler" JDKs priv...
package org.sandrob.bouncycastle.crypto.params; import java.math.BigInteger; /** * Public key parameters for NaccacheStern cipher. For details on this cipher, * please see * * http://www.gemplus.com/smart/rd/publications/pdf/NS98pkcs.pdf */ public class NaccacheSternKeyParameters extends AsymmetricKeyParameter ...