Practical Cryptography:      Algorithms and        Implementations Using C++

    Published by CRC Press, USA


      Edited and Authored By:

Saiful Azad

Al-Sakib Khan Pathan






Many books are available on the subject of cryptography. Most of these books focus on only the theoretical aspects of cryptography. Some books that include cryptographic algorithms with practical programming codes are by this time (i.e., at the preparation of this book) outdated. Though cryptography is a classical subject in which often old is gold, many new techniques and algorithms have been developed in recent years. These are the main points that motivated us to write and edit this book.

In fact, as students for life, we are constantly learning new needs in our fields of interest. When we were formally enrolled university students completing our undergraduate and postgraduate studies, we felt the need for a book that would not only provide details of the theories and concepts of cryptography, but also provide executable programming codes that the students would be able to try using their own computers. It took us a long time to commit to prepare such a book with both theory and practical codes.

Though some chapters of this book have been contributed by different authors from different countries, we, the editors, have also made our personal contributions in many parts. The content is a balanced mixture of the foundations of cryptography and its practical implementation with the programming language C++.


What This Book Is For

The main objective of this book is not only to describe state-of-the-art cryptographic algorithms (alongside classic schemes), but also to demonstrate how they can be implemented using a programming language, i.e., C++. As noted before, books that discuss cryptographic algorithms do not elaborate on implementation issues. Therefore, a gap between the understanding and the implementation remains unattained to a large extent. The motivation for this book is to bridge that gap and to cater to readers in such a way that they will be capable of developing and implementing their own designed cryptographic algorithm.

What This Book Is Not For

The book is not an encyclopedia-like resource. It is not for those who are completely outside the related fields, for example, readers with backgrounds in arts, business, economics, or other such areas. It may not contain the meanings and details of each technical term mentioned. While many of the technical matters have been detailed for easy understanding, some knowledge about computers, networking, programming, and aspects of computer security may be required. Familiarity with these basic topics will allow the reader to understand most of the materials.

Target Audience

This book is prepared especially for undergraduate or postgraduate students. It can be utilized as a reference book to teach courses such as cryptography, network security, and other security-related courses. It can also help professionals and researchers working in the field of computers and network security. Moreover, the book includes some chapters written in tutorial style so that general readers will be able to easily grasp some of the ideas in relevant areas.


Additional material is available from the CRC Press website:
Available for purchase at Amazon:


We hope that this book will be significantly beneficial for the readers.

Any criticism, comments, suggestions, corrections, or updates about any portion of the book are welcomed.


Editors'/Authors' contact email addresses are: and


Source Codes for Free Download


Chapter Number

 Chapter Title

 Source Codes

Chapter 01

Basics of Security and Cryptography


Chapter 02

Classical Cryptographic Algorithms


Chapter 03

Rotor Machine


Chapter 04

Block Cipher


Chapter 05

Data Encryption Standard


Chapter 06

Advanced Encryption Standard


Chapter 07

Asymmetric Key Algorithms


Chapter 08

The RSA Algorithm


Chapter 09 Elliptic Curve Cryptography download
Chapter 10 Message Digest Algorithm 5 download
Chapter 11 Secure Hash Algorithm download
Chapter 12 Fundamentals of Identity-Based Cryptography N/A

Chapter 13

Symmetric Key Encryption Acceleration on Heterogeneous Many-Core Architectures N/A

Chapter 14

Methods and Algorithms for Fast Hashing in Data Streaming



* N/A means the chapter does not have any source code for it.



Copyright Al-Sakib Khan Pathan, 2014.