encryption : Java Glossary

*0-9ABCDEFGHIJKLMNOPQRSTUVWXYZ (all)

encryption
Uses of Encryption Uncrackable Encryption
Blocking Rebellion
The Downside of Any Encryption Learning More
Cracking Encryption Links

Uses of Encryption

There are two main uses for encryption:

  1. Encrypting your files to prevent snoops from looking at them. Snoops can look at your files without knowing your login password by booting with an Ubuntu Linux CD (Compact Disc) and examining your files, bypassing Windows and its passwords. Possible tools to encrypt (scramble) your files include:
    • Microsoft Encrypt available in right click properties.
    • Bundled encryption software such as Acer e-Protect.
    • Commercial file encryption software. There are dozens of choices. I have no experience with them. Keep in mind none of them will stop the IRS (Internal Revenue Service), FBI (Federal Bureau of Investigation) , CIA (Central Intelligence Agency), KGB (Komitet Gosudarstvennoy Bezopasnosti (Russian CIA)) , Mosad etc. These are designed to stop individual snoops.
    Beware! If you lose your password, there is no way ever to get your files back.
  2. Encoding messages in ways so that people snooping on them won’t be able to make sense of them. Depending on who the spies are that you are trying to defeat, you use increasing strength of encryption. The stronger the encryption the more onerous it is to use and the more computing power it requires to encode and decode the messages. Ways of encrypting include:
    • XORing with a key phrase. This is relatively trivial to crack, but keeps out casual prying eyes.
    • DES (Data Encryption Standard). This is fast, but can be easily cracked by all US government agencies.
    • RSA (Rivest, Shamir and Adelman). 40-bit can be fairly easily cracked. 1024-bit or higher would require secret special-purpose hardware that presumably the CIA has. The Transporter supports up to 4096-bit encryption, but is suitable only for short messages because it is so slow at decrypting.
    • One time pad. This is in theory uncrackable, but has the problem of needing to distribute one-use-only keys just as large as the messages ahead of time. I have written a Pascal implementation. If you are working at this level of security, you must write your own program to be sure it contains no Trojans. See the One time pad uncrackable encryption student project.
    • JCE (Java Cryptography Extension) supports a number of different algorithms from 40 to 2048 bits. The more bits, the more secure, but the more CPU (Central Processing Unit) time needed to encrypt and decrypt. You use the generic javax.crypto.Cipher class both to encrypt and decrypt the message. You use the javax.crypto.KeyGenerator class to generate random numbers to use as keys.
    • AES (Advanced Encryption Standard) : Advanced Encryption Standard as specified by NIST (National Institute of Standards and Technology) in a draft FIPS (Federal Information Processing Standard) . Based on the Rijndael algorithm by Joan Daemen and Vincent Rijmen, AES is a 128-bit block cipher supporting keys of 128, 192 and 256 bits.
    • Blowfish: 56 bits. The block cipher designed by Bruce Schneier.
    • DES : 56 bits. The Digital Encryption Standard as described in FIPS PUB 46-2.
    • DESede: 112 bits. Triple DES Encryption (DES-EDE).
    • PBE (Password Based Encryption) : PBE algorithm (defined as part of the PKCS (Public-Key Cryptography Standards) #5 standard), defines how some other algorithm can get its key. It derives the encryption key from a passphrase. It is not an encryption algorithm on its own.
    • RC2, RC4 and RC5: Variable-key-size (32 .. 160-bit) encryption algorithms developed by Ron Rivest for RSA Data Security, Inc.
    • RSA: The RSA encryption algorithm as defined in PKCS #1. Public/private key.
    • HMAC-MD5, HMAC-SHA1 : 64 bits.
    • Diffie-Hellman : 1024 bits.
    • HTTPS/SSL : a way of encrypting a binary TCP/IP (Transmission Control Protocol/Internet Protocol) stream over the Internet. I have noticed that server after server is converting from HTTP (Hypertext Transfer Protocol) to HTTPS (Hypertext Transfer Protocol over SSL (Secure Socket Layer)). It requires the server to buy a certificate. Typically 256 bits to 2048 bit keys.
    These techniques are often combined, e.g. public/private key (which is slow) used to exchange a fast DES, or HMAC-SHA1 for authentication combined with AES for encryption.

    For email signing and encryption, the two most common schemes are PGP often used with Thunderbird and SMIME often used with MS Outlook.

Encryption algorithm work on blocks, usually of some power of 2, e.g. 256 bits. If your message is not a multiple of that size, you need to pad it and when you decrypt it, discard the excess. That is handled automatically when you select a JCE padding algorithm such as: ISO10126Padding, PKCS1Padding, PKCS5Padding…

Blocking

The blocking algorithm handles breaking the messages into fixed size pieces for encryption and joining the pieces again on decryption such as: CBC (Cipher Block Chaining mode), PCBC, CFB (Cipher Feedback mode), OFB…

For data that only has to be protected until 2010, 1024 bits should suffice. For data that has to remain secret after that, you need 2048 bits.

The Downside of Any Encryption

Quantum computers can solve try all possibilities problems by using Quantum Mechanics to explore all possibilities simultaneously. I suspect encryption, except one-time pads will have to be revamped or abandoned to stay ahead. This is going to create a massive social problem and open astounding possibilities.

Using any sort of encryption flags to the attention of snoopers that you are trying to hide something. They can then bring in their experts and computers to crack the code. There is a whole field called steganography about how to hide information in images, e.g. porn, which gets lost in the torrents of images flying over the net. Even the tiniest error in the program or use of it greatly simplifies their task. The security of Windows is so weak, it is trivial for criminal or government agencies to install a keystroke logger than looks at everything you type before you encrypt it. Today, with massive wiretapping by the government, your only hope is in sending messages that have perfectly innocuous meaning that don’t trip any filters.

You should be thinking of encryption as a way of deterring non-Fortune 500 competitors, wives, children and employees. You will probably just give yourself a false sense of security and raise he-might-be-a-terrorist flags with militaries and governments. The cleverer your security, the bigger the alarm you set off.

Circa 1985, a company gave a presentation to our Apples BC Computer club on some encryption software. They explained how it would take hundreds of thousands of years to crack the lock. I broke it in a few minutes by going around the lock and using the fact that deleted files on the Apple ][ were not really deleted, something the programmers had inadvertently overlooked. No matter how strong your lock is, clever people will find ways to bypass it. There is not much point in building ever stronger locks without simultaneously studying the devious ways to bypass them.

Cracking Encryption

Techniques for cracking encryption include:

Uncrackable Encryption

Vernam one-time-pads of true random numbers XORed with messages are provable uncrackable, at least by examining the exchanged messages. I will be releasing an implementation suitable for dummies soon, with source so you can check yourself for back doors.

There are coming quantum techniques for detecting eavesdroppers on optical communications. details.

Nothing else is uncrackable, just difficult or time-consuming to crack. If you are doing something you don’t want the FBI , CIA, Pentagon, NSA (National Security Agency) etc. to see, you should not be using crackable encryption techniques such as DES, AES, HTTPS…

Even uncrackable software is vulnerable to hacking into either the sending or receiving computer, or to snooping on the clear text version of the data.

Rebellion

It gets a bit annoying knowing that Obama, Harper and the CEO (Chief Executive Officer) of nearly every corporation believe that it is completely proper for them to spy on ordinary citizens who pose no security risk, mostly people who merely disagree with them.

What can you do to make life awkward for them, but not miserable enough for them to torture or assassinate you?

Learning More



This page is posted
on the web at:

http://mindprod.com/jgloss/encryption.html

Optional Replicator mirror
of mindprod.com
on local hard disk J:

J:\mindprod\jgloss\encryption.html
Canadian Mind Products
Please the feedback from other visitors, or your own feedback about the site.
Contact Roedy. Please feel free to link to this page without explicit permission.

IP:[65.110.21.43]
Your face IP:[3.149.23.124]
You are visitor number