It uses a 64-bit key; however,
in practice only 56 of these bits are used (8 bits are ???parity??? bits), which is not strong enough to avoid
being broken using today??™s computers.
Both Triple DES and RC2 are variations of DES. Triple DES effectively encrypts data using three separate
DES encryptions with three keys totaling 168 bits when parity bits are subtracted. The RC2 variant can have
key lengths up to 128 bits (longer keys are also possible using RC3, RC4, and so on), so it can be made
weaker or stronger than DES depending on the key size.
Rijndael is a completely separate encryption method and is the current Advanced Encryption Standard
(AES) standard; several competing algorithms were considered before Rijndael was chosen. This
standard is intended to replace DES and is gradually becoming the most used (and secure) symmetric
encryption algorithm.
The tasks associated with encrypting and decrypting data are a little more involved than
hashing. The mcrypt functions are optimized to work with raw data, so you have some work to
do with data conversion. You also have to define both a key and an initialization vector (IV) to
CHAPTER 16 ?– MANAGING CUSTOMER DETAILS 484
perform encryption and decryption. The IV is required because of the nature of encryption:
the data blocks are usually encrypted in sequence, and calculating the encrypted values for
one sequence of bits involves using some data from the preceding sequence of bits.
Pages:
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608