Post
Topic
Board Development & Technical Discussion
Re: The security megathread: Detailed info about keypairs, encryption, and more
by
NotATether
on 15/02/2021, 12:30:41 UTC
I'll edit this post tomorrow with the answers to the rest of everyone's questions and suggestions as it's getting late here.

Why do you get the message once you rise the encryptedMessage to the power of privateExponent and then take the modulus of this process?

In layman's terms, the public exponent is derived from the private exponent in such a way that multiplying (EDIT: sorry, taking the exponent)  some message data, in big integer form, with both of them cancels each other out.

AFAIK modulus is the remainder of a division. With what do you divide encryptedMesaage**privateExponent?

In the private (and public) key file there is a field called "modulus" which is used for that.


EDIT: The answers to the rest of your inquiries:

Can you explain why that happens? And brute forcing what algorithm? I suppose that since RSA encryption is different than just keeping hashed passwords on a database, you probably mean brute forcing a message digest algorithm. But why 311?

311 is the amount of characters required to make the search space approximately equal to the size of RSA-2048. And that's if we only use printable characters in the ASCII character set, so excluding 0x00-0x1f and 0x7fffffff, leaves us 96 characters, and 96**311 is almost equal to 2048.

Obviously I have to take into account the hashing algorithm used to store passwords, whether it be bcrypt or SHA256, and compare that to the running time of some RSA2048 brute-forcing program, so my quote is not 100% accurate.

Nice, very good material!
Do you want to add some analysis about quantum proof? Quantum computers are in rapid development quietly, and the exponential nature of Moore's law means it'll be there probably sooner than all of us can expect. Years ago Vitalik Buterin wrote a short article about Bitcoin's quantum proof on Bitcoin magazine, but probably people weren't paying enough attention.

Appreciated! Though it will be troublesome to find material related to quantum encryption algorithms, it's definitely on my TODO list now.