Study of Color Coding Cryptography

download print

About this sample

About this sample


Words: 1929 |

Pages: 4|

10 min read

Published: Sep 14, 2018

Words: 1929|Pages: 4|10 min read

Published: Sep 14, 2018

Table of contents

  1. Abstract
  2. Introduction
  3. Color coded encryption process
  4. Proposed system
  5. System dsign and working
  6. Conclusion


Cryptography is a science based on abstract algebra, which means secret writing that transforms text messages to make them secure and immune to attack. Cryptography uses encryption and decryption techniques to ensure privacy and security of information sharing between the systems. An encryption transforms the plain text into cipher text and decryption transforms cipher text to plaintext.

'Why Violent Video Games Shouldn't Be Banned'?

One of the techniques to implement cryptography using color know as color coding cryptography is revealed in this paper, which is used for data encryption and decryption that presents text in the form of colored blocks by grouping together binary digits and assigning them colors along with Huffman encoding scheme which is used for lossless data compression. Index Terms—Cryptography, Huffman Coding, Encryption, Decryption, Color Coding.


Cryptography means secret writing in which, we apply data encryption and decryption techniques to convert data in scrambled form to protect from external attacks during transfer from one system to another. Color Coded Encryption is a technique of implementing a symmetrical system for security purposes. The symmetrical system is implemented through encryption of text by converting it into image format. To reduce the size of the image file, compression techniques are to be implemented at the encryption stage.

The reverse process decryption is used at the destination to generate the original text from the colored image at the receiving end. The security of cipher text is based on the following two things : Power of the cryptographic algorithm. Confidential key Confidential key is the most common technique for authentication. This technique is more susceptible to a variety of cyber attacks like phishing, dictionary attacks, brute force attack, spyware attacks etc. This key helps to encrypt the message and send it to receiver.

When the receiver gets that message he decrypts it with their confidential key which nobody can access it. This technique is used for protecting sensitive data with the help of two keys, when it is being sent over an unsecure system such as the Internet. Color coding cryptography is one of that techniques that allows text to be encrypted in such a way that decryption should be done via converting the image into text.

Color coded encryption process

Data Encryption Data encryption translates data into another form, so that only people with access to a decryption key can read it. Encrypted data is commonly referred to as ciphertext, while unencrypted data is called plaintext. Two types of data encryption exist: Symmetric encryption, in which the same key is used by the sender to encrypt the data and receiver to decrypt the data. The key is shared. Asymmetric encryption uses different keys for encryption and decryption. The purpose of data encryption is to protect digital data from attacks as it is stored on computer systems and transmitted using the internet or other computer networks.

The following method is used for converting the text into colors at the encryption side: ASCII based encoding using colors The following method of ASCII-based encoding scheme using colors which is used by. In RGB-256 color mode, a pixel is represented by 24 bits, in which 8 bits represent the intensity of each color. For example, a color (80, 121, 150) is represented as (01010000 01111001 10010110) implemented by.

Taking the first 8 bits i.e. in this case, 01010000: ignoring the MSB bit, the remaining 7 bits or first 128 parts of the color is used to denote a character in the ASCII table. In this way, three different characters can be denoted by a single color. Thus, a text document is converted into an encoded file filled with colored dots. By using the above concepts of encoding, large amounts of text can be compressed and transmitted in a more secured way. This concept of ASCII based method for representing characters and encoding them into colors is used in the proposed system.

Lossless text compression Text compression requires that the combination of compression and decompression methods to be lossless, or else the data cannot be restored in original format. The data compression via textual substitution method is used in .The design of data compression schemes involves adjustments among various factors, including the degree of compression, the amount of distortion introduced; if using a lossy compression algorithm and the computational resources required to compress and uncompress data.

The following method is used for lossless text compression in the Color Coded encryption at the source end implemented by Huffman: Huffman Encoding Compression Algorithm The Huffman encoding algorithm is an optimal compression algorithm in which the frequency of individual letters are used to compress the data. The idea behind the algorithm is that if you have some letters that are more frequent than others, it makes sense to use fewer bits to encode those letters than to encode the less frequent letters . This algorithm build the bottom-up tree using the frequency of each letter or symbol.

First, every letter starts off as part of its own tree and trees are ordered by the frequency of the letters in the original string. Then the two least frequently used letters are combined into a single tree, and the frequency of that tree is set to be the combined frequency of the two trees that it links together. This new tree is reinserted into the list of trees in its sorted position. The process is then repeated, treating trees with more than one element the same as any other trees except that their frequencies are the sum of the frequencies of all of the letters at the leaves. This is just the sum of the left and right children of any node because each node stores the frequency information about its own children.

The process completes when all of the trees have been combined into a single tree. This tree describes a Huffman compression encoding. Basically, a tree is built from the bottom up manner: we start out with 256 trees and end up with a single tree with 256 leaves along with 255 internal nodes. The tree has a interesting property: the frequencies of all of the internal nodes combined together will give the total number of bits needed to write the encoded file.

Proposed system

We propose a cryptographic encryption and decryption method called Color coded cryptography uses the color and Huffman compression techniques to compress the data. This is a symmetrical system which is implemented by encryption of text by converting it into colors. Each character of the message is encrypted into a blocks of color. The inverse process is used to produce the original text from colors at the receiver side. Advantages of proposed System

