Contents · Forum Home · StreamSec Tools 4.1.5.363 documentation

methodiDSIDLArith.KeyAgreementScheme_DH2

function KeyAgreementScheme_DH2(const aPriv0 : iDLPrivateKey; const aPriv1 : iDLPrivateKey; const aWPr : iGroupElement; const aVPr : iGroupElement; const aP : iSecretKey; aCoFactor0, aCoFactor1 : Boolean; aHashAlgorithm: tHashAlgorithm; aKeyDerivation: tKeyDerivation; akLen : Integer; var aK : iSecretKey;
Diffie-Hellman primitive DH2 (two-key / C(2,2) agreement, e.g. static-static + ephemeral-ephemeral as in the Unified Model): combines two of this party's private keys (aPriv0, aPriv1) with two of the peer's public elements (aWPr, aVPr) into a single shared secret, then derives key aK as in DH1. Use it for authenticated key-agreement schemes that mix a long-term key and an ephemeral key on each side; both peers make the symmetric call with their own two privates and the peer's two publics.