Abstract
authsmith is a unified interface for generating cryptographically strong passwords, passphrases, PINs, recovery codes, usernames and similar user-facing authentication artifacts suitable for managing data such as account authentication, security tokens (GPG keys, disk-encryption) and related secrets.
A short, funny and easy way to understand passphrases can be found at xkcd: Password Strength.
Features
Due to its simplicity, authsmith offers from the start the opportunity to build upon and adapt it to a variety of use cases.
Its flexible architecture ensures support for future development. It has been designed to be adaptable to new requirements while minimizing complete system remake.
authsmith is open source and committed to respect your freedoms, including your freedom to share and change the software (see LICENSE).
Technical Notes
- programming language: Python 3.13.5
- version control system: git
- dependencies: NumPy
- testing: pytest
- building and distributing: setuptools
- documentation: Sphinx
- audience: software developers
Notable changes in CHANGELOG.
Installation
You can get started with authsmith by installing it from PyPI (recommended). As always, it is best practice to use a virtual environment while you evaluate its features.
Note: How you create and activate a virtual environment is not covered here.
pip install authsmith
Then open a Python session and enter the following commands. A successful installation returns the version number.
import authsmith
print(authsmith.__version__)
Development
Clone the repository to get a local copy of the authsmith source code.
git clone https://codeberg.org/cx2b/authsmith.git
Activate the virtual environment (recommended) and install the package in editable mode.
pip install -e .
Examples
Some introductory examples below (more in the examples directory).
Generate password
from authsmith.models.context import (
Context
)
from authsmith.services.artifacts import (
Artifacts
)
context = Context()
context.size = 18
artifacts = Artifacts(context)
random = artifacts.password(lowercase=6, uppercase=6, digits=2, punctuation=-1, ignore="Ol")
result = "".join(random)
print("password:", result)
Calculate entropy
from authsmith.services.artifacts import (
Entropy
)
def explain_strength(value: int) -> str:
if value < 28:
message = "very weak; trivial to crack"
elif value < 35:
message = "weak; seconds to minutes to crack"
elif value < 59:
message = "moderate; hours to days to crack"
elif value < 79:
message = "strong; weeks to months to crack"
elif value < 127:
message = "very strong; centuries to crack"
else:
message = "excellent cryptographic strength"
return message
password = "3aSBtW4JrJJEL0qt2p"
randomness = Entropy.shannon_entropy(list(password))
strength = Entropy.combinatorial_entropy(list(password))
print(f"password: {password}")
print(f"randomness: {randomness:.2f}")
print(f"strength: {explain_strength(strength)}")
Next
In no particular order:
generate unique random charactersgenerate unique passwordsgenerate PIN codesgenerate user name as combination of letters and digitsgenerate random hexadecimal codesgenerate random cryptographically-secure UUID identifiers- generate recovery codes
- generate API keys
- generate code matrices
- generate Apple-style, easier to remember passwords
- generate unique customizable passphrases
- generate passphrases using the dice method
- add total length (in characters) as requirement for passphrase generation
- option to remove words that are considered offensive
- limits to how long words can be in a passphrase
- option to mix digits and special characters in passphrases
- option to mix uppercase and lowercase letters in passphrases
calculate entropy (randomness)calculate entropy (strength)- generate passwords and passphrases in bulk
- add Sphinx configuration files
Contributing
Currently, contributing to this project is limited to reporting issues and participating in discussions about feature requests and improvements.
Your feedback is always welcome.
License
authsmith is free software and released under the GNU General Public License version 3 or any later version. Refer to LICENSE for further information about licensing. If not received, see Licenses - GNU Project - Free Software Foundation.
This file is part of authsmith and under the GNU All-Permissive License.
Copyright (C) 2026 Cristian Cezar Botez
Copying and distribution of this file, with or without modification, are permitted in any medium without royalty provided the copyright notice and this notice are preserved. This file is offered as-is, without any warranty.
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 authsmith-0.0.1.tar.gz.
File metadata
- Download URL: authsmith-0.0.1.tar.gz
- Upload date:
- Size: 23.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f930eb9d6a6aebc909657cc442105490af9b5f77cf5fb00791933c8872aecc34
|
|
| MD5 |
98bb7cf75c8a40a40dd062832131eb4a
|
|
| BLAKE2b-256 |
ef6c158a9cee626caeb951a93c98e3f9d2b2a62daa3960487d8366b0e8e14bda
|
File details
Details for the file authsmith-0.0.1-py3-none-any.whl.
File metadata
- Download URL: authsmith-0.0.1-py3-none-any.whl
- Upload date:
- Size: 24.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
37c3bf08dc104144c2657683ce1adb887681b25d214f813c3315a1f0e798f11e
|
|
| MD5 |
71fed66435ce83a17d44a26c7e134028
|
|
| BLAKE2b-256 |
bcfad3398f6b51ba0a8cf064812d64bde31d5e3f51a6bd9e44ac71e4fd7562ee
|