I got a ransomware called StopDjvu. On my PC, I have found the public key that is used by the malware (maybe RSA hardcoded).
Is it possible to extract the private key from the public key?
Information Security Stack Exchange is a question and answer site for information security professionals. It only takes a minute to sign up.
Sign up to join this communityNo. If it were possible to derive the private key from the public key, then this would break asymmetric encryption. This would make it possible to break the encryption for https, VPNs, SSH, Signal, cryptocurrencies, and much more.
As a thought experiment, take a look at this bitcoin address: https://www.blockchain.com/btc/address/12tkqA9xSoowkzoERHMWNKsTey55YEBqkv
As you can see, this address has ~28,000 bitcoins associated with it. At today's exchange rate, that's almost half a billion USD. The public key is in the clear. If it were possible to derive the private key from the public key, someone would have done it by now and used the private key to steal all the bitcoins from this address. But, to date, this has never happened. So, think of bitcoin as a massive bug bounty on exactly what you are trying to do.
Public key cryptography uses mathematical constructs that makes it really difficult (practically impossible) to find a private key once you know the public key.
So, the answer is no.