Is RSA secure enough to protect bitcoin private keys? Suppose my very trusting friend has a bitcoin private key with a large balance (let's say $1B USD worth of Bitcoin) and wishes to keep a backup copy with me as a trustee.
He doesn't want to transfer the raw key over an internet connection for obvious reasons, so he asks me to generate an RSA key and send him the public key so he can encrypt his bitcoin private key and then I can decrypt it on my end offline and store my backup of his bitcoin private key.
Is there a realistic risk that someone could brute force the encrypted key that we transferred plaintext over the internet?
2048 bit RSA is currently and for the foreseeable future secure.
512 bit is currently not considered useful.
1024 bit RSA though not currently known to be cracked doesn't have enough security margins for comfort. Definitely not for securing $1B USD. Several years ago the cost of a machine which could break 1024 bit RSA in a year was a few million. Cost presumably went down. And it is likely certain 3 letter organizations have such machines.
The best way to attack RSA is by factorizing the composite $n$ using Number Field Sieve. and though $1B is a lot of money I don't believe there is a known design which will break 2048 bit RSA for that budget.
However, there are other attacks to think of. Starting with how you share your public key. How does your friend know your public key is indeed yours.
Then there are various side channel attacks on RSA, if the attacker has timing or power or noise measurements of you computing stuff with the private key that can help.
Then of course to protect a $1B secret there better be plenty of physical security around your key.
Should large quantum computers become available RSA may be broken also for significant key sizes. Personally I don't expect this any time soon but plenty of smart people disagree.