A Study of the Performance of SSL on PDAs



Similar documents
Announcement. Final exam: Wed, June 9, 9:30-11:18 Scope: materials after RSA (but you need to know RSA) Open books, open notes. Calculators allowed.

Communication Systems SSL

Security Engineering Part III Network Security. Security Protocols (I): SSL/TLS

Communication Systems 16 th lecture. Chair of Communication Systems Department of Applied Sciences University of Freiburg 2009

Overview. SSL Cryptography Overview CHAPTER 1

Three attacks in SSL protocol and their solutions

Outline. Transport Layer Security (TLS) Security Protocols (bmevihim132)

Web Security Considerations

Overview of CSS SSL. SSL Cryptography Overview CHAPTER

Real-Time Communication Security: SSL/TLS. Guevara Noubir CSU610

Software Engineering 4C03 Research Project. An Overview of Secure Transmission on the World Wide Web. Sean MacDonald

Chapter 17. Transport-Level Security

Security. Contents. S Wireless Personal, Local, Metropolitan, and Wide Area Networks 1

Lecture 7: Transport Level Security SSL/TLS. Course Admin

Using etoken for SSL Web Authentication. SSL V3.0 Overview

Network Security Web Security and SSL/TLS. Angelos Keromytis Columbia University

Secure Sockets Layer (SSL ) / Transport Layer Security (TLS) Network Security Products S31213

As enterprises conduct more and more

SSL Secure Socket Layer

Authenticity of Public Keys

Communication Security for Applications

Lecture Objectives. Lecture 8 Mobile Networks: Security in Wireless LANs and Mobile Networks. Agenda. References

SECURE SOCKETS LAYER (SSL)

12/3/08. Security in Wireless LANs and Mobile Networks. Wireless Magnifies Exposure Vulnerability. Mobility Makes it Difficult to Establish Trust

Secure Socket Layer. Security Threat Classifications

CS 356 Lecture 27 Internet Security Protocols. Spring 2013

