Modernized xmlsec interoperability vectors
=========================================

Copied unchanged from https://github.com/lsh123/xmlsec/tree/ca209d82429783d5120f71b90bdd1dac14cf0c7e/tests
(11 November 2026): xmldsig11-interop-2012.modern,
merlin-xmldsig-twenty-three.modern, and phaos-xmldsig-three.modern.
Their README.txt files describe the upstream provenance and modernization.
The upstream Copyright notice is included in this directory.
These are xmlsec re-signings of historical suites, not new W3C recommendations.
The unsigned templates are retained alongside the signed vectors.

Support files from the same revision:
- external-data/xml-stylesheet-2005 and xml-stylesheet-2005.b64
- external-data/rfc3161.txt
- keys/rsa/rsa-4096-cert.pem (public certificate for X509Digest resolution)
No private keys are required. HMAC fixtures use the public test secret "secret".

Run: python test/test_modern_interop.py -v

The suite pins embedded leaf certificates and uses a time within their validity
period; it tests signature interoperability, not certificate-chain policy.
The X509Digest case additionally exercises the certificate resolver.
Unsupported Manifest, XPath/XSLT and key lookup cases are explicit skips.
Truncated HMAC and corrupted signatures must be rejected.

ML-DSA vectors
--------------

The three envelopes in ml-dsa/ were signed and verified with upstream XMLSec
at the revision linked above, built with --enable-ml-dsa and OpenSSL 3.6.5.
They use the upstream tests/aleksey-xmldsig-01/enveloped-sha512-mldsa*.tmpl
templates and the corresponding test keys from tests/keys/ml-dsa/. The ML-DSA-65
template includes the context string "A context string" followed by a newline.
For each template we removed the redundant XPath transform and added an empty
dsig11:DEREncodedKeyValue after ds:KeyName so the signed file carries its key.

For each parameter set (n=44, 65 or 87), run these commands from an XMLSec
source checkout with the prepared template in template.xml::

    xmlsec1 --sign --enabled-key-data key-name,der-encoded-key-value,ml-dsa \
        --privkey-pem:TestKeyName-ml-dsa-$n tests/keys/ml-dsa/ml-dsa-$n-key.pem \
        --pwd secret123 --output ml-dsa-$n.xml template.xml
    xmlsec1 --verify --enabled-key-data der-encoded-key-value,ml-dsa ml-dsa-$n.xml
