View stunning SlideShares in full-screen with the new iOS app!Introducing SlideShare for AndroidExplore all your favorite topics in the SlideShare appGet the SlideShare app to Save for Later — even offline
View stunning SlideShares in full-screen with the new Android app!View stunning SlideShares in full-screen with the new iOS app!
This class provides the functionality of a key agreement (or key exchange) protocol.
For each of the correspondents in the key exchange, doPhase needs to be called. For example, if this key exchange is with one other party, doPhase needs to be called once, with the lastPhase flag set to true .
If this key exchange is with two other parties, doPhase needs to be called twice, the first time setting the lastPhase flag to false , and the second time setting it to true . There may be any number of parties involved in a key exchange.
With the doPhase method, Diffie-Hellman allows any number of public keys to be added to perform a key agreement.