QoreSign for Python
Hybrid secp256k1 + ML-DSA-87 (FIPS 204) signing, verification and Sign In With
QoreChain (SIWQ) for Python 3.9+. The package wraps the Rust implementation
(crates/qoresign) through UniFFI, so its output is byte-identical to the
TypeScript, Rust, Go, Swift and Kotlin packages; all of them are checked
against vectors/qoresign-v1.json.
It is offline: key derivation, signing, verification, key registration messages, message signing and SIWQ. Fetching account numbers and broadcasting stay in your app.
Lanes
| Lane | Today |
|---|---|
| native | hybrid ML-DSA-87 (FIPS 204) signature plus secp256k1 |
| EVM | quantum-ready only: the account registers an ML-DSA-87 key and opens an authorization window from the native lane; EVM transactions carry no ML-DSA-87 signature |
| SVM | not available (LANE_NOT_AVAILABLE) |
Install
pip install qorechain-qoresign
import qoresign
Wheels: macOS 11+ (arm64, x86_64), Linux manylinux2014 (x86_64, aarch64) and
Windows (x86_64). One wheel per platform serves every Python 3 version: the
bindings call the native library through ctypes. Other platforms build from
the source distribution, which needs Rust 1.95.
Example
import qoresign as qs
# Public BIP-39 test phrase: never send funds to it.
mnemonic = "abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon about"
classical = qs.derive_classical_key(mnemonic, qs.ClassicalKeyType.SECP256K1) # m/44'/118'/0'/0/0
account = qs.address_from_public_key(classical.public_key, qs.ClassicalKeyType.SECP256K1)
pq_key = qs.derive_canonical_pq_key(mnemonic, account.bech32) # the key QoreChain wallets register
# body_bytes, auth_info_bytes and account_number come from the transaction you build.
signed = qs.sign_hybrid("qorechain-vladi", account_number, body_bytes, auth_info_bytes, classical, pq_key=pq_key)
# signed.tx_bytes is the encoded TxRaw, ready to broadcast.
result = qs.verify_hybrid_tx(
signed.tx_bytes, "qorechain-vladi", account_number, classical.public_key,
pq_public_key=pq_key.public_key,
)
assert result.valid and result.classical and result.pq.valid
Sign arbitrary data (spec/message-signing-v1.md):
data = b"Approve export of report 2026-10"
sig = qs.sign_message("qorechain-vladi", account.bech32, data, classical, pq_key=pq_key)
as_json = qs.message_signature_to_json(sig) # JSON shape shared by every implementation
# pq_public_key: the key registered on chain for the signer.
qs.verify_message(
"qorechain-vladi", account.bech32, data,
qs.message_signature_from_json(as_json), pq_public_key=pq_key.public_key,
) # raises QoreSignError when the signature does not verify
Verify a sign-in on the server (spec/siwq-v1.md):
fields = qs.verify_siwq(
message, # the text the wallet signed
qs.siwq_signature_from_json(sig_json), # the signature the wallet returned
"app.example.com", # your domain
nonce, # the nonce you issued
pq_public_key=registered_pq_key, # the account's key registered on chain
chain_id="qorechain-vladi",
)
print(fields.address) # qor1...
A wallet creates the message with create_siwq_message(qs.SiwqFields(...))
and signs it with sign_siwq(message, classical, pq_key=pq_key).
Errors are QoreSignError; code is the stable code shared by every
implementation:
try:
qs.derive_classical_key("not a phrase", qs.ClassicalKeyType.SECP256K1)
except qs.QoreSignError as e:
print(e.code, e.detail) # INVALID_MNEMONIC ...
Byte fields are bytes; records are plain classes with keyword-only
constructors and value equality. Optional arguments default to the same
values as the TypeScript package (v2 sign-bytes, deterministic ML-DSA-87,
hybrid mode). verify_siwq(..., now_ms=...) takes Unix milliseconds; None
reads the system clock. Format constants (ML_DSA_87_SIGNATURE_LENGTH,
PQC_HYBRID_TYPE_URL, ...) are module attributes.
Build locally
Needs Rust 1.95 and Python 3.9+.
python3 -m venv .venv && . .venv/bin/activate
pip install -r python/requirements-dev.txt
scripts/build-python-wheels.sh # this machine's wheel -> python/dist/
pip install --no-index --find-links python/dist qorechain-qoresign
pytest python/tests
scripts/build-python-wheels.sh takes a list of targets: host,
macos-arm64, macos-x86_64, sdist, and check (scans python/dist for
build-machine paths, which every build also does). The release workflow builds
the Linux and Windows wheels. python/qoresign/_ffi/ is UniFFI output,
generated at build time.
License
Apache-2.0
Metadata
Release files for qorechain-qoresign 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| qorechain_qoresign-0.1.1.tar.gz | 61.4 kB | Without provenance | Details for qorechain_qoresign-0.1.1.tar.gz |
Built distributions (wheels)
| File | Actions Reset | |||
|---|---|---|---|---|
| qorechain_qoresign-0.1.1-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl | Python 3 | none | Linux glibc 2.17+ x86-64 | Details for qorechain_qoresign-0.1.1-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
| qorechain_qoresign-0.1.1-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl | Python 3 | none | Linux glibc 2.17+ ARM64 | Details for qorechain_qoresign-0.1.1-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl |
| qorechain_qoresign-0.1.1-py3-none-macosx_11_0_x86_64.whl | Python 3 | none | macOS 11.0+ x86-64 | Details for qorechain_qoresign-0.1.1-py3-none-macosx_11_0_x86_64.whl |
| qorechain_qoresign-0.1.1-py3-none-macosx_11_0_arm64.whl | Python 3 | none | macOS 11.0+ ARM64 | Details for qorechain_qoresign-0.1.1-py3-none-macosx_11_0_arm64.whl |
Total release size: 2.4 MB
Release files / qorechain_qoresign-0.1.1.tar.gz
| Download URL | qorechain_qoresign-0.1.1.tar.gz |
|---|---|
| Size | 61.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9c312d4700672e49e91dccffbe5deb52484860137a2eab5224266a23ec545d4d
|
|
BLAKE2b-256 checksum How to use checksums |
484852821b250fc87af7592e4eb4be3f29550150055e1f87e5216cf71a6076b1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.7
|
Release files / qorechain_qoresign-0.1.1-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | qorechain_qoresign-0.1.1-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 608.8 kB |
| Tags | Linux glibc 2.17+ x86-64 Python 3 |
|
SHA-256 checksum How to use checksums |
933fbb09266d1f8070ab2994de82be0c80914f39d47cae0742c939d7077c26e1
|
|
BLAKE2b-256 checksum How to use checksums |
8c52fcbdb872ca95da2f30bef456896caa6e3de92d18e195af66d4a42de9e7ab
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.7
|
Release files / qorechain_qoresign-0.1.1-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
| Download URL | qorechain_qoresign-0.1.1-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl |
|---|---|
| Size | 614.0 kB |
| Tags | Linux glibc 2.17+ ARM64 Python 3 |
|
SHA-256 checksum How to use checksums |
f739dbc8543999f9d186f80e894b2d3e7f28bdb4b47215556dab35e49523741c
|
|
BLAKE2b-256 checksum How to use checksums |
65efa576f27c3049f40df16130bfa570cd01e3a9e103a734ed3b46611fd35acf
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.7
|
Release files / qorechain_qoresign-0.1.1-py3-none-macosx_11_0_x86_64.whl
| Download URL | qorechain_qoresign-0.1.1-py3-none-macosx_11_0_x86_64.whl |
|---|---|
| Size | 584.0 kB |
| Tags | Python 3 macOS 11.0+ x86-64 |
|
SHA-256 checksum How to use checksums |
754e21c049cf7263e5b35445d4a7c5b00ef5b1e00880c9f74f94368dda952c91
|
|
BLAKE2b-256 checksum How to use checksums |
2939c76b4d3029a08948a61de0c3e7221ea070ae33e5293ad7a6b8b15a45e6f2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.7
|
Release files / qorechain_qoresign-0.1.1-py3-none-macosx_11_0_arm64.whl
| Download URL | qorechain_qoresign-0.1.1-py3-none-macosx_11_0_arm64.whl |
|---|---|
| Size | 569.1 kB |
| Tags | Python 3 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
3dc6ac73e2ea2e660196a19fea238edb9118e8b51aca4c86dfee904e7f27188a
|
|
BLAKE2b-256 checksum How to use checksums |
e7f16573a76a14687edbb05cc31e1eb7e7dc965275e5e688e243e7c7cbdee594
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.7
|
Security for qorechain-qoresign 0.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.