Bouncy Castle Cryptography Library 1.49

org.bouncycastle.crypto.tls
Class TlsDHUtils

java.lang.Object
  extended by org.bouncycastle.crypto.tls.TlsDHUtils

public class TlsDHUtils
extends java.lang.Object


Constructor Summary
TlsDHUtils()
           
 
Method Summary
static byte[] calculateDHBasicAgreement(DHPublicKeyParameters publicKey, DHPrivateKeyParameters privateKey)
           
static AsymmetricCipherKeyPair generateDHKeyPair(java.security.SecureRandom random, DHParameters dhParams)
           
static DHPrivateKeyParameters generateEphemeralClientKeyExchange(java.security.SecureRandom random, DHParameters dhParams, java.io.OutputStream output)
           
static java.math.BigInteger readDHParameter(java.io.InputStream input)
           
static DHPublicKeyParameters validateDHPublicKey(DHPublicKeyParameters key)
           
static void writeDHParameter(java.math.BigInteger x, java.io.OutputStream output)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TlsDHUtils

public TlsDHUtils()
Method Detail

calculateDHBasicAgreement

public static byte[] calculateDHBasicAgreement(DHPublicKeyParameters publicKey,
                                               DHPrivateKeyParameters privateKey)

generateDHKeyPair

public static AsymmetricCipherKeyPair generateDHKeyPair(java.security.SecureRandom random,
                                                        DHParameters dhParams)

generateEphemeralClientKeyExchange

public static DHPrivateKeyParameters generateEphemeralClientKeyExchange(java.security.SecureRandom random,
                                                                        DHParameters dhParams,
                                                                        java.io.OutputStream output)
                                                                 throws java.io.IOException
Throws:
java.io.IOException

validateDHPublicKey

public static DHPublicKeyParameters validateDHPublicKey(DHPublicKeyParameters key)
                                                 throws java.io.IOException
Throws:
java.io.IOException

readDHParameter

public static java.math.BigInteger readDHParameter(java.io.InputStream input)
                                            throws java.io.IOException
Throws:
java.io.IOException

writeDHParameter

public static void writeDHParameter(java.math.BigInteger x,
                                    java.io.OutputStream output)
                             throws java.io.IOException
Throws:
java.io.IOException

Bouncy Castle Cryptography Library 1.49