---

Linux Journal: Exploring RSA Encryption in OpenSSL

“When sending your credit card number through a public medium,
such as the Internet, your financial credibility may be compromised
if the number is not first encrypted. It is impossible to tell who
may be listening in on your connection as you shop for new CDs or
books. The RSA encryption method often is used to hide your credit
card number from would-be thiefs on the Internet, because it uses a
public key to hide your information and a private key to reveal it.
This article banishes the mystery surrounding RSA encryption and
explains how a realistic implementation of RSA works in the OpenSSL
library. The only files you need to concern yourself with appear in
the openssl/crypto/bn and openssl/crypto/rsa subdirectories. Feel
free to download and take a look at the code to get a feel for it
before continuing.

“The best way to understand asymmetric encryption is to think of
a box that has two kinds of keys: one key locks it and the other
unlocks it. Anybody who has a copy of the locking key (aka public
key) can put a secret in the box. Because only you have the
unlocking key (aka private key), nobody else can reveal a secret
that someone else locked in the box. This is different from
symmetric key encryption, in which the same key is used for locking
and unlocking…”

Complete
Story

Get the Free Newsletter!

Subscribe to Developer Insider for top news, trends, & analysis