Top Fields Constructors Methods
org.bouncycastle.crypto.tls

public abstract Class TlsRsaKeyExchange

extends Object
Class Inheritance
Imports
java.math.BigInteger, java.security.SecureRandom, org.bouncycastle.crypto.CryptoServicePurpose, .CryptoServicesRegistrar, .DataLengthException, org.bouncycastle.crypto.constraints.ConstraintUtils, .DefaultServiceProperties, org.bouncycastle.crypto.params.RSAKeyParameters, .RSAPrivateCrtKeyParameters, org.bouncycastle.util.Arrays, .BigIntegers, .Pack

Field Summary

Modifier and TypeField and Description
private static final BigInteger
public static final int

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
private static int
caddTo(int len, int cond, byte[] x, byte[] z)

private static int
checkPkcs1Encoding2(byte[] buf, int pkcs1Length, int plaintextLength)

Check the argument is a valid encoding with type 2 of a plaintext with the given length.

private static BigInteger
convertInput(BigInteger modulus, byte[] in, int inOff, int inLen)

public static byte[]
decryptPreMasterSecret(byte[] in, int inOff, int inLen, RSAKeyParameters privateKey, int protocolVersion, SecureRandom secureRandom)

public static int
private static BigInteger
rsa(RSAKeyParameters privateKey, BigInteger input)

private static byte[]
rsaBlinded(RSAKeyParameters privateKey, BigInteger input, SecureRandom secureRandom)

private static BigInteger
private static int
subFrom(int len, byte[] x, byte[] z)

private static byte[]
toBytes(BigInteger output, int fixedSize)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

ONEback to summary
private static final BigInteger ONE
PRE_MASTER_SECRET_LENGTHback to summary
public static final int PRE_MASTER_SECRET_LENGTH

Constructor Detail

TlsRsaKeyExchangeback to summary
private TlsRsaKeyExchange()

Method Detail

caddToback to summary
private static int caddTo(int len, int cond, byte[] x, byte[] z)
checkPkcs1Encoding2back to summary
private static int checkPkcs1Encoding2(byte[] buf, int pkcs1Length, int plaintextLength)

Check the argument is a valid encoding with type 2 of a plaintext with the given length. Returns 0 if valid, or -1 if invalid.

convertInputback to summary
private static BigInteger convertInput(BigInteger modulus, byte[] in, int inOff, int inLen)
decryptPreMasterSecretback to summary
public static byte[] decryptPreMasterSecret(byte[] in, int inOff, int inLen, RSAKeyParameters privateKey, int protocolVersion, SecureRandom secureRandom)
getInputLimitback to summary
public static int getInputLimit(RSAKeyParameters privateKey)
rsaback to summary
private static BigInteger rsa(RSAKeyParameters privateKey, BigInteger input)
rsaBlindedback to summary
private static byte[] rsaBlinded(RSAKeyParameters privateKey, BigInteger input, SecureRandom secureRandom)
rsaCrtback to summary
private static BigInteger rsaCrt(RSAPrivateCrtKeyParameters crtKey, BigInteger input)
subFromback to summary
private static int subFrom(int len, byte[] x, byte[] z)
toBytesback to summary
private static byte[] toBytes(BigInteger output, int fixedSize)