methodiDSIDLArith.IntegratedEncryption
procedure IntegratedEncryption(aKey : iDLPublicKey; const aMsg : tBytes; aMsgOffset, aMsgCount : Integer; const aP1 : tBytes; aP1Offset, aP1Len : Integer; const aP2 : tBytes; aP2Offset, aP2Len : Integer; aHashAlgorithm: tHashAlgorithm;
DL/ECIES integrated encryption (IEEE 1363a IES): encrypts aMsg to the peer's public key aKey by generating an ephemeral key pair, deriving a symmetric key via ECDH+KDF (with optional shared-info aP1) and returning the ephemeral public element, the XOR/stream ciphertext, and a MAC (keyed with shared-info aP2). Use it for one-shot public-key encryption of a small payload. This overload uses the built-in stream construction; the sender (encryptor) side.
procedure IntegratedEncryption(aKey : iDLPublicKey; const aMsg : tBytes; aMsgOffset, aMsgCount : Integer; const aP1 : tBytes; aP1Offset, aP1Len : Integer; const aP2 : tBytes; aP2Offset, aP2Len : Integer; aHashAlgorithm: tHashAlgorithm;
DL/ECIES integrated encryption, block-cipher variant: same scheme as the overload above, but instead of the built-in XOR stream it encrypts aMsg with the caller-chosen symmetric cipher aCipherClass using a KDF-derived key of aKeyLen bytes (the message is length-padded to the cipher block size). Use it when a profile mandates a specific block cipher (e.g. AES) for the IES bulk layer rather than the default construction. Sender (encryptor) side.