Skip to main content

smartauthen v1.0.0

Smart, simple, lightweight, secure cross-platform authentication for any application.


PyPI Downloads GitHub top language PyPI - Downloads GitHub release (latest by date) GitHub PyPI PyPI - Format GitHub Repo stars GitHub watchers GitHub forks


Author and developer: Alexander Suvorov.


Supported

  • Linux: All.
  • Windows: 7/8/10/11?.
  • Termux (Android).

Description

smartauthen - Smart, simple, lightweight, secure cross-platform authentication for any application.

  • Use simple yet very reliable and secure authentication in any of your applications.

  • Avoid passwords when registering and authenticating in your applications. It is difficult for a user to remember passwords, therefore, users use either short passwords or light passwords, which plays into the hands of cybercriminals. The secret phrase is difficult to find and easy to remember. At the moment there are no rainbow tables of secret phrases, since this is unrealistic. For example, I can use when registering as a secret Quatrain phrases from your favorite song.

  • It makes no difference to your authentication system how long the secret phrase is, in any case, you will receive only fixed-length key as a string.

  • Let your users register with an easy-to-remember secret phrase that the user will be easy to remember, but an attacker will not be able to pick it up.

  • Store only login and public key in your databases, if your database gets compromised, an attacker will not gain access to user accounts and will not be able to use public keys for authentication in any way, after all, by the public key, he will not be able to find out the secret phrase in any way.

Possibilities:

  • Generation of a public key linked to a pair of login + secret phrase.
  • Checking user data login + secret phrase + public key.
  • Regulation of complexity in the generation of a public key.

Attention!

  • The public key for the login + secret phrase pair will always be the same.

  • With any change in the login or secret phrase, the key will change, therefore if the user changes his username or passphrase, the key needs to be regenerated.

  • If your system can use the same logins for registration and authentication, use something else, unique, to generate the public key, such as a unique identifier.

  • If you change the value of the step attribute in the SmartAuth object, the key for the login + secret phrase pair will also change. Always use the same value for this attribute. The higher the value of this attribute, the more secure the public key.

Usage:

  • When registering, you will receive a login and a secret phrase from the user.

  • Based on the data received, generate a public key for further storage, paired with a login. If your system can use the same logins for registration and authentication, use something else, unique, to generate the public key, such as a unique identifier.

  • When authenticating a user, you are asked to enter a login and a secret phrase.

  • Checking the data.

(During verification, a public key is first generated based on the received data, compared with the stored key, and a boolean value of the key comparison is returned.)


⚠️ Disclaimer

By using this software, you agree to the full disclaimer terms.

Summary: Software provided "AS IS" without warranty. You assume all risks.

Full legal disclaimer: See DISCLAIMER.md


Install and Use

Install

  • pip install smartauthen

Use

from smartauthen import SmartAuth

smart_auth = SmartAuth()

login = 'login'
secret = 'secret'

key = smart_auth.make_key(login, secret)

# True since the login + secret phrase is correct
print(smart_auth.check(login, secret, key))  # True

secret = 'secret2'

# False because the secret phrase is incorrect
print(smart_auth.check(login=login, secret=secret, key=key))  # False

For the developer

For run tests

  • pip install pytest
  • pytest -v

For run tests coverage

  • pip install pytest-cov
  • pytest --cov --cov-report=html

Test coverage

Coverage 100% !!!

coverage img

Building and publishing a package:

  • python -m build

Or outdated method:

  • python setup.py sdist bdist_wheel

  • twine upload dist/*


License

BSD 3-Clause License

Copyright (©) 2026, Alexander Suvorov


Metadata

Release files for smartauthen 1.0.0

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

Source distribution (sdist)

Source distribution for smartauthen 1.0.0
File Size Uploaded
smartauthen-1.0.0.tar.gz 6.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for smartauthen 1.0.0
File Interpreter ABI Platform
smartauthen-1.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 12.2 kB

Release files / smartauthen-1.0.0.tar.gz

Download URL smartauthen-1.0.0.tar.gz
Size 6.1 kB
Tags Source
SHA-256 checksum
How to use checksums
dfe78530c12960cc6b1af35224dc44510bbda66a273583d5fd6efb5f0e883395
BLAKE2b-256 checksum
How to use checksums
572f6452dd6b90697d9f3ab592f30ba46af7bd8926d099656d3f73a90478c4ad
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.3

Release files / smartauthen-1.0.0-py3-none-any.whl

Download URL smartauthen-1.0.0-py3-none-any.whl
Size 6.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a3216342bd081b6586757019ac56379413cdd4497ef3a3f70b4bb713f02db02c
BLAKE2b-256 checksum
How to use checksums
7d8dfd93ad25876cb4ff98091e1bdbbb50f4e501221875277a5111426ea87f9b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.3

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 release files

0.2.4

2 release files

0.2.3

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.2.0

2 release files

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