11-Speech Encryption and Decryption
11-Speech Encryption and Decryption
Presented by :
Contact us at:
[email protected]
[email protected]
Digital signal is a numerical representation of the analog signal. It may be easier and more cost
effective to process these signals in the digital world. One of the main advantages of digital signal
is that it can be stored and manipulated easily. To do this several processes are in use. Of these,
Digital Signal Processor plays a leading role.This is used in various applications like
instrumentation & measurement, communications , audio & video processing ,graphics , image
The objective is to encrypt the speech signal. That is to convert the speech signal into an unknown
form and then the scrambled speech signal is transmitted. The person who know, how the speech signal is
encrypted can decrypt (i.e.,converting the scrambled speech signal into original signal) the signal. Thus security of
For encryption and decryption of the signal, we develop a software program in assembly language
programming techniques of ADSP 2181. In this paper, encryption and decryption of the speech
1. INTRODUCTION
4. ADVANTAGES
6. CONCLUSION
7. REFERENCES
INTRODUCTION
In recent trends, cell phone, voice chat, etc., is the main topic of the communication. But it is not
possible to speak secretly through them. Our objective is to speak secretly, i.e., to maintain security of
certain important information. So for that we are going for a technology using digital signal processor.
Our paper also deals with storing and retrieval of speech signal using digital signal processor. We
have used ADSP processor 2181. This is 16 bit fixed point processor.
Here the voice signals is acquired and then digitally coded and stored in the memory of
processor. Using FFT (Fast Fourier Transform) and IFFT (Inverse Fast Fourier Transform) techniques,
speech signal is scrambled. Then it is decoded to obtain the same speech signal and now the original
speech is confused. Then it is transmitted using transmitter. The coding and decoding is done with
CODEC.
In the receiver side, if the receiver knows how the speech signal is scrambled, then the receiver would
descramble the scrambled signal and get the original speech signal. The programming is done on the
In general signal carries information, and the objective of signal processing is to extract this information.
Signal processing is the method of extracting information from the signal. Thus signal processing is
concerned with representing in mathematical terms and extracting the information by carrying out
Analog signal are real world signals that you and I experience everyday- sound, light, temperature,
pressure. A digital signal is a numerical representation of the analog signal. We can convert the analog
signal into digital signal through our analog to digital conversion process, process the signals, and if
needed, bring the signal back out to analog world through the digital to analog converter.
The basic explanation of DSP is the processing of signal by digital systems, to improve the signal. The
improvement may be clearer sound, sharper images, or faster data. The digital systems are software and
a software program.
RS 232 UART
From PC
MIC
CLOCK ADSP-2181 CODEC
24.576Mhz speaker
A digital signal processor is a type of microprocessor that is incredibly fast and powerful. They are
microprocessors, such as the Pentium, primarily directed at data manipulation. Similarly, DSPs are
A DSP is unique because it processes data in real time. To start we need to distinguish between offline
In this processing, the entire input signal resides in the computer at the time of
manipulation, for example, in medical imaging such as tomography, the data is acquired while the
patient is inside the machine, but the image reconstruction may be delayed until a later time. The key
Signal is produced at the same time that the input signal is being acquired. This real time
capability makes the DSP perfect for applications that cannot tolerate any delays. For example, did you
ever talk on a cell phone where two people couldn’t talk at once? You had to wait until the other person
finished talking. If you both spoke simultaneously, the signal will be cut. You couldn’t hear the other
person. With today’s digital cell phones, which use DSP, you can talk normally. The DSP processors
inside cell phones process sounds so rapidly you hear them as quickly as you can speak in real time.
Flexibility
Reliability
CIRCULAR BUFFER :
To calculate the output sample, we must have access to a certain number of the most recent samples
from the input. Let a0,a1,…,a7 be the value of the 8 most recent samples from the input signal. These 8
samples must be stored in memory and x[n],x[n-1],…,x[n-7] continually updated as new samples are
acquired.
ADDRESS VALUES
20041 - X [N-3]
0.225768
20042 - X [N-2]
0.210768
20043 - X [N-1]
0.105768
20044 - X [N]
0.225108
20045 - X [N-7]
0.225768
20046 - X [N-6]
0.235768
20047 - X [N-5]
Circular buffers are used to
0.224568
store the most recent values of 20048 - X [N-4]
The fig shows how an eight sample circular buffer might appear at some instant of time.
Figure illustrates an eight sample circular buffer. Consider that we have placed this circular buffer in
eight consecutive memory locations, 20041 to 20048. Fig shows how the eight samples from the input
The idea of circular buffering is that the end of this linear array is connected to its beginning; memory
location 20041 is viewed as being next to 20048, just as 20044 is next to 20045. You keep track of the
array by a pointer (a variable whose value is an address) that indicates where the most recent sample
resides. For instance in the fig the pointer contains the address 20044, while it contains 20045 after the
arrival of next sample. When a new sample is acquired, it replaces the oldest sample in the array, and the
There must be a pointer that indicates the start of the circular buffer in memory (in
There must be a pointer indicating the end of the array (e.g. 20048) or a variable
The step size of the memory addressing must be one. Example: address 20043
contains one sample; address 20044 contains the next sample and so on.
The above three values define the size and configuration of the circular buffer, and will not change
The pointer to the most recent sample must be modified as each new sample is
acquired.
In other words, there must be program logic that controls how this fourth value is updated based on the
value of the first three values. While this logic is quite simple, it must be very fast. This is the whole
point of this discussion; DSPs must be optimized at managing circular buffers to achieve the highest
SPEECH ENCRYPTION :
BLING
SPEECH DECRYPTION :
DESCRA-
ADC FFT IFFT DAC
MBLING
The Discrete Fourier Transform (DFT) of a discrete time signal x(n) is a finite duration discrete
frequency sequence. DFT is obtained by sampling one period of the Fourier Transform X (ω ) of the
digital system. Hence we go for DFT, which converts continuous function of ω into a discrete one,
analysis.
It is an algorithm for computing DFT with reduced number of calculations. The computational
efficiency is achieved by a divide and conquer approach, which is based on the decomposition of N-
point DFT into successively smaller DFT’s. In an N-point sequence if N=rm , then the sequence can be
decimated into r-point sequences. Here ‘r’ is called the radix. If r=2 it is called radix-2 FFT. The
decimation can be done in two ways namely Decimation In Time (DIT) and Decimation In Frequency
The IDFT of the sequence is computed using the IFFT. The FFT serves the evaluation of both direct
Scrambling means make confusion. After doing FFT in assembly language program in
ADSP-2181, the signal is converted into spikes and it is in frequency domain. The signal spikes are
stored in the memory. Using the circular buffers, the spikes positions are interchanged. Now the original
signal is scrambled. This is called scrambling. Again if the spikes are placed into its original position,
then we get original signal. This is called descrambling and is also done with the use of circular buffer.
GRAPHICAL REPRESENTATION:
START
FFT
Scrambling and
descrambling
IFFT
Output to
CODEC
Return
ALGORITHM :
ENCRYPTION :
1) First the speech signal (analog signal) is converted into digital signal by passing
through the CODEC. Now the signal is in time domain and it is sent to the ADSP
2181 processor.
2) By running 128-point FFT algorithm using computer (system is connected to the
processor) on ADSP 2181, the signal which is in time domain is converted into
frequency domain. Now the signal is sampled into 128 samples and it is stored in
displaced into next 64 samples position and vice versa. This is called scrambling.
4) Now the original signal is scrambled and by doing IFFT algorithm on ADSP
2181, the scrambled signal, which is in frequency domain, is converted into time
domain.
5)By CODEC scrambled signal which is a digital signal is converted into analog signal and then it is
transmitted.
DECRYPTION :
Received signal (scrambled signal) is converted into digital signal by CODEC and it is sent to the
processor.
1) By 128-point FFT algorithm, the signal in time domain is converted into frequency
2) By doing assembly language program on ADSP 2181, the displaced 64 samples are
3) Now the scrambled signal is descrambled and we get the original signal.
4) By doing IFFT, the original signal, which is in frequency domain, is converted into time
The assembly language program was executed for the speech signal and the output
We have stored the speech signal in the memory in encoded form. We decode the
same to get the analog output. For coding and decoding, CODEC is used.
CONCLUSION :
We can use this technique in military for sending secret messages. We can use this
technique wherever we want security. What we have done is storing the speech signal for a period of few
milli seconds. This can be increased if we extend the memory size and select that through a decoding
switch.
REFERENCES :
WEBSITES:
www.analogdevice.com
www.DSPguide.com