How To Understand And Understand The Ssl Protocol ( And Its Security Features (Protocol)

An Experimental Study on Wireless Security Protocols over Mobile IP Networks

Managing and Securing Computer Networks. Guy Leduc. Chapter 4: Securing TCP. connections. connections. Chapter goals: security in practice:

CSC Network Security

SSL: Secure Socket Layer

CSC 474 Information Systems Security

HTTPS: Transport-Layer Security (TLS), aka Secure Sockets Layer (SSL)

Key Hopping A Security Enhancement Scheme for IEEE WEP Standards

SSL Secure Socket Layer

Transport Level Security

Secure Socket Layer. Introduction Overview of SSL What SSL is Useful For

WEB Security & SET. Outline. Web Security Considerations. Web Security Considerations. Secure Socket Layer (SSL) and Transport Layer Security (TLS)

Chapter 7 Transport-Level Security

An Experimental Study of Cross-Layer Security Protocols in Public Access Wireless Networks

Security (WEP, WPA\WPA2) 19/05/2009. Giulio Rossetti Unipi

Lecture 31 SSL. SSL: Secure Socket Layer. History SSL SSL. Security April 13, 2005

Secure Socket Layer (SSL) and Transport Layer Security (TLS)

Chapter 2 Configuring Your Wireless Network and Security Settings

Learning Network Security with SSL The OpenSSL Way

Network Security Essentials Chapter 5

TLS/SSL in distributed systems. Eugen Babinciuc

Information Security

Some solutions commonly used in order to guarantee a certain level of safety and security are:

Transport Layer Security Protocols

Savitribai Phule Pune University

Summary of Results. NGINX SSL Performance

SSL Handshake Analysis

Chapter 3 Safeguarding Your Network

Security Protocols and Infrastructures. h_da, Winter Term 2011/2012

Low-Level TLS Hacking

Overview of SSL. Outline. CSC/ECE 574 Computer and Network Security. Reminder: What Layer? Protocols. SSL Architecture

TLS and SRTP for Skype Connect. Technical Datasheet

SSL/TLS. What Layer? History. SSL vs. IPsec. SSL Architecture. SSL Architecture. IT443 Network Security Administration Instructor: Bo Sheng

Secure Sockets Layer

Wireless Networks. Welcome to Wireless

White Paper. Enhancing Website Security with Algorithm Agility

Protocol Rollback and Network Security

SSL A discussion of the Secure Socket Layer

Key Management (Distribution and Certification) (1)

Figure 1: Application scheme of public key mechanisms. (a) pure RSA approach; (b) pure EC approach; (c) RSA on the infrastructure

Differences Between SSLv2, SSLv3, and TLS

Internet Engineering Task Force (IETF) Request for Comments: Category: Standards Track ISSN: A. Langley Google June 2015

Secure Socket Layer/ Transport Layer Security (SSL/TLS)

Chapter 10. Network Security

SECURE SOCKETS LAYER (SSL) SECURE SOCKETS LAYER (SSL) SSL ARCHITECTURE SSL/TLS DIFFERENCES SSL ARCHITECTURE. INFS 766 Internet Security Protocols

INF3510 Information Security University of Oslo Spring Lecture 9 Communication Security. Audun Jøsang

Cryptography and Network Security Sicurezza delle reti e dei sistemi informatici SSL/TSL

Secure Socket Layer (SSL) and Trnasport Layer Security (TLS)

Security vulnerabilities in the Internet and possible solutions

Security Policy Revision Date: 23 April 2009

Quantifying the Performance Degradation of IPv6 for TCP in Windows and Linux Networking

TLS-RSA-PSK. Channel Binding using Transport Layer Security with Pre Shared Keys

3.2: Transport Layer: SSL/TLS Secure Socket Layer (SSL) Transport Layer Security (TLS) Protocol

Secure Socket Layer. Carlo U. Nicola, SGI FHNW With extracts from publications of : William Stallings.

Chapter 5. Data Communication And Internet Technology

Network Security Protocols

7 Network Security. 7.1 Introduction 7.2 Improving the Security 7.3 Internet Security Framework. 7.5 Absolute Security?

Einführung in SSL mit Wireshark

Cornerstones of Security

Lecture 4: Transport Layer Security (secure Socket Layer)

Security. Learning Objectives. This module will help you...

The next generation of knowledge and expertise Wireless Security Basics

ERserver. iseries. Securing applications with SSL

Embedded SSL. Christophe Kiennert, Pascal Urien. Embedded SSL - Christophe Kiennert, Pascal Urien 1

ERserver. iseries. Secure Sockets Layer (SSL)

Extensible Authentication Protocol Transport Layer Security Deployment Guide for Wireless LAN Networks

Web Security (SSL) Tecniche di Sicurezza dei Sistemi 1

Chapter 6 CDMA/802.11i

Bridgit Conferencing Software: Security, Firewalls, Bandwidth and Scalability

ms-help://ms.technet.2005mar.1033/winnetsv/tnoffline/prodtechnol/winnetsv/plan/ssl...

Transcription:

A Study of the Performance of SSL on PDAs Youngsang Shin Computer Science Department Indiana University Bloomington, Indiana Email: shiny@cs.indiana.edu Minaxi Gupta Computer Science Department Indiana University Bloomington, Indiana Email: minaxi@cs.indiana.edu Steven Myers Department of Informatics Indiana University Bloomington, Indiana Email: samyers@indiana.edu Abstract PDAs and smartphones are increasingly being used as handheld computers. Today, their network connectivity and their usages for various tasks over the Internet require privacy and authenticity. In this paper, we conduct a comprehensive and comparative study of the performance of the SSL protocol for PDA and laptop clients, both in WEP secured and open Wi-Fi environments. Unlike previous studies [1], [2], the measurements are at sub-protocol granularity allowing for researchers to consider appropriate optimizations for these resource-constrained devices. Unsurprisingly, we find that SSL handshake costs 3 times more at a PDA client than it does for a laptop client, but surprisingly most of the delay comes from network latency and other PDA architecture issues, not cryptographic computation. This suggests that more effort should be spent in minimizing communication rounds in future cryptographic protocols that will be used by PDAs, even at the cost of more cryptographic operations. I. INTRODUCTION Small devices such as Personal Data Assistants (PDAs) and smartphones pervade our society today. They typically come equipped with a Wi-Fi or cellular network connection, allowing them to connect to the Internet. Increasingly, they are being used as clients in scenarios that require security, such as e-commerce and e-mailing. Wired Equivalent Privacy (WEP) [3] is still commonly used to secure many Wi-Fi communications at the data link layer, despite its known vulnerabilities [4]. Further, the Secure Sockets Layer (SSL) protocol [5] forms the basis for the vast majority of secure Web transactions. It provides security at the transport layer. While the performance impact of these protocols, especially SSL, is well studied for commodity client machines, only recently [1], [2], [6] has the community begun studying the performance of these protocols for small handheld devices such as PDAs and smartphones which have constrained computational, energy and software resources. It is important to study how security protocols perform in constrained environments, so that better, customized options can be designed. We undertake such a study for SSL and WEP on PDAs, comparing their performance to that of laptops. Overall, our paper makes the following contributions: a) Granularity: We perform a comprehensive and granular study of the performance of SSL protocol on PDAs. We used a high-end PDA, whose processor and running speed compares favorably to modern average smartphones such as the iphone 3G and BlackBerry Storm, we therefore believe our results represent a majority of such devices. Studies in [1], [2] analyzed the performance of SSL on PDAs. However, they did not observe SSL s performance in fine granular detail: They focused on measuring the running time of only each public-key cryptographic operation and the whole protocol. Specifically, the SSL protocol has two phases. The handshake phase allows the client and the server to securely exchange a key using public-key cryptography. This phase is known to be computationally expensive and contain many network flows. Subsequently, the data transfer phase uses the resulting key to exchange data securely and more efficiently. We separate each phase into detailed steps to specifically distinguish cryptographic and network operations from the other general code. Our granular analysis enables us to clearly observe how factors other than CPU affect the performance of SSL. CPU clock speed is not the only factor affecting the practical performance of security protocols. Other constrained resources, such as, network access, slower memory and buses in PDAs, are also contributing elements. Furthermore, it is important to understand how CPU bound cryptographic operations run inside a security protocol especially in such a constrained environment. We analyze the proportion of CPU-bound cryptographic operations in the performance of SSL as compared to the network and other general sections of code. b) Server-Side Measurements: We study SSL performance at both the client and the server. To our knowledge, this paper is the first study to investigate how the performance of SSL on PDA clients can affect that of SSL on a server. An SSL server handles clients without the knowledge of their capabilities. The low performance of SSL on PDAs causes the server to under-serve its potential. Although the server s CPU s time can be preempted for other clients, the specific number of permitted outstanding handshakes is fixed in modern Web or other server implementations. Thus, the performance of SSL on PDA clients also impacts that of the server. c) Session Resumption Measurements: We examine SSL session resumption, which permits in cases where the client re-connects to the server an abridged cryptographic handshake. d) PDA vs. Laptop: We compare the performance of the SSL protocol on PDA and laptop clients with commodity hardware and software configurations. e) WEP & SSL: We study the effect of using WEP concurrently with SSL. Prior to being shown insecure, WEP

