MASTER PASSWORD

Liberating yourself:
An algorithm for freedom

Copyright © 2010-2018, Maarten Billemonthttp://masterpasswordapp.com — masterpassword@lyndir.com

The key principle:
statelessness
At the core of the Master Password solution is the principle of statelessness.
State is the technical term for “what needs to be saved”.
In most tasks, state is used to ensure you don’t need to redo your work. You write adocument and save it to disk so you needn’t rewrite it every time you need it.
But not all state is reproducible. When you save your sites’ passwords on yourcomputer, be it in a program or elsewhere, you depend on that information whenever
you need to log in. If this state becomes inaccessible for any reason; you don’t haveyour computer handy, it breaks down, you lose it; the state is gone and there is no way
to accomplish our task. We are dependent on this state. State also introduces
vulnerability: private state must be protected from any and all attack vectors.
In order to free ourselves from these risks and dependencies, we need to freeourselves from state. Stateless operation implies that the computer or program cangive you what you need based on nothing more than inputs you can give it.

The Master Password solution
Master Password solves the password problem in a stateless manner while continuing
to guarantee and to some extent even enforce good security for your sites.
Master Password implements its solution in three distinct phases:
1. Your Master Key
2. Your Site Key
3. Your Site Password

Copyright © 2010-2018, Maarten BillemontPhase 1:
Your identity
Your identity is defined by your master key. This key unlocks all of your doors.
Your master key is the cryptographic result of two components:
1. Your <name> (identification)
2. Your <master password> (authentication)
Your master password is your personal secret and your name scopes that secret toyour identity. Together, they create a cryptographic identifier that is unique to yourperson.
masterKey= SCRYPT1( key, seed, N, r, p, dkLen )

key
seed

= <master password>= scope2 . LEN(<name>) . <name>

NrpdkLen= 32768= 8= 2= 64

We employ the SCRYPT cryptographic function to derive a 64-byte cryptographic key
from the user’s name and master password using a fixed set of parameters.

[1 ] STRONGER KEY DERIVATION VIA SEQUENTIAL MEMORY-HARD FUNCTIONS – https://www.tarsnap.com/scrypt/scrypt.pdf[2 ] Table 1: Key Scopes

Copyright © 2010-2018, Maarten BillemontPhase 2:Your site key
Your site key is a derivative from your master key when it is used to unlock the door toa specific site.
Your site key is the result of two components:
1. Your <site name> (identification)
2. Your <master key> (authentication)
3. Your <site counter>
Your master key ensures only your identity has access to this key and your site namescopes the key to your site. The site counter ensures you can easily create new keys
for the site should a key become compromised. Together, they create a cryptographic
identifier that is unique to your account at this site.
siteKey= HMAC-SHA-25612( key, seed )

key
seed

= <master key>
= scope3 . LEN(<site name>) . <site name> . <counter>

We employ the HMAC-SHA-256 cryptographic function to derive a 64-byte
cryptographic site key from the from the site name and master key scoped to a givencounter value.

[1 ] SHA-256, FIPS PUB 180-4 – http://dx.doi.org/10.6028/NIST.FIPS.180-4[2 ] HMAC, FIPS PUB 198-1 – http://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.198-1.pdf[3 ] Table 1: Master Password Key Scopes

Copyright © 2010-2018, Maarten BillemontPhase 3:Your site password
Your site password is an identifier derived from your site key in compliance with thesite’s password policy.
The purpose of this step is to render the site’s cryptographic key into a format that thesite’s password input will accept.
Master Password declares several site password formats and uses these pre-definedpassword “templates” to render the site key legible.
template= templates1[ <site key>[0] % LEN( templates ) ]for i in 0..LEN( template )passChars= templateChars2[ template[i] ]passWord[i] = passChars[ <site key>[i+1] % LEN( passChars ) ]We resolve a template to use for the password from the site key’s first byte. As weiterate the template, we use it to translate site key bytes into password characters.
The result is a site password in the form defined by the site template scoped to our sitekey.
This password is then used to authenticate the user for his account at this site.

