)]}' { "commit": "68fb23864515a93dbc2783e518db1a91a4d6d45b", "tree": "908401339bdb2683b77680a43562f02a630d70a0", "parents": [ "5588ec7a8bab22a9a7abff8584bcb9e2552c0697" ], "author": { "name": "David Benjamin", "email": "davidben@google.com", "time": "Fri Mar 22 12:52:40 2019 -0500" }, "committer": { "name": "Adam Langley", "email": "agl@google.com", "time": "Fri Sep 13 17:21:58 2019 +0000" }, "message": "Add vpaes-armv7.pl and replace non-parallel modes.\n\nThis is translated from vpaes-armv8.pl. See top of the new file for\ndetails. Unfortunately, vpaes\u0027s performance is disappointing here. The\nvpaes paper notes NEON\u0027s vector permutation instructions are not very\nfast. But this is now constant-time.\n\nParallel modes, notably CTR derivatives, are performance-sensitive and\nworth further work. (They currently use bsaes.) Thus this CL only\nreplaces non-parallel uses, which currently use a variable-time\ntable-based implementation.\n\nNote QUIC packet number encryption will do a single one-off AES block\noperation per packet and use this file. But the single-block speeds\nbelow should be fine for a per-packet operation.\n\nAlternatives considered: I toyed with BearSSL\u0027s 32-bit C bitsliced\nimplementation, but it appears to be slower than this implementation.\n\nCortex-A53 (Raspberry Pi 3 Model B+)\nBefore:\nDid 124000 AES-128-CBC-SHA1 (16 bytes) seal operations in 1005644us (123304.1 ops/sec): 2.0 MB/s\nDid 45000 AES-128-CBC-SHA1 (256 bytes) seal operations in 1009513us (44575.9 ops/sec): 11.4 MB/s\nDid 12000 AES-128-CBC-SHA1 (1350 bytes) seal operations in 1009735us (11884.3 ops/sec): 16.0 MB/s\nDid 2266 AES-128-CBC-SHA1 (8192 bytes) seal operations in 1060631us (2136.5 ops/sec): 17.5 MB/s\nDid 1078 AES-128-CBC-SHA1 (16384 bytes) seal operations in 1002268us (1075.6 ops/sec): 17.6 MB/s\nDid 114000 AES-256-CBC-SHA1 (16 bytes) seal operations in 1004576us (113480.7 ops/sec): 1.8 MB/s\nDid 38000 AES-256-CBC-SHA1 (256 bytes) seal operations in 1001777us (37932.6 ops/sec): 9.7 MB/s\nDid 9999 AES-256-CBC-SHA1 (1350 bytes) seal operations in 1028518us (9721.8 ops/sec): 13.1 MB/s\nDid 1892 AES-256-CBC-SHA1 (8192 bytes) seal operations in 1095702us (1726.7 ops/sec): 14.1 MB/s\nDid 902 AES-256-CBC-SHA1 (16384 bytes) seal operations in 1038989us (868.2 ops/sec): 14.2 MB/s\nDid 2094000 AES-128 encrypt setup operations in 1000296us (2093380.4 ops/sec)\nDid 1505000 AES-128 encrypt operations in 1000596us (1504103.6 ops/sec)\nDid 465000 AES-128 decrypt setup operations in 1000354us (464835.4 ops/sec)\nDid 1468000 AES-128 decrypt operations in 1000178us (1467738.7 ops/sec)\nDid 1751000 AES-256 encrypt setup operations in 1000189us (1750669.1 ops/sec)\nDid 1113000 AES-256 encrypt operations in 1000004us (1112995.5 ops/sec)\nDid 339000 AES-256 decrypt setup operations in 1002970us (337996.2 ops/sec)\nDid 1103000 AES-256 decrypt operations in 1000882us (1102028.0 ops/sec)\n\nAfter:\nDid 119000 AES-128-CBC-SHA1 (16 bytes) seal operations in 1000259us (118969.2 ops/sec): 1.9 MB/s [-5.0%]\nDid 39000 AES-128-CBC-SHA1 (256 bytes) seal operations in 1001341us (38947.8 ops/sec): 10.0 MB/s [-12.3%]\nDid 10571 AES-128-CBC-SHA1 (1350 bytes) seal operations in 1067614us (9901.5 ops/sec): 13.4 MB/s [-16.3%]\nDid 1903 AES-128-CBC-SHA1 (8192 bytes) seal operations in 1090907us (1744.4 ops/sec): 14.3 MB/s [-18.3%]\nDid 957 AES-128-CBC-SHA1 (16384 bytes) seal operations in 1093380us (875.3 ops/sec): 14.3 MB/s [-18.8%]\nDid 108000 AES-256-CBC-SHA1 (16 bytes) seal operations in 1005090us (107453.1 ops/sec): 1.7 MB/s [-5.6%]\nDid 33000 AES-256-CBC-SHA1 (256 bytes) seal operations in 1026530us (32147.1 ops/sec): 8.2 MB/s [-15.5%]\nDid 8393 AES-256-CBC-SHA1 (1350 bytes) seal operations in 1064768us (7882.5 ops/sec): 10.6 MB/s [-19.1%]\nDid 1496 AES-256-CBC-SHA1 (8192 bytes) seal operations in 1090316us (1372.1 ops/sec): 11.2 MB/s [-20.6%]\nDid 737 AES-256-CBC-SHA1 (16384 bytes) seal operations in 1070396us (688.5 ops/sec): 11.3 MB/s [-20.4%]\nDid 695000 AES-128 encrypt setup operations in 1000325us (694774.2 ops/sec) [-66.8%]\nDid 1043000 AES-128 encrypt operations in 1000568us (1042407.9 ops/sec) [-30.7%]\nDid 495000 AES-128 decrypt setup operations in 1000680us (494663.6 ops/sec) [-6.4%]\nDid 743000 AES-128 decrypt operations in 1000892us (742337.8 ops/sec) [-49.4%]\nDid 550000 AES-256 encrypt setup operations in 1000228us (549874.6 ops/sec) [-68.6%]\nDid 786000 AES-256 encrypt operations in 1000978us (785232.0 ops/sec) [-29.4%]\nDid 377000 AES-256 decrypt setup operations in 1002252us (376152.9 ops/sec) [-11.3%]\nDid 547000 AES-256 decrypt operations in 1000168us (546908.1 ops/sec) [-50.3%]\n\nBug: 266\nChange-Id: Ia5f9c90bcf5e713e40cacc954c604a6ffb432d6c\nReviewed-on: https://boringssl-review.googlesource.com/c/boringssl/+/37426\nReviewed-by: Adam Langley \u003cagl@google.com\u003e\n", "tree_diff": [ { "type": "modify", "old_id": "e978820049c2b6fddb7944f593a80a713104d683", "old_mode": 33188, "old_path": "crypto/fipsmodule/CMakeLists.txt", "new_id": "dc8f1b1434de92cf44caf33712fa83c784f25ca0", "new_mode": 33188, "new_path": "crypto/fipsmodule/CMakeLists.txt" }, { "type": "modify", "old_id": "7fadb351407044e093cd13b75433f488d7b4ec8d", "old_mode": 33188, "old_path": "crypto/fipsmodule/aes/aes_test.cc", "new_id": "f83c1054eb65e55d1029356e2306fe23d65ad66b", "new_mode": 33188, "new_path": "crypto/fipsmodule/aes/aes_test.cc" }, { "type": "add", "old_id": "0000000000000000000000000000000000000000", "old_mode": 0, "old_path": "/dev/null", "new_id": "a7563214f056134a05d6d69a2444f29b0f0b23e8", "new_mode": 33188, "new_path": "crypto/fipsmodule/aes/asm/vpaes-armv7.pl" }, { "type": "modify", "old_id": "0cebb04cae34da881f726065f811957b9b42af0f", "old_mode": 33188, "old_path": "crypto/fipsmodule/aes/internal.h", "new_id": "5428b543e7b800c70329065de0e79edbe9271d1d", "new_mode": 33188, "new_path": "crypto/fipsmodule/aes/internal.h" }, { "type": "modify", "old_id": "1ea012dd7cb0c9672e5486decde4623b61cbf980", "old_mode": 33188, "old_path": "crypto/fipsmodule/cipher/e_aes.c", "new_id": "bc90649a1b999158d1a2569f6122a0bcc7e62705", "new_mode": 33188, "new_path": "crypto/fipsmodule/cipher/e_aes.c" } ] }