Python minisign library
Project description
Missing python minisign library.
Install
pip install py-minisign
Library
import os
import minisign
# verify
pk = minisign.PublicKey.from_base64(
'RWQf6LRCGA9i53mlYecO4IzT51TGPpvWucNSCh1CBM0QTaLn73Y7GFO3')
sig = minisign.Signature.from_bytes(
b'untrusted comment: signature from minisign secret key\n'
b'RWQf6LRCGA9i59SLOFxz6NxvASXDJeRtuZykwQepbDEGt87ig1BNpWaVWuNrm73YiIiJbq71Wi+dP9eKL8OC351vwIasSSbXxwA=\n'
b'trusted comment: timestamp:1555779966\tfile:test\n'
b'QtKMXWyYcwdpZAlPF7tE2ENJkRd1ujvKjlj1m9RtHTBnZPa5WKU5uWRs5GoP5M/VqE81QFuMKI5k/SfNQUaOAA=='
)
pk.verify(b'test', sig)
# sign
sk = minisign.SecretKey.from_file('/path/to/secret.key')
sk.decrypt('strong_password')
sig = sk.sign(b'very important data')
# generate key pair
key_pair = minisign.KeyPair.generate()
sk = key_pair.secret_key
pk = key_pair.public_key
# save key
sk.encrypt('strong_password')
with open(os.open('/path/to/secret.key', os.O_CREAT | os.O_WRONLY, 0o600), 'wb') as f:
f.write(bytes(sk))
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file py_minisign-0.13.0.tar.gz.
File metadata
- Download URL: py_minisign-0.13.0.tar.gz
- Upload date:
- Size: 7.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
789314443c7af9b2d39109582bc1ee8b8b67aad6f057ef79b026ebfc1549e360
|
|
| MD5 |
854ba45f6c59c9e56658aea7e107a392
|
|
| BLAKE2b-256 |
75b2d1ad7279f282b5580ab6def401f1069dc2200af00fd4cfb2cb7b50834797
|
Provenance
The following attestation bundles were made for py_minisign-0.13.0.tar.gz:
Publisher:
publish.yml on x13a/py-minisign
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
py_minisign-0.13.0.tar.gz -
Subject digest:
789314443c7af9b2d39109582bc1ee8b8b67aad6f057ef79b026ebfc1549e360 - Sigstore transparency entry: 727004106
- Sigstore integration time:
-
Permalink:
x13a/py-minisign@36203a96151ecb12619d9e9f6775d10523f682ab -
Branch / Tag:
refs/tags/v0.13.0 - Owner: https://github.com/x13a
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@36203a96151ecb12619d9e9f6775d10523f682ab -
Trigger Event:
push
-
Statement type:
File details
Details for the file py_minisign-0.13.0-py3-none-any.whl.
File metadata
- Download URL: py_minisign-0.13.0-py3-none-any.whl
- Upload date:
- Size: 7.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1ebf7feb49b3a539d93c70e1cf7c5d62cbdaa1618c32b438f5871c9809ac3a32
|
|
| MD5 |
87f5a42adb3c45df721d00e584ce5853
|
|
| BLAKE2b-256 |
c3a7c3a6df92c20cbe0f905747390e0e69852f27872ef86e192444386360ffc2
|
Provenance
The following attestation bundles were made for py_minisign-0.13.0-py3-none-any.whl:
Publisher:
publish.yml on x13a/py-minisign
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
py_minisign-0.13.0-py3-none-any.whl -
Subject digest:
1ebf7feb49b3a539d93c70e1cf7c5d62cbdaa1618c32b438f5871c9809ac3a32 - Sigstore transparency entry: 727004128
- Sigstore integration time:
-
Permalink:
x13a/py-minisign@36203a96151ecb12619d9e9f6775d10523f682ab -
Branch / Tag:
refs/tags/v0.13.0 - Owner: https://github.com/x13a
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@36203a96151ecb12619d9e9f6775d10523f682ab -
Trigger Event:
push
-
Statement type: