C# Class Org.BouncyCastle.Crypto.Tls.TlsDHUtilities

Mostrar archivo Open project: gkardava/WinPass Class Usage Examples

Public Methods

Method Description
AddNegotiatedDheGroupsClientExtension ( IDictionary extensions, byte dheGroups ) : void
AddNegotiatedDheGroupsServerExtension ( IDictionary extensions, byte dheGroup ) : void
AreCompatibleParameters ( DHParameters a, DHParameters b ) : bool
CalculateDHBasicAgreement ( DHPublicKeyParameters publicKey, DHPrivateKeyParameters privateKey ) : byte[]
ContainsDheCipherSuites ( int cipherSuites ) : bool
CreateNegotiatedDheGroupsClientExtension ( byte dheGroups ) : byte[]
CreateNegotiatedDheGroupsServerExtension ( byte dheGroup ) : byte[]
GenerateDHKeyPair ( SecureRandom random, DHParameters dhParams ) : AsymmetricCipherKeyPair
GenerateEphemeralClientKeyExchange ( SecureRandom random, DHParameters dhParams, Stream output ) : DHPrivateKeyParameters
GenerateEphemeralServerKeyExchange ( SecureRandom random, DHParameters dhParams, Stream output ) : DHPrivateKeyParameters
GetNegotiatedDheGroupsClientExtension ( IDictionary extensions ) : byte[]
GetNegotiatedDheGroupsServerExtension ( IDictionary extensions ) : short
GetParametersForDHEGroup ( short dheGroup ) : DHParameters
IsDheCipherSuite ( int cipherSuite ) : bool
ReadDHParameter ( Stream input ) : BigInteger
ReadNegotiatedDheGroupsClientExtension ( byte extensionData ) : byte[]
ReadNegotiatedDheGroupsServerExtension ( byte extensionData ) : byte
ValidateDHParameters ( DHParameters parameters ) : DHParameters
ValidateDHPublicKey ( DHPublicKeyParameters key ) : DHPublicKeyParameters
WriteDHParameter ( BigInteger x, Stream output ) : void

Private Methods

Method Description
FromHex ( String hex ) : BigInteger
FromSafeP ( String hexP ) : DHParameters

Method Details

AddNegotiatedDheGroupsClientExtension() public static method

public static AddNegotiatedDheGroupsClientExtension ( IDictionary extensions, byte dheGroups ) : void
extensions IDictionary
dheGroups byte
return void

AddNegotiatedDheGroupsServerExtension() public static method

public static AddNegotiatedDheGroupsServerExtension ( IDictionary extensions, byte dheGroup ) : void
extensions IDictionary
dheGroup byte
return void

AreCompatibleParameters() public static method

public static AreCompatibleParameters ( DHParameters a, DHParameters b ) : bool
a DHParameters
b DHParameters
return bool

CalculateDHBasicAgreement() public static method

public static CalculateDHBasicAgreement ( DHPublicKeyParameters publicKey, DHPrivateKeyParameters privateKey ) : byte[]
publicKey DHPublicKeyParameters
privateKey DHPrivateKeyParameters
return byte[]

ContainsDheCipherSuites() public static method

public static ContainsDheCipherSuites ( int cipherSuites ) : bool
cipherSuites int
return bool

CreateNegotiatedDheGroupsClientExtension() public static method

public static CreateNegotiatedDheGroupsClientExtension ( byte dheGroups ) : byte[]
dheGroups byte
return byte[]

CreateNegotiatedDheGroupsServerExtension() public static method

public static CreateNegotiatedDheGroupsServerExtension ( byte dheGroup ) : byte[]
dheGroup byte
return byte[]

GenerateDHKeyPair() public static method

public static GenerateDHKeyPair ( SecureRandom random, DHParameters dhParams ) : AsymmetricCipherKeyPair
random SecureRandom
dhParams DHParameters
return AsymmetricCipherKeyPair

GenerateEphemeralClientKeyExchange() public static method

public static GenerateEphemeralClientKeyExchange ( SecureRandom random, DHParameters dhParams, Stream output ) : DHPrivateKeyParameters
random SecureRandom
dhParams DHParameters
output Stream
return DHPrivateKeyParameters

GenerateEphemeralServerKeyExchange() public static method

public static GenerateEphemeralServerKeyExchange ( SecureRandom random, DHParameters dhParams, Stream output ) : DHPrivateKeyParameters
random SecureRandom
dhParams DHParameters
output Stream
return DHPrivateKeyParameters

GetNegotiatedDheGroupsClientExtension() public static method

public static GetNegotiatedDheGroupsClientExtension ( IDictionary extensions ) : byte[]
extensions IDictionary
return byte[]

GetNegotiatedDheGroupsServerExtension() public static method

public static GetNegotiatedDheGroupsServerExtension ( IDictionary extensions ) : short
extensions IDictionary
return short

GetParametersForDHEGroup() public static method

public static GetParametersForDHEGroup ( short dheGroup ) : DHParameters
dheGroup short
return DHParameters

IsDheCipherSuite() public static method

public static IsDheCipherSuite ( int cipherSuite ) : bool
cipherSuite int
return bool

ReadDHParameter() public static method

public static ReadDHParameter ( Stream input ) : BigInteger
input Stream
return BigInteger

ReadNegotiatedDheGroupsClientExtension() public static method

public static ReadNegotiatedDheGroupsClientExtension ( byte extensionData ) : byte[]
extensionData byte
return byte[]

ReadNegotiatedDheGroupsServerExtension() public static method

public static ReadNegotiatedDheGroupsServerExtension ( byte extensionData ) : byte
extensionData byte
return byte

ValidateDHParameters() public static method

public static ValidateDHParameters ( DHParameters parameters ) : DHParameters
parameters DHParameters
return DHParameters

ValidateDHPublicKey() public static method

public static ValidateDHPublicKey ( DHPublicKeyParameters key ) : DHPublicKeyParameters
key DHPublicKeyParameters
return DHPublicKeyParameters

WriteDHParameter() public static method

public static WriteDHParameter ( BigInteger x, Stream output ) : void
x BigInteger
output Stream
return void