Cryptography

And Java API for the common cryptographic algorithms

Preface

Here, I'll try to stick with the common cryptographic algorithms, but, I suggest a complex mapping that is algebraic and conformal, allowing encryption and decryption. To not compromise the flow of the text, a Java introduction is given in Appendix A. I assume that you know the basic Client-API architecture from software engineering. Java was chosen because learning Java is not a big deal if you already know C++. Besides, the language doesn't allow you make mistakes that can seriously crash the application. Moreover, Java provides a handful of algorithms and data structures implementations. Java is also easily portable.

We implement the easier models on introduction, leaving some parts to exercise the reader.

Introduction

Cryptography is concerned with establishing a secure channel between two parties: Angus and Barbara. And an eavesdropper Elvis, that always bugs the channel.

We have a cryptographic system \(S = (P,C,K,E,D)\), where P is a plain text, C is a cipher text, K is a key and E and D are encryption and decryption functions, such that \(E_K(D_K(C)) = C\). No matter what, the keys must remain hidden from Elvis, otherwise the channel is compromised.

A shift cipher is just a "delayed" permutation of symbols \(a_i\) of an alphabet \(\Sigma\). Delays are just phase shifts \(\theta\). It can be implemented directly in the signal processing, provided that Angus and Barbara have previously agreed on a key (the \(theta\)). It can also be implemented in software using Java.