# How does Termius detect a leaked Encryption Password?

When you set a new Encryption Password for your account, Termius can check whether it appeared in known data breaches by using the [haveibeenpwned.com](https://haveibeenpwned.com/Privacy) service, or HIBP.

{% hint style="info" %}
Termius never sends the original password in plain text or enough information to reveal it.
{% endhint %}

The Termius app sends the first 5 characters of the SHA-1 hash of the user-provided password to the HIBP API, following [Cloudflare's k-anonymity model](https://blog.cloudflare.com/validating-leaked-passwords-with-k-anonymity/).

For example, take the password `pa$word`:

* The SHA-1 hash of the password is `617ADCC02712A40E76254BA1F3A26AF660F98EC7`.
* The first 5 characters of that hash are `617AD`.
* The remaining characters are `CC02712A40E76254BA1F3A26AF660F98EC7`.
* HIBP returns the possible matches for that prefix at <https://api.pwnedpasswords.com/range/617AD>.
* Then Termius checks whether the remainder listed above appears in the response.

```
...
CC02712A40E76254BA1F3A26AF660F98EC7:96
...
```

This means the password appeared in 96 known breaches.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.termius.com/help-center/faq/how-does-termius-detect-a-leaked-encryption-password.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