was widely accepted as a wireless security protocol. While WEP has shown to be insecure, measurements of its effect on the SSL protocol gives some insight as to what might be expected from WPA2 [7], WEP s accepted replacement. It is important to understand how this combination of security protocols affects, if at all, the performance of SSL over wireless networks. Works in [1], [6] examined the performance of SSL over an open Wi-Fi connection, but did not explore the effect of WEP. The of this paper is organized as follows. Related work is discussed in Section II. Section III provides a background on SSL and WEP protocols. Section IV introduces our experimental environment and experimental methodology. In Section V, we present the performance evaluation. Section VI concludes the paper. II. RELATED WORK Works in [8], [9] measured the performance of an SSL Web server by instrumenting and analyzing SSL protocol stacks. They measured the timing of cryptographic operations and the entire protocol on client and server machines over Ethernet. They did not consider PDAs or wireless networks. The authors of [10], [11] measured the performance and battery usage of naked cryptographic operations in PDA. They did not investigate how such cryptographic algorithms performed within a security protocol such as SSL. [6] studied battery drainage due to individual cryptographic operations when SSL was run on a PDA, but they did not measure other SSL costs. [1], [2] studied the performance of SSL on a PDA, but did not analyze the detailed costs of SSL. They measured only timing of the handshake, data transfer, and cryptographic operations, while allowing different key sizes and cryptographic algorithms. [2] considered the costs of session resumption as well as full handshake. However, they did not investigate the differences between PDA and laptop clients. Furthermore, none of relevant works measured or compared the cost of WEP against open wireless environments for PDAs. III. BACKGROUND A. Secure Sockets Layer (SSL) The Secure Sockets Layer (SSL) protocol [5] provides security for network traffic at the transport layer and forms the basis of most secure Web transactions on the Internet today. Originally developed by Netscape corporation as a security enhancement for their Web server and browser, it has since been adopted by almost all vendors and developers for their security sensitive client-server applications. SSL has become the de facto standard for transport layer security. The Internet Engineering Task Force (IETF) has standardized SSL as an IETF standard under the name of Transport Layer Security (TLS) protocol [12]. The two protocols are slightly different in the aspects of key expansion and authentication, but for our purposes are essentially the same. We focus on SSL in this paper. In SSL, to start the handshake, the client sends the server ClientHello message (Figure 1) proposing protocol options, such as supported ciphersuites. The server responds with a ServerHello message selecting a set of protocol options. It then sends its public-key certificate in a ServerKeyExchange message. The server finalizes its part of the negotiation with a ServerHelloDone message. Toward that goal of generating symmetric keys, the client sends a premaster-secret encrypted with the server s public-key in a ClientKeyExchange message. Both the client and the server generate a the premaster-secret and exchanged random numbers as seeds. The client then sends a ChangeCipherSpec message to activate the negotiated ciphersuite protocols for all further sent messages. Finally, the client sends the Finished message encrypted with the masterkey and authenticated according to the negotiated option. The server finishes by sending a ChangeCipherSpec message similar to that of the client and then sending the encrypted Finished message. The full SSL handshake is expensive, for it requires expensive asymmetric cryptography operations and a large number of messages. This can severely degrade performance in cases where multiple clients try to connect to an SSL server simultaneously. To minimize the overhead due to the asymmetric handshake, the SSL protocol defines a mechanism by which a previous session can be resumed without repeating the asymmetric operations. Termed as session resumption( [5] and [12]) it starts with a ClientHello message just like the full handshake, but a previously established SessionID is used instead of new one. This allows for a reuse of the previously negotiated security options and master-key. Upon agreeing to the sessionid, the server responds with a ServerHello message. The next three messages of the full handshake are skipped (and thus the asymmetric cryptography). The server directly sends the ChangeCipherSpec and Finished messages to reactivate the previous security options. The client concludes the handshake by also sending the ChangeCipherSpec and Finished messages. Session resumption provides a significant performance gain especially when a client opens multiple connections to an SSL server. B. Wired Equivalent Privacy (WEP) Wireless networks broadcast messages using radio waves, leaving them susceptible to eavesdropping. The Wired Equivalent Privacy (WEP) is a protocol to secure 802.11 wireless networks. WEP adopts a stream cipher, RC4, for privacy and a CRC-32 checksum for integrity. In a common configuration, 128-bit WEP key is used. WEP s cryptographic protocol is easily broken [4], but its use continues due to the sheer number of deployed devices that support it, compared to subsequent secure standards of Wi-Fi Protected Access (WPA) and WPA2 [7], which are frequently unsupported on older devices. We conducted experiments on WEP due to its pervasive use, despite its flaws. IV. METHODOLOGY Experimental Environment: We used a desktop, laptop, PDA, and wireless router to evaluate the performances of SSL and WEP. The desktop was used as a server. The laptop and the

