Skip to content

smartlegionlab/smartpasslib

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

29 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Smart Passwords Library (smartpasslib) v1.2.1


Note: The core library for deterministic password generation. For academic research on the underlying security paradigm, see The Pointer-Based Security Paradigm.


Cross-platform library for generating smart passwords.


PyPI - Downloads GitHub release (latest by date) GitHub top language PyPI GitHub PyPI - Format

PyPI Downloads PyPI Downloads PyPI Downloads

Your passwords don't need to be stored because they were never created - they already exist as mathematical certainties, waiting to be discovered through the correct combination of login and secret phrase.


πŸ“¦ Installation

pip install smartpasslib

πŸ§™β€β™‚οΈ Quick Start: Discover Your First Password

from smartpasslib import SmartPasswordMaster

# Your secret phrase is the key to the infinite password library
secret = "secret"

# Discover the password that was always yours
password = SmartPasswordMaster.generate_smart_password(
    login="login", 
    secret=secret, 
    length=16
)
print(f"Your discovered password: {password}")
# 'rJoiB%Q1mKT_@e2D'

πŸ”‘ The Magic of Verification Without Storage

from smartpasslib import SmartPasswordMaster

# Generate a public verification key (safe to store anywhere)
public_key = SmartPasswordMaster.generate_public_key(
    login="login", 
    secret="secret"
)

# Later, verify you can rediscover the same password
is_valid = SmartPasswordMaster.check_public_key(
    login="login",
    secret="secret",
    public_key=public_key
)  # Returns True - The password is still there!

πŸ—οΈ Core Components

1. SmartPasswordMaster - Your Guide to the Password Library

from smartpasslib import SmartPasswordMaster

# Discover different types of passwords
basic_pass = SmartPasswordMaster.generate_base_password(length=12)
strong_pass = SmartPasswordMaster.generate_strong_password(length=14)
smart_pass = SmartPasswordMaster.generate_smart_password("login", "secret", 16)

# Key management for verification
public_key = SmartPasswordMaster.generate_public_key("login", "secret")
is_valid = SmartPasswordMaster.check_public_key("login", "secret", public_key)

2. SmartPasswordManager - Organize Your Discoveries

from smartpasslib import SmartPasswordManager, SmartPassword, SmartPasswordMaster

manager = SmartPasswordManager()

# "Store" password coordinates (not the password itself!)
public_key = SmartPasswordMaster.generate_public_key(
    "login", 
    "secret"
)
password_data = SmartPassword(
    login="login", 
    key=public_key, 
    length=18
)
manager.add_smart_password(password_data)

# "Retrieve" by rediscovering from the secret
smart_password = manager.get_smart_password("login")
password = SmartPasswordMaster.generate_smart_password(
    smart_password.login,
    "secret",
    smart_password.length
)

πŸš€ Advanced Usage

Complete Usage Examples

CLI Password Discovery Tool:

from smartpasslib import SmartPasswordMaster

login = input("Enter your login: ")
secret = input("Enter your secret phrase: ")
password = SmartPasswordMaster.generate_smart_password(login, secret, 14)
print(f"Discovered password: {password}")

Two-Factor Code Discovery:

from smartpasslib.generators.code import CodeGenerator

# Discover authentication codes that were always waiting
auth_code = CodeGenerator.generate(6)  # '4&TkIP'
print(f"Your auth code: {auth_code}")

🌐 Ecosystem Applications Built on SmartPassLib

Explore my suite of applications that implement the "discovery over storage" paradigm:

πŸ”§ Console Tools

πŸ–₯️ Desktop & Web Applications

πŸ’» For Developers

Development Setup

pip install pytest pytest-cov setuptools wheel build
pytest tests/ -v
pytest tests/ -v --cov=smartpasslib --cov-report=html

Testing Coverage

Test Coverage

πŸ“œ License & Disclaimer

BSD 3-Clause License

Copyright (c) 2025, Alexander Suvorov

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.