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 $84,000

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

  • Zelensky Responds to Trump's Russia-Ukraine Ceasefire Statement: Ukraine Will Agree if Russia Accepts Energy Ceasefire

    According to Axios, Ukrainian President Zelensky stated that Trump's ceasefire statement was also a surprise to him. Ukraine will agree if Russia accepts an energy ceasefire.

  • CryptoBillis Ledger Attacker Deposits $3.89 Million in Crypto Assets to Binance

    On October 11, the attacker of CryptoBillis Ledger deposited approximately $3.89 million in crypto assets to Binance over the past two days, including 3.685 million USDT and 615,000 TRX (about $204,000). This attacker had previously stolen over $90 million in crypto assets. (PeckShieldAlert)

  • KillaXBT: BTC May Surge Before Midterm Elections, Drop After, Historical Probability 75% Bearish

    On October 11, Killa (@KillaXBT), a user on X, shared his perspective that the ideal path for BTC is to rise before the midterm elections, establishing a bullish narrative and surpassing previous highs. Following this, he anticipates a pullback post-election, similar to past cycles, but with higher lows instead of new cycle lows. He believes that if there is a decline before the elections, it is more likely to rise towards $95,000 afterward. Citing data, he noted that nearly $2 billion in long positions were just liquidated, with only three weeks until the midterm elections. Historically, in four midterm elections, three have seen bearish trends emerge one to two months after the elections, giving a probability of 75%. He stated that the worst-case scenario would be a price rebound leading into the elections, followed by a reversal that traps the other side before de-risking. He believes that the narrative for one side has already been liquidated, and the current exposure of shorts is higher than that of longs. The author claims to still hold 10x long positions and longs established at 62.6K and 76.4K, with all positions fully allocated and not closed. This represents his personal trading view and is not an objective event.

  • Argentine Central Bank Indicates Cryptocurrencies May Open to Banks

    On October 11, the Argentine Central Bank stated that during Milei's second term, cryptocurrencies may be opened to banks, lifting a ban that has been in place for four years.

  • Trump: Russia and Ukraine Agree to 'Energy Ceasefire'

    On October 11, U.S. President Trump announced that an 'energy ceasefire' has been reached in the Russia-Ukraine war, effective immediately. Both sides have agreed not to disrupt it.

  • CITIC Securities: Hong Kong Stocks' Fundamentals Expected to Have Bottomed Out

    On October 11, CITIC Securities' research report pointed out that for Hong Kong stocks, although the overseas interest rate hike cycle combined with the restart of AI-driven trading continues to pressure liquidity, the fundamental expectations have bottomed out, and the earnings growth expectations for major broad-based indices have begun to be revised upwards. There is a significant divergence in the adjustment of industry earnings expectations, with some specific sectors seeing upward revisions, while industries related to domestic demand still face downward pressure on earnings expectations. The upcoming third-quarter performance will be an important basis for assessing the progress of recovery. The report advises investors to maintain patience with Hong Kong stocks, expecting that short-term dividend strategies will continue to outperform.

  • Five Major U.S. TV Networks Boycott White House Coverage; DOJ Launches Antitrust Investigation

    On October 11, the U.S. Department of Justice announced it is investigating whether five television networks, including CNN, violated federal antitrust laws. This follows President Trump's ban on reporters from CNN and two other news organizations from entering the White House for coverage, prompting these five major media outlets to collectively boycott and refuse to report on White House activities in solidarity with the banned reporters. The antitrust division of the DOJ is examining CNN, NBC, CBS, Fox News, and ABC. These news organizations have formed a television broadcasting alliance to jointly cover presidential activities and share video footage. The DOJ stated that the members of this television press corps are boycotting White House coverage; such collective boycott actions among business competitors may violate the Sherman Antitrust Act. The antitrust division is investigating to determine if these news organizations have violated antitrust laws. Last month, Trump barred reporters from CNN, MS NOW, and Politico from entering the White House, citing that their coverage was unfavorable to him. Following this, major television networks suspended joint reporting. When CNN was removed from its scheduled coverage of Trump at the United Nations General Assembly, other networks refused to take its place.

  • Zelensky: Will Organize Ukrainian Elections if Putin Agrees to 60-Day Ceasefire

    On October 11, according to ABC News, Ukrainian President Zelensky responded to U.S. President Trump, stating that he would organize Ukrainian elections if Russian President Putin agrees to a 60-day ceasefire.

  • CITIC Securities: Hong Kong Stocks' Fundamentals Expected to Have Reached Bottom

    On October 11, CITIC Securities' research report indicated that for Hong Kong stocks, although the overseas interest rate hike cycle combined with the restart of AI-driven trading continues to pressure liquidity, the fundamental expectations have reached a bottom, and the earnings growth expectations for major broad-based indices have begun to be revised upward. There is a significant divergence in the adjustment of industry earnings expectations, with some specific sectors seeing upward revisions, while earnings expectations in domestic demand-related industries still face downward pressure. The upcoming third-quarter performance will be an important basis for assessing the progress of recovery. The report advises investors to maintain patience with Hong Kong stocks, expecting that short-term dividend strategies will still outperform.