is seed phrase case sensitive?

Is a Seed Phrase Case Sensitive?

Not exactly.

Technically, within the BIP39 specification, mnemonic phrases are not case-sensitive (Note: passphrases are case-sensitive). This is due to the words within the BIP39 wordlist containing only all lowercase letters.

When generating a mnemonic phrase, a wallet begins with a random number (entropy). Then, that random number is transformed into a mnemonic phrase by utilizing the indexed position (i.e. order in which the word appears) of the words in the BIP39 wordlist beginning with "0" (e.g. abandon - 0, ability - 1, etc). See here for additional details on how a seed phrase is created.

Okay, then why doesn't this article just stop right here? 

Because for a wallet to implement the BIP39 specification, programming is involved. Programming (for the most languages) is case sensitive. 

The character "A" is not the same as the character "a". The word "ABANDON" is not the same as "abandon".

To quote the relevant section of the BIP39 specification:

To create a binary seed from the mnemonic, we use the PBKDF2 function with a mnemonic sentence (in UTF-8 NFKD) used as the password and the string "mnemonic" + passphrase (again in UTF-8 NFKD) used as the salt.

This excerpt explains the first step of getting to your key tree from your mnemonic phrase. Basically to recover your coins (your keys), your mnemonic phrase is inputted into multiple functions (a set of instructions) which eventually outputs into the keys to your coins. See here for more details on how a mnemonic phrase recovers all your coins.

The first function is called, "PBKDF2".

Your mnemonic phrase is inputted into the "PBKDF2" function as a string (sequence of characters) and outputs a specific "number" (your seed).

This number is the foundation of your wallet. A change in letter case will result in a different number.

This mnemonic phrase:

liberty bread eight solar income poet squirrel enlist wine educate profit define

Will result in a different seed than this mnemonic phrase:

Liberty bread eight solar income poet squirrel enlist wine educate profit define

And I only changed the letter case of the first letter of the first word.

Programming does not necessarily "recognize" letters. Programming recognizes the data in those letters. An uppercase letter and a lowercase letter have different data.

So it does matter!

Kind of.

Wallet developers program the BIP39 specification into their wallet software. Since the BIP39 specification does not provide direct guidance on how to handle case sensitivity (other than implicitly in the wordlist), they can program it however they like.

To make a comparison, the BIP39 specification is like a recipe for a cake. Many chefs can follow the same recipe but will do things a bit differently where the recipe isn't overly specific.

There are things that won't change the end result (like the type of whisk you use to mix, metal, plastic, etc). And there are things that will change the end result (e.g. recipes specifies a whole egg and you add a whole and all).

Wallet developers can do the same with case sensitivity when inputting your mnemonic phrase into the function. Some of which may not have considered the case sensitivity when a user inputs their mnemonic phrase.

There are some appropriate options (in my opinion) to handle case sensitivity when users are inputting mnemonics to prevent an unintended result:

  1. Only allow inputting lowercase letters/words.
  2. Change all letters into lowercase.
  3. Uppercase letters result in an invalid message. Then to prevent confusion, warn users only lowercase letters are valid.

After this, wallets should then check each word against the BIP39 wordlist to ensure it is a valid word.

So it sort of matters?

It depends.

But, a majority of wallets are from good developers that understand the intent of the specification (like a good chef that understands the recipe). They've tested their software and have considered how a user inputs their mnemonic phrase to ensure they get their intended result.

Back to blog