Ruspbery PI NAs
Ruspbery PI NAs
Ruspbery PI NAs
Information Storage
Abstract. The aim of this paper is to propose a design for a prototype device,
which can further be developed and used to replace existing commercial USB
storage media with a secure data access mechanism that is intended to be used in
a confidential environment, such as defense establishments. The prototype
construction involved configuration of target microcontroller board as a Full
Speed USB 2.0 Mass Storage Class Device and MicroSD Card as storage media
with read/write speeds of 9 Mbps/7 Mbps respectively. Realization of two
independent, non-overlapping critical/non critical storage areas has been
explained. Password based Login procedure to enable critical storage area using
Keypad has been showed. Password Management using 256-bit SHA-2 HASH
function has been explained. Functionality to erase data from critical storage
area in emergency conditions through a hardware erasure switch has been
explained. As a proof of concept, encryption using stream cipher RC4 generated
key stream has been presently implemented to ensure confidentiality of data
being stored. Choice of best suited encryption algorithm for the given purpose is
an independent research on its own, hence, integration of custom encryption
algorithm for enhanced security would be considered for future improvement.
Thus, this in-house designed and developed hardware authentication based
encrypted storage device can be used to manage critical data securely and safely
in confidential work environments.
1 Introduction
2 Related Work
With the advent of computers and information technology, came the problem of
sharing data. USB storage drives are one of the most used and preferred storage
mediums. USB storage drives are designed for the same purpose as floppy disks and
optical disks i.e. for storage, data back-up and transfer of data. They merit against
counter-parts as they are smaller, faster, and more durable and reliable. Floppy disk
drives have been abandoned due to their lower capacity compared to USB flash drives.
In 2010, Sony stopped the production of Floppy Disk. USB mass storage standard is
supported in almost all modern OS natively. First USB drives were sold by Trek
Technology under the brand name Thumb Drive and IBM’s “DiskOnKey” manufac-
tured by M-Systems [1].
As the popularity increased the threats also increased. As of 2011, according to the
ESET’s [2] Global Threat Report of 2011, 9 out of 10 of the top ten computer threats
embedded in software files in world spreads through removable storage media such as
USB storage drives.
Also, there have been increased reports of Trojans, virus and spy programs
embedded in hardware., More recent times have seen the emergence of what has been
dubbed by some as the “Silicon Trojan”, these Trojans are embedded at the hardware
level and can be designed directly into chips and devices.
During the early 80s, there was a big focus on secure operating system (OS). Large
investments were made in adapting UNIX to mil-grade security models. The most
famous of the assurance criteria used was the Orange Book. A US Army’s effort to
evaluate a version of UNIX cost rose from an extra US$640 per line of code (loc) has
risen to $1000 per loc. This rising cost and cheap microchips and COTs products from
economies like China makes risk of inclusion of untrusted risky components in the
current infrastructure high. The threat becomes more tangible if the resource of a nation
state which manufactures vast numbers of the products is applied to the task for
espionage purposes. The report recommended efforts to counter Trojans developed in
the design process, and inserted during the manufacture process. This resulted in both a
“Trusted Foundry Program” used for security critical ICs, and a DARPA program to
examine trust in ICs created by untrusted processes. Currently, there is no such pro-
gram in our country. Also, a distributed denial of service kind of attack will be targeted
upon low cost, trailing edge general purpose circuits integrated into a wide range of
systems and peripherals. Physical layer chips like Ethernet PHY chips, USB
310 A. Dhiman et al.
transceivers used in NIC cards, USB storage devices etc. These facts were discussed in
details by Anderson, North and Yiu [3].
One case of silicon embedded backdoor inserted into the Actel/Microsemi ProA-
SIC3 chips which was discovered by differential power analysis (D P A) techniques is
studied by Skorobogatov and Woods [2]. Also many other articles over web discussed
and raised this incident [4–6].
These research and findings motivates us to use trusted components with indige-
nous designs and discourages the use of COTs products wherever viable in confidential
environment.
Even FIPS 140-2 Level 2 Certified encrypted USB Memory Stick tends to be
unreliable since there is no assurance of implementation of correct access authentica-
tion techniques. One such case happened in early 2010 when SySS security experts
found a flaw in authorization procedure of password entry mechanism and almost all
encrypted drives at that time used the same technique. For a successful authentication
event, a fixed string was passed irrespective of password entered on to the encrypted
drive which initiates the process of decrypting the data on disk as requested by OS. So,
Syss security experts wrote a small tool which modified active password entry pro-
gram’s RAM which always made sure that the appropriate string was sent to the drive.
The following drives were said to be effected:- Kingston Data Traveler Black Box, the
SanDisk Cruzer Enterprise FIPS Edition and the Verbatim Corporate Secure FIPS
Edition. This incidence was discussed in many web security articles [7–9].
A whitepaper published by SanDisk suggests that attacks like Brute force attacks,
Cold boot attack, Malicious code, Dependence on OS security are more efficiently
tackled in using Hardware Based Encryption and keeping the Access by Authentication
procedure on Storage Drive only [10].
So, this motivated us to design an in-house designed, developed and authorization
techniques implemented in a proper manner secure portable storage device which
allows hardware encryption.
cipher itself is beyond the scope of this project and shall be taken up as a future scope
of work.
4x3 Matrix
Keypad
USB2.0
SDIO I/O
Host
STM32F407
HOST PC Microcontroller Micro SD
Lock/Unlock LED
An ERASE SWITCH has been provided, which can be used in emergency situa-
tions to erase all data in a single touch. The device is required to be powered up by
connecting to a PC and the user can initiate the emergency erasure by pressing the
emergency erasure switch post authentication.
The controller’s programmable Flash area is written by the random stream gen-
erated through on-board hardware RNG. Then at a pre-defined memory location the
previously generated HASH VALUE is written. Then, at another pre-defined memory
location the Random Salt is written.
When the user enters the password, the Fixed Salt is concatenated before password
and Random Salt is picked up from the pre-defined location to be concatenated before
Fixed Salt. Then, HASH is calculated and compared to the HASH VALUE stored at
the predefined location. If a match is found out the user has entered the CORRECT
PASSWORD, otherwise the password entry is considered as WRONG PASSWORD.
Upon user’s entry of password, a routine check password is initiated:-
(1) CORRECT PASSWORD: Upon entry of correct password starts a special re-
initialization routine of USB device library which in turn sets up the special global
flag SEC_AREA_EN to TRUE. So, the device re-initializes with this specific flag
value as TRUE and responses to the HOST PC’s inquiry of max. no. of LUNS
available with device that there is two storage devices (i.e. max. no. of LUNs 2)
available and allows the initialization of LUN 0 storage device and LUN 1 storage
device.
Secure Portable Storage Drive: Secure Information Storage 313
(2) WRONG PASSWORD: Upon entry of correct password, the device discards the
password entered and waits for re-entry of password by user. It also maintains a
consecutive wrong password counter, which keeps a tab of consecutively wrong
password entered and upon 5 consecutive wrong entries, de-initializes the USB
device library and requires a power cycle to the device to continue working.
This is required to avoid attacks when attacker tries to make an automated brute-
force attack by somehow gaining access to the keypad lines for entering password.
Initially, the user is provided with a default password of “012345678” and is required
to change it as soon as possible.
Mironov [17]. Since the standard sector/block size in our case is 512 bytes, 512 bytes
are taken after discarding initial 4096 bytes and are saved in a temp. variable for
encryption or decryption by XOR-ING the temp. variable with the data to be enc/dec.
Now, decryption is implemented just after read from the SD Card.
Decrypted Data = Data Read from SD Card (Encrypted Data) xor RC4 key stream.
Encryption is implemented just before write on the SD Card.
Encrypted Data = Data to be written over SD Card (Plain Data) xor RC4 key
stream.
3.7 Results
The identified target microcontroller is configured as a USB Mass Storage Class Device
and use MicroSD Card as storage media. So, STM32F407ZG variant 144 pin was
identified as a suitable 32-bit target microcontroller. SDIO interface is configured to
read/write on MicroSD Card. Multiple Logical Storage Units (LUNs) are implemented
over the SD Card which acts as two independent, non-overlapping storage devices.
FatFs Open Source library was configured and integrated to provide microcontroller the
ability to manage/erase storage areas over the storage medium. Keypad and LED is
integrated to accept/change password and know the result and initiate the erase
sequence. Password based Login procedure to enable/disable critical/non-critical
storage area using Keypad and LED is incorporated. Password Management using
Secure Portable Storage Drive: Secure Information Storage 315
recommended practices was implemented using trusted public domain hash algorithm
256-bit SHA-2. Functionality to erase all data from critical storage area in emergency
conditions through a hardware emergency erasure switch is incorporated. Encryption
using stream cipher RC4 generated key stream is implemented at SD Card Level to
demonstrate a custom encryption implementation in future.
The printing area is 122 mm 193 mm. The text should be justified to occupy the
full line width, so that the right margin is not ragged, with words hyphenated as
appropriate. Please fill pages so that the length of the text is no less than 180 mm, if
possible.
Use 10-point type for the name(s) of the author(s) and 9-point type for the address
(es) and the abstract. For the main text, please use 10-point type and single-line
spacing. We recommend the use of Computer Modern Roman or Times. Italic type
may be used to emphasize words in running text. Bold type and underlining should be
avoided.
Papers not complying with the LNCS style will be reformatted. This can lead to an
increase in the overall number of pages. We would therefore urge you not to squash
your paper.
The final aim of designing and developing a microcontroller based Secure Portable
Storage Drive with the following features was achieved:-SD Card based secure storage
having hardware-based encryption.
• Separation of critical and non-critical storage space
• Emergency erasure of data in critical storage area
• Keypad base authentication to access critical storage space is implemented on
device itself without any requirement of any software
The device works in USB 2.0 Full SPEED mode. After testing practically it pro-
vided read throughputs of 9mbps with RC4 implementation of encryption and write
throughputs of 7mbps with 10Mbytes of single file.
Currently at the prototyping level, device is working in Full Speed mode, but our
microcontroller and the USB Device library supports USB 2.0 High Speed Mode
operation using a ULPI [10] Transceiver.
So, with current speeds, the targeted use of operation is for general office envi-
ronment use, where the majority of usage involves transferring files of small sizes like
presentations & documentation.
There are following points for future work:-
• Since, this is the work done at the prototyping level. The production level can have
a ULPI transceiver to enable microcontroller work in USB HIGH SPEED MODE.
• The production version will be targeted to feature the microcontroller from the same
family but with the encryption standard like AES-256 as ASIC implemented on-
board. So, on top of the Standard encryption, a layer of custom encryption could be
316 A. Dhiman et al.
carried out. The current version is a proof of concept for implementation of light
weight custom encryption.
• Implementation of dynamically monitoring and policing of storage of files with
allowed file extension by reading their extension signatures.
• Include a battery for RTC support and implementing emergency erasure without
requiring connecting to a HOST PC
References
1. USB flash drive. http://en.wikipedia.org/wiki/USB_flash_drive
2. Global threat report, December 2011. http://www.eset.com/us/resources/threat-trends/
Global_Threat_Trends_December_2011.pdf
3. Anderson, M.S., North, C.J.G., Yiu, K.K.: Towards Countering the Rise of the Silicon
Trojan, vol. 11, pp. 2–5. Australian Government DoD-DSTO (2008)
4. Backdoor Found (Maybe) in Chinese-Made Military Silicon Chips. https://www.schneier.
com/blog/archives/2012/05/backdoor_found.html
5. Backdoors Embedded in DoD Microchips From China. http://www.scribd.com/doc/
95282643/Backdoors-Embedded-in-DoD-Microchips-From-China
6. Proof That Military Chips From China Are Infected? http://defensetech.org/2012/05/30/
smoking-gun-proof-that-military-chips-from-china-are-infected/#ixzz3IZntQYTYDefense.
org
7. FIPS 140-2 Level 2 Certified USB Memory Stick Cracked. https://www.schneier.com/blog/
archives/2010/01/fips_140-2_leve.html
8. Flash drive manufacturers warn: Hackers can decrypt ‘secure’ USBsticks. https://
nakedsecurity.sophos.com/2010/01/05/flash-drive-manufacturers-warn-hackers-decrypt-
secure-usb-sticks/
9. Decrypting USB flash drives is easy. http://blog.erratasec.com/2010/01/decrypting-usb-
flash-drives-is-easy.html#.VF9qfVdYsvK
10. SanDisk: Assessing the Security of Hardware-Based vs. Software-Based Encryption on USB
Flash Drives (2008)
11. RC4. http://en.wikipedia.org/wiki/RC4
12. Stallings, W.: The RC4 Stream Encryption Algorithm (2005). http://www.st.com/web/en/
resource/technical/document/datasheet/DM00037051.pdf
13. STM32-H407 development board USER’S MANUAL. https://www.olimex.com/Products/
ARM/ST/STM32-H407/resources/STM32-H407.pdf
14. ARM-USB-TINY-H ARM JTAG DEBUGGER USER S MANUAL. https://www.olimex.
com/Products/ARM/JTAG/_resources/ARM-USB-TINY_and_TINY_H_manual.pdf
15. Patel, P., Patel, J., Virparia, P.: A cryptography application using salt hash technique. Int.
J. Appl. Innov. Eng. Manag. (IJAIEM) 2(6), 1 (2013)
16. Manber, U.: A simple scheme to make passwords based on one-way functions much harder
to crack. Comput. Secur. 15, 4 (1996)
17. Mironov, I.: (Not so) random shuffles of RC4. In: Yung, M. (ed.) CRYPTO 2002. LNCS,
vol. 2442, pp. 304–319. Springer, Heidelberg (2002). https://doi.org/10.1007/3-540-45708-
9_20