Client Step1: Initializes and prepares ClientHello message (Step1-1: Sends ClientHello message) Step2 Receives and sets up ciphers to be used (Step: Checks server's certificate and extracts server's public key) Step3: Prepares and sends ClientKeyExchange message (Step: Generates premaster secret) (Step3-2: Encrypts premaster secret with server's public key) (Step3-3: Sends ClientKeyExchange message) Step4: Prepares and sends ChangeCipherSpec message (Step: Sends ChangeCipherSpec message) Step6 Step5: Prepares and sends Finished message (Step: Hashes Finished message) (Step: Encrypts Finished message with the master key) (Step: Sends Finished message) Receives and handles server's ChangeCipherSpec and Finished messages (Step: Decrypts Finished message) (Step6-2: Hashes Finished message) Proposes SSL options ClientHello Selects SSL options ServerHello Server's certificate (public key) ServerKeyExchange ServerHelloDone {Premaster secret} server's public key ClientKeyExchange Activates negotiated options ChangeCipherSpec {Verifies negotiated options} master key {Finished} Activates negotiated options ChangeCipherSpec {Verifies negotiated options} master key {Finished} Server Step1: Accepts client's connection and receives ClientHello message Step2: Prepares and sends ServerHello message (Step: Sends ServerHello message) Step3: Prepares and sends server's certificate (Step: Sends ServerKeyExchange message) Step4: Prepares and sends ServerHelloDone message (Step: Sends ServerHelloDone message) Receives premaster secret and confirms the cipher setup (Step: Decrypts ClientKeyExchange message) (Step: Generates the master key) (Step: Decrypts Finished message) (Step5-4: Hashes Finished message) Step5 Step6: Prepares and sends ChangeCipherSpec message (Step: Sends ChangeCipherSpec message) Step7: Prepares and sends Finished message (Step7-1: Hashes Finished message) (Step7-2: Encrypts Finished message with the master key) (Step7-3: Sends Finished message) Fig. 1. Cryptography and network messages in SSL handshake PDA were used as clients. The device configurations are shown in Table I. The PDA used in the experiment contains a highend commodity CPU for standalone PDAs [13]. However, its calculation speed is representative or faster than most modern average smartphones, such as the iphone 3G or BlackBerry Storm. We conducted all the experiments over wireless as the PDA only supported wireless communication. To ensure that radio interference did not affect packet-loss, and thus latency, the router was placed at 3 meters from the PDA or laptop. Device Model CPU/RAM/OS Network Connection server Dell GX620 Pentium IV 3.2G/1G 1Gbps Ethernet Linux kernel 2.6.9 laptop Dell Latitude D610 Pentium M 1.86G/512M 802.11b Linux kernel 2.6.9 PDA Dell Axim X51v Intel PXA270 624M/64M 802.11b Windows Mobile 5 router Netgear WGR614 MSP2007 170M/4M 802.11b/g, 10Mbps TABLE I CONFIGURATION OF DEVICES USED The server and client programs were simple HTTPS servers and clients written in C. We deployed OpenSSL (version 0.9.8a) [14] on the desktop, laptop, and the PDA. To measure timings, we instrumented the OpenSSL library, and server and client programs by putting rdtsc 1 and 1 On Intel Pentium processors, rdtsc (read time stamp counter) instruction returns the number of clock cycles since the CPU was powered up or reset. QueryPerformanceCounter 2 into the Linux and Windows systems. Measurements Performed: We measured the cost of the SSL protocol at both the client and server. While the server stayed fixed, the clients alternated between laptop and PDA in our tests. There are two approaches to compare the performance of an SSL client on a PDA to that on the laptop. The first is to make the environment as similar as possible for both laptop and PDA. One could install identical operating system and identical version of SSL compiled using identical compilers. Indeed, such similar configurations is possible and a previous study [6] that focused on measuring battery drainage in PDAs took that approach. The drawback of this approach is that it cannot effectively represent the tweaked performance of commodity PDAs running commercial operating systems, which are optimized by hardware vendors. Vendors spend a lot of effort optimizing the OS and hardware to compliment each other. While more modern ports of Linux to smartphone hardware (such as Android to the G1) would be so optimized, it is unlikely that the port in [6] was. We left the optimized Windows Mobile on our PDA, but installed the same version of OpenSSL both laptop and PDA. This allowed us to measure SSL performance in a widely used configuration. The PDAs have an automatic CPU speed adjustment mode. This option allows an efficient use of battery, by slowing the CPU down when it is idle, and speeding it up for computationally inten- 2 The API function, QueryPerformanceCounter retrieves the current value of the high-resolution performance counter in the Windows system.

Running Time (ms) 28 26 24 22 20 18 16 14 4 2 0 1-1 3-3 3-2 Step 1 Step 2 Step 3 Step 4 Step 5 Step 6 Fig. 2. Client timings for SSL handshake (ms) 6-2 sive tasks. We enabled it on the PDA to further mimic the settings under which PDAs are generally used. We evaluated the performance of both the handshake and data transfer phases. For the handshake, we investigated the cost of cryptographic operations as well as the processing of full messages. The latter was largely lacking in other studies dealing with PDAs. We evaluated both handshakes and the session resumptions. For the bulk data transfer phase measurements, our clients downloaded a pre-specified file from the server. To observe the effect of using the SSL protocol over WEP, we performed all timing measurements both with and without WEP. The latter is often termed open mode. The WEP key size in all cases was 128 bits. All data-points represent the mean result of 100 identical runs. V. EXPERIMENTAL RESULTS A. The Granular Performance of the SSL Handshake Figure 1 enumerates and describes the various steps of the SSL handshake. We separate out cryptographic and network operations at each entity into detailed sub-steps. It enables us to clearly distinguish cryptographic and network operations from the other general operations performed by the SSL code. Figure 2 shows the handshake costs at the client when RSA (1024 bit key) was used for the exchange of premaster-secret, AES (256 bit key) was used for symmetric key encryption, and SHA-1 for hashing. These are the default values in many SSL implementations. First we focus on the performance of the PDA client in open (insecure) mode (PDA-open bars depicted in Figure 2). The PDA client took a total of 50.6ms to finish the handshake. This time includes network latency, which was small since all of the messages are small and the wireless router setup was optimal. Most of this time was spent on steps 2, 3, and 6, each of which contains cryptographic operations. During step 2 the client verifies the server s SSL certificate and extracts its public-key. Certificate verification requires digital signature verification, an expensive asymmetric cryptography operation. In total, this operation cost almost 7% of the Running Time (ms) 50 40 30 20 0.06 0.04 0.02 0.00 Step 1 all Fig. 3. Step 2 Step 3 Step 4 Step 5 5-4 Step 6 Step 7 Server timings for full SSL handshake (ms) 7-3 7-2 7-1 client s total handshake cost. In step 3, the PDA client sends a premaster-secret encrypted with the server s public-key. This also involves asymmetric public-key encryption (Note that with RSA it is common to choose a public-key that allows for faster encryptions, at the expense of longer decryptions). This operation accounted for almost 10% of the total handshake cost. The most expensive client operation in the full handshake occurs in step 6. This step took 46% of the total handshake cost. Only a small component of this cost was due to the symmetric key decryption and hashing, which took a total of 0.129ms. The of it, 25.21ms, was caused mainly by a blocking socket read function, BIO_read 3 in OpenSSL. The function itself took 93% of 25.21ms. Thus, its cost is not directly related to the overhead for SSL protocol itself, but implementation dependent. The corresponding results for the laptop client in open mode (denoted ) are alongside those of the PDA-open mode in Figure 2. First, note every step of the laptop took less time than for the PDA. Overall, the laptop took only 31% of the time the PDA took to finish the handshake. This is not surprising because the laptop is not resource constrained like the PDA. Unsurprisingly, the steps that cost the most time for PDA are also the ones that took most time for the laptop client. Further, the cryptographic operations in the laptop client took a total of 5.9% of the total handshake cost while those of the PDA clients took 18.5%. This is very surprising, as the power management software on the PDA s CPU reduces its frequency when computational tasks are light, and increases the frequency when they are more burdensome, so one would expect the percentage time to be less on the PDA. When removing the network latency and network packet processing times and comparing the cryptographic operations as a percentage of time, we do see the expected relation, with the PDA taking 72% of time on cryptographic operations vs. 3 BIO_read function in OpenSSL is responsible for reading from a blocking socket. The blocking problem is identified in OpenSSL version 0.9.8a. We did not pursue the problem in other versions of OpenSSL.

Running Time (ms) 160 150 140 130 120 110 100 90 80 70 60 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 1-1 rsa- dh- rsa- dh- 3-3 3-2 rsa- dh- rsa- dh- rsa- dh- rsa- dh- rsa- dh- rsa- dh- rsa- dh- rsa- dh- rsa- dh- rsa- dh- Step 1 Step 2 Step 3 Step 4 Step 5 Step 6 6-2 Fig. 4. A comparison of RSA and Diffie-Hellman Key Exchange for PDA and laptop clients (open wireless connection) 90% on the laptop. However, this shows that factors other than the processor speed differentials must be seriously considered when designing protocols for PDAs. We do not have data to motivate why the network and stack latencies are so much higher on the PDA. Effect of WEP on Handshake: Next, we repeated the above experiments for PDA and laptop clients when WEP was used (respectively and ), and results are also shown in Figure 2. Overall, using WEP increased the cost of each SSL handshake step by a small amount. Specifically, the PDA client took 8% more time under WEP in comparison to the open mode, where as the laptops performance remained consistent in both modes. This is unexpected because, while WEP adds another layer of security on top of SSL and slightly reduces bandwidth it should not greatly affect latency. Since the amount of data being transmitted is relatively small there should be little noticeable effect on either device. Finally, one would not expect it to affect the PDA relatively more than it did the laptop. Therefore, we further measured the effect of WEP on transmission on PDAs and laptops, with the results presented later in Section D. Handshake at the Server: Figure 3 shows the handshake cost at the server when clients connect to it one at a time in both open and WEP modes. As expected, the server handles most of the steps faster than the laptop client. The exception is the decryption of the ClientKeyExchange message (step 5), which requires the use of its private key. This is the expected outcome since we used a small and efficiently computable encryption exponents (65,537) at the expense of a large decryption exponent (as is typical usage with RSA publickeys). Further, the server took longer to finish the handshake when the client was a PDA than when it was a laptop. This is because the handshake proceeds in lockstep and the server must wait for the client. Therefore, by providing knowledge of a PDA client to a server it can optimize and enter in to more Running Time (ms) 200 180 160 140 120 100 80 60 40 20 0.08 0.06 0.04 0.02 0.00 all rsa- dh- rsa- dh- 5-4 rsa- dh- rsa- dh- rsa- dh- rsa- dh- rsa- dh- rsa- dh- rsa- dh- rsa- dh- rsa- dh- rsa- dh- rsa- dh- rsa- dh- Step 1 Step 2 Step 3 Step 4 Step 5 Step 6 Step 7 7-3 7-2 7-1 Fig. 5. A comparison of RSA and Diffie-Hellman Key Exchange at the SSL server (open wireless connection) concurrent handshakes than it might otherwise (most servers rict the number of active concurrent handshakes they are willing to perform to limit computational loads). A server that services many PDAs should be able to handle a larger number of handshakes due to the implicit slack precipitated by waiting for the PDAs. We note that this could be implemented in SSL through the TLS extension mechanism [15]. B. The Effect of Diffie-Hellman vs. RSA in Handshake SSL supports multiple key exchange options and multiple cryptographic primitives for encryption and hashing. Since symmetric-key related operations account for a rather small proportion of cost, we focus on handshake key-exchange options. Figures 4 and 5 show a comparison of timings for client and server respectively when Diffie-Hellman (DH) and RSA with 1024-bit moduli are used. With DH, once again, steps 2, 3, and 6 take the longest time at the client, as was the case with RSA. However, each of them take longer than they took for RSA. This is expected because the expensive operation at the core of RSA and DH are exponentiation. As mentioned earlier, in the case of RSA the exponent for encryption can be chosen intelligently to speed up calculation of the exponentiation, whereas in DH the exponents must be chosen randomly. The total running time for the full handshake at the PDA and laptop clients is respectively 6 and 3 times longer using DH. The running times at the server follow similar trends because the client and the server have to finish the handshake in tandem. With RSA, we have an opportunity for optimization by adjusting the public exponent, causing the public-key operations in PDAs to be faster than the private key operations in a server. Thus, there is a preference for implementing RSA on servers that will handshake with many PDAs.

C. Handshake under Session Resumption Session resumption allows a client to reconnect to the server using previously negotiated options. We conducted tests similar to those for full handshake and measured timings for each step at each client as well as the server. We focused on RSA key exchange for this case. Session resumption requires fewer steps and excludes any asymmetric cryptographic operations. As a result, it cost only a fraction of the time in comparison to the full handshake. Specifically, the session resumption costs were 28% and 14% of the full handshake costs for the the PDA and laptop clients respectively. Given that we have shown that a large part of the latency on the PDA is due to the networking, it is unclear how much of the saving on the PDA result from a reduced number of network flows. PDA and laptop session resumption times were 4.89ms and 4.18ms. Thus, the lack of asymmetric cryptographic operations allows for little performance difference between the PDA and laptop clients. D. Data Transfer & WEP The next stage after the SSL handshake is that of data transfer. We measured data transfer times for an SSL client when the client downloads multiple sizes of HTML files from the SSL server. The sizes are 130K, 256K, 512K, 1024K, and 2048K bytes. Per work in [16], the size of 130K bytes is an average transfer size for an HTML session. We examined data transfer times with different sizes of files to investigate the effect of WEP, if any. In Figure 6 we show the differences in time to transfer different files over WEP vs. an open channel, for both the PDA and laptop clients. While WEP requires some encoding and therefore a reduction in bandwidth (and thus slower transfer times for larger files), we expected the slopes of the plotted lines to be consistent. However, this is clearly not the case and the lines diverge. We conclude that either the PDA is not able to compute the symmetric WEP encryption fast enough to keep the wireless pipe full or the same network bottlenecks that affected the PDA handshake are again apparent here. Fig. 6. Linear regression of the difference in transfer time between a WEP and open connection for files of different lengths on the laptop vs. PDA clients VI. CONCLUSION We make several key conclusions in this paper. First, there is room for optimization of SSL handshake on the serverside by taking client s capabilities into account. Second, as expected, session resumption cuts down the handshake costs substantially. However, the measured relative gains for a laptop are more than those experienced by a PDA. The differences between PDA and laptop resources become somewhat less apparent at the data transfer phase which requires less expensive cryptographic operations for the SSL protocol. However, when combined with WEP the computational penalty reasserts itself for larger transfers. We also find that the use of RSA is preferable than Diffie-Hellman in SSL handshakes from the perspective of optimizing costs at the client. Our results indicate that all aspects of resource constraints on a PDA affect the performance of the SSL protocol, not just the CPU, which plays a large role in cryptographic operations. They point to the need for optimizing security protocols for handheld devices. This is necessary not just to improve experience for clients connecting through the devices but to ensure that the server performance does not degrade as a result of serving a large number of these clients. In the future, when smartphones are expected to be the dominant computational device, this will be essential. REFERENCES [1] P. G. Argyroudis, R. Verma, H. Tewari, and D. O Mahony, Performance Analysis of Cryptographic Protocols on Handheld Devices, in IEEE NCA 2004, 2004. [2] D. Berbecaru, On Measuring SSL-based Secure Data Transfer with Handheld Devices, in Int l Symposium on Wireless Communication Systems, 2005. [3] IEEE Computer Society, Wireless LAN medium access control (MAC) and physical layer (PHY) specifications, IEEE Standard 802.11, 1999 Edition, 1999. [4] N. Borisov, I. Goldberg, and D. Wagner, Intercepting Mobile Communications: The Insecurity of 802.11, in ACM Mobicom, July 2001. [5] A. O. Freier, P. Karlton, and P. C. Kocher, The SSL 3.0 Protocol, November 1996. [6] N. R. Potlapally, S. Ravi, A. Raghunathan, and N. K. Jha, A Study of the Energy Consumption Characteristics of Cryptographic Algorithms and Security Protocols, IEEE Transactions On Mobile Computing, vol. 5, no. 2, pp. 128 143, 2005. [7] IEEE Computer Society, IEEE Standard 802.11i, 2004. [8] G. Apostolopoulos, V. Peris, and D. Saha, Transport Layer Security: How much doest it really cost? in IEEE INFOCOM, 1999. [9] C. Coarfa, P. Druschel, and D. S. Wallach, Performance Analysis of TLS Web Servers, in NDSS, 2002. [10] D. S. Wong, H. H. Fuentes, and A. H. Chan, The Performance Measurement of Cryptographic Primitives on Palm Devices, in IEEE ACSAC, no. 17, 2001. [11] C. T. R. Hager, S. F. Midkiff, J.-M. Park, and T. L. Martin, Performance and Energy Efficiency of Block Ciphers in Personal Digital Assistants, in IEEE PerCom, 2005. [12] T. Dierks and E. Rescorla, The Transportation Layer Security (TLS) Protocol, version 1.1, RFC4346, April 2006. [13] PDAdb.net, http://www.pdadb.net. [14] OpenSSL Project. [Online]. Available: http://www.openssl.org [15] S. Blake-Wilson, M. Nystrom, D. Hopwood, J. Mikkelsen, and T. Wright, Transport Layer Security (TLS) Extensions, RFC3546, 2003. [16] A. King, The Average Web Page, http://www.optimizationweek.com/reviews/average-web-page, October 2006.