THotPDF.AddPubKeyAgreementRecipientWithSecret Method
宣告
procedure AddPubKeyAgreementRecipientWithSecret(
const CertificateDER: array of byte;
Permissions: THPDFProtectOptions; Scheme: THPDFPubKeyAgreementScheme;
const OriginatorPublicKey, OriginatorPrivateScalar,
OwnPublicPoint: array of byte);
行為
便利包裝,會在程序內由發起端私有純量計算共享祕密,不需要外部 ECDH 工具:X25519 與 X448 執行可攜式 ladder 運算,NIST 曲線則透過 CNG 處理,OriginatorPublicKey 是發起端的公開金鑰,在 Montgomery 方案下由 HPDFX25519PublicFromScalar 與 HPDFX448PublicFromScalar 推導;OwnPublicPoint 是發起端未壓縮的 0x04||X||Y 點,只有 NIST 曲線需要