-1

Consider a RSA key file like this:

-----BEGIN PUBLIC KEY-----
MIIBITANBgkqhkiG9w0BAQEFAAOCAQ4AMIIBCQKCAQBUndTbDYZ9HM8WxZRHi6ir
Oi1XbiZzRk+ABErWWDxbDc+wo9jM4FSXEPiaZsBtrjgggZu9naCoKTue2BC7FEGh
wuRazFP5OnGp9ojq8xoDKtWcREtyfLC2UdYNuA0WrJBr7gUol+Mn5DTKxUFV5KLj
45JDiB2zYPDLzxWWTggjp2pK7u0jHOThMy+Af7Q886itbFrbbesj30VTLRSXn7sm
LkuQU8g0IyiQeCZuPACjqFkYFa68DjqAZlRr5EoZp88IRoNonWQv14GBv+kDBeUu
2fYZpet0z3srNyjgWPsEQLBUPPWyxcrtwhJpu5I6wLqs91w49LMsbkec8nwjqDgL
AgMBAAE=
-----END PUBLIC KEY-----

How does that tell a program how to encrypt? Can I decode this key and see the its components?

yyyyyyy
  • 12,081
  • 4
  • 47
  • 68
NetCoder
  • 27
  • 1
  • 7

1 Answers1

0

An RSA public key contains the modulus ($n$) and the public exponent ($e$, usually $65537$). It is formatted differently in different implementations, most commonly, it is a dump of the data and its length, encoded with base64. For an example, see https://stackoverflow.com/questions/1193529/how-to-store-retreieve-rsa-public-private-key/13104466#13104466

Mints97
  • 246
  • 4
  • 13