Depends on signing and the SSZ encoding landing first.
The Python package is how test vectors get generated and how other implementations can call this specification. The shape is already set by Bls/Exports.lean with bindings/python/bls.c, and by the KZG equivalents: inputs and outputs are ByteArray, booleans come back as UInt8, and the wrapper reads every size at module-init time through the eth_xmss_const_* accessors that already exist in Xmss/Constants.lean, so no size is hardcoded in C.
Export the low-level pieces as well as key generation, signing and verification — the raw hash, the tweaked hash, and the message encoding. That costs a few lines and it is what lets someone whose signing vector fails work out which layer diverged, instead of staring at a 1208-byte mismatch.
Three files to touch besides the Lean: a new bindings/python/xmss.c, a wrapper module under bindings/python/eth_cryptography_specs/xmss/, and setup.py, which globs the Lean object files automatically but names the C sources one by one.
Goes in EthCryptographySpecs/Xmss/Exports.lean plus the binding files.
Depends on signing and the SSZ encoding landing first.
The Python package is how test vectors get generated and how other implementations can call this specification. The shape is already set by
Bls/Exports.leanwithbindings/python/bls.c, and by the KZG equivalents: inputs and outputs areByteArray, booleans come back asUInt8, and the wrapper reads every size at module-init time through theeth_xmss_const_*accessors that already exist inXmss/Constants.lean, so no size is hardcoded in C.Export the low-level pieces as well as key generation, signing and verification — the raw hash, the tweaked hash, and the message encoding. That costs a few lines and it is what lets someone whose signing vector fails work out which layer diverged, instead of staring at a 1208-byte mismatch.
Three files to touch besides the Lean: a new
bindings/python/xmss.c, a wrapper module underbindings/python/eth_cryptography_specs/xmss/, andsetup.py, which globs the Lean object files automatically but names the C sources one by one.Goes in
EthCryptographySpecs/Xmss/Exports.leanplus the binding files.