text stringlengths 3 1.18M |
|---|
package org.sandrob.bouncycastle.crypto.encodings;
import java.math.BigInteger;
import org.sandrob.bouncycastle.crypto.AsymmetricBlockCipher;
import org.sandrob.bouncycastle.crypto.CipherParameters;
import org.sandrob.bouncycastle.crypto.InvalidCipherTextException;
import org.sandrob.bouncycastle.crypto.params.Parame... |
package org.sandrob.bouncycastle.crypto.encodings;
import java.security.AccessController;
import java.security.PrivilegedAction;
import java.security.SecureRandom;
import org.sandrob.bouncycastle.crypto.AsymmetricBlockCipher;
import org.sandrob.bouncycastle.crypto.CipherParameters;
import org.sandrob.bouncycastle.cry... |
package org.sandrob.bouncycastle.crypto.encodings;
import org.sandrob.bouncycastle.crypto.AsymmetricBlockCipher;
import org.sandrob.bouncycastle.crypto.CipherParameters;
import org.sandrob.bouncycastle.crypto.Digest;
import org.sandrob.bouncycastle.crypto.InvalidCipherTextException;
import org.sandrob.bouncycastle.cry... |
package org.sandrob.bouncycastle.crypto;
/**
* all parameter classes implement this.
*/
public interface CipherParameters
{
}
|
package org.sandrob.bouncycastle.crypto.signers;
import java.io.IOException;
import java.math.BigInteger;
import org.sandrob.bouncycastle.asn1.ASN1EncodableVector;
import org.sandrob.bouncycastle.asn1.ASN1Object;
import org.sandrob.bouncycastle.asn1.ASN1Sequence;
import org.sandrob.bouncycastle.asn1.DERInteger;
impor... |
package org.sandrob.bouncycastle.crypto.signers;
import org.sandrob.bouncycastle.crypto.AsymmetricCipherKeyPair;
import org.sandrob.bouncycastle.crypto.CipherParameters;
import org.sandrob.bouncycastle.crypto.DSA;
import org.sandrob.bouncycastle.crypto.DataLengthException;
import org.sandrob.bouncycastle.crypto.genera... |
package org.sandrob.bouncycastle.crypto.signers;
import java.security.SecureRandom;
import org.sandrob.bouncycastle.crypto.AsymmetricBlockCipher;
import org.sandrob.bouncycastle.crypto.CipherParameters;
import org.sandrob.bouncycastle.crypto.CryptoException;
import org.sandrob.bouncycastle.crypto.Digest;
import org.s... |
package org.sandrob.bouncycastle.crypto.signers;
import java.util.Hashtable;
import org.sandrob.bouncycastle.crypto.AsymmetricBlockCipher;
import org.sandrob.bouncycastle.crypto.CipherParameters;
import org.sandrob.bouncycastle.crypto.CryptoException;
import org.sandrob.bouncycastle.crypto.Digest;
import org.sandrob.... |
package org.sandrob.bouncycastle.crypto.signers;
import org.sandrob.bouncycastle.crypto.AsymmetricBlockCipher;
import org.sandrob.bouncycastle.crypto.CipherParameters;
import org.sandrob.bouncycastle.crypto.CryptoException;
import org.sandrob.bouncycastle.crypto.DataLengthException;
import org.sandrob.bouncycastle.cry... |
package org.sandrob.bouncycastle.crypto.signers;
import org.sandrob.bouncycastle.crypto.CipherParameters;
import org.sandrob.bouncycastle.crypto.DSA;
import org.sandrob.bouncycastle.crypto.params.ECKeyParameters;
import org.sandrob.bouncycastle.crypto.params.ECPrivateKeyParameters;
import org.sandrob.bouncycastle.cryp... |
package org.sandrob.bouncycastle.crypto.signers;
import org.sandrob.bouncycastle.crypto.CipherParameters;
import org.sandrob.bouncycastle.crypto.DSA;
import org.sandrob.bouncycastle.crypto.params.DSAKeyParameters;
import org.sandrob.bouncycastle.crypto.params.DSAParameters;
import org.sandrob.bouncycastle.crypto.param... |
package org.sandrob.bouncycastle.crypto.signers;
import java.security.SecureRandom;
import org.sandrob.bouncycastle.crypto.AsymmetricBlockCipher;
import org.sandrob.bouncycastle.crypto.CipherParameters;
import org.sandrob.bouncycastle.crypto.CryptoException;
import org.sandrob.bouncycastle.crypto.DataLengthException;... |
package org.sandrob.bouncycastle.crypto.signers;
import java.math.BigInteger;
import java.security.SecureRandom;
import org.sandrob.bouncycastle.crypto.CipherParameters;
import org.sandrob.bouncycastle.crypto.DSA;
import org.sandrob.bouncycastle.crypto.params.ECKeyParameters;
import org.sandrob.bouncycastle.crypto.pa... |
package org.sandrob.bouncycastle.crypto.signers;
import org.sandrob.bouncycastle.asn1.DERNull;
import org.sandrob.bouncycastle.asn1.DERObjectIdentifier;
import org.sandrob.bouncycastle.asn1.nist.NISTObjectIdentifiers;
import org.sandrob.bouncycastle.asn1.pkcs.PKCSObjectIdentifiers;
import org.sandrob.bouncycastle.asn1... |
package org.sandrob.bouncycastle.crypto.signers;
import org.sandrob.bouncycastle.crypto.CipherParameters;
import org.sandrob.bouncycastle.crypto.DSA;
import org.sandrob.bouncycastle.crypto.params.*;
import java.security.SecureRandom;
import java.math.BigInteger;
/**
* GOST R 34.10-94 Signature Algorithm
*/
public ... |
package org.sandrob.bouncycastle.crypto.generators;
import org.sandrob.bouncycastle.crypto.Digest;
import org.sandrob.bouncycastle.crypto.digests.SHA1Digest;
import org.sandrob.bouncycastle.crypto.digests.SHA256Digest;
import org.sandrob.bouncycastle.crypto.params.DSAParameters;
import org.sandrob.bouncycastle.crypto.... |
package org.sandrob.bouncycastle.crypto.generators;
import org.sandrob.bouncycastle.crypto.AsymmetricCipherKeyPair;
import org.sandrob.bouncycastle.crypto.AsymmetricCipherKeyPairGenerator;
import org.sandrob.bouncycastle.crypto.KeyGenerationParameters;
import org.sandrob.bouncycastle.crypto.params.DHKeyGenerationParam... |
package org.sandrob.bouncycastle.crypto.generators;
import org.sandrob.bouncycastle.crypto.params.DHParameters;
import java.math.BigInteger;
import java.security.SecureRandom;
public class DHParametersGenerator
{
private int size;
private int certainty;
private SecureRandom ran... |
package org.sandrob.bouncycastle.crypto.generators;
import org.sandrob.bouncycastle.crypto.Digest;
/**
* KFD2 generator for derived keys and ivs as defined by IEEE P1363a/ISO 18033
* <br>
* This implementation is based on IEEE P1363/ISO 18033.
*/
public class KDF2BytesGenerator
extends BaseKDFBytesGenerator
{... |
package org.sandrob.bouncycastle.crypto.generators;
import java.math.BigInteger;
import java.security.SecureRandom;
import org.sandrob.bouncycastle.crypto.params.DHParameters;
import org.sandrob.bouncycastle.util.BigIntegers;
class DHKeyGeneratorHelper
{
static final DHKeyGeneratorHelper INSTANCE = new DHKeyGene... |
package org.sandrob.bouncycastle.crypto.generators;
import org.sandrob.bouncycastle.crypto.CipherParameters;
import org.sandrob.bouncycastle.crypto.Digest;
import org.sandrob.bouncycastle.crypto.ExtendedDigest;
import org.sandrob.bouncycastle.crypto.PBEParametersGenerator;
import org.sandrob.bouncycastle.crypto.params... |
package org.sandrob.bouncycastle.crypto.generators;
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.p... |
package org.sandrob.bouncycastle.crypto.generators;
import org.sandrob.bouncycastle.crypto.CipherKeyGenerator;
import org.sandrob.bouncycastle.crypto.KeyGenerationParameters;
import org.sandrob.bouncycastle.crypto.params.DESParameters;
public class DESKeyGenerator
extends CipherKeyGenerator
{
/**
* initi... |
package org.sandrob.bouncycastle.crypto.generators;
import org.sandrob.bouncycastle.crypto.params.ElGamalParameters;
import java.math.BigInteger;
import java.security.SecureRandom;
public class ElGamalParametersGenerator
{
private int size;
private int certainty;
private SecureRan... |
package org.sandrob.bouncycastle.crypto.generators;
import java.math.BigInteger;
import java.security.SecureRandom;
import org.sandrob.bouncycastle.util.BigIntegers;
class DHParametersHelper
{
private static final BigInteger ONE = BigInteger.valueOf(1);
private static final BigInteger TWO = BigInteger.valueO... |
package org.sandrob.bouncycastle.crypto.generators;
import org.sandrob.bouncycastle.crypto.AsymmetricCipherKeyPair;
import org.sandrob.bouncycastle.crypto.AsymmetricCipherKeyPairGenerator;
import org.sandrob.bouncycastle.crypto.KeyGenerationParameters;
import org.sandrob.bouncycastle.crypto.params.RSAKeyGenerationPara... |
package org.sandrob.bouncycastle.crypto.generators;
import org.sandrob.bouncycastle.crypto.AsymmetricCipherKeyPair;
import org.sandrob.bouncycastle.crypto.AsymmetricCipherKeyPairGenerator;
import org.sandrob.bouncycastle.crypto.KeyGenerationParameters;
import org.sandrob.bouncycastle.crypto.params.GOST3410KeyGeneratio... |
package org.sandrob.bouncycastle.crypto.generators;
import org.sandrob.bouncycastle.crypto.AsymmetricCipherKeyPair;
import org.sandrob.bouncycastle.crypto.AsymmetricCipherKeyPairGenerator;
import org.sandrob.bouncycastle.crypto.KeyGenerationParameters;
import org.sandrob.bouncycastle.crypto.params.DHKeyGenerationParam... |
package org.sandrob.bouncycastle.crypto.generators;
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.p... |
package org.sandrob.bouncycastle.crypto.generators;
import org.sandrob.bouncycastle.crypto.CipherParameters;
import org.sandrob.bouncycastle.crypto.params.ParametersWithRandom;
import org.sandrob.bouncycastle.crypto.params.RSAKeyParameters;
import org.sandrob.bouncycastle.crypto.params.RSAPrivateCrtKeyParameters;
imp... |
package org.sandrob.bouncycastle.crypto.generators;
import java.math.BigInteger;
import java.security.SecureRandom;
import org.sandrob.bouncycastle.crypto.AsymmetricCipherKeyPair;
import org.sandrob.bouncycastle.crypto.AsymmetricCipherKeyPairGenerator;
import org.sandrob.bouncycastle.crypto.KeyGenerationParameters;
i... |
package org.sandrob.bouncycastle.crypto.generators;
import org.sandrob.bouncycastle.crypto.AsymmetricCipherKeyPair;
import org.sandrob.bouncycastle.crypto.AsymmetricCipherKeyPairGenerator;
import org.sandrob.bouncycastle.crypto.KeyGenerationParameters;
import org.sandrob.bouncycastle.crypto.params.DSAKeyGenerationPara... |
package org.sandrob.bouncycastle.crypto.generators;
import org.sandrob.bouncycastle.crypto.CipherParameters;
import org.sandrob.bouncycastle.crypto.Digest;
import org.sandrob.bouncycastle.crypto.PBEParametersGenerator;
import org.sandrob.bouncycastle.crypto.params.KeyParameter;
import org.sandrob.bouncycastle.crypto.p... |
package org.sandrob.bouncycastle.crypto.generators;
import org.sandrob.bouncycastle.crypto.CipherParameters;
import org.sandrob.bouncycastle.crypto.Mac;
import org.sandrob.bouncycastle.crypto.PBEParametersGenerator;
import org.sandrob.bouncycastle.crypto.digests.SHA1Digest;
import org.sandrob.bouncycastle.crypto.macs.... |
package org.sandrob.bouncycastle.crypto.generators;
import org.sandrob.bouncycastle.crypto.CipherParameters;
import org.sandrob.bouncycastle.crypto.Digest;
import org.sandrob.bouncycastle.crypto.PBEParametersGenerator;
import org.sandrob.bouncycastle.crypto.digests.MD5Digest;
import org.sandrob.bouncycastle.crypto.par... |
package org.sandrob.bouncycastle.crypto.generators;
import org.sandrob.bouncycastle.crypto.params.GOST3410Parameters;
import org.sandrob.bouncycastle.crypto.params.GOST3410ValidationParameters;
import java.math.BigInteger;
import java.security.SecureRandom;
/**
* generate suitable parameters for GOST3410.
*/
publi... |
package org.sandrob.bouncycastle.crypto.generators;
import org.sandrob.bouncycastle.crypto.Digest;
/**
* KDF1 generator for derived keys and ivs as defined by IEEE P1363a/ISO 18033
* <br>
* This implementation is based on ISO 18033/IEEE P1363a.
*/
public class KDF1BytesGenerator
extends BaseKDFBytesGenerator
... |
package org.sandrob.bouncycastle.crypto.generators;
import org.sandrob.bouncycastle.crypto.AsymmetricCipherKeyPair;
import org.sandrob.bouncycastle.crypto.AsymmetricCipherKeyPairGenerator;
import org.sandrob.bouncycastle.crypto.KeyGenerationParameters;
import org.sandrob.bouncycastle.crypto.params.NaccacheSternKeyGene... |
package org.sandrob.bouncycastle.crypto.generators;
import org.sandrob.bouncycastle.crypto.KeyGenerationParameters;
import org.sandrob.bouncycastle.crypto.params.DESedeParameters;
public class DESedeKeyGenerator
extends DESKeyGenerator
{
/**
* initialise the key generator - if strength is set to zero
... |
package org.sandrob.bouncycastle.crypto.generators;
import java.math.BigInteger;
import org.sandrob.bouncycastle.crypto.AsymmetricCipherKeyPair;
import org.sandrob.bouncycastle.crypto.AsymmetricCipherKeyPairGenerator;
import org.sandrob.bouncycastle.crypto.KeyGenerationParameters;
import org.sandrob.bouncycastle.cryp... |
package org.sandrob.bouncycastle.crypto.macs;
import org.sandrob.bouncycastle.crypto.BlockCipher;
import org.sandrob.bouncycastle.crypto.CipherParameters;
import org.sandrob.bouncycastle.crypto.DataLengthException;
import org.sandrob.bouncycastle.crypto.Mac;
import org.sandrob.bouncycastle.crypto.paddings.BlockCipherP... |
package org.sandrob.bouncycastle.crypto.macs;
import org.sandrob.bouncycastle.crypto.BlockCipher;
import org.sandrob.bouncycastle.crypto.CipherParameters;
import org.sandrob.bouncycastle.crypto.Mac;
import org.sandrob.bouncycastle.crypto.modes.CBCBlockCipher;
import org.sandrob.bouncycastle.crypto.paddings.ISO7816d4Pa... |
package org.sandrob.bouncycastle.crypto.macs;
import org.sandrob.bouncycastle.crypto.BlockCipher;
import org.sandrob.bouncycastle.crypto.CipherParameters;
import org.sandrob.bouncycastle.crypto.Mac;
import org.sandrob.bouncycastle.crypto.modes.CBCBlockCipher;
public class BlockCipherMac
implements Mac
{
priva... |
package org.sandrob.bouncycastle.crypto.macs;
import org.sandrob.bouncycastle.crypto.BlockCipher;
import org.sandrob.bouncycastle.crypto.CipherParameters;
import org.sandrob.bouncycastle.crypto.Mac;
import org.sandrob.bouncycastle.crypto.modes.CBCBlockCipher;
import org.sandrob.bouncycastle.crypto.paddings.BlockCipher... |
package org.sandrob.bouncycastle.crypto.macs;
import org.sandrob.bouncycastle.crypto.CipherParameters;
import org.sandrob.bouncycastle.crypto.DataLengthException;
import org.sandrob.bouncycastle.crypto.Mac;
import org.sandrob.bouncycastle.crypto.params.KeyParameter;
import org.sandrob.bouncycastle.crypto.params.Parame... |
package org.sandrob.bouncycastle.crypto.macs;
import org.sandrob.bouncycastle.crypto.BlockCipher;
import org.sandrob.bouncycastle.crypto.CipherParameters;
import org.sandrob.bouncycastle.crypto.Mac;
import org.sandrob.bouncycastle.crypto.engines.DESEngine;
import org.sandrob.bouncycastle.crypto.modes.CBCBlockCipher;
i... |
package org.sandrob.bouncycastle.crypto.macs;
import org.sandrob.bouncycastle.crypto.CipherParameters;
import org.sandrob.bouncycastle.crypto.Digest;
import org.sandrob.bouncycastle.crypto.Mac;
import org.sandrob.bouncycastle.crypto.params.KeyParameter;
/**
* HMAC implementation based on RFC2104
*
* H(K XOR opad, ... |
package org.sandrob.bouncycastle.crypto.macs;
import org.sandrob.bouncycastle.crypto.CipherParameters;
import org.sandrob.bouncycastle.crypto.DataLengthException;
import org.sandrob.bouncycastle.crypto.Mac;
import org.sandrob.bouncycastle.crypto.params.KeyParameter;
import org.sandrob.bouncycastle.crypto.params.Parame... |
package org.sandrob.bouncycastle.crypto.macs;
import java.util.Hashtable;
import org.sandrob.bouncycastle.crypto.CipherParameters;
import org.sandrob.bouncycastle.crypto.Digest;
import org.sandrob.bouncycastle.crypto.ExtendedDigest;
import org.sandrob.bouncycastle.crypto.Mac;
import org.sandrob.bouncycastle.crypto.pa... |
package org.sandrob.bouncycastle.crypto;
/**
* Parameters for key/byte stream derivation classes
*/
public interface DerivationParameters
{
}
|
package org.sandrob.bouncycastle.crypto;
/**
* the foundation class for the exceptions thrown by the crypto packages.
*/
public class RuntimeCryptoException
extends RuntimeException
{
/**
* base constructor.
*/
public RuntimeCryptoException()
{
}
/**
* create a RuntimeCryptoE... |
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.ECPublicKeyParameters;
import org.sandrob.bouncycastle.crypto.signers.ECDSASigner;
class TlsECDSASigner extends T... |
package org.sandrob.bouncycastle.crypto.tls;
import org.sandrob.bouncycastle.asn1.x509.X509CertificateStructure;
/**
* This should be implemented by any class which can find out, if a given certificate
* chain is being accepted by an client.
*
* @deprecated Perform certificate verification in TlsAuthentication i... |
package org.sandrob.bouncycastle.crypto.tls;
/**
* RFC 4366 2.3
*/
public class ExtensionType
{
public static final int server_name = 0;
public static final int max_fragment_length = 1;
public static final int client_certificate_url = 2;
public static final int trusted_ca_keys = 3;
public static ... |
package org.sandrob.bouncycastle.crypto.tls;
import java.io.IOException;
import org.sandrob.bouncycastle.crypto.params.AsymmetricKeyParameter;
public interface TlsAgreementCredentials extends TlsCredentials
{
byte[] generateAgreement(AsymmetricKeyParameter serverPublicKey) throws IOException;
}
|
package org.sandrob.bouncycastle.crypto.tls;
import java.io.IOException;
public interface TlsCipherFactory
{
/**
* See enumeration classes EncryptionAlgorithm and DigestAlgorithm for appropriate argument values
*/
TlsCipher createCipher(TlsClientContext context, int encryptionAlgorithm, int digestAl... |
package org.sandrob.bouncycastle.crypto.tls;
import java.io.IOException;
/**
* A temporary class to use LegacyTlsAuthentication
*
* @deprecated
*/
public class LegacyTlsClient extends DefaultTlsClient
{
/** @deprecated */
protected CertificateVerifyer verifyer;
/**
* @deprecated
*/
pub... |
package org.sandrob.bouncycastle.crypto.tls;
import java.io.IOException;
import java.io.OutputStream;
/**
* An OutputStream for an TLS connection.
*/
class TlsOutputStream extends OutputStream
{
private byte[] buf = new byte[1];
private TlsProtocolHandler handler;
TlsOutputStream(TlsProtocolHandler han... |
package org.sandrob.bouncycastle.crypto.tls;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
/**
* An implementation of the TLS 1.0 record layer.
*/
class RecordStream
{
private TlsProtocolHandler handler;
private InputStream is;
... |
package org.sandrob.bouncycastle.crypto.tls;
/**
* RFC 2246 7.2
*/
public class AlertDescription
{
public static final short close_notify = 0;
public static final short unexpected_message = 10;
public static final short bad_record_mac = 20;
public static final short decryption_failed = 21;
public... |
package org.sandrob.bouncycastle.crypto.tls;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.util.Hashtable;
import org.sandrob.bouncycastle.util.Arrays;
public abstract class SRPTlsClient implements TlsClient
{
public static final Integer EXT_SRP = new Integer(ExtensionType.srp);
... |
package org.sandrob.bouncycastle.crypto.tls;
import java.io.IOException;
import java.io.InputStream;
import org.sandrob.bouncycastle.crypto.Signer;
import org.sandrob.bouncycastle.crypto.io.SignerInputStream;
import org.sandrob.bouncycastle.crypto.params.ECDomainParameters;
import org.sandrob.bouncycastle.crypto.para... |
package org.sandrob.bouncycastle.crypto.tls;
import java.security.SecureRandom;
class TlsClientContextImpl implements TlsClientContext
{
private SecureRandom secureRandom;
private SecurityParameters securityParameters;
private Object userObject = null;
TlsClientContextImpl(SecureRandom secureRandom,... |
package org.sandrob.bouncycastle.crypto.tls;
public class KeyExchangeAlgorithm
{
/*
* Note that the values here are implementation-specific and arbitrary.
* It is recommended not to depend on the particular values (e.g. serialization).
*/
public static final int NULL = 0;
public static final... |
package org.sandrob.bouncycastle.crypto.tls;
/**
* A NULL CipherSuite in java, this should only be used during handshake.
*/
public class TlsNullCipher implements TlsCipher
{
public byte[] encodePlaintext(short type, byte[] plaintext, int offset, int len)
{
return copyData(plaintext, offset, len);
... |
package org.sandrob.bouncycastle.crypto.tls;
import java.security.SecureRandom;
import org.sandrob.bouncycastle.crypto.CryptoException;
import org.sandrob.bouncycastle.crypto.Signer;
import org.sandrob.bouncycastle.crypto.params.AsymmetricKeyParameter;
interface TlsSigner
{
byte[] calculateRawSignature(SecureRan... |
package org.sandrob.bouncycastle.crypto.tls;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.security.SecureRandom;
import java.util.Enumeration;
import java.util.Hashtable;
import java.util.Vect... |
package org.sandrob.bouncycastle.crypto.tls;
import java.io.IOException;
import org.sandrob.bouncycastle.crypto.BlockCipher;
import org.sandrob.bouncycastle.crypto.Digest;
import org.sandrob.bouncycastle.crypto.digests.MD5Digest;
import org.sandrob.bouncycastle.crypto.digests.SHA1Digest;
import org.sandrob.bouncycast... |
package org.sandrob.bouncycastle.crypto.tls;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import org.sandrob.bouncycastle.crypto.Digest;
import org.sandrob.bouncycastle.crypto.macs.HMac;
import org.sandrob.bouncycastle.crypto.params.KeyParameter;
/**
* A generic TLS MAC implementation, which ca... |
package org.sandrob.bouncycastle.crypto.tls;
import java.io.IOException;
import java.util.Hashtable;
public interface TlsClient
{
void init(TlsClientContext context);
int[] getCipherSuites();
short[] getCompressionMethods();
// Hashtable is (Integer -> byte[])
Hashtable getClientExtensions() th... |
package org.sandrob.bouncycastle.crypto.tls;
import java.io.IOException;
import java.util.Hashtable;
public abstract class DefaultTlsClient implements TlsClient
{
protected TlsCipherFactory cipherFactory;
protected TlsClientContext context;
protected int selectedCipherSuite;
protected int selectedCo... |
package org.sandrob.bouncycastle.crypto.tls;
import java.security.SecureRandom;
public interface TlsClientContext
{
SecureRandom getSecureRandom();
SecurityParameters getSecurityParameters();
Object getUserObject();
void setUserObject(Object userObject);
}
|
package org.sandrob.bouncycastle.crypto.tls;
public class SecurityParameters
{
byte[] clientRandom = null;
byte[] serverRandom = null;
byte[] masterSecret = null;
public byte[] getClientRandom()
{
return clientRandom;
}
public byte[] getServerRandom()
{
return serverRa... |
package org.sandrob.bouncycastle.crypto.tls;
import java.security.SecureRandom;
import org.sandrob.bouncycastle.crypto.CryptoException;
import org.sandrob.bouncycastle.crypto.Signer;
import org.sandrob.bouncycastle.crypto.digests.NullDigest;
import org.sandrob.bouncycastle.crypto.encodings.PKCS1Encoding;
import org.s... |
package org.sandrob.bouncycastle.crypto.tls;
import java.io.IOException;
/**
* A temporary class to wrap old CertificateVerifyer stuff for new TlsAuthentication
*
* @deprecated
*/
public class LegacyTlsAuthentication implements TlsAuthentication
{
protected CertificateVerifyer verifyer;
public LegacyTls... |
package org.sandrob.bouncycastle.crypto.tls;
import java.io.EOFException;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import org.sandrob.bouncycastle.asn1.DERBitString;
import org.sandrob.bouncycastle.asn1.x509.KeyUsage;
import org.sandrob.bouncycastle.asn1.x509.X509Certificat... |
package org.sandrob.bouncycastle.crypto.tls;
import java.io.IOException;
import org.sandrob.bouncycastle.crypto.CryptoException;
import org.sandrob.bouncycastle.crypto.params.AsymmetricKeyParameter;
import org.sandrob.bouncycastle.crypto.params.DSAPrivateKeyParameters;
import org.sandrob.bouncycastle.crypto.params.EC... |
package org.sandrob.bouncycastle.crypto.tls;
/**
* RFC 2246 6.1
*/
public class CompressionMethod
{
public static final short NULL = 0;
/*
* RFC 3749 2
*/
public static final short DEFLATE = 1;
/*
* Values from 224 decimal (0xE0) through 255 decimal (0xFF)
* inclusive are reserv... |
package org.sandrob.bouncycastle.crypto.tls;
/**
* RFC 2246 7.4
*/
public class HandshakeType
{
public static final short hello_request = 0;
public static final short client_hello = 1;
public static final short server_hello = 2;
public static final short certificate = 11;
public static final shor... |
package org.sandrob.bouncycastle.crypto.tls;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
/**
* A generic interface for key exchange implementations in TLS 1.0.
*/
public interface TlsKeyExchange
{
void skipServerCertificate() throws IOException;
void processServerCe... |
package org.sandrob.bouncycastle.crypto.tls;
import java.math.BigInteger;
import org.sandrob.bouncycastle.crypto.BasicAgreement;
import org.sandrob.bouncycastle.crypto.agreement.DHBasicAgreement;
import org.sandrob.bouncycastle.crypto.agreement.ECDHBasicAgreement;
import org.sandrob.bouncycastle.crypto.params.Asymmet... |
package org.sandrob.bouncycastle.crypto.tls;
import java.io.IOException;
import java.io.InputStream;
/**
* An InputStream for an TLS 1.0 connection.
*/
class TlsInputStream extends InputStream
{
private byte[] buf = new byte[1];
private TlsProtocolHandler handler = null;
TlsInputStream(TlsProtocolHandl... |
package org.sandrob.bouncycastle.crypto.tls;
import java.io.IOException;
public class TlsFatalAlert extends IOException
{
private static final long serialVersionUID = 3584313123679111168L;
private short alertDescription;
public TlsFatalAlert(short alertDescription)
{
this.alertDescription = ... |
package org.sandrob.bouncycastle.crypto.tls;
/**
* RFC 2246 6.2.1
*/
public class ContentType
{
public static final short change_cipher_spec = 20;
public static final short alert = 21;
public static final short handshake = 22;
public static final short application_data = 23;
}
|
package org.sandrob.bouncycastle.crypto.tls;
import java.io.IOException;
public interface TlsAuthentication
{
/**
* Called by the protocol handler to report the server certificate
* Note: this method is responsible for certificate verification and validation
*
* @param serverCertificate the s... |
package org.sandrob.bouncycastle.crypto.tls;
/**
* RFC 4492 5.4
*/
public class ECCurveType
{
/**
* Indicates the elliptic curve domain parameters are conveyed verbosely, and the
* underlying finite field is a prime field.
*/
public static final short explicit_prime = 1;
/**
* Indica... |
package org.sandrob.bouncycastle.crypto.tls;
public class TlsRuntimeException extends RuntimeException
{
private static final long serialVersionUID = 1928023487348344086L;
Throwable e;
public TlsRuntimeException(String message, Throwable e)
{
super(message);
this.e = e;
}
pu... |
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 java.io.IOException;
import java.io.InputStream;
import java.math.BigInteger;
import org.sandrob.bouncycastle.crypto.Signer;
import org.sandrob.bouncycastle.crypto.io.SignerInputStream;
import org.sandrob.bouncycastle.crypto.params.DHParameters;
import org.sandrob.b... |
package org.sandrob.bouncycastle.crypto.tls;
/**
* RFC 2246 7.4.4
*/
public class ClientCertificateType
{
public static final short rsa_sign = 1;
public static final short dss_sign = 2;
public static final short rsa_fixed_dh = 3;
public static final short dss_fixed_dh = 4;
/*
* RFC 4492 5.5... |
package org.sandrob.bouncycastle.crypto.tls;
/**
* RFC 4492 5.1.2
*/
public class ECPointFormat
{
public static final short uncompressed = 0;
public static final short ansiX962_compressed_prime = 1;
public static final short ansiX962_compressed_char2 = 2;
/*
* reserved (248..255)
*/
}
|
package org.sandrob.bouncycastle.crypto.tls;
import java.io.IOException;
public interface TlsCipher
{
byte[] encodePlaintext(short type, byte[] plaintext, int offset, int len) throws IOException;
byte[] decodeCiphertext(short type, byte[] ciphertext, int offset, int len) throws IOException;
}
|
package org.sandrob.bouncycastle.crypto.tls;
import java.io.IOException;
import java.security.SecureRandom;
import org.sandrob.bouncycastle.crypto.BlockCipher;
import org.sandrob.bouncycastle.crypto.Digest;
import org.sandrob.bouncycastle.crypto.params.KeyParameter;
import org.sandrob.bouncycastle.crypto.params.Param... |
package org.sandrob.bouncycastle.crypto.tls;
public interface TlsCredentials
{
Certificate getCertificate();
}
|
package org.sandrob.bouncycastle.crypto.tls;
import java.io.IOException;
public interface TlsSignerCredentials extends TlsCredentials
{
byte[] generateCertificateSignature(byte[] md5andsha1) throws IOException;
}
|
package org.sandrob.bouncycastle.crypto.tls;
public class EncryptionAlgorithm
{
/*
* Note that the values here are implementation-specific and arbitrary.
* It is recommended not to depend on the particular values (e.g. serialization).
*/
public static final int NULL = 0;
public static final ... |
package org.sandrob.bouncycastle.crypto.tls;
/**
* A queue for bytes. This file could be more optimized.
*/
public class ByteQueue
{
/**
* @return The smallest number which can be written as 2^x which is bigger than i.
*/
public static final int nextTwoPow(int i)
{
/*
* This co... |
package org.sandrob.bouncycastle.crypto.tls;
/**
* RFC 2246 A.5
*/
public class CipherSuite
{
public static final int TLS_NULL_WITH_NULL_NULL = 0x0000;
public static final int TLS_RSA_WITH_NULL_MD5 = 0x0001;
public static final int TLS_RSA_WITH_NULL_SHA = 0x0002;
public static final int TLS_RSA_EXPOR... |
package org.sandrob.bouncycastle.crypto.tls;
import org.sandrob.bouncycastle.asn1.sec.SECNamedCurves;
import org.sandrob.bouncycastle.asn1.x9.X9ECParameters;
import org.sandrob.bouncycastle.crypto.params.ECDomainParameters;
/**
* RFC 4492 5.1.1
*
* The named curves defined here are those specified in SEC 2 [13]. ... |
package org.sandrob.bouncycastle.crypto.tls;
public class DigestAlgorithm
{
/*
* Note that the values here are implementation-specific and arbitrary.
* It is recommended not to depend on the particular values (e.g. serialization).
*/
public static final int NULL = 0;
public static final int ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.