You are on page 1of 22

# SECURED WIRELESS DATA COMMUNICATION USING CRYPTOGRAPHY

INTRODUCTION:


Data communication is the conveyance of any kind of information from one space to another. Although the computers can be interconnected through a traditional cables, the cost of installing such cables is very high. Also, the use of cables requires their maintenance to protect them from unintentional breaks and loss of signal transfer.

Data communication is established between two PCs using Radio Frequency (RF) wireless technology. y The wireless communication is secured in the sense that the data to be transmitted is encrypted using an encryption algorithm.
y

Cryptography
y

Cryptography is a tool that can be used to keep information confidential and to ensure its integrity and authenticity. All modern cryptographic systems are based on Kerckhoff's principle of having a publicly-known algorithm and a secret key. Many cryptographic algorithms use complex transformations involving substitutions and permutations to transform the plaintext into the ciphertext

Cryptography involves the process of encryption and decryption. y It is carried out using algorithms y Cryptographic algorithms are of two types: Symmetric (private) Asymmetric (public)
y

## Symmetric Cryptographic Algorithm

y y y

In this algorithm same secret key is used to encrypt and decrypt information. A secret key can be a number, a word or just a string of random letters. The disadvantage of this algorithm is that if the secret key is discovered all messages can be decrypted. There are two types of symmetric algorithms Stream Algorithms Block Algorithms

Stream ciphers:
y

This operates on the basis of a time varying information applied to individual bits of plain text. These are better suited for secure transmission of data over error prone communication . In this the plain text is divided into large blocks consisting of fixed number of bits. Succesive blocks of plain text are encrypted using the same secret key.

Block ciphers:

Asymmetric Encryption

BLOCK DIAGRAM

Operation
Initially the sender one who wants to send the information sends the data using serial port of PC. y Then the data is given to microcontroller using RS 232 cable, and later is given to MAX 232 for level conversion. y Microcontroller performs the task of encryption at transmitter side and sends the encrypted data through i/o port to RF-transmitter
y

Here the algorithm used for encryption and decryption is RC4. y RC4 is a stream cipher, symmetric key algorithm. y This algorithm produces a stream of pseudo-random values. The input stream is XORed with these values, bit by bit.
y

## The steps for RC4 encryption algorithm is as follows:

Get the data to be encrypted and the selected key. y Create two string arrays.
y y

Initiate one array with numbers from 0 to 255. Fill the other array with the selected key.

Fill the other array with the selected key. y Randomize the first array depending on the array of the key. y Randomize the first array within itself to generate the final key stream. y XOR the final key stream with the data to be encrypted to give cipher text.
y

Then at receiver side the data encrypted is given to RF-receiver then that gives the data to microcontroller through i/o port. y There microcontroller decrypts the data and gives that to pc again.
y

Here the RF-transceiver works at the frequency of 433Mhz y This wireless transmission is applicable to 100 feet distance only y This uses ASK modulation process for RF transmission
y

## PIC Microcontroller Core Features:

y y y y y y y y y y y y y y

High-performance RISC CPU Only 35 single word instructions to learn All single cycle instructions except for program branches which are two cycle Operating speed: DC - 20 MHz clock input DC - 200 ns instruction cycle Up to 8K x 14 words of FLASH Program Memory, Up to 368 x 8 bytes of Data Memory (RAM) Up to 256 x 8 bytes of EEPROM data memory Pinout compatible to the PIC16C73B/74B/76/77 Interrupt capability (up to 14 sources) Eight level deep hardware stack Direct, indirect and relative addressing modes Power-on Reset (POR) Power-up Timer (PWRT) and Oscillator Start-up Timer (OST) Watchdog Timer (WDT) with its own on-chip RC oscillator for reliable operation

y y y y y y y y y y y y y y y y

Programmable code-protection Power saving SLEEP mode Selectable oscillator options Low-power, high-speed CMOS FLASH/EEPROM technology Fully static design In-Circuit Serial Programming (ICSP) via two pins Single 5V In-Circuit Serial Programming capability In-Circuit Debugging via two pins Processor read/write access to program memory Wide operating voltage range: 2.0V to 5.5V High Sink/Source Current: 25 mA Commercial and Industrial temperature ranges Low-power consumption: < 2 mA typical @ 5V, 4 MHz 20 mA typical @ 3V, 32 kHz < 1 mA typical standby current

Peripheral Features
y y y y y y y y y y y

Timer0: 8-bit timer/counter with 8-bit prescaler Timer1: 6-bit timer/counter with prescaler, can be incremented during sleep via external crystal/clock Timer2: 8-bit timer/counter with 8-bit period register, prescalar and post-scalar Two Capture, Compare, PWM modules Capture is 6-bit, max. resolution is 12.5 ns Compare is 6-bit, max. resolution is 200 ns PWM max. resolution is 10-bit 10-bit multi-channel Analog-to-Digital converter Synchronous Serial Port (SSP) with SPI (Master Mode) and I2C (Master/Slave) Universal Synchronous Asynchronous Receiver Transmitter (USART/SCI) with 9-bit address detection Parallel Slave Port (PSP) 8-bits wide, with external RD, WR and CS controls (40/44-pin only)