Internationals Journal of Emerging Technology and Advanced Engineering
Website: www.ijetae.com (ISSN 2250-2459, Volume 2, Issue 8, August 2012)
492
Porting Android to Arm for Wireless Data Encryption and
Decryption
Arunkumar G 1, Pramila B 2, Hanumanth Raju R.K3, Harish H.M4 1
Department of E&C, S.T.J.I.T, Ranebennur
2
Department of E&C, EWIT, Bangalore
3
Department of E&C, CIT, Gubbi
4
Department of E&C, GEC, Haveri
Abstract-This paper presents the design and development of wireless encryption and decryption system using android operating system which is ported to the TI's Beagle Board-xM. Beagle Board-xM has DM3730 chip which internally containing ARM Cortex-A8 processor. By using keypad, the user can compose a text and submit the message using GSM modem. The application written in java will encrypt the message and sent through the GSM modem. At the receiver end GSM modem will receive the data and the microcontroller (LPC2148) will decrypt the message and will be displayed on the LCD. At any case if a third person or hacker tries to get a message, they cannot know or understand the message and cannot encrypt the data. In this way secured communication using GSM between intended users in real time is established.
Keywords-OS, BeagleBoard-XM, DM3730, GSM, LCD.
I. INTRODUCTION
Encryption is the most effective way to achieve data security. The process of Encryption hides the contents of a message in a way that the original information is recovered only through a decryption process. The purpose of Encryption is to prevent unauthorized parties from viewing or modifying the data. Encryption occurs when the data is passed through some substitute technique, shifting technique, table references or mathematical operations. All those processes generate a different form of that data. The unencrypted data is referred to as the plaintext and the encrypted data as the cipher text, which is representation of the original data in a difference form. The project main responsibility is to encrypt and decrypt the message without risking data.
Key-based algorithms use an Encryption key to encrypt the message. There are two general categories for key-based Encryption: Symmetric Encryption which uses a single key to encrypt and decrypt the message and Asymmetric Encryption which uses two different keys – a public key to encrypt the message, and a private key to decrypt it.
Currently, there are several types of key based Encryption algorithms such as: DES, RSA, PGP, Elliptic curve, and others but all of these algorithms depend on high mathematical manipulations.
One simple and good way to encrypt data is through rotation of bits or sometimes called bit shifting. But, rotation of bits is more advanced than simple bit shifting. In rotation of bits operation, the bits are moved, or shifted, to the left orto the right.
II.PREVIOUS WORK
Memory footprint is considered as an important design issue for embedded systems. Sharing dynamically compiled code among virtual machines can reduce memory footprint and recompilation overhead. On the other hand, sharing writable native code may cause security problems, due to support of native function call such as Java Native Interface (JNI). They proposed a native-code sharing mechanism that ensures the security for Dalvik virtual machine (VM) on the Android platform. Dynamically generated code is saved in a file and is shared with memory mapping when other VMs need the same code. Protection is granted by controlling of file writing permissions. To improve the security, an implementation in a daemon process, named Query Agent, to control all accesses to the native code and maintain all the information of traces, which are the units of the compilation in the Dalvik VM [1].
Internationals Journal of Emerging Technology and Advanced Engineering
Website: www.ijetae.com (ISSN 2250-2459, Volume 2, Issue 8, August 2012)
493 Our evaluation shows that the collection techniques incur low overhead. Encryption overhead in recording is less than 26 milliseconds [2].
In order to improve the security of the private information in memorizer, an encryption algorithm, which inherits the advantages of chaotic encryption, stream cipher and AES algorithm, is proposed in the paper.
They designed and realized an encryption system based on the algorithm on ARM (S3C6410), which can encrypt and decrypt the information in many kinds of memorizers, such as Universal Serial BUS (USB) Disk, Secure Digital (SD) card and mobile Hard Disk Drives (HDD). The system that uses Human-Computer Interaction and Visualization technology provides several encryption algorithms and key generators. Some analysis results are presented to show its high security at the end of the paper [3].
[image:2.612.47.281.345.694.2]Block Diagram A. Transmitter
Figure 1. A Encryption System
B. Receiver
Figure 1.b: Decryption System
Fig 1 shows the block diagram of encryption system consisting of following main sections.
BeagleBoard-XM
The BeagleBoard is a low-power open source hardware single-board computer produced by Texas Instruments.
Signal Conditioning Unit:
The signal conditioning unit accepts input signals from the analog sensors and gives a conditioned output of 0-5V DC corresponding to the entire range of each parameter. This unit also accepts the digital sensor inputs and gives outputs in 10 bit binary with a positive logic level of +5V.
GSM modem
The GSM modem delivers all the power of instant wireless connectivity to multiple applications.
Fig 2 shows the block diagram of decryption system consisting of following main sections.
LPC2148
The LPC2148 microcontroller is based on a 32/16 bit ARM7TDMI-S CPU with real-time emulation and embedded trace support, that combines the microcontroller with embedded high speed flash memory ranging from 32 kB to 512 kB. A 128-bit wide memory interface and unique accelerator architecture enable 32-bit code execution at the maximum clock rate.
LCD (HD44780)
The HD44780U dot-matrix liquid crystal display controller and driver LSI displays alphanumeric,characters, and symbols. It can be configured to drive a dot-matrix liquid crystal display under the control of a 4- or 8-bit microprocessor. Since all the functions such as display RAM, character generator, and liquid crystal driver, required for driving a dot-matrix liquid crystal display are internally provided on one chip, a minimal system can be interfaced with this controller/driver. A single HD44780U can display up to one 8-character line or two 8-character lines.
Android is a software stack for mobile devices that includes an operating system, middleware and key applications. Android stack uses Linux-2.6 kernel. Since this project is Porting Android on ARM (Beagleboard), the linux-2.6 kernel added a full support for Beagle board and its peripherals and android specific subsystems.
Hardware requirement Beagle Board.
Null Modem Serial Cable.
S-video cable.
Mini-B to USB cable.
SD/MMC card.
SD/MMC card Reader.
Monitor with S-video support. (Or TV tuner card with S-video support)
GSM MODE M
LPC2148 (ARM-7)
LCD (HD 4478 0)
P
O
R
T
1
U
AR
T
1
BEAGLEBOARD-xM (ARM A8-CORTEX)
DVI MONITOR
KEYBOARD
GSM MODEM (SIM300)
U
AR
T
Internationals Journal of Emerging Technology and Advanced Engineering
Website: www.ijetae.com (ISSN 2250-2459, Volume 2, Issue 8, August 2012)
494
Software requirement
Linux kernel 2.6.22.18-TIomap3 (2.6_kernel_revb-v2.tar.gz-Beagle board based).
Android Patch – Patching above kernel to get android specific supports.
Linux File System – ramdisk image.
Android file system. Extracted from emulator discussed below.
Arm Tool chain – cross compiler (arm-2007q3-51-arm-none-linux-gnueabi-i686 pc-linux-gnu.tar.bz2).
Script file to start android services.
Setup
Figure 2: Cross development platform setup
A. Make sure Beagle power is in OFF state by removing the 5V supply and the USB host connection.
B. Connect the IDC UART cable the Beagle Board and using a Null- Modem serial cable connect it to a UART port on a Linux machine.
C. Have terminal program, such as Minicom running on the host machine.
D. Configure the terminal program for (BAUD RATE - 115200, DATA- 8 bit, PARITY- none, STOP - 1bit, FLOW CONTROL – none).
E. Insert the MMC/SD card (that is prepared as described above) into MMC/SD slot on Beagle Board.
F. Connect a TV (NTSC-M) to S-video port. Power ON TV.
G. Make three partitions over the SD card. One should be VFAT file system while other two with EXT2 file system.
H. mmcblk0p1 – first partition – file system vfat – keep uImage
I. mmcblk0p2 – second partition – file system ext2 – keep linux with android file system
J. mmcblk0p3 – third partition – file system ext2 – keep android file system
K. Building Kernel Image
Configure Linux-2.6 kernel with full beagleboard and android support.
make ARCH=arm ROSS_COMPILE=$(Path of tool chain)/bin/arm-eabi- menuconfig
Compile kernel by following command.
make ARCH=arm ROSS_COMPILE=$(Path of tool chain)/bin/arm-eabi- uImage
Copy uImage from
Linux-kernel/arch/arch/boot folder to SD/MMC card with the following command to vfat partition,
mount /dev/sdxx /mnt.
cp arch/arm/boot/uImage /mnt.umount /mnt
L. Building Android Filesystem
Extract the data.tar system.tar ramdisk.img with following commands which forms Android filesystem.
Download android SDK android-sdk-linux_x86-1.0_r1.zip and setup the path in
/root/.bash_profile
Steps for extracting system and data from emulator
Start the google android emulator
Upload a busybox tool to the google android emulator, we can find a busybox binary on benno's website: busybox for android, you can also find the cross compiler (select ARM GNU/Linux, and IA32 GNU/Linux) and create a busybox tool
To upload files to the google android emulator, run the following command:
# adb push filename /target_folder/filename
(the target_folder is the folder on the file system of google android emulator. e.g. /system/bin/)
Put the busybox to /system/bin, so we can see busybox tool in the extracted file system. Open a google android shell command
window:
# adb shell
Change the busybox mode to 555:
# chmod 555 /system/bin/busybox
Create the tarball for /system and /data:
# busybox tar cvf /system.tar /system
Internationals Journal of Emerging Technology and Advanced Engineering
Website: www.ijetae.com (ISSN 2250-2459, Volume 2, Issue 8, August 2012)
495 Pull the tarball file from the google android
emulator:
# adb pull system.tar /system.tar # adb pull data.tar /data.tar
M. Get the ramdisk.img from
SDK_PATH/tools/lib/images/ramdisk.img. Steps for extracting ramdisk.img
cp ramdisk.img ramdisk.gz
gunzip ramdisk.gz
cd target_fs
cpio -iv < ../ramdisk
N. After this Android file system is ready. Which means it should have directories : system and data O. Building Linux filesystem (rd-ext2-8M.bin)with
Android filesystem
gunzip -d < rd-ext2-8M.bin > ramdisk
mkdir linux-fs
mount -o loop ramdisk linux-fs/
cd linux-fs/
mkdir android – keep android file system extracted as per above, in this android directory.
copy linux file system with Android support to mmcblkp2 of sd card.
mount /dev/sdx2 /mnt cp -av linux-fs/* /mnt/ umount /mnt
Encryption and Decryption
Encryption system is designed by using Eclipse IDE (Integrated Development Environment) software.
1. Download androidtutorial-1.0.zip
2. Install the Android SDK and the ADT plugin for Eclipse.
3. In Eclipse, create a new Workspace and set its default Java Compiler compliance level to 1.5. 4. Import the projects: File > Import > General >
Existing Projects into Workspace, and point to the android tutorial directory.
[image:4.612.337.549.151.371.2]Run project using the Android emulator
Fig 3 Shows flow chart of Encryption
For decrypting message at the receiver end, code is written in embedded C and this code is dumped to LPC2148 (ARM7-TDMI) board by using flash utility software. By using keil software code is written and compiled.
Fig 4 shows dumping code to LPC2148 Start
Applicati on
Message Encryptio n Module
Process message via ASCII code
encryption technique Message
Phone numbe
r
Send encrypted
[image:4.612.344.535.449.575.2]Internationals Journal of Emerging Technology and Advanced Engineering
Website: www.ijetae.com (ISSN 2250-2459, Volume 2, Issue 8, August 2012)
496
Implementation and Testing Modules of the project
The project consists of modules listed below Transmitter
Porting android to Beagleboard-xM
Designing the application for message encryption and installing the application onto the Beagleboard-xM
Receiver
Interfacing LPC2148 to LCD and GSM module Dumping the code to LPC2148 by using FLASH software to decrypt the message
Testing
The purpose of testing is to discover errors. Testing is the process of trying to discover every conceivable fault or weakness in a product. It provides a way to check the functionality of components, sub assemblies, assemblies and/or a finished product. It is the process of exercising software with the intent of ensuring that the software system meets its requirements and user expectations and does not fail in an unacceptable manner. There are various types of test. Each test type addresses a specific testing requirement.
System Test
System testing ensures that the entire integrated software meets requirements. It tests a configuration to ensure known and predictable results. System testing is based on process descriptions and flows, emphasizing pre-driven process links and integration points.
Performance Test
The performance test ensures that the output be produced within the time limits and the time taken by the system for compiling, giving response to the users.
Result
[image:5.612.364.527.134.273.2]An application is generated by using eclipse IDE software and installed on android OS. Following figures shows the encryption.
Fig 5 shows Starting of the application.
[image:5.612.363.527.272.604.2]Fig 6 shows Composing Text
Internationals Journal of Emerging Technology and Advanced Engineering
Website: www.ijetae.com (ISSN 2250-2459, Volume 2, Issue 8, August 2012)
497 III. CONCLUSION
This paper explains the design and development of wireless encryption and decryption system using Android operating system Here we have ported android to Beagleboard then an application is generated by using Eclipse IDE software for encrypting the message by using JAVA code. For decrypting the message i written code in embedded C then dumped this code to LPC2148 by using flash utility software. In this paper am using the GSM technology along with the ARM ported with the android system as this can make the whole process much faster and secured communication is also established in the system.
REFERENCES
[1 ] Yuanlong Wang, “An embedded wireless transmission system based on the extended user datagram protocol (EUDP)”IEEE Trans onFuture Computer and Communication (ICFCC), On page(s):690-693, may.2010.
[2 ] Zheng Qiao,” Embedded short-range wireless data communication protocols design” IEEE Trans onApperceiving Computing and Intelligence Analysis On Page(s):399 – 402, Oct. 2009.
[3 ] Kumar.S, “Location based services using android (LBSOID)” IEEE Trans on Internet Multimedia Services Architecture and Applications (IMSAA), On Page(s): 1 - 5, Dec. 2009.
[4 ] Liang Wei “A New Embedded Encryption Algorithm for Wireless Sensor Networks” IEEE Trans on Information Technology and Applications, On Page(s): 119 – 122, May 2009.
[5 ] Adolfo Rodriguez and John Gatrell, TCP/IP Tutorial and Technical Overview (IBM, August 2001).
[6 ] Douglas E.Comer, Internetworking with TCP/IP Volume I, fourth edition, Pearson Education Asia.
[7 ] J.Breckling, Ed., The Analysis of Directional Time Series: Applications to Wind Speed and Direction, ser. Lecture Notes in Statistics. Berlin, Germany: Springer, 1989, vol. 61.
[8 ] Alberto Leon Garcia, Communication Networks Fundamental Concepts and Key Architectures, Tata McGraw-Hill Edition 2000. [9 ] Andrew S.Tanenbaum, Computer Network, Third Edition, Pearson
Education Asia.
[10 ]An Embedded Web Server for Equipments, Tao Lin Hai Zhao Jiyong Wang Guangjie Han Jindong Wang, COMPUTER SOCIETY, IEEE2004.