Documentation

EcDH
in package
implements EcDHInterface

This class is the implementation of ECDH.

EcDH is safe key exchange and achieves that a key is transported securely between two parties. The key then can be hashed and used as a basis in a dual encryption scheme, along with AES for faster two- way encryption.

Table of Contents

Interfaces

EcDHInterface
This is the contract for implementing EcDH (EC Diffie Hellman).

Properties

$adapter  : GmpMathInterface
Adapter used for math calculations
$recipientKey  : PublicKeyInterface
$secretKey  : PublicKeyInterface
Secret key between the two parties
$senderKey  : PrivateKeyInterface

Methods

__construct()  : mixed
Initialize a new exchange from a generator point.
calculateSharedKey()  : GMP
Calculates and returns the shared key for the exchange.
createMultiPartyKey()  : PublicKeyInterface
setRecipientKey()  : void
Sets the recipient key.
setSenderKey()  : mixed
Sets the sender's key.
calculateKey()  : mixed
checkExchangeState()  : mixed
Verifies that the shared secret is known, or that the required keys are available to calculate the shared secret.

Properties

Methods

calculateKey()

private calculateKey() : mixed

checkExchangeState()

Verifies that the shared secret is known, or that the required keys are available to calculate the shared secret.

private checkExchangeState() : mixed
Tags
throws
RuntimeException

when the exchange has not been made.


        
On this page

Search results