Generate public and private RSA key pairs locally for authentication.
RSA (Rivest-Shamir-Adleman) is an asymmetric cryptographic algorithm. This means it uses a pair of mathematically linked keys: a Public Key (which can be shared with anyone) and a Private Key (which must be kept secret).
Data encrypted with the public key can only be decrypted by the private key. Conversely, data signed by the private key can be verified by the public key.
RSA's security relies on the practical difficulty of factoring the product of two very large prime numbers (the "factoring problem").
PEM (Privacy-Enhanced Mail) is a Base64 encoded format with header and footer lines.
BEGIN PRIVATE KEY).BEGIN PUBLIC KEY), typically found in X.509 certificates.Shor's algorithm, running on a sufficiently powerful quantum computer, could factor the large primes used in RSA exponentially faster than classical computers, completely breaking RSA security. This is driving the current industry shift towards Post-Quantum Cryptography (PQC) algorithms.
If Alice wants to send a secret encrypted message to Bob using RSA, which key should she use to encrypt the message?