15.04.2018 Views

programming-for-dummies

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

452<br />

Symmetric/Asymmetric Encryption Algorithms<br />

Plaintext I A M S A M .<br />

Figure 5-3:<br />

Cipherblock<br />

chaining<br />

uses the<br />

output from<br />

one block as<br />

the input <strong>for</strong><br />

encrypting a<br />

second<br />

block.<br />

Blocks<br />

Ciphertext<br />

I<br />

A<br />

Block cipher<br />

encryption<br />

X * 4<br />

M S A M .<br />

Altered cipher<br />

encryption #1<br />

d + 3<br />

X * 4 d + 3 q Y ^<br />

Altered cipher<br />

encryption #2<br />

q Y ^<br />

Symmetric/Asymmetric Encryption Algorithms<br />

The most common type of encryption algorithm is a symmetric algorithm,<br />

which uses the same password to encrypt and decrypt data. Basically, this<br />

means that the password that scrambles the data can also reverse the<br />

process and unscramble the data, as shown in Figure 5-4.<br />

Plaintext I A M S A M .<br />

Key<br />

Encryption<br />

Ciphertext<br />

X * 4 d + 3 q Y ^<br />

Figure 5-4:<br />

A single<br />

password<br />

can encrypt<br />

and decrypt<br />

a message.<br />

Ciphertext<br />

Plaintext<br />

X * 4 d + 3 q Y ^<br />

Key<br />

Decryption<br />

I A M S A M .

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!