xref: /dragonfly/tools/tools/crypto/README (revision 86d7f5d3)
1*86d7f5d3SJohn Marino$FreeBSD: src/tools/tools/crypto/README,v 1.1.2.1 2003/02/24 22:52:36 sam Exp $
2*86d7f5d3SJohn Marino$DragonFly: src/tools/tools/crypto/README,v 1.2 2003/06/17 04:29:11 dillon Exp $
3*86d7f5d3SJohn Marino
4*86d7f5d3SJohn MarinoThe cryptotest program repeatedly encrypts and decrypts a buffer
5*86d7f5d3SJohn Marinowith the built-in iv and key, using hardware crypto.  At the end,
6*86d7f5d3SJohn Marinoit computes the data rate achieved.  Operations are carried out by
7*86d7f5d3SJohn Marinomaking ioctl calls to /dev/crypto.
8*86d7f5d3SJohn Marino
9*86d7f5d3SJohn MarinoFor a test of how fast a crypto card is, use something like:
10*86d7f5d3SJohn Marino
11*86d7f5d3SJohn Marino	cryptotest -z 1024
12*86d7f5d3SJohn Marino
13*86d7f5d3SJohn MarinoThis will run a series of tests using the available crypto/cipher
14*86d7f5d3SJohn Marinoalgorithms over a variety of buffer sizes.  The 1024 says to do
15*86d7f5d3SJohn Marino1024 iterations.  Extra arguments can be used to specify one or
16*86d7f5d3SJohn Marinomore buffer sizes to use in doing tests.
17*86d7f5d3SJohn Marino
18*86d7f5d3SJohn MarinoA sample run is:
19*86d7f5d3SJohn Marino
20*86d7f5d3SJohn Marino 0.129 sec,    2048    des crypts,       8 bytes,   127120 byte/sec,     1.0 Mb/sec
21*86d7f5d3SJohn Marino 0.129 sec,    2048    des crypts,      16 bytes,   253915 byte/sec,     1.9 Mb/sec
22*86d7f5d3SJohn Marino 0.129 sec,    2048    des crypts,      32 bytes,   508942 byte/sec,     3.9 Mb/sec
23*86d7f5d3SJohn Marino 0.128 sec,    2048    des crypts,      64 bytes,  1020135 byte/sec,     7.8 Mb/sec
24*86d7f5d3SJohn Marino 0.134 sec,    2048    des crypts,     128 bytes,  1954869 byte/sec,    14.9 Mb/sec
25*86d7f5d3SJohn Marino 0.142 sec,    2048    des crypts,     256 bytes,  3698107 byte/sec,    28.2 Mb/sec
26*86d7f5d3SJohn Marino 0.190 sec,    2048    des crypts,    1024 bytes, 11037700 byte/sec,    84.2 Mb/sec
27*86d7f5d3SJohn Marino 0.264 sec,    2048    des crypts,    2048 bytes, 15891127 byte/sec,   121.2 Mb/sec
28*86d7f5d3SJohn Marino 0.403 sec,    2048    des crypts,    4096 bytes, 20828998 byte/sec,   158.9 Mb/sec
29*86d7f5d3SJohn Marino 0.687 sec,    2048    des crypts,    8192 bytes, 24426602 byte/sec,   186.4 Mb/sec
30*86d7f5d3SJohn Marino 0.129 sec,    2048   3des crypts,       8 bytes,   127321 byte/sec,     1.0 Mb/sec
31*86d7f5d3SJohn Marino 0.131 sec,    2048   3des crypts,      16 bytes,   249773 byte/sec,     1.9 Mb/sec
32*86d7f5d3SJohn Marino 0.128 sec,    2048   3des crypts,      32 bytes,   512304 byte/sec,     3.9 Mb/sec
33*86d7f5d3SJohn Marino 0.128 sec,    2048   3des crypts,      64 bytes,  1021685 byte/sec,     7.8 Mb/sec
34*86d7f5d3SJohn Marino 0.132 sec,    2048   3des crypts,     128 bytes,  1986511 byte/sec,    15.2 Mb/sec
35*86d7f5d3SJohn Marino 0.142 sec,    2048   3des crypts,     256 bytes,  3695005 byte/sec,    28.2 Mb/sec
36*86d7f5d3SJohn Marino 0.190 sec,    2048   3des crypts,    1024 bytes, 11024876 byte/sec,    84.1 Mb/sec
37*86d7f5d3SJohn Marino 0.264 sec,    2048   3des crypts,    2048 bytes, 15887997 byte/sec,   121.2 Mb/sec
38*86d7f5d3SJohn Marino 0.402 sec,    2048   3des crypts,    4096 bytes, 20850846 byte/sec,   159.1 Mb/sec
39*86d7f5d3SJohn Marino 0.689 sec,    2048   3des crypts,    8192 bytes, 24333532 byte/sec,   185.7 Mb/sec
40*86d7f5d3SJohn Marino
41*86d7f5d3SJohn MarinoExpect ~400 Mb/s for a Broadcom 582x for 16K buffers on a reasonable
42*86d7f5d3SJohn MarinoCPU.  Hifn 7811 parts top out at ~120 Mb/s.  Performance depends
43*86d7f5d3SJohn Marinoheavily on memory and bus performance.
44*86d7f5d3SJohn Marino
45*86d7f5d3SJohn MarinoThis code originally came from openbsd; give them all the credit.
46