Академический Документы
Профессиональный Документы
Культура Документы
Raspberry Pi Technology
Ms. Sejal V. Gawande*, Dr. Prashant R. Deshmukh
*Student, Computer Science and Engineering, Sipna C.O.E.T., Amravati, Maharashtra, India
Abstract: Now-a-days, computer is not only a luxury
but also a necessity for every person in todays world.
Raspberry pi is a credit-card sized computer aimed at
providing a computer to every person in the world.
Raspberry Pi is intended to provide a base on which
kids can learn programming while enthusiasts can do
different types of commercial programming. It serves
as an efficient base due to its low cost and the number
of interfaces available. The Raspberry Pi can be used
instead of a personal computer, but with some
limitations due to its limited processing power. In this
paper we will learn about the basics, hardware and its
implementation of RC4 algorithm using two raspberry
pi boards to enable UART communication.
Index Terms: Raspberry pi, credit-card sized, RC4
algorithm, UART communication
I. INTRODUCTION
Gawande et al., International Journal of Advanced Research in Computer Science and Software Engineering 5 (4),
April- 2015, pp.37-40
prototype version of the computer was mounted in a
message. When it is received at the right computer
package the same size as a USB memory stick. It had a
using decryption coding the pseudo random sequence is
USB port on one end and an HDMI port on the other.
converted into plain text using the symmetric key. In
[7]
this way UART communication occurs using raspberry
pi technology.
IV. HARDWARE
A] Working of the RC4 Algorithm:
RC4 is a stream cipher designed in 1987 by Ron Rivest
for RSA Security. It is a variable key size stream cipher
with byte-oriented operations. The algorithm is based
on the use of a random permutation. [8]
The RC4 algorithm is simple and quite easy to explain.
The keystream is generated from a variable length key
using an internal state composed of the following
Fig. 2:- Internal hardware of Raspberry Pi
elements:
In the above block diagram for model A, B, A+, B+;
A 256 bytes array S containing a permutation
model A and A+ have the lowest two blocks and the
of these 256 bytes.
rightmost block missing (note that these three blocks
Two indexes i and j, used to point elements in
are in a chip that actually contains a three-port USB
the S array.
hub, with a USB Ethernet adapter connected to one of
Once
the
S array has been initialized, the next step does
its ports). In model A and A+ the USB port is connected
the shuffling of array using the key to make it a
directly to the SoC. On model B+ the chip contains a
permutation array. This permutation array is generated
five point hub, with four USB ports fed out, instead of
using key scheduling algorithm. To do so, we iterate
the two on model B. [7]
256 times the following actions after initializing i and j
to 0. Once i has reached 256, the S array is initialized
V. IMPLEMENTATION OF RASPBERRY PI
and shuffled with the key-scheduling algorithm, then it
TECHNOLOGY
is modified in the pseudo-random generation algorithm
to generate the keystream. The initializing of the S table
with the identity permutation: the values in the array are
equal to their index.
compute j = j + S[i] + key[i mod keylength]
swap S[i] and S[j]
increment i
Here is pseudo-code corresponding to the keyscheduling algorithm:
Fig. 3: Implementation of RC4 algorithm between two
for i from 0 to 255
Raspberry Pi boards.
S[i] := i
We implement RC4 algorithm using two raspberry pi
endfor
boards enabling UART communication. So according to
j := 0
RC4 algorithm left board will be used for encryption
for i from 0 to 255
and the right board will be used as decryption. First we
j := (j + S[i] + key[i mod keylength])
need to send encrypted message from the left raspberry
mod 256
pi board and the right raspberry pi board will ask for the
swap values of S[i] and S[j]
symmetric key to decrypt the message. So we need to
endfor
enable the UART communication. So in the above
Now that the S array is generated, it is used in the next
figure we can see that red wire is used to transmit for
step to generate the keystream.
left board to right board and white wire is connected to
To do so, we first initialize the two indexes to 0 and we
left board to receive from right board and black wire is
then start the generation of the keystream one byte at a
used for ground. The boards are connected to two
time until we reached the size of the message to
laptops using Navy Blue colour USB cables. The left
encrypt. For each new byte to compute we do the
computer consist of encrypting and sending message
following actions:
code and the right computer consist of decrypting and
Compute new value of i and j:
receiving message code. According to RC4 algorithm,
i := (i + 1) % 256
the c code converts the plaintext into cipher text using a
j := (j + S[i]) % 256
symmetric key given by user. This generates pseudo
Swap S[i] and S[j] to have a dynamic state
random sequence of the cipher text when sending the
2015, IJARCSSE All Rights Reserved
Page | 38
Gawande et al., International Journal of Advanced Research in Computer Science and Software Engineering 5 (4),
April- 2015, pp.37-40
The following figure shows the working of RC4
Retrieve the next byte of the keystream from
algorithm:
the S array at the index
S[i]+S[j]% 256
Here is pseudo-code corresponding to the pseudorandom generation algorithm:
i := 0
j := 0
while GeneratingOutput:
i := (i + 1) mod 256
j := (j + S[i]) mod 256
swap values of S[i] and S[j]
K := S[(S[i] + S[j]) mod 256]
output K
endwhile
This array helps to generate a pseudo-random
keystream. It is called pseudo random because it
generates a sequence of numbers that only approximates
the properties of random numbers.
The steps of algorithm are as follows:
1. The key stream is generated from a variable sized
length called as an array.
2. The key scheduling algorithm is used to generate
permutation array using the key length.
3. This array is then shuffled with permutation array
to generate a sequence of bits.
4. This sequence of bits is generated by pseudo
random generator called as pseudo random
number.
5. The pseudo random numbers are XORed with the
plaintext to generate ciphertext.
6. The reverser process happens on decryption end
and the plaintext is generated from the
ciphertext.[9,10]
VII. ADVANTAGES
IX. CONCLUSION
This paper gives us the detail knowledge about
raspberry pi technology. Also that raspberry pi is an
innovative product which is available in market at a low
cost. Due to its credit-card sized single board, it is very
easy to handle. This device is really helpful to anyone
who wants to learn electronics and computers.
Raspberry pi helps to increase hardware knowledge and
software applications related to it. Raspberry pi is an
Page | 39
Gawande et al., International Journal of Advanced Research in Computer Science and Software Engineering 5 (4),
April- 2015, pp.37-40
amazing piece of hardware because of the combination
of the features of a traditional computer and an
[7] Working of RC4 Algorithm [Online]. Available:
embedded device. Here we have implemented the RC4
http://securityblog.redhat.com/category/
algorithm using two raspberry pi boards to create the
Cryptography/page/3/
communication between the two computers. Use of
RC4 algorithm has enhanced the working between these
[8] Rick Wash Stream Ciphers and RC4, lecture notes
computers.
of Computer Science, Working paper. September 2001
REFERENCES
[1]
Raspberry
pi.
[Online].
http://www.raspberrypi.org/
Available:
[9]
Applications
[Online].
http://www.slideshare.net/nipunmaster/areport-on-raspberry-pi
Available:
seminar-
Page | 40