What are the quantum threats to cold storage and P2SH or P2PKH in crypto wallets?
Cold storage, which involves storing bitcoins offline (e.g., on hard drives or in Swiss bunkers), and Pay-to-Script Hash (P2SH) or Pay-to-Public-Key Hash (P2PKH) are perceived to be secure as they are either disconnected from the internet or require the public key to be revealed to the blockchain only during a transaction. However, quantum computers have the potential to break this security by calculating the private key from the public key, which is considered a one-way function in classical computing. In the context of P2SH or P2PKH, once the public key is exposed during a transaction, a quantum attacker could calculate the private key and steal the funds stored in the P2PKH address. Thus, the advent of quantum computing poses a significant risk to the security of crypto wallets, necessitating the adoption of quantum-resistant cryptography to safeguard assets.