• Kevin Jacobs's avatar
    Bug 1608493 - Use AES-NI intrinsics for CBC and ECB decrypt when no assembly... · a6f7f366
    Kevin Jacobs authored
    Bug 1608493 - Use AES-NI intrinsics for CBC and ECB decrypt when no assembly implementation is available. r=mt
    
    AES-NI is currently not used for //CBC// or //ECB decrypt// when an assembly implementation (`intel-aes.s` or `intel-aes-x86/64-masm.asm`) is not available. Concretely, this is the case on MacOS, Linux32, and other non-Linux OSes such as BSD. This patch adds the plumbing to use AES-NI intrinsics when available.
    
    Before:
    ```
           mode          in symmkey  opreps  cxreps     context          op   time(sec)     thrgput
      aes_ecb_d        78Mb     256     10T       0       0.000     395.000       0.395       197Mb
      aes_cbc_e        78Mb     256     10T       0       0.000     392.000       0.393       198Mb
      aes_cbc_d        78Mb     256     10T       0       0.000     425.000       0.425       183Mb
    
    ```
    
    After:
    ```
          mode          in symmkey  opreps  cxreps     context          op   time(sec)     thrgput
     aes_ecb_d        78Mb     256     10T       0       0.000      39.000       0.039         1Gb
     aes_cbc_e        78Mb     256     10T       0       0.000      94.000       0.094       831Mb
     aes_cbc_d        78Mb     256     10T       0       0.000      74.000       0.075         1Gb
    
    ```
    
    Differential Revision: https://phabricator.services.mozilla.com/D60195
    
    --HG--
    extra : moz-landing-system : lando
    a6f7f366
Name
Last commit
Last update
automation Loading commit data...
cmd Loading commit data...
coreconf Loading commit data...
cpputil Loading commit data...
doc Loading commit data...
fuzz Loading commit data...
gtests Loading commit data...
lib Loading commit data...
nss-tool Loading commit data...
pkg Loading commit data...
tests Loading commit data...
.arcconfig Loading commit data...
.clang-format Loading commit data...
.gitignore Loading commit data...
.hgignore Loading commit data...
.hgtags Loading commit data...
.sancov-blacklist Loading commit data...
.taskcluster.yml Loading commit data...
COPYING Loading commit data...
Makefile Loading commit data...
build.sh Loading commit data...
exports.gyp Loading commit data...
help.txt Loading commit data...
mach Loading commit data...
manifest.mn Loading commit data...
nss.gyp Loading commit data...
readme.md Loading commit data...
trademarks.txt Loading commit data...