MLDSA65Verify

密碼編譯

描述

針對公鑰、訊息與選用內容驗證 ML-DSA-65 簽章

語法

Delphi

Function MLDSA65Verify(Const PublicKey, Message, Context, Signature: AnsiString): Boolean;

傳回值

只有當 PublicKey 為 1952 位元組、Signature 為 3309 位元組、Context 不超過 255 位元組且簽章為真時為 True
長度無效、提示格式錯誤、回應係數超出範圍或承諾雜湊不符時為 False

備註

驗證是確定性的,並在重建承諾前執行 FIPS 204 範數檢查。官方已知答案向量與遭竄改簽章向量都在回歸測試涵蓋範圍內

範例

if not MLDSA65Verify(PublicKey, Message, Context, Signature) then
  Reject(Message);

另請參閱

MLDSA65KeyGen, MLDSA65Sign