setKeyExchangeSize()
setKeyExchangeSize(integer $keySize)
Setter for the key pair size property.
Parameters
| integer | $keySize | The key pair size in bits. |
Throws
- \Exception
Validation errors.
Interface KeyExchangeInterface - Interface specification for key exchange protocols.
generateExchangeRequestInformation() : \CryptoManana\DataStructures\ExchangeInformation
Generates fresh key exchange information for sending to the remote party.
Validation errors.
The key exchange information object.
generateExchangeResponseInformation(string $prime, string $generator) : \CryptoManana\DataStructures\ExchangeInformation
Generates fresh key exchange information based on the received prime and generator values.
| string | $prime | The hexadecimal representation of a prime number, also knows as |
| string | $generator | The hexadecimal generator number, a primitive root modulo of |
Validation errors.
The key exchange information object.
computeSharedSecret(string $remotePublicKey, string $localPrivateKey) : string
Computes the secret shared key for usage of both parties.
| string | $remotePublicKey | The remote side's public key, based on the same prime and generator combination. |
| string | $localPrivateKey | The local side's private key, based on the same prime and generator combination. |
Validation errors.
The shared secret key.