


Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!



A great deal of effort is currently being expended to pro- vide some level of Internet security. An important ques- tion is whether security can be provided at gigabit speeds. The standard set of algorithms required to secure a con- nection includes a bulk encryption algorithm such as DES [1], a cryptographic checksum such as MD5 [13], a key ex- change algorithm (such as Diffie-Hellman key exchange) to securely distribute the DES key, and some form of digital signature algorithm to authenticate the parties (e.g., RSA [14]). The encryption and checksum algorithm must be ap- plied to every packet going across a secure link, and there- fore the performance of these algorithms directly affects the achievable bandwidth. Furthermore, there are some problems (such as sender authentication in multicast) that require the use of expensive algorithms such as RSA signa- tures on every packet. The other algorithms only need to be run at connection set-up time, so they only affect the overall bandwidth if the connections are short, the algorithms are particularly expensive, and/or the overhead of using these algorithms on busy servers reduces overall network perfor- mance. Thus there are two important performance metrics to consider: overall bandwidth and number of connections per second. A straightforward approach to improving cryptographic performance is to implement cryptographic algorithms in hardware. This approach has been shown to improve cryp- tographic performance of single algorithms (e.g., DEC has demonstrated a 1 Gbit/sec DES chip [5]). Unfortunately there are several problems with this approach. First, a secure network system requires the efficient implementa- tion of a suite of algorithms, not just DES. Hosts clearly need to be able to run both DES and MD5 efficiently, and servers, at least, need to run them all efficiently. Second, hosts need to implement Internet standards, and standards change. In fact, most Internet security standards are written to allow flexibility in algorithm selection. Third, security
This research supported in part by NSF under grant NCR-9206908, by ARPA under contract F19628-92-C-0089, by ARPA under contract DABT63-94-C-0002, and by NCSC under contract MDA 904-94-C-6110.
Protocol Performance MD5 80 Mbits/sec DES 15 Mbits/sec 3-DES 5 Mbits/sec RSA Crypt-Decrypt 10 Kbits/sec RSA Signature 20 signatures/sec Diffie-Hellman 5 keys/sec Key Exchange
Table 1: Current Cryptographic Algorithm Performance
algorithms can be broken (e.g. knapsack crypto-systems, 129 digit RSA, 192 bit Diffie Hellman Key exchange, and any year now, DES). Hence, they may have to be changed on short notice. Fourth, cryptographic hardware is not ubi- quitous, cheap or readily exportable. It is clear that adding more than one (and some people would say any) piece of cryptographic hardware to a given host is unlikely, if only for these reasons. Finally, implementing certain crypto- graphic algorithms (e.g. MD5) in hardware provides only limited increases in performance [19]. Thus we question whether the traditional approach of implementing crypto- graphic hardware is suitable for the current Internet envi- ronment. Thus we need cryptographic software. Therefore let us consider the performance of a set of cryptographic algo- rithms when implemented in software. Table 1 gives the performance of a variety of standard cryptographic algo- rithms as implemented in software on a 175 MHz Dec Alpha 600. Clearly, implementing these algorithms in soft- ware on a modern RISC workstation does not provide suf- ficient bandwidth to drive a gigabit link. Furthermore, the connection establishment overhead is so high that overall performance on busy servers is likely to suffer. All of these algorithms are compute bound and their performance will scale nicely with increasing processor performance. Unfor- tunately, we believe that most, if not all, of this increased performance is already spoken for. Increasing network per-
formance will require improvements in cryptographic soft-
also helps an attacker. Thus, the strength (and hence the computational cost) of the cryptographic algorithms must be increased to keep up. In this paper we will examine three different approaches to improving the performance of cryptographic software: new algorithm design, parallelization, and algorithm inde- pendent hardware support.
An obvious way to improve the performance of crypto- graphic software is to develop new and faster algorithms. Unfortunately it is not sufficient for a security algorithm to be correct, it also must be secure. Showing that an algo- rithm is secure is a time consuming problem. This makes the creation of entirely new algorithms problematic: new algorithms are assumed to be insecure. We address this problem in three ways. First, there are a large number of existing security algorithms which, while not widely used, have at least been around long enough to have withstood some amount of attack. Second, existing security algo- rithms can often be implemented in a variety of different ways. Finally, it is often possible to make small modifica- tions to an existing algorithm with a strong assurance that the resulting algorithm is not significantly weaker than the original. An example of this approach is a set of modifications to the Diffie-Hellman key exchange algorithm(DHKX) that we (and others) have implemented. The DHKX algorithm [4] is a secure method for initiating a conversation between two previously un-introduced parties. It relies on exponen- tiation in a large group, and the software implementation of the group operation is usually computationally intensive. The algorithm has been proposed as an Internet standard [18], and as such its performance is of great importance. A straightforward implementation of DHKX uses the multi-
(this is the implementation timed in Table 1). However, the DHKX algorithm can also be im- plemented with the same level of security using the group of
By choosing an appropriate mapping from elliptic curve
structions, one can gain significant improvements. In [16] we showed an improved method of computing reciprocals in
algorithm by a factor of 6, bringing it down to 30 millisec- onds per key exchange. A further increase in performance (about a factor of 2.5) can be achieved by precomputing a table of generator powers [3]. The resulting table size is small (in the low kilobytes) and as such is well worth the time-space trade off. What is more important than the results on any specific
algorithm is the approach. One can choose from a variety of algorithms in the literature. Then, in the case of num- ber theoretic algorithms, one can choose the underlying mathematical structures for implementation. If careful im- plementation techniques for the structure representation and operators are used, performance improvements are some- times possible.
Another approach to improving software encryption perfor- mance is to use parallelism. At least three types of paral- lelism can be used: per-connection, per-packet, and intra- packet (or functional) parallelism. Connection-level par- allelism is straightforward, but does not allow parallelism to improve the throughput of a single connection. Packet- level parallelism associates processing with each packet, regardless of the connection. Intra-packet parallelism asso- ciates multiple processing units with a single packet, and is only feasible if the encryption algorithm allows it. For ex- ample, DES with Electronic Code Book (ECB) allows sep- arate eight-byte blocks to be encrypted in parallel, and thus could be parallelized at an intra-packet granularity. How- ever, ECB is susceptible to simple-substitution code attacks and cut-and-paste forgery. Thus, most implementations use the Cipher-Block Chaining (CBC) mode of DES, where the output of each encryption is xor’ed into the next block of plaintext. Although each block cannot be encrypted in parallel with DES CBC mode, they can be decrypted in parallel. To examine the impact of parallelism on cryptographic software, we used a version of the x -kernel [6] augmented to support packet-level parallelism [11]. The system runs in user space on Silicon Graphics R4400-based shared- memory multiprocessors. We ran a set of send-side through- put tests with DES and MD5 to see how well encryption protocols scale using packet-level parallelism. Given that the granularity of parallelism in this study is packet-sized, DES parallelism here means that separate packets are en- crypted in parallel using CBC mode. Figure 1 shows sending throughputs in Megabits per second for three protocol stacks: a TCP/IP stack, a TCP/MD5/IP stack, and a DES/TCP/IP stack
. These throughputs were measured on an 8-processor 100MHz Challenge machine, using a single TCP connection with 4 KB packets. Figure 2 shows the corresponding rela- tive speedup for the three TCP stacks, where speedup is normalized relative to the appropriate stack’s uniprocessor throughput. Each data point is the average of 10 runs, and throughput graphs include 90 percent confidence intervals. More details can be found in [11].
For purposes of this study, we ignore for the moment that TCP does not preserve packet boundaries on the receive side. In this case, on the send side, packet boundaries are preserved.
codes. Is it practical to add instructions to a RISC processor? We think so. First, there is no real shortage of chip area on most modern RISC processors [7], and second, many modern super-scalar processors have more ALU’s than are needed for the amount of instruction level parallelism found in most applications [17]. The real problem is the cost of the design work required to implement these instructions in very high clock-rate technologies. The question then is one of economics: is the market for such a chip large enough for the vendor to make a profit? The UltraSPARC and HP PA- 7100LC may provide existence proofs that this approach is viable given a large enough market. The UltraSPARC design contains a set of special purpose instructions to speed up pixel operations and MPEG play [8]; a similar technique is used in the PA-7100LC chips [9]. This increases the performance of multimedia applications and reduces cost by eliminating the necessity of providing special purpose graphics hardware off chip. The market for crypto hardware may reach a size where this approach is profitable. If we can demonstrate that enhancing a standard CPU core by a minimal number of RISC-style instructions improves the performance of several security (and perhaps non-security) algorithms, then the viability of that market may well be increased.
Current software implementations of current cryptographic software is orders of magnitude slower than required to se- cure a gigabit network. We have proposed three techniques to solve this problem. We believe that in combination these approaches could go a long way to improving cryptographic protocol performance without the inflexibility required for the current generation of cryptographic hardware support.
Joe Touch and David Yates provided valuable comments on earlier drafts of this paper.
[1] A. N. S. I. (ANSI). American national standard data en- cryption standard. Technical report ANSI X3.92-1981, Dec.
[2] M. Bj¨orkman and P. Gunningberg. Locking effects in multi- processor implementations of protocols. In ACM SIGCOMM Symposium on Communications Architectures and Proto- cols , pages 74–83, San Francisco, CA, Sept. 1993. [3] E. Brickell, D. Gordon, K. McCurley, and D. Wilson. Fast exponentiation with precomputation (extended abstract). In
Lecture Notes in Computer Science 658 , pages 200–207,
[4] W. Diffie and M. E. Hellman. New directions in cryptogra- phy. IEEE Transactions on Information Theory , 22(6):644– 654, Feb. 1993. [5] H. Eberle. A high-speed DES implementation for network applications. Technical Report 90, Digital Equipment Cor- poration Systems Research Center, Sept. 1992. [6] N. C. Hutchinson and L. L. Peterson. The x-Kernel: An architecture for implementing network protocols. IEEE Transactions on Software Engineering , 17(1):64–76, Jan- uary 1991. [7] N. Jouppi and S. Wilton. Tradeoffs in two-level on-chip caching. Technical Report Research Report 93/3, DEC WRL, Oct. 1993. [8] L. Kohn, G. Maturana, A. Prabhu, and G. Zyner. The visual instruction set (VIS) in UltraSPARC. In Compcon Spring 95 , pages 462–469, March 1995. [9] R. B. Lee. Accelerating multimedia with enhanced micro- processors. IEEE Micro , 15(2):22–32, Apr. 1995. [10] A. J. Menezes. Elliptic Curve Public Key Cryptosystems. Kluwer Academic Publishers, 1993. [11] E. M. Nahum, D. J. Yates, J. F. Kurose, and D. Towsley. Performance issues in parallelized network protocols. In First USENIX Symposium on Operating Systems Design and Implementation , Monterey, CA, Nov. 1994. [12] H. Orman, S. O’Malley, R. Schroeppel, and D. Schwartz. Paving the road to network security, or the value of small cobblestones. In Proceedings of the 1994 Internet Society Symposium on Network and Distributed System Security , Feb. 1994. [13] R. Rivest. The MD5 message-digest algorithm. In Network Information Center RFC 1321 , pages 1–21, Menlo Park, CA, Apr. 1992. SRI International. [14] R. Rivest, A. Shamir, and L. Adleman. A method for obtain- ing digital signatures and public-key cryposystems. Com- munications of the ACM , pages 120–126, Feb. 1978. [15] D. C. Schmidt and T. Suda. Measuring the performance of parallel message-based process architectures. In Proceed- ings of the Conference on Computer Communications (IEEE Infocomm) , Boston, MA, Apr. 1995. [16] R. Schroeppel, H. Orman, S. O’Malley, and O. Spatscheck. Fast key exchange with elliptic curve systems. Technical Report 95-03, Department of Computer Science, University of Arizona, Feb. 1995. [17] M. D. Smith, M. Johnson, and M. A. Howowitz. Lim- its on multiple instruction issue. In Proceedings Third In- ternational Conference on Architectural Support for Pro- gramming Languages and Operating Systems (ASPLOS III) , pages 290–302, Boston MA, April 1989. [18] The Internet Engineering Task Force Working Group on Security for IPv4. Ipsec draft. Technical report, 1995. [19] J. Touch. Performance analysis of MD5. In ACM SIG- COMM Symposium on Communications Architectures and Protocols , Boston MA, Aug. 1995.