Cointime

Download App
iOS & Android

Best Practices To Manage Private Keys Safely and Securely

Validated Project

The compromise of private keys are becoming a trend in cybersecurity vulnerabilities. Here are our recommendations on what you can do to maximize security and keep your private keys safe.

Among all the security incidents that have occurred in the crypto space, the compromise of private keys is one of the most prominent root causes. Although hackers do not need to apply complex techniques to exploit this compromise, this does not mean it would not lead to huge losses in projects.

For instance, in March 2022, the private keys for Axie’s cross-chain bridge Ronin were compromised, leading to the exploitation of crypto assets worth around US$600 million.

Therefore, managing private keys safely and securely is very important for both users and developers when they interact with blockchain applications.

Based on Fairyproof’s experience and study, here is a list of 7 recommended best practices to manage private keys:

1. Do Not Code Private Keys in the Source Code

Occasionally, crypto application may need to use an external account to sign transactions by using the account’s private key. To make coding and operations easier, some developers may write the private keys directly in the source code.

As most of the crypto application’s source code is open sourced, if the code of the private key is open sourced, the application is exposed to enormous risks.

2. Use References to Private Keys

If the situation calls for the private key to be embedded in an application’s source code, we suggest the use of references pointing to the private key that is stored in alternate sources and is not publicly accessible.

3. Do Note Use Private Keys with Simple Digits or Characters

Crypto applications use hash functions to make it practically infeasible to calculate a private key based on its public key. Therefore, the more random a private key, the harder it is for hackers to guess the private key.

Users should then never use private keys consisting of characters that can be easily guessed — Such as characters or regular digits like “1234…” or “abcd…”. Hackers can easily hack through brute force to gain access to private keys of this kind through modern hacking tools.

A good rule of thumb is to randomly mix characters and digits. Some popular crypto wallets such as MetaMask use carefully designed algorithms to achieve this randomness.

4. Do Not Install Unidentified Software or Application on Devices Where Private Keys are Stored

Hackers tend to use malware or ransomware to steal private keys from users. These malware or ransomware is usually contained in malicious links. If users happen to click on these links, the malware and ransomware would be installed into their devices (Sometimes without the awareness of the user), and their private keys would be scanned by them.

5. Do Not Send Private Keys as Plain Text in Communication Tools or Utilities Like Instant Messengers

Instant messengers are the most common form of communication among crypto users. Users might send their private keys as plain text in their messages if they do not have a strong understanding of cybersecurity. These messages storing these private keys can be easily leaked, compromising security.

6. Do Not Save Private Keys as Plain Text in Physical Devices Like Hard Disks or Notebooks

Most crypto wallet users like keeping their private keys in physical devices like laptops or hard disks through saved notepad files or word documents. If these devices are hijacked or acquired by hackers, they can gain access to private keys easily. To mitigate this risk, we highly recommend users not to save their private keys as plain text, but to save hem as encrypted data in physical devices.

For crypto wallet users, a rule of thumb for saving private keys is to save them on paper which is a general recommendation by most crypto wallet applications.

7. Do Not Use Lucky Number Generation Tools to Generate Private Keys

Tools/utilities to generate blockchain addresses that contain lucky numbers exist. Some users prefer to use these addresses to showcase their special on-chain identities and keep their crypto assets in these addresses. Tools/utilities like these have been thoroughly hacked and studied by many hackers.

Hackers can easily deduce the corresponding private keys and their respective characters from these addresses, thus exploiting crypto assets kept in these addresses.

In Summary-

These 7 best practices will help you greatly reduce the risk of your private keys being compromised. Follow them strictly.

We hope both users and developers can interact and participate in crypto applications safely and securely by doing what they can to manage and handle their private keys with great care and caution.

Comments

All Comments

Recommended for you

  • BTC Surpasses $82,000

    Market data shows that BTC has surpassed $82,000, currently priced at $82,038.65, with a 24-hour increase of 0.31%. The market is experiencing significant volatility, so please ensure proper risk management.

  • ETH Surpasses $2400

    Market data shows that ETH has surpassed $2400, currently priced at $2400.26, with a 24-hour decline of 1.33%. The market is experiencing significant volatility, so please ensure proper risk management.

  • BTC Surpasses $81,000

    Market data shows that BTC has surpassed $81,000, currently priced at $81,016.34, with a 24-hour decline of 1.53%. The market is experiencing significant volatility, so please ensure proper risk management.

  • BTC Falls Below $80,000

    Market data shows that BTC has fallen below $80,000, currently priced at $79,940.09, with a 24-hour decline of 3.44%. The market is experiencing significant volatility, so please ensure proper risk management.

  • Philadelphia Semiconductor Index Set to Lose Over $2 Trillion in Market Value in Seven Trading Days

    The Philadelphia Semiconductor Index is poised to evaporate over $2 trillion in market value within seven trading days.

  • Philadelphia Semiconductor Index Drops 4% to Lowest Level in Nearly a Month

    The Philadelphia Semiconductor Index fell by 4.01% during the day, currently reported at 11,215.37 points. Nvidia dropped by 3.25%, Broadcom fell by 2.87%, Micron decreased by 5.79%, Intel declined by 5.81%, AMD dropped by 6.28%, Qualcomm rose by 0.66%, TSMC fell by 4.37%, and ASML decreased by 3.34%.

  • Philadelphia Semiconductor Index Falls 4% to Lowest Level in Nearly a Month

    The Philadelphia Semiconductor Index dropped 4.01% during the day, currently reported at 11,215.37 points. Nvidia fell by 3.25%, Broadcom by 2.87%, Micron by 5.79%, Intel by 5.81%, AMD by 6.28%, Qualcomm rose by 0.66%, TSMC fell by 4.37%, and ASML dropped by 3.34%.

  • Ripple Prime Launches Perpetual Contract Trading Services for Institutional Clients

    According to Bloomberg, Ripple's main brokerage division, Ripple Prime, is launching perpetual contracts for real-world assets (RWA) aimed at institutional clients, covering over 100 reference markets including stocks, indices, ETFs, and commodities. This product is offered through Trade.xyz on Hyperliquid, continuing Ripple Prime's previous initiative to provide clients with access to cryptocurrency perpetual contract trading.

  • NYC Comptroller Urges Anthropic to Pause IPO Plans

    On October 15, New York City Comptroller Mark Levine stated in an interview that he has written to Anthropic CEO Dario Amodei, urging the company to suspend its planned initial public offering (IPO). In the letter, he called for Anthropic to pause its IPO plans until it can fully and transparently address concerns related to AI safety, governance, and development that the company itself has raised. Levine wrote that the company should focus on mitigating these risks rather than advancing the IPO. Currently, New York City has an investment exposure of less than $10 million in Anthropic through the private market.

  • US September PPI Rises 6.3% Year-on-Year, Exceeding Market Expectations

    The US Producer Price Index (PPI) for September recorded a year-on-year increase of 6.3%, the highest since May 2026, surpassing market expectations of 5.3%. The month-on-month PPI for September was reported at 1.3%, significantly higher than the market forecast of 0.5%. Additionally, US retail sales for September showed a month-on-month increase of 0.8%, also exceeding market expectations.