Skip to main content

Cipher Token

High-performance token and crypto utilities in Rust, with PyO3 Python bindings for secure JWT generation, validation, and cryptographic helpers.

Cipher Token open source software developed by Cipher Unit (CipherUnit). High-performance token and crypto utilities in Rust, with PyO3 Python bindings for secure JWT generation, validation, and cryptographic helpers.
Cipher Token by Cipher Unit. High-performance token and crypto utilities in Rust, with PyO3 Python bindings for secure JWT generation, validation, and cryptographic helpers.

Rust • Python • PyO3 • JWT • Cryptography

About Cipher Token

High-performance token and crypto utilities in Rust, with PyO3 Python bindings for secure JWT generation, validation, and cryptographic helpers.

Cipher Token is Cipher Unit's open-source token engine for secure JWT generation, validation, rotation, and cryptographic helpers. The Rust core delivers high performance, while PyO3 bindings make the same APIs available to Python services and tooling.

Engineers use Cipher Token when they need a focused, auditable library for token lifecycle management inside backends, CLIs, and developer infrastructure — without pulling in a heavyweight auth platform.

Cipher Token README image

CipherToken

CipherToken is a next-generation token engine built for developers who demand speed, security, and reliability. Currently focused on JWT, it provides a complete token lifecycle — from key generation and token minting to verification, rotation, and expiry tracking — all backed by the raw performance of Rust.

  • Python 3.8+
  • HMAC, RSA, ECDSA, RSA-PSS, EdDSA
  • Sync and Async APIs via Tokio

Built by Cipher-Unit.


Documentation

📖 Official Documentation: https://cipherunits.github.io/CipherToken/


Installation

pip install ciphertoken

Quick Example

from ciphertoken import CipherToken
from ciphertoken.algorithms import HS256
from ciphertoken.time import minutes, days
from ciphertoken.jwt import access, refresh, rotation

token = CipherToken(
    secret="your-strong-secret-key",
    algorithm=HS256,
    access_ttl=minutes(10),
    refresh_ttl=days(7),
)

access_token = access(token, payload={"user_id": 42})
refresh_token = refresh(token, payload={"user_id": 42})
new_access, new_refresh = rotation(token, refresh_token)

print(token.verify(access_token))  # True
print(token.decode(access_token))

Contribute

Contributions are welcome! Whether it's bug fixes, new algorithms, documentation improvements, or feature suggestions — feel free to open an issue or pull request.

Please read the code of conduct and contribution guidelines before submitting. All contributions must follow the MIT license.


License

MIT — see LICENSE for details.







Made with ❤️ for developers by CipherUnit

Open Terminal
Terminal Logo