[1 ] Table 2: Master Password Template Classes[2 ] Table 3: Master Password Character Classes

Copyright © 2010-2018, Maarten BillemontKey Scopes
The Master Password algorithm defines several key scopes. These scopes are used toscope the key generation to a specific purpose.
Three purposes are defined:
1. Authentication
The authentication scope is used when generating a key that is used forauthenticating the user, such as a passphrase or password.
2. Identification
The identification scope is used when generating a key that is intended for thepurpose of identifying the user, such as a user or login name.
3. Recovery
The recovery scope is used for generating fall-back identifiers for use in accessrecovery when the primary authentication mechanism has failed, such as backup
codes or security question answers.
Table 1: Master Password Key Scopes
PurposeScope Identifier

Authenticationcom.lyndir.masterpassword

Identificationcom.lyndir.masterpassword.login

Recoverycom.lyndir.masterpassword.answer

Copyright © 2010-2018, Maarten BillemontOutput Templates
In an effort to enforce increased password entropy, a common consensus hasdeveloped among account administrators that passwords should adhere to certain
arbitrary password policies. These policies enforce certain rules which must behonoured for an account password to be deemed acceptable.
As a result of these enforcement practices, Master Password’s site key output mustnecessarily adhere to these types of policies. Since password policies are governed bysite administrators and not standardized, Master Password defines several password
templates to make a best-effort attempt at generating site passwords that conform tothese policies while also keeping its output entropy as high as possible under theconstraints.
Table 2: Master Password Template Classes
Template Class

Template Set

Maximum Security

anoxxxxxxxxxxxxxxxxx

axxxxxxxxxxxxxxxxxno

Long

CvcvnoCvcvCvcv

CvcvCvcvCvccno

CvcvCvcvnoCvcv

CvccnoCvccCvcv

CvcvCvcvCvcvno

CvccCvccnoCvcv

CvccnoCvcvCvcv

CvccCvccCvcvno

CvccCvcvnoCvcv

CvcvnoCvccCvcc

CvccCvcvCvcvno

CvcvCvccnoCvcc

CvcvnoCvccCvcv

CvcvCvccCvccno

CvcvCvccnoCvcv

CvccnoCvcvCvcc

CvcvCvccCvcvno

CvccCvcvnoCvcc

CvcvnoCvcvCvcc

CvccCvcvCvccno

CvcvCvcvnoCvcc

Medium

CvcnoCvc

Short

Cvcn

Basic

aaanaaan

CvcCvcno

aannaaan

aaannaaa

PINnnnn

Namecvccvcvcv

Phrasecvcc cvc cvccvcv cvc

cvc cvccvcvcv cvcv

cv cvccv cvc cvcvccv
Copyright © 2010-2018, Maarten BillemontA Master Password template is a string of characters, where each character identifies
a certain character class. As such, the template specifies that the output password
should be formed by substituting each of the template’s character class characters bya chosen character from that character class.
Table 2: Master Password Character Classes
Character Class

Character Set

V (vowels)

AEIOU

C (consonants)

BCDFGHJKLMNPQRSTVWXYZ

v (vowels)aeiou

c (consonants)

bcdfghjklmnpqrstvwxyz

A (alphabetic)

AEIOUBCDFGHJKLMNPQRSTVWXYZ

a (alphabetic)

AEIOUaeiouBCDFGHJKLMNPQRSTVWXYZbcdfghj
klmnpqrstvwxyz

n (numeric)

123456789

o (other)@&%?,=[]_:-+*$#!'^~;()/.

X (union set)

AEIOUaeiouBCDFGHJKLMNPQRSTVWXYZbcdfghj
klmnpqrstvwxyz0123456789!@#$%^&*()

Copyright © 2010-2018, Maarten Billemont