Creates a predefined DiffieHellmanGroup key exchange object. The
supported groups are listed in the documentation for DiffieHellmanGroup.
The returned object mimics the interface of objects created by createDiffieHellman, but will not allow changing
the keys (with diffieHellman.setPublicKey(), for example). The
advantage of using this method is that the parties do not have to
generate nor exchange a group modulus beforehand, saving both processor
and communication time.
Creates a predefined
DiffieHellmanGroup
key exchange object. The supported groups are listed in the documentation forDiffieHellmanGroup
.The returned object mimics the interface of objects created by createDiffieHellman, but will not allow changing the keys (with
diffieHellman.setPublicKey()
, for example). The advantage of using this method is that the parties do not have to generate nor exchange a group modulus beforehand, saving both processor and communication time.Example (obtaining a shared secret):