<blockquote>
<p>Where can I see the specification/specification/clear requirements for the password to be created?</p>
</blockquote>
<p>I suspect the source code is the best guide.</p>
<blockquote>
<p>the wallet wrote an error &quot;invalid password&quot;.</p>
</blockquote>
<p>That phrase doesn't occur in the source code of the current version (23.0).</p>
<p>The file <a href="https://github.com/bitcoin/bitcoin/blob/master/src/qt/askpassphrasedialog.cpp" rel="nofollow noreferrer"><code>qt\askpassphrasedialog.cpp</code></a> contains the message <em>&quot;The passphrase entered for the wallet decryption was incorrect.&quot;</em></p>
<pre><code>    case Unlock:
        try {
            if (!model-&gt;setWalletLocked(false, oldpass)) {
                QMessageBox::critical(this, tr(&quot;Wallet unlock failed&quot;),
                                      tr(&quot;The passphrase entered for the wallet decryption was incorrect.&quot;));
            } else {
                QDialog::accept(); // Success
            }
        } catch (const std::runtime_error&amp; e) {
            QMessageBox::critical(this, tr(&quot;Wallet unlock failed&quot;), e.what());
        }
        break;
</code></pre>
<p>So far as I can see from a quick look, there's no special processing of the entered password (referred to as a passphrase in the code). So I'd certainly expect that normal punctuation like <kbd>.</kbd>, <kbd>,</kbd> and <kbd>;</kbd> would not cause any issues.</p>
<p>When you set a password, the code does produce the ominous warning <em>&quot;Warning: If you encrypt your wallet and lose your passphrase, you will <b>LOSE ALL OF YOUR BITCOINS</b>!&quot;</em></p>
<pre><code>        QMessageBox::StandardButton retval = QMessageBox::question(this, tr(&quot;Confirm wallet encryption&quot;),
                 tr(&quot;Warning: If you encrypt your wallet and lose your passphrase, you will &lt;b&gt;LOSE ALL OF YOUR BITCOINS&lt;/b&gt;!&quot;) + &quot;&lt;br&gt;&lt;br&gt;&quot; + tr(&quot;Are you sure you wish to encrypt your wallet?&quot;),
                 QMessageBox::Yes|QMessageBox::Cancel,
                 QMessageBox::Cancel);
</code></pre>
<p>There are other questions here that ask about password recovery for Bitcoin code based on partially known passwords. Answers to those questions may be helpful.</p>
<ul>
<li><a href="https://bitcoin.stackexchange.com/q/3313/13866">Are there Bitcoin password crackers I can use to recover forgotten passwords?</a></li>
</ul>

CC BY-SA 4.0
2022-08-13T14:20:26.010Z
2022-08-13T14:37:48.023Z
2022-08-13T14:37:48.023Z
RedGrittyBrick
<p>In 2017 I created a wallet in Bitcoin core and protected it with a password. The password contains characters like &quot;.,;&quot;. When I decided to send my bitcoins the wallet wrote an error &quot;invalid password&quot;. Where can I see the specification/specification/clear requirements for the password to be created? I have a suspicion that the use of special characters caused problems with the wallet. Thanks in advance for the answers.</p>

<bitcoin-core><wallet>
Where can I see the requirements for creating a password in Bitcion core?
Neck
# Where can I see the requirements for creating a password in Bitcion core?

(Asked by: username_0 on 2022-08-13)

In 2017 I created a wallet in Bitcoin core and protected it with a password. The password contains characters like ".,;". When I decided to send my bitcoins the wallet wrote an error "invalid password". Where can I see the specification/specification/clear requirements for the password to be created? I have a suspicion that the use of special characters caused problems with the wallet. Thanks in advance for the answers.

**Tags:** bitcoin-core, wallet


---

## 1 answers

### Answer by username_1 on 2022-08-13. Score: 1

> Where can I see the specification/specification/clear requirements for the password to be created?

I suspect the source code is the best guide.

> the wallet wrote an error "invalid password".

That phrase doesn't occur in the source code of the current version (23.0).

The file [`qt\askpassphrasedialog.cpp`](https://github.com/bitcoin/bitcoin/blob/master/src/qt/askpassphrasedialog.cpp) contains the message *"The passphrase entered for the wallet decryption was incorrect."*

```
    case Unlock:
        try {
            if (!model->setWalletLocked(false, oldpass)) {
                QMessageBox::critical(this, tr("Wallet unlock failed"),
                                      tr("The passphrase entered for the wallet decryption was incorrect."));
            } else {
                QDialog::accept(); // Success
            }
        } catch (const std::runtime_error& e) {
            QMessageBox::critical(this, tr("Wallet unlock failed"), e.what());
        }
        break;

```

So far as I can see from a quick look, there's no special processing of the entered password (referred to as a passphrase in the code). So I'd certainly expect that normal punctuation like `.`, `,` and `;` would not cause any issues.

When you set a password, the code does produce the ominous warning *"Warning: If you encrypt your wallet and lose your passphrase, you will **LOSE ALL OF YOUR BITCOINS**!"*

```
        QMessageBox::StandardButton retval = QMessageBox::question(this, tr("Confirm wallet encryption"),
                 tr("Warning: If you encrypt your wallet and lose your passphrase, you will <b>LOSE ALL OF YOUR BITCOINS</b>!") + "<br><br>" + tr("Are you sure you wish to encrypt your wallet?"),
                 QMessageBox::Yes|QMessageBox::Cancel,
                 QMessageBox::Cancel);

```

There are other questions here that ask about password recovery for Bitcoin code based on partially known passwords. Answers to those questions may be helpful.

* [Are there Bitcoin password crackers I can use to recover forgotten passwords?](https://bitcoin.stackexchange.com/q/3313/13866)


---

