Skip to main content

multisig-hmac-python-version

Multisig scheme for HMAC authentication

Work in progress

Usage

Key management can happen in either of two modes, either by storing every of the component keys, or by storing a single master seed and using that to derive keys ad hoc.

Using stored keys:

m = MultisigHMAC()

# generate keys which need to be stored securely and need to be shared securely with each party
k1 = m.keygen()
k2 = m.keygen()
k3 = m.keygen()

# sign by each client with 2-of-3
data = b'Hello world'

s1 = m.sign(k1, data)
s3 = m.sign(k3, data)

out = m.combine([s1, s3])

sent = (out[0], base64.urlsafe_b64encode(out[1]))

# --- network ---

received = (sent[0], base64.urlsafe_b64decode(sent[1]))

# verify on the server
threshold = 2
keys = [k1, k2, k3]
signature = received

m.verify(keys, signature, data, threshold)

Using a derived master key:

m = MultisigHMAC()

# generate a master seed which needs to be stored securely
# this seed must NOT be shared with any other party
seed = m.seedgen()

k1 = m.keygen()
k2 = m.keygen()
k3 = m.keygen()

# sign by each client with 2-of-3
data = b'Hello world'

s1 = m.sign(k1, data)
s3 = m.sign(k3, data)

out = m.combine([s1, s3])

sent = (out[0], base64.urlsafe_b64encode(out[1]))

# --- network ---

received = (sent[0], base64.urlsafe_b64decode(sent[1]))

# verify on the server, but now keys are dynamically derived
threshold = 2
keys = [k1, k2, k3]
signature = received

m.verifyDerived(keys, signature, data, threshold)

Metadata

Release files for multisig-hmac-AmalieDue 0.0.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for multisig-hmac-AmalieDue 0.0.3
File Size Uploaded Provenance Actions
multisig-hmac-AmalieDue-0.0.3.tar.gz 3.4 kB Without provenance Details for multisig-hmac-AmalieDue-0.0.3.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for multisig-hmac-AmalieDue 0.0.3
File Interpreter ABI Platform Actions
multisig_hmac_AmalieDue-0.0.3-py3-none-any.whl Python 3 none any Details for multisig_hmac_AmalieDue-0.0.3-py3-none-any.whl

Total release size: 8.1 kB

Release files / multisig-hmac-AmalieDue-0.0.3.tar.gz

Download URL multisig-hmac-AmalieDue-0.0.3.tar.gz
Size 3.4 kB
Tags Source
SHA-256 checksum
How to use checksums
d47a7b228bbf4961b1ff9606d3a67403ac9f85c6217963e54e67e0c3fd3bb11d
BLAKE2b-256 checksum
How to use checksums
1116b983ad7c45ec00239613ac71ff60b3d496ecf6881b2249aff4fc1557d63a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.2.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.7.4

Release files / multisig_hmac_AmalieDue-0.0.3-py3-none-any.whl

Download URL multisig_hmac_AmalieDue-0.0.3-py3-none-any.whl
Size 4.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1429be5ad22664ffc5876271fdb93cfa5e8ccf2d5b210aec130701a0b3608c99
BLAKE2b-256 checksum
How to use checksums
422d1e1757bde16efa8bcaffa169ad7cf4969921159a6a48e3911fdcedb76856
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.2.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.7.4

Security for multisig-hmac-AmalieDue 0.0.3

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.

Release history Release notifications | RSS feed

This release

0.0.3 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page