Cryptography is the art of secret writing. It involves transforming information into apparently unintelligible garbage so that unwanted eyes will be unable to comprehend it. This transformation, however, must be done so that it is reversible, so that individuals intended to view the information may do so. This is the traditional use of cryptography.
I agree with the philosophy that it is wiser to publish your encryption methods than to try to keep them secret. Thus, this book and others like it exist. Only government agencies endeavor to keep their encryption methods hidden. It is generally thought that publishing your ciphers exposes them to an army of brilliant people who will take great joy in pointing out any weaknesses they have. This gives the developer a chance to correct these weaknesses. On the other hand, trying to protect your methods from someone who really wants to know what they are probably wonÕt work. A few bribes here and there will take care of that, and once they know your algorithms, they will pay very intelligent people to find weaknesses to exploit. The difference, of course, is that you wonÕt know that this has happened, nor that the precious information you are sending with this cryptosystem is being monitored.
A great deal of modern cryptography depends upon the clever manipulation of huge integers. Thus, both number theory and abstract algebra play a large role in contemporary methods of hiding information. In many respects, Java is a pioneer in computer languages, with system security one of its primary missions. Java provides a BigInteger class, and through the use of this class, one may write cryptographic routines unbreakable by even the fastest supercomputers in the world. This will not change in the near future, nor probably even the distant future. The solution to modern cryptanalysis is not more powerful hardware, but more powerful mathematics, for modern cryptosystems depend on the intractability of certain mathematical problems.
Java already has security classes defined for it; they are in a package consisting of various abstract classes and interfaces, like Cipher, Message, and so on. This book does not cover these; rather, the emphasis is in learning the mathematical theory of cryptography, and writing algorithms Òfrom the ground upÓ to implement the theory. For an excellent exposition of Java security providers and the Java security classes, one should consult Knudsen's book, Java Cryptography by OÕReilly.