If you want to access your Trust Wallet private keys, you'll need to first copy your secret phrase and use a tool to convert it to a private key. You can use a web tool to do so or run your own Python script if you have some coding knowledge.
In this article, we will show you how to get access to your crypto’s private keys handled by Trust Wallet.
How to get Trust Wallet private key? (Quick guide)
Open Trust Wallet and go to Settings.
Click on View Secret Phrase.
Enter your password to reveal the 12-word secret phrase.
Copy your secret phrase (also called BIP39 mnemonic code).
Convert your secret phrase to a private key manually or with an online tool.
Understanding the difference between secret phrase and private key
A secret phrase (or seed phrase) and a private key are both crucial in cryptocurrencies but have different roles.
A secret phrase is a series of 12 to 24 words generated by a wallet to back up and restore the wallet and all associated private keys. The words It is easier to remember and write down but must be kept secure as it can restore the entire wallet.
Example of a secret phrase: exotic auction virtual tongue again dolphin eager manage pole buzz visa grocery
How secure is a seed phrase? The wordlist for seed phrases has 2048 words. If a seed phrase contains 12 words, the number of potential combinations is 2048^12, or 2^132. Such a phrase has 132-bit security, meaning there are 340,282,366,920,938,463,463,374,607,431,768,211,456 possible combinations. The possibility of a hacker guessing the combination is virtually non-existent.
A private key, on the other hand, is a long alphanumeric string used to sign transactions and prove ownership of a specific blockchain address. Each address has its own private key, which is essential for accessing funds. Unlike a secret phrase, a private key is tied to a single address and is not user-friendly due to its complexity.
Example of a private key: xprv9s21ZrQH143K3nHP8xunpSnG2bcDUWEQV7cCCQzyvvrCDTH76P4GN8FTeUVoNmPavKaxS9dwNeqmgmQUxpaVZQX8TgCYQEZyHuyxpL9XuZP
In essence, the secret phrase serves as a master key for wallet recovery of Trust Wallet, MetaMask, Ledger, or some other crypto wallet, while the private key is used for transaction signing and proving ownership of individual addresses.
Get your 12-word Trust Wallet secret phrase
The first thing you need to do to get your private key is to copy the secret phrase from your Trust Wallet. In the following steps, we’ll show you how to do exactly that.
Step 1: Go to settings
Click on Settings in the bottom menu.
Step 2: Click on view the secret phrase
Select View Secret Phrase from the list of menu items.
Step 3: Enter your password to reveal the secret phrase
Next, enter your Trust Wallet password as a safety measure. Then, click Reveal.
Step 4: View your secret phrase
The 12-word secret phrase will appear in a popup window. You can write it down or download it, but don’t share it with anyone.
⚠️ Keep your secret phrase secure It’s worth noting that storing your secret phrase on a piece of paper is very risky, as it’s very prone to physical damage. To ensure maximum protection, we suggest you use a metal seed phrase storage device.
Convert your secret phrase to a private key
Now that you have your secret phrase ready, you can proceed with the process of converting it to a private key. You can do so manually or with an online tool. Please note that using an online tool could potentially reveal your secret phrase and private key to hackers, so make sure that you’re aware of the risks if you go down that route.
For the purposes of this article, we’ll be using Ian Coleman’s Mnemonic Coder Converter, which is an open-source tool listed on GitHub. The tool has many positive reviews, and its code is available for anyone to examine, so it should be safe from a security standpoint.
The process of converting the Trust Wallet secret phrase into a private key is very simple and involves the following steps:
Paste your secret phrase into the designated field (for example, exotic auction virtual tongue again dolphin eager manage pole buzz visa grocery)
Select the cryptocurrency for which you’d like to generate the private key.
Find your private key that was generated from the provided secret phrase (for example, xprv9s21ZrQH143K3nHP8xunpSnG2bcDUWEQV7cCCQzyvvrCDTH76P4GN8FTeUVoNmPavKaxS9dwNeqmgmQUxpaVZQX8TgCYQEZyHuyxpL9XuZP).
(Advanced) Convert secret phrase to a private key using Python
If you have some basic coding knowledge and are not ready to share your secret phrase online due to security concerns, you can use a short script that uses the “bip-utils” package on Python, which allows generating mnemonics, seeds, private/public keys and addresses for different types of cryptocurrencies.
Step 1: Create a virtual environment in Python
We tried installing the bip-utils package without a virtual environment but to no avail. If you have the same problem, you can run the following command: python -m venv myenv.
Step 2: Activate the virtual environment
Next, activate the virtual environment. For Windows, the command is myenv\Scripts\activate, and for MacOS, the command is source myenv/bin/activate.
Step 3: Install ‘bip-utils’
Next, install the package that will actually convert the secret phrase to a private key by running pip install bip-utils.
Step 4: Use the following script and replace the placeholder text with your actual secret phrase
Replace the "your mnemonic phrase here" text string with your actual secret phrase. For this example, our secret phrase is “exotic auction virtual tongue again dolphin eager manage pole buzz visa grocery”. Run the script.
from bip_utils import Bip39SeedGenerator, Bip32Slip10Secp256k1 # Step 1: Generate seed from mnemonic phrase mnemonic_phrase = "your mnemonic phrase here" seed = Bip39SeedGenerator(mnemonic_phrase).Generate() # Step 2: Generate master private key from seed bip32_ctx = Bip32Slip10Secp256k1.FromSeed(seed) master_private_key = bip32_ctx.PrivateKey().Raw().ToHex() # Step 3: Derive specific private key for first Bitcoin address derived_ctx = bip32_ctx.DerivePath("m/44'/0'/0'/0/0") private_key = derived_ctx.PrivateKey().Raw().ToHex() print(f"Master Private Key: {master_private_key}") print(f"Derived Private Key: {private_key}")
Step 5: Run the script
Run the script. The output should look like the following screenshot.
If you need a script that generates private keys for coins other than Bitcoin, you can check the official list of script examples. Conversely, you can use the official documentation of the bip-utils package to generate your own code.
The bottom line
While it’s possible to obtain a private key from the secret phrase, it’s usually not something that most users will ever need. The secret phrase allows you to restore all digital assets handled by the Trust Wallet at once, meaning that you don’t need to verify ownership of every single digital asset separately. Still, if you absolutely need access to your private keys, then this guide should provide you with all the necessary tools.
Now that you’ve mastered another aspect of using cryptocurrencies, you can proceed by funding your Trust Wallet and start using it for DeFi, trading, and other use cases.
We should note that if you want maximum security, you shouldn’t keep most of your crypto in an online wallet such as Trust Wallet. To ensure your crypto is as safe as possible, it’s highly recommended that you use cryptocurrency hardware wallets. It’s worth noting that hot wallets and cold wallets can be used simultaneously, combining the convenience of hot wallets with the security of cold wallets.