You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

ghashv8-armx.pl 11 KiB

modes/asm/ghashv8-armx.pl: up to 90% performance improvement. (Imported from upstream's 7eeeb49e1103533bc81c234eb19613353866e474) Here are the performance numbers on a Nexus 9 (32-bit binary): Before: Did 4376000 AES-128-GCM (16 bytes) seal operations in 1000016us (4375930.0 ops/sec): 70.0 MB/s Did 642000 AES-128-GCM (1350 bytes) seal operations in 1001090us (641301.0 ops/sec): 865.8 MB/s Did 126000 AES-128-GCM (8192 bytes) seal operations in 1001460us (125816.3 ops/sec): 1030.7 MB/s Did 4120000 AES-256-GCM (16 bytes) seal operations in 1000004us (4119983.5 ops/sec): 65.9 MB/s Did 547000 AES-256-GCM (1350 bytes) seal operations in 1001165us (546363.5 ops/sec): 737.6 MB/s Did 99000 AES-256-GCM (8192 bytes) seal operations in 1000027us (98997.3 ops/sec): 811.0 MB/s After: Did 4569000 AES-128-GCM (16 bytes) seal operations in 1000011us (4568949.7 ops/sec): 73.1 MB/s Did 796000 AES-128-GCM (1350 bytes) seal operations in 1000161us (795871.9 ops/sec): 1074.4 MB/s Did 162000 AES-128-GCM (8192 bytes) seal operations in 1003828us (161382.2 ops/sec): 1322.0 MB/s Did 4398000 AES-256-GCM (16 bytes) seal operations in 1000001us (4397995.6 ops/sec): 70.4 MB/s Did 634000 AES-256-GCM (1350 bytes) seal operations in 1001290us (633183.2 ops/sec): 854.8 MB/s Did 122000 AES-256-GCM (8192 bytes) seal operations in 1005650us (121314.6 ops/sec): 993.8 MB/s Change-Id: I2fef921069ad174f5651dfe59be262625fb3f7c9 Reviewed-on: https://boringssl-review.googlesource.com/4483 Reviewed-by: Adam Langley <agl@google.com>
9 vuotta sitten
modes/asm/ghashv8-armx.pl: up to 90% performance improvement. (Imported from upstream's 7eeeb49e1103533bc81c234eb19613353866e474) Here are the performance numbers on a Nexus 9 (32-bit binary): Before: Did 4376000 AES-128-GCM (16 bytes) seal operations in 1000016us (4375930.0 ops/sec): 70.0 MB/s Did 642000 AES-128-GCM (1350 bytes) seal operations in 1001090us (641301.0 ops/sec): 865.8 MB/s Did 126000 AES-128-GCM (8192 bytes) seal operations in 1001460us (125816.3 ops/sec): 1030.7 MB/s Did 4120000 AES-256-GCM (16 bytes) seal operations in 1000004us (4119983.5 ops/sec): 65.9 MB/s Did 547000 AES-256-GCM (1350 bytes) seal operations in 1001165us (546363.5 ops/sec): 737.6 MB/s Did 99000 AES-256-GCM (8192 bytes) seal operations in 1000027us (98997.3 ops/sec): 811.0 MB/s After: Did 4569000 AES-128-GCM (16 bytes) seal operations in 1000011us (4568949.7 ops/sec): 73.1 MB/s Did 796000 AES-128-GCM (1350 bytes) seal operations in 1000161us (795871.9 ops/sec): 1074.4 MB/s Did 162000 AES-128-GCM (8192 bytes) seal operations in 1003828us (161382.2 ops/sec): 1322.0 MB/s Did 4398000 AES-256-GCM (16 bytes) seal operations in 1000001us (4397995.6 ops/sec): 70.4 MB/s Did 634000 AES-256-GCM (1350 bytes) seal operations in 1001290us (633183.2 ops/sec): 854.8 MB/s Did 122000 AES-256-GCM (8192 bytes) seal operations in 1005650us (121314.6 ops/sec): 993.8 MB/s Change-Id: I2fef921069ad174f5651dfe59be262625fb3f7c9 Reviewed-on: https://boringssl-review.googlesource.com/4483 Reviewed-by: Adam Langley <agl@google.com>
9 vuotta sitten
modes/asm/ghashv8-armx.pl: up to 90% performance improvement. (Imported from upstream's 7eeeb49e1103533bc81c234eb19613353866e474) Here are the performance numbers on a Nexus 9 (32-bit binary): Before: Did 4376000 AES-128-GCM (16 bytes) seal operations in 1000016us (4375930.0 ops/sec): 70.0 MB/s Did 642000 AES-128-GCM (1350 bytes) seal operations in 1001090us (641301.0 ops/sec): 865.8 MB/s Did 126000 AES-128-GCM (8192 bytes) seal operations in 1001460us (125816.3 ops/sec): 1030.7 MB/s Did 4120000 AES-256-GCM (16 bytes) seal operations in 1000004us (4119983.5 ops/sec): 65.9 MB/s Did 547000 AES-256-GCM (1350 bytes) seal operations in 1001165us (546363.5 ops/sec): 737.6 MB/s Did 99000 AES-256-GCM (8192 bytes) seal operations in 1000027us (98997.3 ops/sec): 811.0 MB/s After: Did 4569000 AES-128-GCM (16 bytes) seal operations in 1000011us (4568949.7 ops/sec): 73.1 MB/s Did 796000 AES-128-GCM (1350 bytes) seal operations in 1000161us (795871.9 ops/sec): 1074.4 MB/s Did 162000 AES-128-GCM (8192 bytes) seal operations in 1003828us (161382.2 ops/sec): 1322.0 MB/s Did 4398000 AES-256-GCM (16 bytes) seal operations in 1000001us (4397995.6 ops/sec): 70.4 MB/s Did 634000 AES-256-GCM (1350 bytes) seal operations in 1001290us (633183.2 ops/sec): 854.8 MB/s Did 122000 AES-256-GCM (8192 bytes) seal operations in 1005650us (121314.6 ops/sec): 993.8 MB/s Change-Id: I2fef921069ad174f5651dfe59be262625fb3f7c9 Reviewed-on: https://boringssl-review.googlesource.com/4483 Reviewed-by: Adam Langley <agl@google.com>
9 vuotta sitten
modes/asm/ghashv8-armx.pl: up to 90% performance improvement. (Imported from upstream's 7eeeb49e1103533bc81c234eb19613353866e474) Here are the performance numbers on a Nexus 9 (32-bit binary): Before: Did 4376000 AES-128-GCM (16 bytes) seal operations in 1000016us (4375930.0 ops/sec): 70.0 MB/s Did 642000 AES-128-GCM (1350 bytes) seal operations in 1001090us (641301.0 ops/sec): 865.8 MB/s Did 126000 AES-128-GCM (8192 bytes) seal operations in 1001460us (125816.3 ops/sec): 1030.7 MB/s Did 4120000 AES-256-GCM (16 bytes) seal operations in 1000004us (4119983.5 ops/sec): 65.9 MB/s Did 547000 AES-256-GCM (1350 bytes) seal operations in 1001165us (546363.5 ops/sec): 737.6 MB/s Did 99000 AES-256-GCM (8192 bytes) seal operations in 1000027us (98997.3 ops/sec): 811.0 MB/s After: Did 4569000 AES-128-GCM (16 bytes) seal operations in 1000011us (4568949.7 ops/sec): 73.1 MB/s Did 796000 AES-128-GCM (1350 bytes) seal operations in 1000161us (795871.9 ops/sec): 1074.4 MB/s Did 162000 AES-128-GCM (8192 bytes) seal operations in 1003828us (161382.2 ops/sec): 1322.0 MB/s Did 4398000 AES-256-GCM (16 bytes) seal operations in 1000001us (4397995.6 ops/sec): 70.4 MB/s Did 634000 AES-256-GCM (1350 bytes) seal operations in 1001290us (633183.2 ops/sec): 854.8 MB/s Did 122000 AES-256-GCM (8192 bytes) seal operations in 1005650us (121314.6 ops/sec): 993.8 MB/s Change-Id: I2fef921069ad174f5651dfe59be262625fb3f7c9 Reviewed-on: https://boringssl-review.googlesource.com/4483 Reviewed-by: Adam Langley <agl@google.com>
9 vuotta sitten
modes/asm/ghashv8-armx.pl: up to 90% performance improvement. (Imported from upstream's 7eeeb49e1103533bc81c234eb19613353866e474) Here are the performance numbers on a Nexus 9 (32-bit binary): Before: Did 4376000 AES-128-GCM (16 bytes) seal operations in 1000016us (4375930.0 ops/sec): 70.0 MB/s Did 642000 AES-128-GCM (1350 bytes) seal operations in 1001090us (641301.0 ops/sec): 865.8 MB/s Did 126000 AES-128-GCM (8192 bytes) seal operations in 1001460us (125816.3 ops/sec): 1030.7 MB/s Did 4120000 AES-256-GCM (16 bytes) seal operations in 1000004us (4119983.5 ops/sec): 65.9 MB/s Did 547000 AES-256-GCM (1350 bytes) seal operations in 1001165us (546363.5 ops/sec): 737.6 MB/s Did 99000 AES-256-GCM (8192 bytes) seal operations in 1000027us (98997.3 ops/sec): 811.0 MB/s After: Did 4569000 AES-128-GCM (16 bytes) seal operations in 1000011us (4568949.7 ops/sec): 73.1 MB/s Did 796000 AES-128-GCM (1350 bytes) seal operations in 1000161us (795871.9 ops/sec): 1074.4 MB/s Did 162000 AES-128-GCM (8192 bytes) seal operations in 1003828us (161382.2 ops/sec): 1322.0 MB/s Did 4398000 AES-256-GCM (16 bytes) seal operations in 1000001us (4397995.6 ops/sec): 70.4 MB/s Did 634000 AES-256-GCM (1350 bytes) seal operations in 1001290us (633183.2 ops/sec): 854.8 MB/s Did 122000 AES-256-GCM (8192 bytes) seal operations in 1005650us (121314.6 ops/sec): 993.8 MB/s Change-Id: I2fef921069ad174f5651dfe59be262625fb3f7c9 Reviewed-on: https://boringssl-review.googlesource.com/4483 Reviewed-by: Adam Langley <agl@google.com>
9 vuotta sitten
modes/asm/ghashv8-armx.pl: up to 90% performance improvement. (Imported from upstream's 7eeeb49e1103533bc81c234eb19613353866e474) Here are the performance numbers on a Nexus 9 (32-bit binary): Before: Did 4376000 AES-128-GCM (16 bytes) seal operations in 1000016us (4375930.0 ops/sec): 70.0 MB/s Did 642000 AES-128-GCM (1350 bytes) seal operations in 1001090us (641301.0 ops/sec): 865.8 MB/s Did 126000 AES-128-GCM (8192 bytes) seal operations in 1001460us (125816.3 ops/sec): 1030.7 MB/s Did 4120000 AES-256-GCM (16 bytes) seal operations in 1000004us (4119983.5 ops/sec): 65.9 MB/s Did 547000 AES-256-GCM (1350 bytes) seal operations in 1001165us (546363.5 ops/sec): 737.6 MB/s Did 99000 AES-256-GCM (8192 bytes) seal operations in 1000027us (98997.3 ops/sec): 811.0 MB/s After: Did 4569000 AES-128-GCM (16 bytes) seal operations in 1000011us (4568949.7 ops/sec): 73.1 MB/s Did 796000 AES-128-GCM (1350 bytes) seal operations in 1000161us (795871.9 ops/sec): 1074.4 MB/s Did 162000 AES-128-GCM (8192 bytes) seal operations in 1003828us (161382.2 ops/sec): 1322.0 MB/s Did 4398000 AES-256-GCM (16 bytes) seal operations in 1000001us (4397995.6 ops/sec): 70.4 MB/s Did 634000 AES-256-GCM (1350 bytes) seal operations in 1001290us (633183.2 ops/sec): 854.8 MB/s Did 122000 AES-256-GCM (8192 bytes) seal operations in 1005650us (121314.6 ops/sec): 993.8 MB/s Change-Id: I2fef921069ad174f5651dfe59be262625fb3f7c9 Reviewed-on: https://boringssl-review.googlesource.com/4483 Reviewed-by: Adam Langley <agl@google.com>
9 vuotta sitten
modes/asm/ghashv8-armx.pl: up to 90% performance improvement. (Imported from upstream's 7eeeb49e1103533bc81c234eb19613353866e474) Here are the performance numbers on a Nexus 9 (32-bit binary): Before: Did 4376000 AES-128-GCM (16 bytes) seal operations in 1000016us (4375930.0 ops/sec): 70.0 MB/s Did 642000 AES-128-GCM (1350 bytes) seal operations in 1001090us (641301.0 ops/sec): 865.8 MB/s Did 126000 AES-128-GCM (8192 bytes) seal operations in 1001460us (125816.3 ops/sec): 1030.7 MB/s Did 4120000 AES-256-GCM (16 bytes) seal operations in 1000004us (4119983.5 ops/sec): 65.9 MB/s Did 547000 AES-256-GCM (1350 bytes) seal operations in 1001165us (546363.5 ops/sec): 737.6 MB/s Did 99000 AES-256-GCM (8192 bytes) seal operations in 1000027us (98997.3 ops/sec): 811.0 MB/s After: Did 4569000 AES-128-GCM (16 bytes) seal operations in 1000011us (4568949.7 ops/sec): 73.1 MB/s Did 796000 AES-128-GCM (1350 bytes) seal operations in 1000161us (795871.9 ops/sec): 1074.4 MB/s Did 162000 AES-128-GCM (8192 bytes) seal operations in 1003828us (161382.2 ops/sec): 1322.0 MB/s Did 4398000 AES-256-GCM (16 bytes) seal operations in 1000001us (4397995.6 ops/sec): 70.4 MB/s Did 634000 AES-256-GCM (1350 bytes) seal operations in 1001290us (633183.2 ops/sec): 854.8 MB/s Did 122000 AES-256-GCM (8192 bytes) seal operations in 1005650us (121314.6 ops/sec): 993.8 MB/s Change-Id: I2fef921069ad174f5651dfe59be262625fb3f7c9 Reviewed-on: https://boringssl-review.googlesource.com/4483 Reviewed-by: Adam Langley <agl@google.com>
9 vuotta sitten
modes/asm/ghashv8-armx.pl: up to 90% performance improvement. (Imported from upstream's 7eeeb49e1103533bc81c234eb19613353866e474) Here are the performance numbers on a Nexus 9 (32-bit binary): Before: Did 4376000 AES-128-GCM (16 bytes) seal operations in 1000016us (4375930.0 ops/sec): 70.0 MB/s Did 642000 AES-128-GCM (1350 bytes) seal operations in 1001090us (641301.0 ops/sec): 865.8 MB/s Did 126000 AES-128-GCM (8192 bytes) seal operations in 1001460us (125816.3 ops/sec): 1030.7 MB/s Did 4120000 AES-256-GCM (16 bytes) seal operations in 1000004us (4119983.5 ops/sec): 65.9 MB/s Did 547000 AES-256-GCM (1350 bytes) seal operations in 1001165us (546363.5 ops/sec): 737.6 MB/s Did 99000 AES-256-GCM (8192 bytes) seal operations in 1000027us (98997.3 ops/sec): 811.0 MB/s After: Did 4569000 AES-128-GCM (16 bytes) seal operations in 1000011us (4568949.7 ops/sec): 73.1 MB/s Did 796000 AES-128-GCM (1350 bytes) seal operations in 1000161us (795871.9 ops/sec): 1074.4 MB/s Did 162000 AES-128-GCM (8192 bytes) seal operations in 1003828us (161382.2 ops/sec): 1322.0 MB/s Did 4398000 AES-256-GCM (16 bytes) seal operations in 1000001us (4397995.6 ops/sec): 70.4 MB/s Did 634000 AES-256-GCM (1350 bytes) seal operations in 1001290us (633183.2 ops/sec): 854.8 MB/s Did 122000 AES-256-GCM (8192 bytes) seal operations in 1005650us (121314.6 ops/sec): 993.8 MB/s Change-Id: I2fef921069ad174f5651dfe59be262625fb3f7c9 Reviewed-on: https://boringssl-review.googlesource.com/4483 Reviewed-by: Adam Langley <agl@google.com>
9 vuotta sitten
modes/asm/ghashv8-armx.pl: up to 90% performance improvement. (Imported from upstream's 7eeeb49e1103533bc81c234eb19613353866e474) Here are the performance numbers on a Nexus 9 (32-bit binary): Before: Did 4376000 AES-128-GCM (16 bytes) seal operations in 1000016us (4375930.0 ops/sec): 70.0 MB/s Did 642000 AES-128-GCM (1350 bytes) seal operations in 1001090us (641301.0 ops/sec): 865.8 MB/s Did 126000 AES-128-GCM (8192 bytes) seal operations in 1001460us (125816.3 ops/sec): 1030.7 MB/s Did 4120000 AES-256-GCM (16 bytes) seal operations in 1000004us (4119983.5 ops/sec): 65.9 MB/s Did 547000 AES-256-GCM (1350 bytes) seal operations in 1001165us (546363.5 ops/sec): 737.6 MB/s Did 99000 AES-256-GCM (8192 bytes) seal operations in 1000027us (98997.3 ops/sec): 811.0 MB/s After: Did 4569000 AES-128-GCM (16 bytes) seal operations in 1000011us (4568949.7 ops/sec): 73.1 MB/s Did 796000 AES-128-GCM (1350 bytes) seal operations in 1000161us (795871.9 ops/sec): 1074.4 MB/s Did 162000 AES-128-GCM (8192 bytes) seal operations in 1003828us (161382.2 ops/sec): 1322.0 MB/s Did 4398000 AES-256-GCM (16 bytes) seal operations in 1000001us (4397995.6 ops/sec): 70.4 MB/s Did 634000 AES-256-GCM (1350 bytes) seal operations in 1001290us (633183.2 ops/sec): 854.8 MB/s Did 122000 AES-256-GCM (8192 bytes) seal operations in 1005650us (121314.6 ops/sec): 993.8 MB/s Change-Id: I2fef921069ad174f5651dfe59be262625fb3f7c9 Reviewed-on: https://boringssl-review.googlesource.com/4483 Reviewed-by: Adam Langley <agl@google.com>
9 vuotta sitten
modes/asm/ghashv8-armx.pl: up to 90% performance improvement. (Imported from upstream's 7eeeb49e1103533bc81c234eb19613353866e474) Here are the performance numbers on a Nexus 9 (32-bit binary): Before: Did 4376000 AES-128-GCM (16 bytes) seal operations in 1000016us (4375930.0 ops/sec): 70.0 MB/s Did 642000 AES-128-GCM (1350 bytes) seal operations in 1001090us (641301.0 ops/sec): 865.8 MB/s Did 126000 AES-128-GCM (8192 bytes) seal operations in 1001460us (125816.3 ops/sec): 1030.7 MB/s Did 4120000 AES-256-GCM (16 bytes) seal operations in 1000004us (4119983.5 ops/sec): 65.9 MB/s Did 547000 AES-256-GCM (1350 bytes) seal operations in 1001165us (546363.5 ops/sec): 737.6 MB/s Did 99000 AES-256-GCM (8192 bytes) seal operations in 1000027us (98997.3 ops/sec): 811.0 MB/s After: Did 4569000 AES-128-GCM (16 bytes) seal operations in 1000011us (4568949.7 ops/sec): 73.1 MB/s Did 796000 AES-128-GCM (1350 bytes) seal operations in 1000161us (795871.9 ops/sec): 1074.4 MB/s Did 162000 AES-128-GCM (8192 bytes) seal operations in 1003828us (161382.2 ops/sec): 1322.0 MB/s Did 4398000 AES-256-GCM (16 bytes) seal operations in 1000001us (4397995.6 ops/sec): 70.4 MB/s Did 634000 AES-256-GCM (1350 bytes) seal operations in 1001290us (633183.2 ops/sec): 854.8 MB/s Did 122000 AES-256-GCM (8192 bytes) seal operations in 1005650us (121314.6 ops/sec): 993.8 MB/s Change-Id: I2fef921069ad174f5651dfe59be262625fb3f7c9 Reviewed-on: https://boringssl-review.googlesource.com/4483 Reviewed-by: Adam Langley <agl@google.com>
9 vuotta sitten
modes/asm/ghashv8-armx.pl: up to 90% performance improvement. (Imported from upstream's 7eeeb49e1103533bc81c234eb19613353866e474) Here are the performance numbers on a Nexus 9 (32-bit binary): Before: Did 4376000 AES-128-GCM (16 bytes) seal operations in 1000016us (4375930.0 ops/sec): 70.0 MB/s Did 642000 AES-128-GCM (1350 bytes) seal operations in 1001090us (641301.0 ops/sec): 865.8 MB/s Did 126000 AES-128-GCM (8192 bytes) seal operations in 1001460us (125816.3 ops/sec): 1030.7 MB/s Did 4120000 AES-256-GCM (16 bytes) seal operations in 1000004us (4119983.5 ops/sec): 65.9 MB/s Did 547000 AES-256-GCM (1350 bytes) seal operations in 1001165us (546363.5 ops/sec): 737.6 MB/s Did 99000 AES-256-GCM (8192 bytes) seal operations in 1000027us (98997.3 ops/sec): 811.0 MB/s After: Did 4569000 AES-128-GCM (16 bytes) seal operations in 1000011us (4568949.7 ops/sec): 73.1 MB/s Did 796000 AES-128-GCM (1350 bytes) seal operations in 1000161us (795871.9 ops/sec): 1074.4 MB/s Did 162000 AES-128-GCM (8192 bytes) seal operations in 1003828us (161382.2 ops/sec): 1322.0 MB/s Did 4398000 AES-256-GCM (16 bytes) seal operations in 1000001us (4397995.6 ops/sec): 70.4 MB/s Did 634000 AES-256-GCM (1350 bytes) seal operations in 1001290us (633183.2 ops/sec): 854.8 MB/s Did 122000 AES-256-GCM (8192 bytes) seal operations in 1005650us (121314.6 ops/sec): 993.8 MB/s Change-Id: I2fef921069ad174f5651dfe59be262625fb3f7c9 Reviewed-on: https://boringssl-review.googlesource.com/4483 Reviewed-by: Adam Langley <agl@google.com>
9 vuotta sitten
modes/asm/ghashv8-armx.pl: up to 90% performance improvement. (Imported from upstream's 7eeeb49e1103533bc81c234eb19613353866e474) Here are the performance numbers on a Nexus 9 (32-bit binary): Before: Did 4376000 AES-128-GCM (16 bytes) seal operations in 1000016us (4375930.0 ops/sec): 70.0 MB/s Did 642000 AES-128-GCM (1350 bytes) seal operations in 1001090us (641301.0 ops/sec): 865.8 MB/s Did 126000 AES-128-GCM (8192 bytes) seal operations in 1001460us (125816.3 ops/sec): 1030.7 MB/s Did 4120000 AES-256-GCM (16 bytes) seal operations in 1000004us (4119983.5 ops/sec): 65.9 MB/s Did 547000 AES-256-GCM (1350 bytes) seal operations in 1001165us (546363.5 ops/sec): 737.6 MB/s Did 99000 AES-256-GCM (8192 bytes) seal operations in 1000027us (98997.3 ops/sec): 811.0 MB/s After: Did 4569000 AES-128-GCM (16 bytes) seal operations in 1000011us (4568949.7 ops/sec): 73.1 MB/s Did 796000 AES-128-GCM (1350 bytes) seal operations in 1000161us (795871.9 ops/sec): 1074.4 MB/s Did 162000 AES-128-GCM (8192 bytes) seal operations in 1003828us (161382.2 ops/sec): 1322.0 MB/s Did 4398000 AES-256-GCM (16 bytes) seal operations in 1000001us (4397995.6 ops/sec): 70.4 MB/s Did 634000 AES-256-GCM (1350 bytes) seal operations in 1001290us (633183.2 ops/sec): 854.8 MB/s Did 122000 AES-256-GCM (8192 bytes) seal operations in 1005650us (121314.6 ops/sec): 993.8 MB/s Change-Id: I2fef921069ad174f5651dfe59be262625fb3f7c9 Reviewed-on: https://boringssl-review.googlesource.com/4483 Reviewed-by: Adam Langley <agl@google.com>
9 vuotta sitten
modes/asm/ghashv8-armx.pl: up to 90% performance improvement. (Imported from upstream's 7eeeb49e1103533bc81c234eb19613353866e474) Here are the performance numbers on a Nexus 9 (32-bit binary): Before: Did 4376000 AES-128-GCM (16 bytes) seal operations in 1000016us (4375930.0 ops/sec): 70.0 MB/s Did 642000 AES-128-GCM (1350 bytes) seal operations in 1001090us (641301.0 ops/sec): 865.8 MB/s Did 126000 AES-128-GCM (8192 bytes) seal operations in 1001460us (125816.3 ops/sec): 1030.7 MB/s Did 4120000 AES-256-GCM (16 bytes) seal operations in 1000004us (4119983.5 ops/sec): 65.9 MB/s Did 547000 AES-256-GCM (1350 bytes) seal operations in 1001165us (546363.5 ops/sec): 737.6 MB/s Did 99000 AES-256-GCM (8192 bytes) seal operations in 1000027us (98997.3 ops/sec): 811.0 MB/s After: Did 4569000 AES-128-GCM (16 bytes) seal operations in 1000011us (4568949.7 ops/sec): 73.1 MB/s Did 796000 AES-128-GCM (1350 bytes) seal operations in 1000161us (795871.9 ops/sec): 1074.4 MB/s Did 162000 AES-128-GCM (8192 bytes) seal operations in 1003828us (161382.2 ops/sec): 1322.0 MB/s Did 4398000 AES-256-GCM (16 bytes) seal operations in 1000001us (4397995.6 ops/sec): 70.4 MB/s Did 634000 AES-256-GCM (1350 bytes) seal operations in 1001290us (633183.2 ops/sec): 854.8 MB/s Did 122000 AES-256-GCM (8192 bytes) seal operations in 1005650us (121314.6 ops/sec): 993.8 MB/s Change-Id: I2fef921069ad174f5651dfe59be262625fb3f7c9 Reviewed-on: https://boringssl-review.googlesource.com/4483 Reviewed-by: Adam Langley <agl@google.com>
9 vuotta sitten
modes/asm/ghashv8-armx.pl: up to 90% performance improvement. (Imported from upstream's 7eeeb49e1103533bc81c234eb19613353866e474) Here are the performance numbers on a Nexus 9 (32-bit binary): Before: Did 4376000 AES-128-GCM (16 bytes) seal operations in 1000016us (4375930.0 ops/sec): 70.0 MB/s Did 642000 AES-128-GCM (1350 bytes) seal operations in 1001090us (641301.0 ops/sec): 865.8 MB/s Did 126000 AES-128-GCM (8192 bytes) seal operations in 1001460us (125816.3 ops/sec): 1030.7 MB/s Did 4120000 AES-256-GCM (16 bytes) seal operations in 1000004us (4119983.5 ops/sec): 65.9 MB/s Did 547000 AES-256-GCM (1350 bytes) seal operations in 1001165us (546363.5 ops/sec): 737.6 MB/s Did 99000 AES-256-GCM (8192 bytes) seal operations in 1000027us (98997.3 ops/sec): 811.0 MB/s After: Did 4569000 AES-128-GCM (16 bytes) seal operations in 1000011us (4568949.7 ops/sec): 73.1 MB/s Did 796000 AES-128-GCM (1350 bytes) seal operations in 1000161us (795871.9 ops/sec): 1074.4 MB/s Did 162000 AES-128-GCM (8192 bytes) seal operations in 1003828us (161382.2 ops/sec): 1322.0 MB/s Did 4398000 AES-256-GCM (16 bytes) seal operations in 1000001us (4397995.6 ops/sec): 70.4 MB/s Did 634000 AES-256-GCM (1350 bytes) seal operations in 1001290us (633183.2 ops/sec): 854.8 MB/s Did 122000 AES-256-GCM (8192 bytes) seal operations in 1005650us (121314.6 ops/sec): 993.8 MB/s Change-Id: I2fef921069ad174f5651dfe59be262625fb3f7c9 Reviewed-on: https://boringssl-review.googlesource.com/4483 Reviewed-by: Adam Langley <agl@google.com>
9 vuotta sitten
modes/asm/ghashv8-armx.pl: up to 90% performance improvement. (Imported from upstream's 7eeeb49e1103533bc81c234eb19613353866e474) Here are the performance numbers on a Nexus 9 (32-bit binary): Before: Did 4376000 AES-128-GCM (16 bytes) seal operations in 1000016us (4375930.0 ops/sec): 70.0 MB/s Did 642000 AES-128-GCM (1350 bytes) seal operations in 1001090us (641301.0 ops/sec): 865.8 MB/s Did 126000 AES-128-GCM (8192 bytes) seal operations in 1001460us (125816.3 ops/sec): 1030.7 MB/s Did 4120000 AES-256-GCM (16 bytes) seal operations in 1000004us (4119983.5 ops/sec): 65.9 MB/s Did 547000 AES-256-GCM (1350 bytes) seal operations in 1001165us (546363.5 ops/sec): 737.6 MB/s Did 99000 AES-256-GCM (8192 bytes) seal operations in 1000027us (98997.3 ops/sec): 811.0 MB/s After: Did 4569000 AES-128-GCM (16 bytes) seal operations in 1000011us (4568949.7 ops/sec): 73.1 MB/s Did 796000 AES-128-GCM (1350 bytes) seal operations in 1000161us (795871.9 ops/sec): 1074.4 MB/s Did 162000 AES-128-GCM (8192 bytes) seal operations in 1003828us (161382.2 ops/sec): 1322.0 MB/s Did 4398000 AES-256-GCM (16 bytes) seal operations in 1000001us (4397995.6 ops/sec): 70.4 MB/s Did 634000 AES-256-GCM (1350 bytes) seal operations in 1001290us (633183.2 ops/sec): 854.8 MB/s Did 122000 AES-256-GCM (8192 bytes) seal operations in 1005650us (121314.6 ops/sec): 993.8 MB/s Change-Id: I2fef921069ad174f5651dfe59be262625fb3f7c9 Reviewed-on: https://boringssl-review.googlesource.com/4483 Reviewed-by: Adam Langley <agl@google.com>
9 vuotta sitten
modes/asm/ghashv8-armx.pl: up to 90% performance improvement. (Imported from upstream's 7eeeb49e1103533bc81c234eb19613353866e474) Here are the performance numbers on a Nexus 9 (32-bit binary): Before: Did 4376000 AES-128-GCM (16 bytes) seal operations in 1000016us (4375930.0 ops/sec): 70.0 MB/s Did 642000 AES-128-GCM (1350 bytes) seal operations in 1001090us (641301.0 ops/sec): 865.8 MB/s Did 126000 AES-128-GCM (8192 bytes) seal operations in 1001460us (125816.3 ops/sec): 1030.7 MB/s Did 4120000 AES-256-GCM (16 bytes) seal operations in 1000004us (4119983.5 ops/sec): 65.9 MB/s Did 547000 AES-256-GCM (1350 bytes) seal operations in 1001165us (546363.5 ops/sec): 737.6 MB/s Did 99000 AES-256-GCM (8192 bytes) seal operations in 1000027us (98997.3 ops/sec): 811.0 MB/s After: Did 4569000 AES-128-GCM (16 bytes) seal operations in 1000011us (4568949.7 ops/sec): 73.1 MB/s Did 796000 AES-128-GCM (1350 bytes) seal operations in 1000161us (795871.9 ops/sec): 1074.4 MB/s Did 162000 AES-128-GCM (8192 bytes) seal operations in 1003828us (161382.2 ops/sec): 1322.0 MB/s Did 4398000 AES-256-GCM (16 bytes) seal operations in 1000001us (4397995.6 ops/sec): 70.4 MB/s Did 634000 AES-256-GCM (1350 bytes) seal operations in 1001290us (633183.2 ops/sec): 854.8 MB/s Did 122000 AES-256-GCM (8192 bytes) seal operations in 1005650us (121314.6 ops/sec): 993.8 MB/s Change-Id: I2fef921069ad174f5651dfe59be262625fb3f7c9 Reviewed-on: https://boringssl-review.googlesource.com/4483 Reviewed-by: Adam Langley <agl@google.com>
9 vuotta sitten
modes/asm/ghashv8-armx.pl: up to 90% performance improvement. (Imported from upstream's 7eeeb49e1103533bc81c234eb19613353866e474) Here are the performance numbers on a Nexus 9 (32-bit binary): Before: Did 4376000 AES-128-GCM (16 bytes) seal operations in 1000016us (4375930.0 ops/sec): 70.0 MB/s Did 642000 AES-128-GCM (1350 bytes) seal operations in 1001090us (641301.0 ops/sec): 865.8 MB/s Did 126000 AES-128-GCM (8192 bytes) seal operations in 1001460us (125816.3 ops/sec): 1030.7 MB/s Did 4120000 AES-256-GCM (16 bytes) seal operations in 1000004us (4119983.5 ops/sec): 65.9 MB/s Did 547000 AES-256-GCM (1350 bytes) seal operations in 1001165us (546363.5 ops/sec): 737.6 MB/s Did 99000 AES-256-GCM (8192 bytes) seal operations in 1000027us (98997.3 ops/sec): 811.0 MB/s After: Did 4569000 AES-128-GCM (16 bytes) seal operations in 1000011us (4568949.7 ops/sec): 73.1 MB/s Did 796000 AES-128-GCM (1350 bytes) seal operations in 1000161us (795871.9 ops/sec): 1074.4 MB/s Did 162000 AES-128-GCM (8192 bytes) seal operations in 1003828us (161382.2 ops/sec): 1322.0 MB/s Did 4398000 AES-256-GCM (16 bytes) seal operations in 1000001us (4397995.6 ops/sec): 70.4 MB/s Did 634000 AES-256-GCM (1350 bytes) seal operations in 1001290us (633183.2 ops/sec): 854.8 MB/s Did 122000 AES-256-GCM (8192 bytes) seal operations in 1005650us (121314.6 ops/sec): 993.8 MB/s Change-Id: I2fef921069ad174f5651dfe59be262625fb3f7c9 Reviewed-on: https://boringssl-review.googlesource.com/4483 Reviewed-by: Adam Langley <agl@google.com>
9 vuotta sitten
modes/asm/ghashv8-armx.pl: up to 90% performance improvement. (Imported from upstream's 7eeeb49e1103533bc81c234eb19613353866e474) Here are the performance numbers on a Nexus 9 (32-bit binary): Before: Did 4376000 AES-128-GCM (16 bytes) seal operations in 1000016us (4375930.0 ops/sec): 70.0 MB/s Did 642000 AES-128-GCM (1350 bytes) seal operations in 1001090us (641301.0 ops/sec): 865.8 MB/s Did 126000 AES-128-GCM (8192 bytes) seal operations in 1001460us (125816.3 ops/sec): 1030.7 MB/s Did 4120000 AES-256-GCM (16 bytes) seal operations in 1000004us (4119983.5 ops/sec): 65.9 MB/s Did 547000 AES-256-GCM (1350 bytes) seal operations in 1001165us (546363.5 ops/sec): 737.6 MB/s Did 99000 AES-256-GCM (8192 bytes) seal operations in 1000027us (98997.3 ops/sec): 811.0 MB/s After: Did 4569000 AES-128-GCM (16 bytes) seal operations in 1000011us (4568949.7 ops/sec): 73.1 MB/s Did 796000 AES-128-GCM (1350 bytes) seal operations in 1000161us (795871.9 ops/sec): 1074.4 MB/s Did 162000 AES-128-GCM (8192 bytes) seal operations in 1003828us (161382.2 ops/sec): 1322.0 MB/s Did 4398000 AES-256-GCM (16 bytes) seal operations in 1000001us (4397995.6 ops/sec): 70.4 MB/s Did 634000 AES-256-GCM (1350 bytes) seal operations in 1001290us (633183.2 ops/sec): 854.8 MB/s Did 122000 AES-256-GCM (8192 bytes) seal operations in 1005650us (121314.6 ops/sec): 993.8 MB/s Change-Id: I2fef921069ad174f5651dfe59be262625fb3f7c9 Reviewed-on: https://boringssl-review.googlesource.com/4483 Reviewed-by: Adam Langley <agl@google.com>
9 vuotta sitten
modes/asm/ghashv8-armx.pl: up to 90% performance improvement. (Imported from upstream's 7eeeb49e1103533bc81c234eb19613353866e474) Here are the performance numbers on a Nexus 9 (32-bit binary): Before: Did 4376000 AES-128-GCM (16 bytes) seal operations in 1000016us (4375930.0 ops/sec): 70.0 MB/s Did 642000 AES-128-GCM (1350 bytes) seal operations in 1001090us (641301.0 ops/sec): 865.8 MB/s Did 126000 AES-128-GCM (8192 bytes) seal operations in 1001460us (125816.3 ops/sec): 1030.7 MB/s Did 4120000 AES-256-GCM (16 bytes) seal operations in 1000004us (4119983.5 ops/sec): 65.9 MB/s Did 547000 AES-256-GCM (1350 bytes) seal operations in 1001165us (546363.5 ops/sec): 737.6 MB/s Did 99000 AES-256-GCM (8192 bytes) seal operations in 1000027us (98997.3 ops/sec): 811.0 MB/s After: Did 4569000 AES-128-GCM (16 bytes) seal operations in 1000011us (4568949.7 ops/sec): 73.1 MB/s Did 796000 AES-128-GCM (1350 bytes) seal operations in 1000161us (795871.9 ops/sec): 1074.4 MB/s Did 162000 AES-128-GCM (8192 bytes) seal operations in 1003828us (161382.2 ops/sec): 1322.0 MB/s Did 4398000 AES-256-GCM (16 bytes) seal operations in 1000001us (4397995.6 ops/sec): 70.4 MB/s Did 634000 AES-256-GCM (1350 bytes) seal operations in 1001290us (633183.2 ops/sec): 854.8 MB/s Did 122000 AES-256-GCM (8192 bytes) seal operations in 1005650us (121314.6 ops/sec): 993.8 MB/s Change-Id: I2fef921069ad174f5651dfe59be262625fb3f7c9 Reviewed-on: https://boringssl-review.googlesource.com/4483 Reviewed-by: Adam Langley <agl@google.com>
9 vuotta sitten
modes/asm/ghashv8-armx.pl: up to 90% performance improvement. (Imported from upstream's 7eeeb49e1103533bc81c234eb19613353866e474) Here are the performance numbers on a Nexus 9 (32-bit binary): Before: Did 4376000 AES-128-GCM (16 bytes) seal operations in 1000016us (4375930.0 ops/sec): 70.0 MB/s Did 642000 AES-128-GCM (1350 bytes) seal operations in 1001090us (641301.0 ops/sec): 865.8 MB/s Did 126000 AES-128-GCM (8192 bytes) seal operations in 1001460us (125816.3 ops/sec): 1030.7 MB/s Did 4120000 AES-256-GCM (16 bytes) seal operations in 1000004us (4119983.5 ops/sec): 65.9 MB/s Did 547000 AES-256-GCM (1350 bytes) seal operations in 1001165us (546363.5 ops/sec): 737.6 MB/s Did 99000 AES-256-GCM (8192 bytes) seal operations in 1000027us (98997.3 ops/sec): 811.0 MB/s After: Did 4569000 AES-128-GCM (16 bytes) seal operations in 1000011us (4568949.7 ops/sec): 73.1 MB/s Did 796000 AES-128-GCM (1350 bytes) seal operations in 1000161us (795871.9 ops/sec): 1074.4 MB/s Did 162000 AES-128-GCM (8192 bytes) seal operations in 1003828us (161382.2 ops/sec): 1322.0 MB/s Did 4398000 AES-256-GCM (16 bytes) seal operations in 1000001us (4397995.6 ops/sec): 70.4 MB/s Did 634000 AES-256-GCM (1350 bytes) seal operations in 1001290us (633183.2 ops/sec): 854.8 MB/s Did 122000 AES-256-GCM (8192 bytes) seal operations in 1005650us (121314.6 ops/sec): 993.8 MB/s Change-Id: I2fef921069ad174f5651dfe59be262625fb3f7c9 Reviewed-on: https://boringssl-review.googlesource.com/4483 Reviewed-by: Adam Langley <agl@google.com>
9 vuotta sitten
modes/asm/ghashv8-armx.pl: up to 90% performance improvement. (Imported from upstream's 7eeeb49e1103533bc81c234eb19613353866e474) Here are the performance numbers on a Nexus 9 (32-bit binary): Before: Did 4376000 AES-128-GCM (16 bytes) seal operations in 1000016us (4375930.0 ops/sec): 70.0 MB/s Did 642000 AES-128-GCM (1350 bytes) seal operations in 1001090us (641301.0 ops/sec): 865.8 MB/s Did 126000 AES-128-GCM (8192 bytes) seal operations in 1001460us (125816.3 ops/sec): 1030.7 MB/s Did 4120000 AES-256-GCM (16 bytes) seal operations in 1000004us (4119983.5 ops/sec): 65.9 MB/s Did 547000 AES-256-GCM (1350 bytes) seal operations in 1001165us (546363.5 ops/sec): 737.6 MB/s Did 99000 AES-256-GCM (8192 bytes) seal operations in 1000027us (98997.3 ops/sec): 811.0 MB/s After: Did 4569000 AES-128-GCM (16 bytes) seal operations in 1000011us (4568949.7 ops/sec): 73.1 MB/s Did 796000 AES-128-GCM (1350 bytes) seal operations in 1000161us (795871.9 ops/sec): 1074.4 MB/s Did 162000 AES-128-GCM (8192 bytes) seal operations in 1003828us (161382.2 ops/sec): 1322.0 MB/s Did 4398000 AES-256-GCM (16 bytes) seal operations in 1000001us (4397995.6 ops/sec): 70.4 MB/s Did 634000 AES-256-GCM (1350 bytes) seal operations in 1001290us (633183.2 ops/sec): 854.8 MB/s Did 122000 AES-256-GCM (8192 bytes) seal operations in 1005650us (121314.6 ops/sec): 993.8 MB/s Change-Id: I2fef921069ad174f5651dfe59be262625fb3f7c9 Reviewed-on: https://boringssl-review.googlesource.com/4483 Reviewed-by: Adam Langley <agl@google.com>
9 vuotta sitten
modes/asm/ghashv8-armx.pl: up to 90% performance improvement. (Imported from upstream's 7eeeb49e1103533bc81c234eb19613353866e474) Here are the performance numbers on a Nexus 9 (32-bit binary): Before: Did 4376000 AES-128-GCM (16 bytes) seal operations in 1000016us (4375930.0 ops/sec): 70.0 MB/s Did 642000 AES-128-GCM (1350 bytes) seal operations in 1001090us (641301.0 ops/sec): 865.8 MB/s Did 126000 AES-128-GCM (8192 bytes) seal operations in 1001460us (125816.3 ops/sec): 1030.7 MB/s Did 4120000 AES-256-GCM (16 bytes) seal operations in 1000004us (4119983.5 ops/sec): 65.9 MB/s Did 547000 AES-256-GCM (1350 bytes) seal operations in 1001165us (546363.5 ops/sec): 737.6 MB/s Did 99000 AES-256-GCM (8192 bytes) seal operations in 1000027us (98997.3 ops/sec): 811.0 MB/s After: Did 4569000 AES-128-GCM (16 bytes) seal operations in 1000011us (4568949.7 ops/sec): 73.1 MB/s Did 796000 AES-128-GCM (1350 bytes) seal operations in 1000161us (795871.9 ops/sec): 1074.4 MB/s Did 162000 AES-128-GCM (8192 bytes) seal operations in 1003828us (161382.2 ops/sec): 1322.0 MB/s Did 4398000 AES-256-GCM (16 bytes) seal operations in 1000001us (4397995.6 ops/sec): 70.4 MB/s Did 634000 AES-256-GCM (1350 bytes) seal operations in 1001290us (633183.2 ops/sec): 854.8 MB/s Did 122000 AES-256-GCM (8192 bytes) seal operations in 1005650us (121314.6 ops/sec): 993.8 MB/s Change-Id: I2fef921069ad174f5651dfe59be262625fb3f7c9 Reviewed-on: https://boringssl-review.googlesource.com/4483 Reviewed-by: Adam Langley <agl@google.com>
9 vuotta sitten
modes/asm/ghashv8-armx.pl: up to 90% performance improvement. (Imported from upstream's 7eeeb49e1103533bc81c234eb19613353866e474) Here are the performance numbers on a Nexus 9 (32-bit binary): Before: Did 4376000 AES-128-GCM (16 bytes) seal operations in 1000016us (4375930.0 ops/sec): 70.0 MB/s Did 642000 AES-128-GCM (1350 bytes) seal operations in 1001090us (641301.0 ops/sec): 865.8 MB/s Did 126000 AES-128-GCM (8192 bytes) seal operations in 1001460us (125816.3 ops/sec): 1030.7 MB/s Did 4120000 AES-256-GCM (16 bytes) seal operations in 1000004us (4119983.5 ops/sec): 65.9 MB/s Did 547000 AES-256-GCM (1350 bytes) seal operations in 1001165us (546363.5 ops/sec): 737.6 MB/s Did 99000 AES-256-GCM (8192 bytes) seal operations in 1000027us (98997.3 ops/sec): 811.0 MB/s After: Did 4569000 AES-128-GCM (16 bytes) seal operations in 1000011us (4568949.7 ops/sec): 73.1 MB/s Did 796000 AES-128-GCM (1350 bytes) seal operations in 1000161us (795871.9 ops/sec): 1074.4 MB/s Did 162000 AES-128-GCM (8192 bytes) seal operations in 1003828us (161382.2 ops/sec): 1322.0 MB/s Did 4398000 AES-256-GCM (16 bytes) seal operations in 1000001us (4397995.6 ops/sec): 70.4 MB/s Did 634000 AES-256-GCM (1350 bytes) seal operations in 1001290us (633183.2 ops/sec): 854.8 MB/s Did 122000 AES-256-GCM (8192 bytes) seal operations in 1005650us (121314.6 ops/sec): 993.8 MB/s Change-Id: I2fef921069ad174f5651dfe59be262625fb3f7c9 Reviewed-on: https://boringssl-review.googlesource.com/4483 Reviewed-by: Adam Langley <agl@google.com>
9 vuotta sitten
modes/asm/ghashv8-armx.pl: up to 90% performance improvement. (Imported from upstream's 7eeeb49e1103533bc81c234eb19613353866e474) Here are the performance numbers on a Nexus 9 (32-bit binary): Before: Did 4376000 AES-128-GCM (16 bytes) seal operations in 1000016us (4375930.0 ops/sec): 70.0 MB/s Did 642000 AES-128-GCM (1350 bytes) seal operations in 1001090us (641301.0 ops/sec): 865.8 MB/s Did 126000 AES-128-GCM (8192 bytes) seal operations in 1001460us (125816.3 ops/sec): 1030.7 MB/s Did 4120000 AES-256-GCM (16 bytes) seal operations in 1000004us (4119983.5 ops/sec): 65.9 MB/s Did 547000 AES-256-GCM (1350 bytes) seal operations in 1001165us (546363.5 ops/sec): 737.6 MB/s Did 99000 AES-256-GCM (8192 bytes) seal operations in 1000027us (98997.3 ops/sec): 811.0 MB/s After: Did 4569000 AES-128-GCM (16 bytes) seal operations in 1000011us (4568949.7 ops/sec): 73.1 MB/s Did 796000 AES-128-GCM (1350 bytes) seal operations in 1000161us (795871.9 ops/sec): 1074.4 MB/s Did 162000 AES-128-GCM (8192 bytes) seal operations in 1003828us (161382.2 ops/sec): 1322.0 MB/s Did 4398000 AES-256-GCM (16 bytes) seal operations in 1000001us (4397995.6 ops/sec): 70.4 MB/s Did 634000 AES-256-GCM (1350 bytes) seal operations in 1001290us (633183.2 ops/sec): 854.8 MB/s Did 122000 AES-256-GCM (8192 bytes) seal operations in 1005650us (121314.6 ops/sec): 993.8 MB/s Change-Id: I2fef921069ad174f5651dfe59be262625fb3f7c9 Reviewed-on: https://boringssl-review.googlesource.com/4483 Reviewed-by: Adam Langley <agl@google.com>
9 vuotta sitten
modes/asm/ghashv8-armx.pl: up to 90% performance improvement. (Imported from upstream's 7eeeb49e1103533bc81c234eb19613353866e474) Here are the performance numbers on a Nexus 9 (32-bit binary): Before: Did 4376000 AES-128-GCM (16 bytes) seal operations in 1000016us (4375930.0 ops/sec): 70.0 MB/s Did 642000 AES-128-GCM (1350 bytes) seal operations in 1001090us (641301.0 ops/sec): 865.8 MB/s Did 126000 AES-128-GCM (8192 bytes) seal operations in 1001460us (125816.3 ops/sec): 1030.7 MB/s Did 4120000 AES-256-GCM (16 bytes) seal operations in 1000004us (4119983.5 ops/sec): 65.9 MB/s Did 547000 AES-256-GCM (1350 bytes) seal operations in 1001165us (546363.5 ops/sec): 737.6 MB/s Did 99000 AES-256-GCM (8192 bytes) seal operations in 1000027us (98997.3 ops/sec): 811.0 MB/s After: Did 4569000 AES-128-GCM (16 bytes) seal operations in 1000011us (4568949.7 ops/sec): 73.1 MB/s Did 796000 AES-128-GCM (1350 bytes) seal operations in 1000161us (795871.9 ops/sec): 1074.4 MB/s Did 162000 AES-128-GCM (8192 bytes) seal operations in 1003828us (161382.2 ops/sec): 1322.0 MB/s Did 4398000 AES-256-GCM (16 bytes) seal operations in 1000001us (4397995.6 ops/sec): 70.4 MB/s Did 634000 AES-256-GCM (1350 bytes) seal operations in 1001290us (633183.2 ops/sec): 854.8 MB/s Did 122000 AES-256-GCM (8192 bytes) seal operations in 1005650us (121314.6 ops/sec): 993.8 MB/s Change-Id: I2fef921069ad174f5651dfe59be262625fb3f7c9 Reviewed-on: https://boringssl-review.googlesource.com/4483 Reviewed-by: Adam Langley <agl@google.com>
9 vuotta sitten
modes/asm/ghashv8-armx.pl: up to 90% performance improvement. (Imported from upstream's 7eeeb49e1103533bc81c234eb19613353866e474) Here are the performance numbers on a Nexus 9 (32-bit binary): Before: Did 4376000 AES-128-GCM (16 bytes) seal operations in 1000016us (4375930.0 ops/sec): 70.0 MB/s Did 642000 AES-128-GCM (1350 bytes) seal operations in 1001090us (641301.0 ops/sec): 865.8 MB/s Did 126000 AES-128-GCM (8192 bytes) seal operations in 1001460us (125816.3 ops/sec): 1030.7 MB/s Did 4120000 AES-256-GCM (16 bytes) seal operations in 1000004us (4119983.5 ops/sec): 65.9 MB/s Did 547000 AES-256-GCM (1350 bytes) seal operations in 1001165us (546363.5 ops/sec): 737.6 MB/s Did 99000 AES-256-GCM (8192 bytes) seal operations in 1000027us (98997.3 ops/sec): 811.0 MB/s After: Did 4569000 AES-128-GCM (16 bytes) seal operations in 1000011us (4568949.7 ops/sec): 73.1 MB/s Did 796000 AES-128-GCM (1350 bytes) seal operations in 1000161us (795871.9 ops/sec): 1074.4 MB/s Did 162000 AES-128-GCM (8192 bytes) seal operations in 1003828us (161382.2 ops/sec): 1322.0 MB/s Did 4398000 AES-256-GCM (16 bytes) seal operations in 1000001us (4397995.6 ops/sec): 70.4 MB/s Did 634000 AES-256-GCM (1350 bytes) seal operations in 1001290us (633183.2 ops/sec): 854.8 MB/s Did 122000 AES-256-GCM (8192 bytes) seal operations in 1005650us (121314.6 ops/sec): 993.8 MB/s Change-Id: I2fef921069ad174f5651dfe59be262625fb3f7c9 Reviewed-on: https://boringssl-review.googlesource.com/4483 Reviewed-by: Adam Langley <agl@google.com>
9 vuotta sitten
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422
  1. #!/usr/bin/env perl
  2. #
  3. # ====================================================================
  4. # Written by Andy Polyakov <appro@openssl.org> for the OpenSSL
  5. # project. The module is, however, dual licensed under OpenSSL and
  6. # CRYPTOGAMS licenses depending on where you obtain it. For further
  7. # details see http://www.openssl.org/~appro/cryptogams/.
  8. # ====================================================================
  9. #
  10. # GHASH for ARMv8 Crypto Extension, 64-bit polynomial multiplication.
  11. #
  12. # June 2014
  13. #
  14. # Initial version was developed in tight cooperation with Ard
  15. # Biesheuvel <ard.biesheuvel@linaro.org> from bits-n-pieces from
  16. # other assembly modules. Just like aesv8-armx.pl this module
  17. # supports both AArch32 and AArch64 execution modes.
  18. #
  19. # July 2014
  20. #
  21. # Implement 2x aggregated reduction [see ghash-x86.pl for background
  22. # information].
  23. #
  24. # Current performance in cycles per processed byte:
  25. #
  26. # PMULL[2] 32-bit NEON(*)
  27. # Apple A7 0.92 5.62
  28. # Cortex-A53 1.01 8.39
  29. # Cortex-A57 1.17 7.61
  30. # Denver 0.71 6.02
  31. #
  32. # (*) presented for reference/comparison purposes;
  33. $flavour = shift;
  34. $output = shift;
  35. $0 =~ m/(.*[\/\\])[^\/\\]+$/; $dir=$1;
  36. ( $xlate="${dir}arm-xlate.pl" and -f $xlate ) or
  37. ( $xlate="${dir}../../perlasm/arm-xlate.pl" and -f $xlate) or
  38. die "can't locate arm-xlate.pl";
  39. open OUT,"| \"$^X\" $xlate $flavour $output";
  40. *STDOUT=*OUT;
  41. $Xi="x0"; # argument block
  42. $Htbl="x1";
  43. $inp="x2";
  44. $len="x3";
  45. $inc="x12";
  46. {
  47. my ($Xl,$Xm,$Xh,$IN)=map("q$_",(0..3));
  48. my ($t0,$t1,$t2,$xC2,$H,$Hhl,$H2)=map("q$_",(8..14));
  49. $code=<<___;
  50. #include "arm_arch.h"
  51. .text
  52. ___
  53. $code.=<<___ if ($flavour =~ /64/);
  54. #if !defined(__clang__)
  55. .arch armv8-a+crypto
  56. #endif
  57. ___
  58. $code.=".fpu neon\n.code 32\n" if ($flavour !~ /64/);
  59. ################################################################################
  60. # void gcm_init_v8(u128 Htable[16],const u64 H[2]);
  61. #
  62. # input: 128-bit H - secret parameter E(K,0^128)
  63. # output: precomputed table filled with degrees of twisted H;
  64. # H is twisted to handle reverse bitness of GHASH;
  65. # only few of 16 slots of Htable[16] are used;
  66. # data is opaque to outside world (which allows to
  67. # optimize the code independently);
  68. #
  69. $code.=<<___;
  70. .global gcm_init_v8
  71. .type gcm_init_v8,%function
  72. .align 4
  73. gcm_init_v8:
  74. vld1.64 {$t1},[x1] @ load input H
  75. vmov.i8 $xC2,#0xe1
  76. vshl.i64 $xC2,$xC2,#57 @ 0xc2.0
  77. vext.8 $IN,$t1,$t1,#8
  78. vshr.u64 $t2,$xC2,#63
  79. vdup.32 $t1,${t1}[1]
  80. vext.8 $t0,$t2,$xC2,#8 @ t0=0xc2....01
  81. vshr.u64 $t2,$IN,#63
  82. vshr.s32 $t1,$t1,#31 @ broadcast carry bit
  83. vand $t2,$t2,$t0
  84. vshl.i64 $IN,$IN,#1
  85. vext.8 $t2,$t2,$t2,#8
  86. vand $t0,$t0,$t1
  87. vorr $IN,$IN,$t2 @ H<<<=1
  88. veor $H,$IN,$t0 @ twisted H
  89. vst1.64 {$H},[x0],#16 @ store Htable[0]
  90. @ calculate H^2
  91. vext.8 $t0,$H,$H,#8 @ Karatsuba pre-processing
  92. vpmull.p64 $Xl,$H,$H
  93. veor $t0,$t0,$H
  94. vpmull2.p64 $Xh,$H,$H
  95. vpmull.p64 $Xm,$t0,$t0
  96. vext.8 $t1,$Xl,$Xh,#8 @ Karatsuba post-processing
  97. veor $t2,$Xl,$Xh
  98. veor $Xm,$Xm,$t1
  99. veor $Xm,$Xm,$t2
  100. vpmull.p64 $t2,$Xl,$xC2 @ 1st phase
  101. vmov $Xh#lo,$Xm#hi @ Xh|Xm - 256-bit result
  102. vmov $Xm#hi,$Xl#lo @ Xm is rotated Xl
  103. veor $Xl,$Xm,$t2
  104. vext.8 $t2,$Xl,$Xl,#8 @ 2nd phase
  105. vpmull.p64 $Xl,$Xl,$xC2
  106. veor $t2,$t2,$Xh
  107. veor $H2,$Xl,$t2
  108. vext.8 $t1,$H2,$H2,#8 @ Karatsuba pre-processing
  109. veor $t1,$t1,$H2
  110. vext.8 $Hhl,$t0,$t1,#8 @ pack Karatsuba pre-processed
  111. vst1.64 {$Hhl-$H2},[x0] @ store Htable[1..2]
  112. ret
  113. .size gcm_init_v8,.-gcm_init_v8
  114. ___
  115. ################################################################################
  116. # void gcm_gmult_v8(u64 Xi[2],const u128 Htable[16]);
  117. #
  118. # input: Xi - current hash value;
  119. # Htable - table precomputed in gcm_init_v8;
  120. # output: Xi - next hash value Xi;
  121. #
  122. $code.=<<___;
  123. .global gcm_gmult_v8
  124. .type gcm_gmult_v8,%function
  125. .align 4
  126. gcm_gmult_v8:
  127. vld1.64 {$t1},[$Xi] @ load Xi
  128. vmov.i8 $xC2,#0xe1
  129. vld1.64 {$H-$Hhl},[$Htbl] @ load twisted H, ...
  130. vshl.u64 $xC2,$xC2,#57
  131. #ifndef __ARMEB__
  132. vrev64.8 $t1,$t1
  133. #endif
  134. vext.8 $IN,$t1,$t1,#8
  135. vpmull.p64 $Xl,$H,$IN @ H.loXi.lo
  136. veor $t1,$t1,$IN @ Karatsuba pre-processing
  137. vpmull2.p64 $Xh,$H,$IN @ H.hiXi.hi
  138. vpmull.p64 $Xm,$Hhl,$t1 @ (H.lo+H.hi)(Xi.lo+Xi.hi)
  139. vext.8 $t1,$Xl,$Xh,#8 @ Karatsuba post-processing
  140. veor $t2,$Xl,$Xh
  141. veor $Xm,$Xm,$t1
  142. veor $Xm,$Xm,$t2
  143. vpmull.p64 $t2,$Xl,$xC2 @ 1st phase of reduction
  144. vmov $Xh#lo,$Xm#hi @ Xh|Xm - 256-bit result
  145. vmov $Xm#hi,$Xl#lo @ Xm is rotated Xl
  146. veor $Xl,$Xm,$t2
  147. vext.8 $t2,$Xl,$Xl,#8 @ 2nd phase of reduction
  148. vpmull.p64 $Xl,$Xl,$xC2
  149. veor $t2,$t2,$Xh
  150. veor $Xl,$Xl,$t2
  151. #ifndef __ARMEB__
  152. vrev64.8 $Xl,$Xl
  153. #endif
  154. vext.8 $Xl,$Xl,$Xl,#8
  155. vst1.64 {$Xl},[$Xi] @ write out Xi
  156. ret
  157. .size gcm_gmult_v8,.-gcm_gmult_v8
  158. ___
  159. ################################################################################
  160. # void gcm_ghash_v8(u64 Xi[2],const u128 Htable[16],const u8 *inp,size_t len);
  161. #
  162. # input: table precomputed in gcm_init_v8;
  163. # current hash value Xi;
  164. # pointer to input data;
  165. # length of input data in bytes, but divisible by block size;
  166. # output: next hash value Xi;
  167. #
  168. $code.=<<___;
  169. .global gcm_ghash_v8
  170. .type gcm_ghash_v8,%function
  171. .align 4
  172. gcm_ghash_v8:
  173. ___
  174. $code.=<<___ if ($flavour !~ /64/);
  175. vstmdb sp!,{d8-d15} @ 32-bit ABI says so
  176. ___
  177. $code.=<<___;
  178. vld1.64 {$Xl},[$Xi] @ load [rotated] Xi
  179. @ "[rotated]" means that
  180. @ loaded value would have
  181. @ to be rotated in order to
  182. @ make it appear as in
  183. @ alorithm specification
  184. subs $len,$len,#32 @ see if $len is 32 or larger
  185. mov $inc,#16 @ $inc is used as post-
  186. @ increment for input pointer;
  187. @ as loop is modulo-scheduled
  188. @ $inc is zeroed just in time
  189. @ to preclude oversteping
  190. @ inp[len], which means that
  191. @ last block[s] are actually
  192. @ loaded twice, but last
  193. @ copy is not processed
  194. vld1.64 {$H-$Hhl},[$Htbl],#32 @ load twisted H, ..., H^2
  195. vmov.i8 $xC2,#0xe1
  196. vld1.64 {$H2},[$Htbl]
  197. cclr $inc,eq @ is it time to zero $inc?
  198. vext.8 $Xl,$Xl,$Xl,#8 @ rotate Xi
  199. vld1.64 {$t0},[$inp],#16 @ load [rotated] I[0]
  200. vshl.u64 $xC2,$xC2,#57 @ compose 0xc2.0 constant
  201. #ifndef __ARMEB__
  202. vrev64.8 $t0,$t0
  203. vrev64.8 $Xl,$Xl
  204. #endif
  205. vext.8 $IN,$t0,$t0,#8 @ rotate I[0]
  206. b.lo .Lodd_tail_v8 @ $len was less than 32
  207. ___
  208. { my ($Xln,$Xmn,$Xhn,$In) = map("q$_",(4..7));
  209. #######
  210. # Xi+2 =[H*(Ii+1 + Xi+1)] mod P =
  211. # [(H*Ii+1) + (H*Xi+1)] mod P =
  212. # [(H*Ii+1) + H^2*(Ii+Xi)] mod P
  213. #
  214. $code.=<<___;
  215. vld1.64 {$t1},[$inp],$inc @ load [rotated] I[1]
  216. #ifndef __ARMEB__
  217. vrev64.8 $t1,$t1
  218. #endif
  219. vext.8 $In,$t1,$t1,#8
  220. veor $IN,$IN,$Xl @ I[i]^=Xi
  221. vpmull.p64 $Xln,$H,$In @ HIi+1
  222. veor $t1,$t1,$In @ Karatsuba pre-processing
  223. vpmull2.p64 $Xhn,$H,$In
  224. b .Loop_mod2x_v8
  225. .align 4
  226. .Loop_mod2x_v8:
  227. vext.8 $t2,$IN,$IN,#8
  228. subs $len,$len,#32 @ is there more data?
  229. vpmull.p64 $Xl,$H2,$IN @ H^2.loXi.lo
  230. cclr $inc,lo @ is it time to zero $inc?
  231. vpmull.p64 $Xmn,$Hhl,$t1
  232. veor $t2,$t2,$IN @ Karatsuba pre-processing
  233. vpmull2.p64 $Xh,$H2,$IN @ H^2.hiXi.hi
  234. veor $Xl,$Xl,$Xln @ accumulate
  235. vpmull2.p64 $Xm,$Hhl,$t2 @ (H^2.lo+H^2.hi)(Xi.lo+Xi.hi)
  236. vld1.64 {$t0},[$inp],$inc @ load [rotated] I[i+2]
  237. veor $Xh,$Xh,$Xhn
  238. cclr $inc,eq @ is it time to zero $inc?
  239. veor $Xm,$Xm,$Xmn
  240. vext.8 $t1,$Xl,$Xh,#8 @ Karatsuba post-processing
  241. veor $t2,$Xl,$Xh
  242. veor $Xm,$Xm,$t1
  243. vld1.64 {$t1},[$inp],$inc @ load [rotated] I[i+3]
  244. #ifndef __ARMEB__
  245. vrev64.8 $t0,$t0
  246. #endif
  247. veor $Xm,$Xm,$t2
  248. vpmull.p64 $t2,$Xl,$xC2 @ 1st phase of reduction
  249. #ifndef __ARMEB__
  250. vrev64.8 $t1,$t1
  251. #endif
  252. vmov $Xh#lo,$Xm#hi @ Xh|Xm - 256-bit result
  253. vmov $Xm#hi,$Xl#lo @ Xm is rotated Xl
  254. vext.8 $In,$t1,$t1,#8
  255. vext.8 $IN,$t0,$t0,#8
  256. veor $Xl,$Xm,$t2
  257. vpmull.p64 $Xln,$H,$In @ HIi+1
  258. veor $IN,$IN,$Xh @ accumulate $IN early
  259. vext.8 $t2,$Xl,$Xl,#8 @ 2nd phase of reduction
  260. vpmull.p64 $Xl,$Xl,$xC2
  261. veor $IN,$IN,$t2
  262. veor $t1,$t1,$In @ Karatsuba pre-processing
  263. veor $IN,$IN,$Xl
  264. vpmull2.p64 $Xhn,$H,$In
  265. b.hs .Loop_mod2x_v8 @ there was at least 32 more bytes
  266. veor $Xh,$Xh,$t2
  267. vext.8 $IN,$t0,$t0,#8 @ re-construct $IN
  268. adds $len,$len,#32 @ re-construct $len
  269. veor $Xl,$Xl,$Xh @ re-construct $Xl
  270. b.eq .Ldone_v8 @ is $len zero?
  271. ___
  272. }
  273. $code.=<<___;
  274. .Lodd_tail_v8:
  275. vext.8 $t2,$Xl,$Xl,#8
  276. veor $IN,$IN,$Xl @ inp^=Xi
  277. veor $t1,$t0,$t2 @ $t1 is rotated inp^Xi
  278. vpmull.p64 $Xl,$H,$IN @ H.loXi.lo
  279. veor $t1,$t1,$IN @ Karatsuba pre-processing
  280. vpmull2.p64 $Xh,$H,$IN @ H.hiXi.hi
  281. vpmull.p64 $Xm,$Hhl,$t1 @ (H.lo+H.hi)(Xi.lo+Xi.hi)
  282. vext.8 $t1,$Xl,$Xh,#8 @ Karatsuba post-processing
  283. veor $t2,$Xl,$Xh
  284. veor $Xm,$Xm,$t1
  285. veor $Xm,$Xm,$t2
  286. vpmull.p64 $t2,$Xl,$xC2 @ 1st phase of reduction
  287. vmov $Xh#lo,$Xm#hi @ Xh|Xm - 256-bit result
  288. vmov $Xm#hi,$Xl#lo @ Xm is rotated Xl
  289. veor $Xl,$Xm,$t2
  290. vext.8 $t2,$Xl,$Xl,#8 @ 2nd phase of reduction
  291. vpmull.p64 $Xl,$Xl,$xC2
  292. veor $t2,$t2,$Xh
  293. veor $Xl,$Xl,$t2
  294. .Ldone_v8:
  295. #ifndef __ARMEB__
  296. vrev64.8 $Xl,$Xl
  297. #endif
  298. vext.8 $Xl,$Xl,$Xl,#8
  299. vst1.64 {$Xl},[$Xi] @ write out Xi
  300. ___
  301. $code.=<<___ if ($flavour !~ /64/);
  302. vldmia sp!,{d8-d15} @ 32-bit ABI says so
  303. ___
  304. $code.=<<___;
  305. ret
  306. .size gcm_ghash_v8,.-gcm_ghash_v8
  307. ___
  308. }
  309. $code.=<<___;
  310. .asciz "GHASH for ARMv8, CRYPTOGAMS by <appro\@openssl.org>"
  311. .align 2
  312. ___
  313. if ($flavour =~ /64/) { ######## 64-bit code
  314. sub unvmov {
  315. my $arg=shift;
  316. $arg =~ m/q([0-9]+)#(lo|hi),\s*q([0-9]+)#(lo|hi)/o &&
  317. sprintf "ins v%d.d[%d],v%d.d[%d]",$1,($2 eq "lo")?0:1,$3,($4 eq "lo")?0:1;
  318. }
  319. foreach(split("\n",$code)) {
  320. s/cclr\s+([wx])([^,]+),\s*([a-z]+)/csel $1$2,$1zr,$1$2,$3/o or
  321. s/vmov\.i8/movi/o or # fix up legacy mnemonics
  322. s/vmov\s+(.*)/unvmov($1)/geo or
  323. s/vext\.8/ext/o or
  324. s/vshr\.s/sshr\.s/o or
  325. s/vshr/ushr/o or
  326. s/^(\s+)v/$1/o or # strip off v prefix
  327. s/\bbx\s+lr\b/ret/o;
  328. s/\bq([0-9]+)\b/"v".($1<8?$1:$1+8).".16b"/geo; # old->new registers
  329. s/@\s/\/\//o; # old->new style commentary
  330. # fix up remainig legacy suffixes
  331. s/\.[ui]?8(\s)/$1/o;
  332. s/\.[uis]?32//o and s/\.16b/\.4s/go;
  333. m/\.p64/o and s/\.16b/\.1q/o; # 1st pmull argument
  334. m/l\.p64/o and s/\.16b/\.1d/go; # 2nd and 3rd pmull arguments
  335. s/\.[uisp]?64//o and s/\.16b/\.2d/go;
  336. s/\.[42]([sd])\[([0-3])\]/\.$1\[$2\]/o;
  337. print $_,"\n";
  338. }
  339. } else { ######## 32-bit code
  340. sub unvdup32 {
  341. my $arg=shift;
  342. $arg =~ m/q([0-9]+),\s*q([0-9]+)\[([0-3])\]/o &&
  343. sprintf "vdup.32 q%d,d%d[%d]",$1,2*$2+($3>>1),$3&1;
  344. }
  345. sub unvpmullp64 {
  346. my ($mnemonic,$arg)=@_;
  347. if ($arg =~ m/q([0-9]+),\s*q([0-9]+),\s*q([0-9]+)/o) {
  348. my $word = 0xf2a00e00|(($1&7)<<13)|(($1&8)<<19)
  349. |(($2&7)<<17)|(($2&8)<<4)
  350. |(($3&7)<<1) |(($3&8)<<2);
  351. $word |= 0x00010001 if ($mnemonic =~ "2");
  352. # since ARMv7 instructions are always encoded little-endian.
  353. # correct solution is to use .inst directive, but older
  354. # assemblers don't implement it:-(
  355. sprintf ".byte\t0x%02x,0x%02x,0x%02x,0x%02x\t@ %s %s",
  356. $word&0xff,($word>>8)&0xff,
  357. ($word>>16)&0xff,($word>>24)&0xff,
  358. $mnemonic,$arg;
  359. }
  360. }
  361. foreach(split("\n",$code)) {
  362. s/\b[wx]([0-9]+)\b/r$1/go; # new->old registers
  363. s/\bv([0-9])\.[12468]+[bsd]\b/q$1/go; # new->old registers
  364. s/\/\/\s?/@ /o; # new->old style commentary
  365. # fix up remainig new-style suffixes
  366. s/\],#[0-9]+/]!/o;
  367. s/cclr\s+([^,]+),\s*([a-z]+)/mov$2 $1,#0/o or
  368. s/vdup\.32\s+(.*)/unvdup32($1)/geo or
  369. s/v?(pmull2?)\.p64\s+(.*)/unvpmullp64($1,$2)/geo or
  370. s/\bq([0-9]+)#(lo|hi)/sprintf "d%d",2*$1+($2 eq "hi")/geo or
  371. s/^(\s+)b\./$1b/o or
  372. s/^(\s+)ret/$1bx\tlr/o;
  373. print $_,"\n";
  374. }
  375. }
  376. close STDOUT; # enforce flush