Crypto Lib
    Preparing search index...

    Function verifyIso20022Payment

    • Verifies an ISO 20022 post-quantum dual-signature envelope against the original payload and the signer's trusted public keys.

      Both signatures are checked against trustedKeys; the public keys carried in the envelope are informational and are ignored. The envelope is valid only when the payload digest matches and both signatures verify. The timestamp is signed but its freshness is not checked here: apply your own replay window to envelope.timestamp after verification.

      Parameters

      Returns Iso20022VerifyResult

      const result = verifyIso20022Payment(envelope, payload, {
      classicalPublicKeyHex: registry.ed25519For(sender),
      postQuantumPublicKeyHex: registry.mlDsaFor(sender),
      });
      console.log(`Valid: ${result.valid}, Classical: ${result.classicalValid}, PQC: ${result.postQuantumValid}`);