| 146 | These openssl speed tests were done using a v5.4.0 kernel and an out of tree cryptodev module on an Ubuntu Focal rootfs. In order to reproduce these results, you must use the config script within openssl's build directory to disable dynamic engine support. Otherwise openssl will almost always default to using the faster CPU method (software). |
| 147 | |
| 148 | {{{#!bash |
| 149 | apt install build-essential pkg-config libssl-dev |
| 150 | wget https://www.openssl.org/source/openssl-1.1.1g.tar.gz |
| 151 | tar xvf openssl-* |
| 152 | cd openssl-* |
| 153 | ./config disable-engine disable-dso disable-dynamic-engine enable-devcryptoeng enable-afalgeng |
| 154 | make |
| 155 | make install |
| 156 | export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib/ # prioritize built shared object path for linker this boot |
| 157 | |
| 158 | # Remove cryptodev module to test afalg |
| 159 | rmmod cryptodev; modprobe af_alg algif_hash algif_aead algif_skcipher algif_rng |
| 160 | openssl speed -evp aes-256-cbc -engine afalg -elapsed |
| 161 | |
| 162 | # Remove afalg modules to test cryptodev |
| 163 | rmmod algif_hash algif_aead algif_skcipher algif_rng af_alg; modprobe cryptodev |
| 164 | openssl speed -evp aes-256-cbc -engine devcrypto -elapsed |
| 165 | |
| 166 | # Remove both to ensure pure software test |
| 167 | rmmod cryptodev; rmmod algif_hash algif_aead algif_skcipher algif_rng af_alg |
| 168 | openssl speed -evp aes-256-cbc -elapsed |
| 169 | }}} |
| 170 | |
| 171 | * Device: GW7300-00-AA |
| 172 | * CPU Speed: 1200 MHz |
| 173 | * OpenSSL version: 1.1.1g (aes-256-cbc) |
| 174 | |
| 175 | || ||||||||||||= '''Number of Blocks Processed in 3s / Block Size in Bytes''' =|| |
| 176 | ||= '''Engine''' =||'''16''' ||'''64''' ||'''256''' ||'''1024''' ||'''8192''' ||'''16384'''|| |
| 177 | ||= AF_ALG =||15.47k||61.66k||245.18k||961.12k ||6416.15k ||10759.56k|| |
| 178 | ||= cryptodev =||15.75k||62.78k||250.07k||978.99k ||6572.84k||11110.23k|| |
| 179 | ||= software =||125752.24k||334926.68k||564419.24k||693793.79k ||743309.31k||746651.65k|| |
| 180 | |
148 | | * OpenSSL version: 1.1.1c |
149 | | |
150 | | || ||||||||||||= '''Number of Blocks Processed in 3s / Block Size in Bytes''' =|| |
151 | | ||= '''Engine''' =||16 ||64 ||256 ||1024 ||8192 ||16384|| |
152 | | ||= AF_ALG =||283925||281102||254300||212132 ||75834 ||43402|| |
153 | | ||= cryptodev =||958747||919563||674246||450026 ||107426||55976|| |
154 | | ||= software =||959704||920003||673949||449422 ||107408||56336|| |
| 183 | * OpenSSL version: 1.1.1g (aes-256-cbc) |
| 184 | |
| 185 | || ||||||||||||= '''Number of Blocks Processed in 3s / Block Size in Bytes''' =|| |
| 186 | ||= '''Engine''' =||'''16''' ||'''64''' ||'''256''' ||'''1024''' ||'''8192''' ||'''16384'''|| |
| 187 | ||= AF_ALG =||243.96k||992.81k||3705.26k||12669.95k ||55855.79k ||75311.79k|| |
| 188 | ||= cryptodev =||361.48k||1453.65k||5723.56k||20779.35k ||74918.57k||93077.50k|| |
| 189 | ||= software =||33182.40k||72847.42k||102824.70k||115210.24k ||119368.36k||119581.35k|| |
| 190 | |