Pre-release
This release is a pre-release and may not be stable for production use.
pyrage
Python bindings for the Rust implementation of age.
Index
Installation
You can install pyrage with pip:
$ python -m pip install pyrage
PEP 561-style type stubs are also available:
$ python -m pip install pyrage-stubs
See the development instructions below for manual installations.
Usage
Identity generation (x25519 only)
from pyrage import x25519
ident = x25519.Identity.generate()
# returns the public key
ident.to_public()
# returns the private key
str(ident)
Identity-based encryption and decryption
from pyrage import encrypt, decrypt, ssh, x25519
# load some identities
alice = x25519.Identity.from_str("AGE-SECRET-KEY-...")
bob = ssh.Identity.from_buffer(b"---BEGIN OPENSSH PRIVATE KEY----...")
# load some recipients
carol = x25519.Recipient.from_str("age1z...")
dave = ssh.Recipient.from_str("ssh-ed25519 ...")
# encryption
encrypted = encrypt(b"bob can't be trusted", [carol, dave, alice.to_public()])
# decryption
decrypted = decrypt(encrypted, [alice, bob])
Passphrase encryption and decryption
from pyrage import passphrase
encrypted = passphrase.encrypt(b"something secret", "my extremely secure password")
decrypted = passphrase.decrypt(encrypted, "my extremely secure password")
Development
$ source env/bin/activate
$ make develop
Licensing
pyrage is released and distributed under the terms of the MIT License.
Release files for pyrage 1.0.1rc7
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distributions (wheels)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pyrage-1.0.1rc7-cp37-abi3-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl | CPython 3.7 | abi3 | macOS 10.9+ x86-64, macOS 11.0+ ARM64, macOS 10.9+ universal2 (ARM64, x86-64) | Details |
| pyrage-1.0.1_rc.7-cp37-abi3-manylinux_2_5_x86_64.manylinux1_x86_64.whl | CPython 3.7 | abi3 | Linux glibc 2.5+ x86-64 | Details |
Total release size:1.8 MB
Release files / pyrage-1.0.1rc7-cp37-abi3-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
| Download URL | pyrage-1.0.1rc7-cp37-abi3-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl |
|---|---|
| Size | 1.1 MB |
| Tags | CPython 3.7 abi3 macOS 10.9+ universal2 (ARM64, x86-64) macOS 10.9+ x86-64 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
8211c2717dc290a9b5b3e085b75b7a6568ace17f1e0585decc1426d4ae937c1e
|
|
BLAKE2b-256 checksum How to use checksums |
5300ba8f89b0b7406654a14c24d398556c9cd62da232c1d7f29c4effe155ebc1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.9.14
|
Release files / pyrage-1.0.1_rc.7-cp37-abi3-manylinux_2_5_x86_64.manylinux1_x86_64.whl
| Download URL | pyrage-1.0.1_rc.7-cp37-abi3-manylinux_2_5_x86_64.manylinux1_x86_64.whl |
|---|---|
| Size | 656.2 kB |
| Tags | CPython 3.7 Linux glibc 2.5+ x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
c9836433eb5837d26817f8574db3e0e7b607bf7135642bf9ea471db8fb5957c1
|
|
BLAKE2b-256 checksum How to use checksums |
b0ffb74e0e646520afe4172fe0942c75676b212d6e36ea63ca9a02ed92e2e8f4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.9.14
|