Contents · Forum Home · StreamSec Tools 4.1.5.363 documentation

methodiDSIDLArith.IntegratedDecryption

function IntegratedDecryption(aKey : iDLPrivateKey; aEphemeralKey : iGroupElement; const aCipherText : tBytes; aCTOffset, aCTCount : Integer; const aMAC : tBytes; aMACOffset, aMACCount : Integer; const aP1 : tBytes; aP1Offset, aP1Len : Integer;
DL/ECIES integrated decryption -- the inverse of the stream-construction IntegratedEncryption. Reconstructs the symmetric key from this party's private key aKey and the sender's aEphemeralKey (ECDH + KDF with shared-info aP1), verifies the aMAC over the ciphertext and shared-info aP2, and on success recovers the plaintext into aMsg (setting aMsgCount). Returns False if the MAC check fails, so treat a False result as tampered/undecryptable and discard the output. Recipient (decryptor) side.
function IntegratedDecryption(aKey : iDLPrivateKey; aEphemeralKey : iGroupElement; const aCipherText : tBytes; aCTOffset, aCTCount : Integer; const aMAC : tBytes; aMACOffset, aMACCount : Integer; const aP1 : tBytes; aP1Offset, aP1Len : Integer;
DL/ECIES integrated decryption, block-cipher variant -- the inverse of the aCipherClass/aKeyLen IntegratedEncryption. Works as the stream overload above but decrypts the bulk data with the same symmetric cipher aCipherClass and aKeyLen-byte derived key the sender used (removing the block padding). Pass the cipher and key length that match how the message was encrypted; returns False on MAC failure. Recipient (decryptor) side.