1*b0d17251Schristos=pod 2*b0d17251Schristos{- OpenSSL::safe::output_do_not_edit_headers(); -} 3*b0d17251Schristos 4*b0d17251Schristos=head1 NAME 5*b0d17251Schristos 6*b0d17251Schristosopenssl-speed - test library performance 7*b0d17251Schristos 8*b0d17251Schristos=head1 SYNOPSIS 9*b0d17251Schristos 10*b0d17251SchristosB<openssl speed> 11*b0d17251Schristos[B<-help>] 12*b0d17251Schristos[B<-elapsed>] 13*b0d17251Schristos[B<-evp> I<algo>] 14*b0d17251Schristos[B<-hmac> I<algo>] 15*b0d17251Schristos[B<-cmac> I<algo>] 16*b0d17251Schristos[B<-mb>] 17*b0d17251Schristos[B<-aead>] 18*b0d17251Schristos[B<-multi> I<num>] 19*b0d17251Schristos[B<-async_jobs> I<num>] 20*b0d17251Schristos[B<-misalign> I<num>] 21*b0d17251Schristos[B<-decrypt>] 22*b0d17251Schristos[B<-primes> I<num>] 23*b0d17251Schristos[B<-seconds> I<num>] 24*b0d17251Schristos[B<-bytes> I<num>] 25*b0d17251Schristos[B<-mr>] 26*b0d17251Schristos{- $OpenSSL::safe::opt_r_synopsis -} 27*b0d17251Schristos{- $OpenSSL::safe::opt_engine_synopsis -}{- $OpenSSL::safe::opt_provider_synopsis -} 28*b0d17251Schristos[I<algorithm> ...] 29*b0d17251Schristos 30*b0d17251Schristos=head1 DESCRIPTION 31*b0d17251Schristos 32*b0d17251SchristosThis command is used to test the performance of cryptographic algorithms. 33*b0d17251Schristos 34*b0d17251Schristos=head1 OPTIONS 35*b0d17251Schristos 36*b0d17251Schristos=over 4 37*b0d17251Schristos 38*b0d17251Schristos=item B<-help> 39*b0d17251Schristos 40*b0d17251SchristosPrint out a usage message. 41*b0d17251Schristos 42*b0d17251Schristos=item B<-elapsed> 43*b0d17251Schristos 44*b0d17251SchristosWhen calculating operations- or bytes-per-second, use wall-clock time 45*b0d17251Schristosinstead of CPU user time as divisor. It can be useful when testing speed 46*b0d17251Schristosof hardware engines. 47*b0d17251Schristos 48*b0d17251Schristos=item B<-evp> I<algo> 49*b0d17251Schristos 50*b0d17251SchristosUse the specified cipher or message digest algorithm via the EVP interface. 51*b0d17251SchristosIf I<algo> is an AEAD cipher, then you can pass B<-aead> to benchmark a 52*b0d17251SchristosTLS-like sequence. And if I<algo> is a multi-buffer capable cipher, e.g. 53*b0d17251Schristosaes-128-cbc-hmac-sha1, then B<-mb> will time multi-buffer operation. 54*b0d17251Schristos 55*b0d17251SchristosTo see the algorithms supported with this option, use 56*b0d17251SchristosC<openssl list -digest-algorithms> or C<openssl list -cipher-algorithms> 57*b0d17251Schristoscommand. 58*b0d17251Schristos 59*b0d17251Schristos=item B<-multi> I<num> 60*b0d17251Schristos 61*b0d17251SchristosRun multiple operations in parallel. 62*b0d17251Schristos 63*b0d17251Schristos=item B<-async_jobs> I<num> 64*b0d17251Schristos 65*b0d17251SchristosEnable async mode and start specified number of jobs. 66*b0d17251Schristos 67*b0d17251Schristos=item B<-misalign> I<num> 68*b0d17251Schristos 69*b0d17251SchristosMisalign the buffers by the specified number of bytes. 70*b0d17251Schristos 71*b0d17251Schristos=item B<-hmac> I<digest> 72*b0d17251Schristos 73*b0d17251SchristosTime the HMAC algorithm using the specified message digest. 74*b0d17251Schristos 75*b0d17251Schristos=item B<-cmac> I<cipher> 76*b0d17251Schristos 77*b0d17251SchristosTime the CMAC algorithm using the specified cipher e.g. 78*b0d17251SchristosC<openssl speed -cmac aes128>. 79*b0d17251Schristos 80*b0d17251Schristos=item B<-decrypt> 81*b0d17251Schristos 82*b0d17251SchristosTime the decryption instead of encryption. Affects only the EVP testing. 83*b0d17251Schristos 84*b0d17251Schristos=item B<-mb> 85*b0d17251Schristos 86*b0d17251SchristosEnable multi-block mode on EVP-named cipher. 87*b0d17251Schristos 88*b0d17251Schristos=item B<-aead> 89*b0d17251Schristos 90*b0d17251SchristosBenchmark EVP-named AEAD cipher in TLS-like sequence. 91*b0d17251Schristos 92*b0d17251Schristos=item B<-primes> I<num> 93*b0d17251Schristos 94*b0d17251SchristosGenerate a I<num>-prime RSA key and use it to run the benchmarks. This option 95*b0d17251Schristosis only effective if RSA algorithm is specified to test. 96*b0d17251Schristos 97*b0d17251Schristos=item B<-seconds> I<num> 98*b0d17251Schristos 99*b0d17251SchristosRun benchmarks for I<num> seconds. 100*b0d17251Schristos 101*b0d17251Schristos=item B<-bytes> I<num> 102*b0d17251Schristos 103*b0d17251SchristosRun benchmarks on I<num>-byte buffers. Affects ciphers, digests and the CSPRNG. 104*b0d17251SchristosThe limit on the size of the buffer is INT_MAX - 64 bytes, which for a 32-bit 105*b0d17251Schristosint would be 2147483583 bytes. 106*b0d17251Schristos 107*b0d17251Schristos=item B<-mr> 108*b0d17251Schristos 109*b0d17251SchristosProduce the summary in a mechanical, machine-readable, format. 110*b0d17251Schristos 111*b0d17251Schristos{- $OpenSSL::safe::opt_r_item -} 112*b0d17251Schristos 113*b0d17251Schristos{- $OpenSSL::safe::opt_engine_item -} 114*b0d17251Schristos 115*b0d17251Schristos{- $OpenSSL::safe::opt_provider_item -} 116*b0d17251Schristos 117*b0d17251Schristos=item I<algorithm> ... 118*b0d17251Schristos 119*b0d17251SchristosIf any I<algorithm> is given, then those algorithms are tested, otherwise a 120*b0d17251Schristospre-compiled grand selection is tested. 121*b0d17251Schristos 122*b0d17251Schristos=back 123*b0d17251Schristos 124*b0d17251Schristos=head1 BUGS 125*b0d17251Schristos 126*b0d17251SchristosThe I<algorithm> can be selected only from a pre-compiled subset of things 127*b0d17251Schristosthat the C<openssl speed> command knows about. To test any additional digest 128*b0d17251Schristosor cipher algorithm supported by OpenSSL use the C<-evp> option. 129*b0d17251Schristos 130*b0d17251SchristosThere is no way to test the speed of any additional public key algorithms 131*b0d17251Schristossupported by third party providers with the C<openssl speed> command. 132*b0d17251Schristos 133*b0d17251Schristos=head1 HISTORY 134*b0d17251Schristos 135*b0d17251SchristosThe B<-engine> option was deprecated in OpenSSL 3.0. 136*b0d17251Schristos 137*b0d17251Schristos=head1 COPYRIGHT 138*b0d17251Schristos 139*b0d17251SchristosCopyright 2000-2022 The OpenSSL Project Authors. All Rights Reserved. 140*b0d17251Schristos 141*b0d17251SchristosLicensed under the Apache License 2.0 (the "License"). You may not use 142*b0d17251Schristosthis file except in compliance with the License. You can obtain a copy 143*b0d17251Schristosin the file LICENSE in the source distribution or at 144*b0d17251SchristosL<https://www.openssl.org/source/license.html>. 145*b0d17251Schristos 146*b0d17251Schristos=cut 147