used the LAMP (Linux, Apache, MySQL [7],[8], PHP /. Python / Perl) platform .... [7]
Michael Kofler, “The Definitive Guide to MySQL” , Second. Edition. [8] Jeremy ...
Secure Internet Storage of Files: Design and Implementation Stelios I. Marnas, Stamatis Madariotakis*, Lefteris Angelis and George L. Bleris† Dept of Informatics, PlaSe Lab-Aristotle University of Thessaloniki {marnas, lef}@csd.auth.gr *Serron 19, 54454 Thessaloniki
[email protected]
Abstract- It is evident that Internet becomes a necessary tool for more and more users every day. However, there is also a growing demand for mobility of users in the sense that they need to store and manage their data at any time and place independently and securely. Since free storage space on the net and fast connection is available in public places, many people may decide to use these sources from remote workstations without having to obtain and install special software for this purpose. In this paper we present design and implementation of an on-line application which provides real time encryption and decryption facilities for files stored in a public server. The application offers autonomy to users that wish to administer securely their data from any workstation by simply connecting to the public server.
I.
INTRODUCTION
The vast growth of Internet during the recent years has changed dramatically the way people arrange their jobs, especially those which are related to remote administration of data files. For users who wish to store their work files in a host server and to have their administration from distant workstations, the Internet is a necessary tool. Although the Internet provides the necessary framework for tasks related to distance management of data there are also an increasing demand for two other communication facilities, i.e. mobility and security. Mobility can be defined in such a situation as the need of users to store and manage their data at any time and place independently from the workstation they use and the installed software. Security in this case is the need to store the data files in the host server in encrypted form so that no one else who has access to the server can see their content. The main idea behind the application described in this paper is the following: as free storage space on the net and fast connections are available in public places, many people may decide to use these sources from distant workstations without having to obtain and install special software for this purpose. So, in this paper we present the design and the implementation of a web service which provides real time encryption and decryption facilities for files stored in a public server. The application offers autonomy to users that wish to administer securely their data from any workstation by simply connecting to the public server.
†
Professor George L. Bleris died on April 16, 2005.
We believe that such a service aims to allow users to benefit more from the connected world and also to preserve their right for privacy. The objective is therefore to provide the users with the ability to store critical or personal data and files to servers all over the world and to be sure that their privacy will not be violated. No matter how often a user moves, he/she must be able to access the personal files stored not in a personal storage device but somewhere on the net. We also believe that the proposed service was developed in accordance to the general philosophy of flexibility, which is the key feature of famous web services such as the web mail. As related work we can mention some attempts to give on-line encryption and decryption of plain text, available in the sites: • http://thetapi.idlecircuits.com/asciiweb103.html • http://webnet77.com/cgi-bin/helpers/crypthelp.pl • http://members.aol.com/brimiljeep/WebPages/Encrypti onDecryptionToolPage.htm • http://public.srce.hr/~ddelija/home/radovi/corema/core ma97.html Next, we will describe the application in detail. In section 2 we analyze the problem the application deals with and in section 3 the proposed solution. Then section 4 describes design and implementation of our idea with some screenshots of the website and finally in section 5 there is an overview of our approach and a discussion for further work. II. THE SECURITY PROBLEM The issue of securing information is rather complicated. Files can be attacked in three levels: The file level, the communication level and the storage system level. We are interested in the file level only, for files that are stored in public domains where the access cannot be easily controlled. In such cases, in order to protect the content of the files from unauthorized read, even if the adversary manages to access them, the solution is their encryption. The security problem is getting worse when there are additional problems regarding the continuous move of the users and the time restrictions. Indeed, it is reasonable to assume that when the user needs to encrypt his/her files probably there is no suitable software installed on the nearest available workstation. Moreover, is possible that
even if the user has the proper software for encryption, the time restrictions or the system administrator will not allow the installation on the workstation. III. THE PROPOSED SOLUTION The solution to all the problems described above is a system for on-line encryption and decryption of files. The system will provide the user with the ability to encrypt and decrypt personal files by simply using the corresponding web page which is accessible through Internet. With the proposed system, the user has the ability to choose not only the file that will be encrypted or decrypted, but also the encryption algorithm and the mode of the algorithm. The encryption is accomplished through symmetric algorithms [1]. The encryption key is randomly generated by the system aiming to even more security resulted from the key randomness. The user will be capable to decrypt the files created earlier from the same system by knowing the encryption algorithm, its mode and the key. It is therefore obvious that all the information required for the decryption of the files is difficult to be memorized and so its storage in written or electronic form is necessary. For this purpose, in order to avoid the effort and the risk of such storage, it is recommended that the users should follow a policy of registration in the system. Under this policy, the parameters of the encryption can be stored and accessed by the user who is uniquely recognized by a simple password. The design and the implementation of the system should provide independence to the user not only from the parameters that has to memorize but also from the need to install the appropriate software in a workstation. Special attention should be given in the design of such system which is exposed in the Internet, a environment inherently insecure. For this reason, various Internet security aspects should be taken into account such as the use of protocols for secure communication and authentication. On the other hand, the system should provide the required functions for efficient operation, such as the password retrieval in case of loss. IV. DESIGN AND IMPLEMENTATION OF THE APPLICATION The proposed system was developed under an open source environment. Specifically, for the development we used the LAMP environment and as programming language the PHP. [4],[5],[6] The use of open source platforms provides to the developers many advantages in comparison to the traditional environments, such as reliability, performance, easiness, independence and security. They are reliable because a significant number of testers test them before their publication and also bugs are corrected quickly. Developing of any application is much easier, as open source platforms contain main functions and provide friendly based graphical environments for design and development. They are also independent from other platforms and give flexibility to developers to choose hardware and software that meet their needs. Finally, they provide security as whenever vulnerability issues arise,
the solution is instant. [2],[3]. For all these reasons we used the LAMP (Linux, Apache, MySQL [7],[8], PHP / Python / Perl) platform which is a comprehensive environment for software development. The web based application was designed so as the users do not need to install any special software to encrypt or decrypt their files. This approach has the major advantage that users need only a web browser and internet access. The application is friendly and not complicated to use and the main operations are easily accessed. Users have the ability to store information and to be sure of their privacy. Of course, anyone that prefers to be registered must be able to configure his/her account and personal stored data. The sitemap in Figure 1 shows the main functions of the application. The visitor may encrypt or decrypt a file immediately, or just login. Members of the application have more advantages as they can store information for the files they have encrypted. In order to exchange data between the users and the server, HTTPS protocol is necessary to preserve security, since sensitive information is transferred. The application is accessible through Internet and is installed in a web server of Aristotle University of Thessaloniki1. The user accesses the home page of the application through a web browser. There are four options: encryption, decryption, enter the members’ area and contact with the webmaster. These options are available in any page for immediate access. There are also links and references related to the main operations of encryption and decryption. Encryption is achieved through the corresponding web page. There has been paid special attention to the fact that some users are not familiar with cryptography principals and notions, so there are two options provided: simple or specialized encryption. The simple encryption requires from the user only to determine the file and uses a standard algorithm and mode (Triple DES in CBC mode) [1]. The specialized encryption provides the expert user with the facility to choose the algorithm and its execution mode. In any case, the key is randomly generated and if the user has logged in with a password, the decryption parameters are stored in order to be retrieved at any moment without having to memorize them. The list of available cryptographic algorithms and modes is dynamically produced from the application and is supported by the libmcrypt library Home Page
Encrypt
Results
Members
Decrypt
Contact
Contact Form
Results
Login
Files
Retrieve Password
Subscribe eMail
Account
Logout
Figure 1 The site map of the application 1
http://www.webers.gr/crypto/home.php
which is installed in the server. The code for this process is the following: $SupportedAlgorithms = mcrypt_list_algorithms (); $SupportedModes = mcrypt_list_modes ();
The encryption process at first disables php error-reporting procedure until the encryption algorithm is checked to be one of the supported in that mode. The command used for this purpose is the following ($td
=
mcrypt_module_open($cipher,
'',
$mode,
'')),
which initializes the decryption module. If the algorithm and the mode don’t match, the command fails and the user is led in the previous webpage to start over the whole process. Otherwise, the file is checked to have been normally uploaded, the encryption process is initialized and the following steps are executed: • The biggest key length is retrieved by the command mcrypt_enc_get_key_size($td); • A random key is generated by the procedure random_string() • Systems’ random number generator is initialized with srand() command • A random IV is generated by mcrypt_create_iv (mcrypt_enc_get_iv_size($td), MCRYPT_RAND) • Encryption is implemented with mcrypt_generic_init($td, $key, $iv) Then the encrypted file is temporary stored in the server until the user downloads it or stores it if he is registered. Registered users have the right to store information about the algorithms and the keys used, so the system uses SQL to add a line with the additional parameters for the encrypted file. Decryption is very easy to execute, since the parameters required is the file for decryption, the algorithm used for encrypting it and the key. This information must be provided from the user and the whole operation is independent from the software used for the initial step of encryption. Since the algorithm used is one of the known supported by the website decryption is efficient. Then the user can download securely the decrypted file and use it. In the first place the same processes take place as in encryption, so error-reporting is disabled and the mode and algorithm are checked to be the same. Then the corresponding variables are fed from the decryption parameters, based on the fact that the user is registered. If the user is registered, then the stored information is used, otherwise the posted one is used. Decryption process makes the following steps: • •
Initialization of all the required buffers for decryption by the command: mcrypt_generic_init($td, $key, $iv); Data decryption by the command: $decrypted_data = mdecrypt_generic($td, $input);
The code of file administration creates the temporary decrypted file which can be downloaded by the user. Some of the goals originally posed regarding the administration of the application include expandability for future enhancements by any work group and maintainability. For these reasons, the files of the application (functional, graphics and parameterization) were organized so as to keep the structure as simple as possible. Another important issue is the security of the application itself as it is always exposed in the Internet environment. Many security issues arise from the fact that simplicity combined with a friendly environment and user interface are contradictory. As the website aims to be visited by many users, it should be as friendly as possible and also as secure as possible. Since most of the users have minimal knowledge of security, the implementation of the website should cover this lack. Security is achieved in three levels: the protocol level, the operation level and the application level. Regarding the protocol level, the use of SSL ensures the secure communication of the users with all the operations of the website. Security at the operation level is related to the security of the application server which is achieved through the continuous monitoring of the updates by the administrator. Regarding the security at the application level, the application is designed to take into account three critical points: the authentication, the file attributes and the validation of users. The user of the application works in a friendly and functional graphical environment. The main menu contains all the options and is available in all pages. The home page of the application is shown in Figure 2 while the encryption and decryption pages are shown in Figure 3 and 4 respectively. In Figure 5 we can see the page used for contact with the webmaster and in Figure 6 the page used for the management of encrypted files. V. OVERVIEW AND FURTHER WORK In this paper we described the design and the implementation of a web service application suitable for those users who wish to store their sensitive files encrypted in a public server and to retrieve them in their original form from any workstation connected to the Interned, independently from installed software. The development of this on-line application revealed various aspects of information security and helped us to realize the vast capabilities of Internet in these aspects. The continuing and rapid growth of Internet can offer to the users even more flexibility in storing and retrieving encrypted information. The work started with this application is a preliminary stage and a base for future work aiming to provide the user with much more flexibility. As an example, we can consider an expansion of the application for the case where the user does not need to be connected to the Internet in order to decrypt the encrypted files. This of course must be achieved without having to install the application in the workstation.
Figure 6 Screenshot of the contact page Figure 4 Screenshot of the home page
Figure 6 Screenshot of the page for the management of encrypted files
Figure 4 Screenshot of the encryption page
A possible solution is the use of a recent version of PGP which during the encryption will create an executable file containing the cipher and the run time environment for its decryption. So the user will be able to decrypt the file by simply entering a password and also to share the file easily with other users. Such implementations will provide much more flexibility and independence to users. Note that any enhancement of the application can be easily accomplished in the same environment. REFERENCES
Figure 4 Screenshot of the decryption p
[1] Menezes, P. van Oorschot, S. Vanstone, “Handbook of Applied Cryptography”, CRC Press, 1996 [2] Feller, J. and Fitzgerald, B. Understanding Open Source Software Development. Addison Wesley, 2002 [3] Koch, S. (ed.). Free/Open Source Software Development. Idea Group Publishing, 2002 [4] W. J. Gilmore, “PHP 5 and MySQL” [5] Rachel Andrew, “Php Web Development With Macromedia Dreamweaver Mx 2004” [6] David Sklar, “Essential PHP Tools” [7] Michael Kofler, “The Definitive Guide to MySQL” , Second Edition [8] Jeremy D. Zawodny, Derek J. Balling, “High Performance MySQL”