Skip to main content

Stateless password manager and generator.

Project description

keyt

keyt-pypi

keyt is a stateless password manager and generator.

Derive don't store.

The intent of this program is to have a password manager and generator without storing any data anywhere in any form. The password is derived from a master password.

⚠️ Every passwords are derived from your master password, if you loose it you will lose access to all your account, be careful.

Install CLI

pip install keyt

Or from source

git clone https://github.com/deoktr/keyt
cd keyt
pip install .

You can also use the CLI has a single file, just download cli/keyt/cli.py. Note that you will need to install pyperclip and base58 to get full functionality.

Usage

usage: keyt [domain] [username] [master_password] [options]

keyt stateless password manager and generator.

positional arguments:
  domain                Domain name/IP/service.
  username              Username/Email/ID.
  master_password       Master password used during the password generation.

options:
  -h, --help            show this help message and exit
  -V, --version
  --confirm             Ask to confirm master password, useful when
                        generating a new password.
  -c COUNTER, --counter COUNTER
                        An integer that can be incremented to get a new
                        password for the same account. default=0.
  -f FORMAT, --format FORMAT
                        Password format can be: 'max', 'high', 'mid', 'pin' or
                        'pin6'. default=max.
  -o, --output          Output the password, by default copy it to the
                        clipboard.
  -t [TIMER], --timer [TIMER]
                        Time before flushing the clipboard. default=20s.

Examples

$ keyt
domain: example.com
username: admin
master password:
Password copied to the clipboard for 20s.

$ keyt --confirm
domain: example.com
username: admin
master password:
master password (confirm):
Password copied to the clipboard for 20s.

$ keyt example.com admin admin
Password copied to the clipboard for 20s.

$ keyt example.com admin admin -o
Fg0XjW@a=vWi@3qGBjo|Vlic7Wo9`zVKp!{Vl_Bp

$ keyt example.com admin admin -o -f mid
5w8Hv23ZUvJCRt2t

$ keyt example.com admin admin -o -f pin
3070

Python API:

>>> from keyt import gen_password
>>> gen_password(d="example.com", u="admin", m="admin")
'Fg0XjW@a=vWi@3qGBjo|Vlic7Wo9`zVKp!{Vl_Bp'

Password generation

The password is generated from 5 inputs.

Inputs

  • domain (d): domain, ip, service or any other string representing a password protected thing.
  • username (u): domains's username.
  • master_password (m): master password.
  • counter (c) (default=0): an integer that can be incremented to get a new password for the same account.
  • format (f) (default=max): the password's format, can be: max, high, mid, pin, pin6.

For more information on the format go the the Password formats section.

The counter input is used to get a new password for the same account, this can be useful to change the password without having to change your master password.

Algorithm

  1. Scrypt a password-based key derivation function is used first to generate a key with:
    • password = master_password
    • salt = username
    • n = 16384 (2^14)
    • r = 8
    • p = 2
  2. BLAKE2b use the key generated by scrypt to create the seed to format the password:
    • data = domain + counter + username
    • key = scrypt output
  3. The password is formatted using either base85, base58 or base10, based on the format variable.
    • seed = BLAKE2b output

Password formats

Format Length Char set Base
max 40 [a-zA-Z0-9!#$%&()*+-;<=>?@^_`{|}~] base85 RFC 1924
high 16 [a-zA-Z0-9!#$%&()*+-;<=>?@^_`{|}~] base85 RFC 1924
mid 16 [a-zA-Z0-9] except [0OIl] base58
pin 4 [0-9] base10
pin6 6 [0-9] base10

Base85 is used has encoding because it adds special characters. The RFC 1924 is a revised version of Ascii85 but this version excludes the characters "',./:[\] .

Base58 is used has encoding because it only contains non ambiguous characters when printed, excluded characters: 0IOl. It was originally created by Satoshi Nakamoto to encode bitcoin addresses in an easily readable way.

License

keyt is licensed under MIT.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

keyt-1.2.0.tar.gz (6.8 kB view details)

Uploaded Source

Built Distribution

keyt-1.2.0-py2.py3-none-any.whl (8.4 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file keyt-1.2.0.tar.gz.

File metadata

  • Download URL: keyt-1.2.0.tar.gz
  • Upload date:
  • Size: 6.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.6

File hashes

Hashes for keyt-1.2.0.tar.gz
Algorithm Hash digest
SHA256 3113b101efe3d02780e441ccc82df121dd34bc5cdcc6db6573c91d616e72e593
MD5 711933723db20b7d8b1e8b86119bb1b9
BLAKE2b-256 c1d54d7bced8f1f66e57331405bb23d9f1a1f8e9ef75fcf25044529ee74cdf4d

See more details on using hashes here.

File details

Details for the file keyt-1.2.0-py2.py3-none-any.whl.

File metadata

  • Download URL: keyt-1.2.0-py2.py3-none-any.whl
  • Upload date:
  • Size: 8.4 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.6

File hashes

Hashes for keyt-1.2.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 48a8abcd455d4e7c6effc86e2cb6b80074336ff11ddee8521df19ab8c6300f5a
MD5 8d4a062cc16cd5fce454da1086eb1024
BLAKE2b-256 a6efead815f4a95b1f37fbb2f07d47a418d848e9e23706318f3af61f5990280b

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page