Each character in the plaintext is substituted with a color block from the available 18 Decillions of colors in the world and at the receiving end the cipher text block (in color) is decrypted in to plain text block. It is resistant against problems like Meet in the middle attack, Birthday attack and Brute force attacks. The size of the plain text is also reduced when it is encrypted, in a lossless manner. The space occupied by the cipher text in the buffer is very less; hence transmitting through a channel is very fast which subsequently brings down the transportation cost.

System dsign and working

The problem definition is to propose a system capable of carry out lossless data compression on binary data using encryption and decryption. It also works as a solution to the data protection needs of the user, holding important role in environments where privacy of data is critical thus contributing to information security. The encoding and compressing schemes need to be computationally and functionally efficient and must look up to provide an optimal solution to the above mentioned problems. The system must be proficient of taking input in the form of text files whose binary representation is processed and thereby encrypted in a color image.

One of the suitable compression method for data compression which is known as Huffman encoding is used on the encrypted data to ensure a proper adjustment between the tasks performed and space complexity issues involved. The design should attain the best promising compression ratio, with the limited resources of a present day computers. As a result, there are firm constraints on the memory usage and the compression speed of the design. The system presently aims to work with text file in standard ASCII based format.

The system performs on two sides: On the Sender side, this technique compresses the file using Huffman encoding and then encodes the binary file data into a color code encrypted JPEG image file. While On the Receiver side, it does the reverse i.e. decrypts the image and then decompresses it, bringing back the binary text file. Sender Side-Encryption Process Image Color Coded Encoder Huffman Compressor Text Message Vector Fig. 1 Fig. 1 shows the block diagram of the Encryption system on the Sender side.

Given a stored text file that is to be encrypted and compressed, the system first converts the file into its binary representation. This is then given to the Huffman Compressor which performs compression on the binary data by transforming into a vector. The vector is next given as input to the encryption process, which then takes in the numeric vector data and transforms it into a color coded JPEG image. The encrypted image has a series of colored blocks.

The process of color assignment is predecided and is done by grouping three bits of the binary data stream together at a time, thus giving a possibility of 8 colors in all. Receiver Side- Decryption Process Text Huffman Decompressor Color Coded Decoder Image Vector Fig. 2 At the receiving end, the system takes the encrypted image as input, which it accesses for restoration.

The system checks the color of the various blocks iteratively and then takes a mean of the values for getting a practical perspective of the color of the particular block. Using this process of decryption, it recreates the vector data. The vectored data is next given to the Huffman Decompressor, which converts the data back to the original binary representation as it was given in the input. The binary file is translated back to the original ASCII text file, thus restoring the text file and completing the lossless decompression on the receiver side


The system presents encryption and decryption of text files. The use of Huffman Compressor and Decompressor scheme for data compression helps in dealing with the complexities of space. The proposed system works on two sides: On the Sender side, this technique is responsible for generating JPEG image from an ASCII text file; it does this by first compressing the file using Huffman Compressor. The vector generated by the compression is then encoded into a color code encrypted JPEG image file. On the Receiver side, it does the reverse i.e. decrypts the image which gives back the encoded vector and then decompresses it using Huffman Decompressor, bringing back the ASCII text file.

Get a custom paper now from our expert writers.

The key advantage of the proposed system is data security. Depending on the availability of time and resources, we hope to work on the future improvements for this system. With the help of a decent printer and high calibrated scanner, this system can be extended to incorporate a hard copy version of the encrypted information which can be scanned at the receiver’s end using a high-end scanner. Further work to be extend for the use of the system on other formats of files such as audio, video media and image files.

Image of Alex Wood
This essay was reviewed by
Alex Wood

Cite this Essay

Study of Color Coding Cryptography. (2018, September 15). GradesFixer. Retrieved February 26, 2024, from
“Study of Color Coding Cryptography.” GradesFixer, 15 Sept. 2018,
Study of Color Coding Cryptography. [online]. Available at: <> [Accessed 26 Feb. 2024].
Study of Color Coding Cryptography [Internet]. GradesFixer. 2018 Sept 15 [cited 2024 Feb 26]. Available from:
Keep in mind: This sample was shared by another student.
  • 450+ experts on 30 subjects ready to help
  • Custom essay delivered in as few as 3 hours
Write my essay

Still can’t find what you need?

Browse our vast selection of original essay samples, each expertly formatted and styled


Where do you want us to send this sample?

    By clicking “Continue”, you agree to our terms of service and privacy policy.


    Be careful. This essay is not unique

    This essay was donated by a student and is likely to have been used and submitted before

    Download this Sample

    Free samples may contain mistakes and not unique parts


    Sorry, we could not paraphrase this essay. Our professional writers can rewrite it and get you a unique paper.



    Please check your inbox.

    We can write you a custom essay that will follow your exact instructions and meet the deadlines. Let's fix your grades together!


    Get Your
    Personalized Essay in 3 Hours or Less!

    We can help you get a better grade and deliver your task on time!
    • Instructions Followed To The Letter
    • Deadlines Met At Every Stage
    • Unique And Plagiarism Free
    Order your paper now