diff --git a/IDE/ARDUINO/sketches/wolfssl_client/wolfssl_client.ino b/IDE/ARDUINO/sketches/wolfssl_client/wolfssl_client.ino index f80cb0212..a7f18a467 100644 --- a/IDE/ARDUINO/sketches/wolfssl_client/wolfssl_client.ino +++ b/IDE/ARDUINO/sketches/wolfssl_client/wolfssl_client.ino @@ -1,6 +1,6 @@ /* wolfssl_client.ino * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/IDE/ARDUINO/sketches/wolfssl_server/wolfssl_server.ino b/IDE/ARDUINO/sketches/wolfssl_server/wolfssl_server.ino index abfe7ee13..26fac5767 100644 --- a/IDE/ARDUINO/sketches/wolfssl_server/wolfssl_server.ino +++ b/IDE/ARDUINO/sketches/wolfssl_server/wolfssl_server.ino @@ -1,6 +1,6 @@ /* wolfssl_server.ino * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/IDE/CRYPTOCELL/main.c b/IDE/CRYPTOCELL/main.c index 61863cfcf..32ff58d71 100644 --- a/IDE/CRYPTOCELL/main.c +++ b/IDE/CRYPTOCELL/main.c @@ -1,6 +1,6 @@ /* main.c * - * Copyright (C) 2019 wolfSSL Inc. + * Copyright (C) 2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/IDE/CRYPTOCELL/user_settings.h b/IDE/CRYPTOCELL/user_settings.h index 3d21d840b..bbc3bab28 100644 --- a/IDE/CRYPTOCELL/user_settings.h +++ b/IDE/CRYPTOCELL/user_settings.h @@ -1,6 +1,6 @@ /* user_settings.h * - * Copyright (C) 2019 wolfSSL Inc. + * Copyright (C) 2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/IDE/ECLIPSE/DEOS/deos_malloc.c b/IDE/ECLIPSE/DEOS/deos_malloc.c index 8188ec0df..e8b213001 100644 --- a/IDE/ECLIPSE/DEOS/deos_malloc.c +++ b/IDE/ECLIPSE/DEOS/deos_malloc.c @@ -1,6 +1,6 @@ /* deos_malloc.c * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/IDE/ECLIPSE/DEOS/tls_wolfssl.c b/IDE/ECLIPSE/DEOS/tls_wolfssl.c index b6cdc3862..5af4f0b5d 100644 --- a/IDE/ECLIPSE/DEOS/tls_wolfssl.c +++ b/IDE/ECLIPSE/DEOS/tls_wolfssl.c @@ -1,6 +1,6 @@ /* tls_wolfssl.c * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/IDE/ECLIPSE/DEOS/tls_wolfssl.h b/IDE/ECLIPSE/DEOS/tls_wolfssl.h index c9b13f1af..062826fba 100644 --- a/IDE/ECLIPSE/DEOS/tls_wolfssl.h +++ b/IDE/ECLIPSE/DEOS/tls_wolfssl.h @@ -1,6 +1,6 @@ /* tls_wolfssl.h * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/IDE/ECLIPSE/DEOS/user_settings.h b/IDE/ECLIPSE/DEOS/user_settings.h index 94fb26b63..5283e3d8a 100644 --- a/IDE/ECLIPSE/DEOS/user_settings.h +++ b/IDE/ECLIPSE/DEOS/user_settings.h @@ -1,6 +1,6 @@ /* user_setting.h * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/IDE/ECLIPSE/MICRIUM/client_wolfssl.c b/IDE/ECLIPSE/MICRIUM/client_wolfssl.c index 9599f00d7..241eb1df9 100644 --- a/IDE/ECLIPSE/MICRIUM/client_wolfssl.c +++ b/IDE/ECLIPSE/MICRIUM/client_wolfssl.c @@ -1,6 +1,6 @@ /* client_wolfssl.c * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/IDE/ECLIPSE/MICRIUM/client_wolfssl.h b/IDE/ECLIPSE/MICRIUM/client_wolfssl.h index f2bcb2f72..e95f818ec 100644 --- a/IDE/ECLIPSE/MICRIUM/client_wolfssl.h +++ b/IDE/ECLIPSE/MICRIUM/client_wolfssl.h @@ -1,6 +1,6 @@ /* client_wolfssl.h * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/IDE/ECLIPSE/MICRIUM/server_wolfssl.c b/IDE/ECLIPSE/MICRIUM/server_wolfssl.c index 884f67f87..a8d0a8232 100644 --- a/IDE/ECLIPSE/MICRIUM/server_wolfssl.c +++ b/IDE/ECLIPSE/MICRIUM/server_wolfssl.c @@ -1,6 +1,6 @@ /* server_wolfssl.c * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/IDE/ECLIPSE/MICRIUM/server_wolfssl.h b/IDE/ECLIPSE/MICRIUM/server_wolfssl.h index fd8384010..c75e1b927 100644 --- a/IDE/ECLIPSE/MICRIUM/server_wolfssl.h +++ b/IDE/ECLIPSE/MICRIUM/server_wolfssl.h @@ -1,6 +1,6 @@ /* server_wolfssl.h * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/IDE/ECLIPSE/MICRIUM/user_settings.h b/IDE/ECLIPSE/MICRIUM/user_settings.h index c5450efad..affd9d9ca 100644 --- a/IDE/ECLIPSE/MICRIUM/user_settings.h +++ b/IDE/ECLIPSE/MICRIUM/user_settings.h @@ -1,6 +1,6 @@ /* user_setting.h * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/IDE/ECLIPSE/MICRIUM/wolfsslRunTests.c b/IDE/ECLIPSE/MICRIUM/wolfsslRunTests.c index d587fda49..84f02b254 100644 --- a/IDE/ECLIPSE/MICRIUM/wolfsslRunTests.c +++ b/IDE/ECLIPSE/MICRIUM/wolfsslRunTests.c @@ -1,6 +1,6 @@ /* wolfsslRunTests.c * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/IDE/Espressif/ESP-IDF/dummy_config_h b/IDE/Espressif/ESP-IDF/dummy_config_h index bbb11f2e1..8d42a0cbf 100644 --- a/IDE/Espressif/ESP-IDF/dummy_config_h +++ b/IDE/Espressif/ESP-IDF/dummy_config_h @@ -1,6 +1,6 @@ /* config.h - dummy * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/IDE/Espressif/ESP-IDF/examples/wolfssl_benchmark/main/helper.c b/IDE/Espressif/ESP-IDF/examples/wolfssl_benchmark/main/helper.c index e58c5caa7..f2084a87d 100644 --- a/IDE/Espressif/ESP-IDF/examples/wolfssl_benchmark/main/helper.c +++ b/IDE/Espressif/ESP-IDF/examples/wolfssl_benchmark/main/helper.c @@ -1,6 +1,6 @@ /* helper.c * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/IDE/Espressif/ESP-IDF/examples/wolfssl_client/main/client-tls.c b/IDE/Espressif/ESP-IDF/examples/wolfssl_client/main/client-tls.c index cde4c6ec2..64730aa77 100644 --- a/IDE/Espressif/ESP-IDF/examples/wolfssl_client/main/client-tls.c +++ b/IDE/Espressif/ESP-IDF/examples/wolfssl_client/main/client-tls.c @@ -1,6 +1,6 @@ /* client-tls-callback.c * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/IDE/Espressif/ESP-IDF/examples/wolfssl_client/main/include/wifi_connect.h b/IDE/Espressif/ESP-IDF/examples/wolfssl_client/main/include/wifi_connect.h index 430529103..602b30f12 100644 --- a/IDE/Espressif/ESP-IDF/examples/wolfssl_client/main/include/wifi_connect.h +++ b/IDE/Espressif/ESP-IDF/examples/wolfssl_client/main/include/wifi_connect.h @@ -1,6 +1,6 @@ /* user_settings.h * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/IDE/Espressif/ESP-IDF/examples/wolfssl_client/main/wifi_connect.c b/IDE/Espressif/ESP-IDF/examples/wolfssl_client/main/wifi_connect.c index 56bbfe5bc..582f7acd5 100644 --- a/IDE/Espressif/ESP-IDF/examples/wolfssl_client/main/wifi_connect.c +++ b/IDE/Espressif/ESP-IDF/examples/wolfssl_client/main/wifi_connect.c @@ -1,6 +1,6 @@ /* wifi_connect.c * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/IDE/Espressif/ESP-IDF/examples/wolfssl_server/main/include/wifi_connect.h b/IDE/Espressif/ESP-IDF/examples/wolfssl_server/main/include/wifi_connect.h index 5718ad34d..a8769dc07 100644 --- a/IDE/Espressif/ESP-IDF/examples/wolfssl_server/main/include/wifi_connect.h +++ b/IDE/Espressif/ESP-IDF/examples/wolfssl_server/main/include/wifi_connect.h @@ -1,6 +1,6 @@ /* wifi_connect.h * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/IDE/Espressif/ESP-IDF/examples/wolfssl_server/main/server-tls.c b/IDE/Espressif/ESP-IDF/examples/wolfssl_server/main/server-tls.c index 9460ac1a5..a3beca538 100644 --- a/IDE/Espressif/ESP-IDF/examples/wolfssl_server/main/server-tls.c +++ b/IDE/Espressif/ESP-IDF/examples/wolfssl_server/main/server-tls.c @@ -1,6 +1,6 @@ /* server-tls-callback.c * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/IDE/Espressif/ESP-IDF/examples/wolfssl_server/main/wifi_connect.c b/IDE/Espressif/ESP-IDF/examples/wolfssl_server/main/wifi_connect.c index 099c6033b..e2a2efbc0 100644 --- a/IDE/Espressif/ESP-IDF/examples/wolfssl_server/main/wifi_connect.c +++ b/IDE/Espressif/ESP-IDF/examples/wolfssl_server/main/wifi_connect.c @@ -1,6 +1,6 @@ /* wifi_connect.c * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/IDE/Espressif/ESP-IDF/user_settings.h b/IDE/Espressif/ESP-IDF/user_settings.h index 6383f3298..015da4bea 100644 --- a/IDE/Espressif/ESP-IDF/user_settings.h +++ b/IDE/Espressif/ESP-IDF/user_settings.h @@ -1,6 +1,6 @@ /* user_settings.h * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/IDE/GCC-ARM/Header/user_settings.h b/IDE/GCC-ARM/Header/user_settings.h index bb9c5da1e..135ddb086 100644 --- a/IDE/GCC-ARM/Header/user_settings.h +++ b/IDE/GCC-ARM/Header/user_settings.h @@ -1,6 +1,6 @@ /* user_settings.h * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/IDE/GCC-ARM/Source/armtarget.c b/IDE/GCC-ARM/Source/armtarget.c index 9a1677c3d..0b9a01321 100644 --- a/IDE/GCC-ARM/Source/armtarget.c +++ b/IDE/GCC-ARM/Source/armtarget.c @@ -1,6 +1,6 @@ /* armtarget.c * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/IDE/GCC-ARM/Source/benchmark_main.c b/IDE/GCC-ARM/Source/benchmark_main.c index 1ceafe748..7f91e7ccb 100644 --- a/IDE/GCC-ARM/Source/benchmark_main.c +++ b/IDE/GCC-ARM/Source/benchmark_main.c @@ -1,6 +1,6 @@ /* benchmark_main.c * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/IDE/GCC-ARM/Source/test_main.c b/IDE/GCC-ARM/Source/test_main.c index 47c0c1b9b..d3d525a76 100644 --- a/IDE/GCC-ARM/Source/test_main.c +++ b/IDE/GCC-ARM/Source/test_main.c @@ -1,6 +1,6 @@ /* test_main.c * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/IDE/GCC-ARM/Source/tls_client.c b/IDE/GCC-ARM/Source/tls_client.c index eca3ba238..43c0b73f9 100644 --- a/IDE/GCC-ARM/Source/tls_client.c +++ b/IDE/GCC-ARM/Source/tls_client.c @@ -1,6 +1,6 @@ /* tls_client.c * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/IDE/GCC-ARM/Source/wolf_main.c b/IDE/GCC-ARM/Source/wolf_main.c index 5c8ffceaf..15443753f 100644 --- a/IDE/GCC-ARM/Source/wolf_main.c +++ b/IDE/GCC-ARM/Source/wolf_main.c @@ -1,6 +1,6 @@ /* wolf_main.c * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/IDE/HEXAGON/DSP/Makefile b/IDE/HEXAGON/DSP/Makefile index b61a48e42..1cf0ccb0d 100644 --- a/IDE/HEXAGON/DSP/Makefile +++ b/IDE/HEXAGON/DSP/Makefile @@ -1,6 +1,6 @@ # Makefile # -# Copyright (C) 2006-2019 wolfSSL Inc. +# Copyright (C) 2006-2020 wolfSSL Inc. # # This file is part of wolfSSL. # diff --git a/IDE/HEXAGON/Makefile b/IDE/HEXAGON/Makefile index 053e1f19b..87ed33cd4 100644 --- a/IDE/HEXAGON/Makefile +++ b/IDE/HEXAGON/Makefile @@ -1,6 +1,6 @@ # Makefile # -# Copyright (C) 2006-2019 wolfSSL Inc. +# Copyright (C) 2006-2020 wolfSSL Inc. # # This file is part of wolfSSL. # diff --git a/IDE/HEXAGON/ecc-verify-benchmark.c b/IDE/HEXAGON/ecc-verify-benchmark.c index 304ac2aeb..8eafa744d 100644 --- a/IDE/HEXAGON/ecc-verify-benchmark.c +++ b/IDE/HEXAGON/ecc-verify-benchmark.c @@ -1,6 +1,6 @@ /* ecc-verify-benchmark.c * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/IDE/HEXAGON/ecc-verify.c b/IDE/HEXAGON/ecc-verify.c index b3b21efb9..835301c75 100644 --- a/IDE/HEXAGON/ecc-verify.c +++ b/IDE/HEXAGON/ecc-verify.c @@ -1,6 +1,6 @@ /* ecc-verify.c * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/IDE/IAR-EWARM/Projects/benchmark/benchmark-main.c b/IDE/IAR-EWARM/Projects/benchmark/benchmark-main.c index dc1f90b66..49acf8060 100644 --- a/IDE/IAR-EWARM/Projects/benchmark/benchmark-main.c +++ b/IDE/IAR-EWARM/Projects/benchmark/benchmark-main.c @@ -1,6 +1,6 @@ /* benchmark-main.c * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/IDE/IAR-EWARM/Projects/benchmark/current_time.c b/IDE/IAR-EWARM/Projects/benchmark/current_time.c index e3552435c..4b7f6bd76 100644 --- a/IDE/IAR-EWARM/Projects/benchmark/current_time.c +++ b/IDE/IAR-EWARM/Projects/benchmark/current_time.c @@ -1,6 +1,6 @@ /* current-time.c * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/IDE/IAR-EWARM/Projects/common/minimum-startup.c b/IDE/IAR-EWARM/Projects/common/minimum-startup.c index 81138ce07..3fbff1166 100644 --- a/IDE/IAR-EWARM/Projects/common/minimum-startup.c +++ b/IDE/IAR-EWARM/Projects/common/minimum-startup.c @@ -1,6 +1,6 @@ /* minimum-startup.c * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/IDE/IAR-EWARM/Projects/test/test-main.c b/IDE/IAR-EWARM/Projects/test/test-main.c index e4a50551f..28c1a01e2 100644 --- a/IDE/IAR-EWARM/Projects/test/test-main.c +++ b/IDE/IAR-EWARM/Projects/test/test-main.c @@ -1,6 +1,6 @@ /* test-main.c * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/IDE/LINUX-SGX/README.md b/IDE/LINUX-SGX/README.md index a06798dbb..3b5ae856d 100644 --- a/IDE/LINUX-SGX/README.md +++ b/IDE/LINUX-SGX/README.md @@ -5,6 +5,7 @@ This code was created to use Intel's SGX hardware. It is expected that the user ### Overview and Build: This project creates a static library to then link with Enclaves. A simple example of an Enclave linking to the created wolfSSL library can be found in wolfssl-examples on github. This project has been tested with gcc 5.4.0 on Ubuntu 16.04. +When building with tests the file wolfssl/options.h is expected, in downloaded bundles from wolfssl.com this file exists but when building from a cloned version of wolfSSL from GitHub then the file needs created. This is done either through cd wolfssl && ./autogen.sh && ./configure && ./config.status or by cd wolfssl && touch wolfssl/options.h. To create the static library, simply call make: diff --git a/IDE/LPCXPRESSO/lib_wolfssl/lpc_18xx_port.c b/IDE/LPCXPRESSO/lib_wolfssl/lpc_18xx_port.c index 652322a86..c02496838 100644 --- a/IDE/LPCXPRESSO/lib_wolfssl/lpc_18xx_port.c +++ b/IDE/LPCXPRESSO/lib_wolfssl/lpc_18xx_port.c @@ -1,6 +1,6 @@ /* lpc_18xx_port.c * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/IDE/LPCXPRESSO/wolf_example/src/lpc_18xx_startup.c b/IDE/LPCXPRESSO/wolf_example/src/lpc_18xx_startup.c index e8add602b..ef7432167 100644 --- a/IDE/LPCXPRESSO/wolf_example/src/lpc_18xx_startup.c +++ b/IDE/LPCXPRESSO/wolf_example/src/lpc_18xx_startup.c @@ -1,6 +1,6 @@ /* lpc_18xx_startup.c * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/IDE/M68K/benchmark/main.cpp b/IDE/M68K/benchmark/main.cpp index c217fda67..7a42ae48f 100644 --- a/IDE/M68K/benchmark/main.cpp +++ b/IDE/M68K/benchmark/main.cpp @@ -1,6 +1,6 @@ /* main.c * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/IDE/M68K/testwolfcrypt/main.cpp b/IDE/M68K/testwolfcrypt/main.cpp index 5bf20363e..90f894a32 100644 --- a/IDE/M68K/testwolfcrypt/main.cpp +++ b/IDE/M68K/testwolfcrypt/main.cpp @@ -1,6 +1,6 @@ /* main.c * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/IDE/MDK-ARM/LPC43xx/time-LCP43xx.c b/IDE/MDK-ARM/LPC43xx/time-LCP43xx.c index 42b82c481..3cdf214d7 100644 --- a/IDE/MDK-ARM/LPC43xx/time-LCP43xx.c +++ b/IDE/MDK-ARM/LPC43xx/time-LCP43xx.c @@ -1,6 +1,6 @@ /* time.c * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/IDE/MDK-ARM/MDK-ARM/wolfSSL/cert_data.c b/IDE/MDK-ARM/MDK-ARM/wolfSSL/cert_data.c index 9939c9b99..a094bb1dd 100644 --- a/IDE/MDK-ARM/MDK-ARM/wolfSSL/cert_data.c +++ b/IDE/MDK-ARM/MDK-ARM/wolfSSL/cert_data.c @@ -1,6 +1,6 @@ /* certs_test.c * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/IDE/MDK-ARM/MDK-ARM/wolfSSL/config-BARE-METAL.h b/IDE/MDK-ARM/MDK-ARM/wolfSSL/config-BARE-METAL.h index 6455b76fc..21974401e 100644 --- a/IDE/MDK-ARM/MDK-ARM/wolfSSL/config-BARE-METAL.h +++ b/IDE/MDK-ARM/MDK-ARM/wolfSSL/config-BARE-METAL.h @@ -1,6 +1,6 @@ /* config-BEREFOOT.h * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/IDE/MDK-ARM/MDK-ARM/wolfSSL/config-FS.h b/IDE/MDK-ARM/MDK-ARM/wolfSSL/config-FS.h index 5d9184f31..daeb75b88 100644 --- a/IDE/MDK-ARM/MDK-ARM/wolfSSL/config-FS.h +++ b/IDE/MDK-ARM/MDK-ARM/wolfSSL/config-FS.h @@ -1,6 +1,6 @@ /* config-FS.h * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/IDE/MDK-ARM/MDK-ARM/wolfSSL/config-RTX-TCP-FS.h b/IDE/MDK-ARM/MDK-ARM/wolfSSL/config-RTX-TCP-FS.h index e8762a938..193eb2531 100644 --- a/IDE/MDK-ARM/MDK-ARM/wolfSSL/config-RTX-TCP-FS.h +++ b/IDE/MDK-ARM/MDK-ARM/wolfSSL/config-RTX-TCP-FS.h @@ -1,6 +1,6 @@ /* config-RTX-TCP-FS.h * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/IDE/MDK-ARM/MDK-ARM/wolfSSL/config.h b/IDE/MDK-ARM/MDK-ARM/wolfSSL/config.h index 29e8c2243..de37fa143 100644 --- a/IDE/MDK-ARM/MDK-ARM/wolfSSL/config.h +++ b/IDE/MDK-ARM/MDK-ARM/wolfSSL/config.h @@ -1,6 +1,6 @@ /* config.h * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/IDE/MDK-ARM/MDK-ARM/wolfSSL/main.c b/IDE/MDK-ARM/MDK-ARM/wolfSSL/main.c index 549e03352..fab05b7e8 100644 --- a/IDE/MDK-ARM/MDK-ARM/wolfSSL/main.c +++ b/IDE/MDK-ARM/MDK-ARM/wolfSSL/main.c @@ -1,6 +1,6 @@ /* main.c * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/IDE/MDK-ARM/MDK-ARM/wolfSSL/shell.c b/IDE/MDK-ARM/MDK-ARM/wolfSSL/shell.c index 8ef7bac81..518c8f5a2 100644 --- a/IDE/MDK-ARM/MDK-ARM/wolfSSL/shell.c +++ b/IDE/MDK-ARM/MDK-ARM/wolfSSL/shell.c @@ -1,6 +1,6 @@ /*shell.c * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/IDE/MDK-ARM/MDK-ARM/wolfSSL/time-CortexM3-4.c b/IDE/MDK-ARM/MDK-ARM/wolfSSL/time-CortexM3-4.c index dbc3ae1b1..ed6b53d97 100644 --- a/IDE/MDK-ARM/MDK-ARM/wolfSSL/time-CortexM3-4.c +++ b/IDE/MDK-ARM/MDK-ARM/wolfSSL/time-CortexM3-4.c @@ -1,6 +1,6 @@ /* time-STM32F2.c * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/IDE/MDK-ARM/MDK-ARM/wolfSSL/time-dummy.c b/IDE/MDK-ARM/MDK-ARM/wolfSSL/time-dummy.c index 72edeab85..b934398f1 100644 --- a/IDE/MDK-ARM/MDK-ARM/wolfSSL/time-dummy.c +++ b/IDE/MDK-ARM/MDK-ARM/wolfSSL/time-dummy.c @@ -1,6 +1,6 @@ /* time-dummy.c.c * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/IDE/MDK-ARM/MDK-ARM/wolfSSL/wolfssl_MDK_ARM.c b/IDE/MDK-ARM/MDK-ARM/wolfSSL/wolfssl_MDK_ARM.c index 513b39853..c173e6a03 100644 --- a/IDE/MDK-ARM/MDK-ARM/wolfSSL/wolfssl_MDK_ARM.c +++ b/IDE/MDK-ARM/MDK-ARM/wolfSSL/wolfssl_MDK_ARM.c @@ -1,6 +1,6 @@ /* wolfssl_KEIL_RL.c * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/IDE/MDK-ARM/MDK-ARM/wolfSSL/wolfssl_MDK_ARM.h b/IDE/MDK-ARM/MDK-ARM/wolfSSL/wolfssl_MDK_ARM.h index c010f9a6a..b334a45e0 100644 --- a/IDE/MDK-ARM/MDK-ARM/wolfSSL/wolfssl_MDK_ARM.h +++ b/IDE/MDK-ARM/MDK-ARM/wolfSSL/wolfssl_MDK_ARM.h @@ -1,6 +1,6 @@ /* wolfssl_KEIL_RL.h * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/IDE/MDK-ARM/STM32F2xx_StdPeriph_Lib/time-STM32F2xx.c b/IDE/MDK-ARM/STM32F2xx_StdPeriph_Lib/time-STM32F2xx.c index 3586354af..6480e10cc 100644 --- a/IDE/MDK-ARM/STM32F2xx_StdPeriph_Lib/time-STM32F2xx.c +++ b/IDE/MDK-ARM/STM32F2xx_StdPeriph_Lib/time-STM32F2xx.c @@ -1,6 +1,6 @@ /* time-STM32F2xx.c * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/IDE/MDK5-ARM/Conf/user_settings.h b/IDE/MDK5-ARM/Conf/user_settings.h index 992bb5c04..b65ee7bf7 100644 --- a/IDE/MDK5-ARM/Conf/user_settings.h +++ b/IDE/MDK5-ARM/Conf/user_settings.h @@ -1,6 +1,6 @@ /* user_settings.h * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/IDE/MDK5-ARM/Inc/wolfssl_MDK_ARM.h b/IDE/MDK5-ARM/Inc/wolfssl_MDK_ARM.h index e8bddc544..4645d7c39 100644 --- a/IDE/MDK5-ARM/Inc/wolfssl_MDK_ARM.h +++ b/IDE/MDK5-ARM/Inc/wolfssl_MDK_ARM.h @@ -1,6 +1,6 @@ /* wolfssl_KEIL_ARM.h * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/IDE/MDK5-ARM/Projects/CryptBenchmark/RTE/wolfSSL/user_settings.h b/IDE/MDK5-ARM/Projects/CryptBenchmark/RTE/wolfSSL/user_settings.h index cf5bbd2d3..5a09b717c 100644 --- a/IDE/MDK5-ARM/Projects/CryptBenchmark/RTE/wolfSSL/user_settings.h +++ b/IDE/MDK5-ARM/Projects/CryptBenchmark/RTE/wolfSSL/user_settings.h @@ -1,6 +1,6 @@ /* user_settings.h * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/IDE/MDK5-ARM/Projects/CryptBenchmark/main.c b/IDE/MDK5-ARM/Projects/CryptBenchmark/main.c index 0ea51343e..1b32a4710 100644 --- a/IDE/MDK5-ARM/Projects/CryptBenchmark/main.c +++ b/IDE/MDK5-ARM/Projects/CryptBenchmark/main.c @@ -1,6 +1,6 @@ /* main.c * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/IDE/MDK5-ARM/Projects/CryptTest/RTE/wolfSSL/user_settings.h b/IDE/MDK5-ARM/Projects/CryptTest/RTE/wolfSSL/user_settings.h index 012cdf459..a7cc2f761 100644 --- a/IDE/MDK5-ARM/Projects/CryptTest/RTE/wolfSSL/user_settings.h +++ b/IDE/MDK5-ARM/Projects/CryptTest/RTE/wolfSSL/user_settings.h @@ -1,6 +1,6 @@ /* user_settings.h * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/IDE/MDK5-ARM/Projects/CryptTest/main.c b/IDE/MDK5-ARM/Projects/CryptTest/main.c index 6345be170..ea6ad3851 100644 --- a/IDE/MDK5-ARM/Projects/CryptTest/main.c +++ b/IDE/MDK5-ARM/Projects/CryptTest/main.c @@ -1,6 +1,6 @@ /* main.c * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/IDE/MDK5-ARM/Projects/EchoClient/RTE/wolfSSL/user_settings.h b/IDE/MDK5-ARM/Projects/EchoClient/RTE/wolfSSL/user_settings.h index 055e17839..251693a0d 100644 --- a/IDE/MDK5-ARM/Projects/EchoClient/RTE/wolfSSL/user_settings.h +++ b/IDE/MDK5-ARM/Projects/EchoClient/RTE/wolfSSL/user_settings.h @@ -1,6 +1,6 @@ /* user_settings.h * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/IDE/MDK5-ARM/Projects/EchoClient/main.c b/IDE/MDK5-ARM/Projects/EchoClient/main.c index 3c5b5218a..2c74bd3bb 100644 --- a/IDE/MDK5-ARM/Projects/EchoClient/main.c +++ b/IDE/MDK5-ARM/Projects/EchoClient/main.c @@ -1,6 +1,6 @@ /* main.c * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/IDE/MDK5-ARM/Projects/EchoServer/RTE/wolfSSL/user_settings.h b/IDE/MDK5-ARM/Projects/EchoServer/RTE/wolfSSL/user_settings.h index 475216693..d0c28a96c 100644 --- a/IDE/MDK5-ARM/Projects/EchoServer/RTE/wolfSSL/user_settings.h +++ b/IDE/MDK5-ARM/Projects/EchoServer/RTE/wolfSSL/user_settings.h @@ -1,6 +1,6 @@ /* user_settings.h * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/IDE/MDK5-ARM/Projects/EchoServer/main.c b/IDE/MDK5-ARM/Projects/EchoServer/main.c index 2cea6374b..f3c252a58 100644 --- a/IDE/MDK5-ARM/Projects/EchoServer/main.c +++ b/IDE/MDK5-ARM/Projects/EchoServer/main.c @@ -1,6 +1,6 @@ /* main.c * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/IDE/MDK5-ARM/Projects/SimpleClient/RTE/wolfSSL/user_settings.h b/IDE/MDK5-ARM/Projects/SimpleClient/RTE/wolfSSL/user_settings.h index 3cc3324dc..045f9d03e 100644 --- a/IDE/MDK5-ARM/Projects/SimpleClient/RTE/wolfSSL/user_settings.h +++ b/IDE/MDK5-ARM/Projects/SimpleClient/RTE/wolfSSL/user_settings.h @@ -1,6 +1,6 @@ /* user_settings.h * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/IDE/MDK5-ARM/Projects/SimpleClient/main.c b/IDE/MDK5-ARM/Projects/SimpleClient/main.c index bbdb5944b..526ed955a 100644 --- a/IDE/MDK5-ARM/Projects/SimpleClient/main.c +++ b/IDE/MDK5-ARM/Projects/SimpleClient/main.c @@ -1,6 +1,6 @@ /* main.c * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/IDE/MDK5-ARM/Projects/SimpleServer/RTE/wolfSSL/user_settings.h b/IDE/MDK5-ARM/Projects/SimpleServer/RTE/wolfSSL/user_settings.h index 3cc3324dc..045f9d03e 100644 --- a/IDE/MDK5-ARM/Projects/SimpleServer/RTE/wolfSSL/user_settings.h +++ b/IDE/MDK5-ARM/Projects/SimpleServer/RTE/wolfSSL/user_settings.h @@ -1,6 +1,6 @@ /* user_settings.h * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/IDE/MDK5-ARM/Projects/SimpleServer/main.c b/IDE/MDK5-ARM/Projects/SimpleServer/main.c index 0a278032b..823d17548 100644 --- a/IDE/MDK5-ARM/Projects/SimpleServer/main.c +++ b/IDE/MDK5-ARM/Projects/SimpleServer/main.c @@ -1,6 +1,6 @@ /* main.c * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/IDE/MDK5-ARM/Projects/wolfSSL-Full/main.c b/IDE/MDK5-ARM/Projects/wolfSSL-Full/main.c index 77b9c1452..3320923cc 100644 --- a/IDE/MDK5-ARM/Projects/wolfSSL-Full/main.c +++ b/IDE/MDK5-ARM/Projects/wolfSSL-Full/main.c @@ -1,6 +1,6 @@ /* main.c * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/IDE/MDK5-ARM/Projects/wolfSSL-Full/shell.c b/IDE/MDK5-ARM/Projects/wolfSSL-Full/shell.c index b6281567f..8245b1c57 100644 --- a/IDE/MDK5-ARM/Projects/wolfSSL-Full/shell.c +++ b/IDE/MDK5-ARM/Projects/wolfSSL-Full/shell.c @@ -1,6 +1,6 @@ /*shell.c * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/IDE/MDK5-ARM/Projects/wolfSSL-Full/time-CortexM3-4.c b/IDE/MDK5-ARM/Projects/wolfSSL-Full/time-CortexM3-4.c index faa74a3da..ee71c2a02 100644 --- a/IDE/MDK5-ARM/Projects/wolfSSL-Full/time-CortexM3-4.c +++ b/IDE/MDK5-ARM/Projects/wolfSSL-Full/time-CortexM3-4.c @@ -1,6 +1,6 @@ /* time-STM32F2.c * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/IDE/MDK5-ARM/Projects/wolfSSL-Lib/RTE/wolfSSL/user_settings.h b/IDE/MDK5-ARM/Projects/wolfSSL-Lib/RTE/wolfSSL/user_settings.h index 3cc3324dc..045f9d03e 100644 --- a/IDE/MDK5-ARM/Projects/wolfSSL-Lib/RTE/wolfSSL/user_settings.h +++ b/IDE/MDK5-ARM/Projects/wolfSSL-Lib/RTE/wolfSSL/user_settings.h @@ -1,6 +1,6 @@ /* user_settings.h * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/IDE/MDK5-ARM/Src/ssl-dummy.c b/IDE/MDK5-ARM/Src/ssl-dummy.c index a5375e1e3..7a6e6961f 100644 --- a/IDE/MDK5-ARM/Src/ssl-dummy.c +++ b/IDE/MDK5-ARM/Src/ssl-dummy.c @@ -1,6 +1,6 @@ /* ssl-dummy.c * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/IDE/MYSQL/CMakeLists_wolfCrypt.txt b/IDE/MYSQL/CMakeLists_wolfCrypt.txt index 253fb48b9..db977dd05 100644 --- a/IDE/MYSQL/CMakeLists_wolfCrypt.txt +++ b/IDE/MYSQL/CMakeLists_wolfCrypt.txt @@ -1,6 +1,6 @@ # CMakeLists.txt # -# Copyright (C) 2006-2019 wolfSSL Inc. +# Copyright (C) 2006-2020 wolfSSL Inc. # # This file is part of wolfSSL. # diff --git a/IDE/MYSQL/CMakeLists_wolfSSL.txt b/IDE/MYSQL/CMakeLists_wolfSSL.txt index 9286f87cd..28bda396b 100644 --- a/IDE/MYSQL/CMakeLists_wolfSSL.txt +++ b/IDE/MYSQL/CMakeLists_wolfSSL.txt @@ -1,6 +1,6 @@ # CMakeLists.txt # -# Copyright (C) 2006-2019 wolfSSL Inc. +# Copyright (C) 2006-2020 wolfSSL Inc. # # This file is part of wolfSSL. # diff --git a/IDE/OPENSTM32/Inc/user_settings.h b/IDE/OPENSTM32/Inc/user_settings.h index 1b0252df5..7ff0e7e43 100644 --- a/IDE/OPENSTM32/Inc/user_settings.h +++ b/IDE/OPENSTM32/Inc/user_settings.h @@ -1,6 +1,6 @@ /* user_settings.h * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/IDE/OPENSTM32/Inc/wolfssl_example.h b/IDE/OPENSTM32/Inc/wolfssl_example.h index 2a05283e5..c97e2dd84 100644 --- a/IDE/OPENSTM32/Inc/wolfssl_example.h +++ b/IDE/OPENSTM32/Inc/wolfssl_example.h @@ -1,6 +1,6 @@ /* wolfssl_example.h * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/IDE/OPENSTM32/Src/main.c b/IDE/OPENSTM32/Src/main.c index 6e428bae7..70efb5a0a 100644 --- a/IDE/OPENSTM32/Src/main.c +++ b/IDE/OPENSTM32/Src/main.c @@ -1,6 +1,6 @@ /* main.c * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/IDE/OPENSTM32/Src/wolfssl_example.c b/IDE/OPENSTM32/Src/wolfssl_example.c index 2d886a53b..d118c5723 100644 --- a/IDE/OPENSTM32/Src/wolfssl_example.c +++ b/IDE/OPENSTM32/Src/wolfssl_example.c @@ -1,6 +1,6 @@ /* wolfssl_example.c * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/IDE/RISCV/SIFIVE-HIFIVE1/main.c b/IDE/RISCV/SIFIVE-HIFIVE1/main.c index dc33ac163..4abbbb055 100644 --- a/IDE/RISCV/SIFIVE-HIFIVE1/main.c +++ b/IDE/RISCV/SIFIVE-HIFIVE1/main.c @@ -1,6 +1,6 @@ /* main.c * - * Copyright (C) 2019 wolfSSL Inc. + * Copyright (C) 2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/IDE/RISCV/SIFIVE-HIFIVE1/user_settings.h b/IDE/RISCV/SIFIVE-HIFIVE1/user_settings.h index 2f7f136cb..19a5686b2 100644 --- a/IDE/RISCV/SIFIVE-HIFIVE1/user_settings.h +++ b/IDE/RISCV/SIFIVE-HIFIVE1/user_settings.h @@ -1,6 +1,6 @@ /* user_settings.h * - * Copyright (C) 2019 wolfSSL Inc. + * Copyright (C) 2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/IDE/ROWLEY-CROSSWORKS-ARM/arm_startup.c b/IDE/ROWLEY-CROSSWORKS-ARM/arm_startup.c index bd85f7cc2..8d7d07488 100644 --- a/IDE/ROWLEY-CROSSWORKS-ARM/arm_startup.c +++ b/IDE/ROWLEY-CROSSWORKS-ARM/arm_startup.c @@ -1,6 +1,6 @@ /* arm_startup.c * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/IDE/ROWLEY-CROSSWORKS-ARM/benchmark_main.c b/IDE/ROWLEY-CROSSWORKS-ARM/benchmark_main.c index de473754e..4d3b63983 100644 --- a/IDE/ROWLEY-CROSSWORKS-ARM/benchmark_main.c +++ b/IDE/ROWLEY-CROSSWORKS-ARM/benchmark_main.c @@ -1,6 +1,6 @@ /* benchmark_main.c * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/IDE/ROWLEY-CROSSWORKS-ARM/kinetis_hw.c b/IDE/ROWLEY-CROSSWORKS-ARM/kinetis_hw.c index d2d1f0370..f4af87b16 100644 --- a/IDE/ROWLEY-CROSSWORKS-ARM/kinetis_hw.c +++ b/IDE/ROWLEY-CROSSWORKS-ARM/kinetis_hw.c @@ -1,6 +1,6 @@ /* kinetis_hw.c * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/IDE/ROWLEY-CROSSWORKS-ARM/retarget.c b/IDE/ROWLEY-CROSSWORKS-ARM/retarget.c index 17551121b..c0b6602af 100644 --- a/IDE/ROWLEY-CROSSWORKS-ARM/retarget.c +++ b/IDE/ROWLEY-CROSSWORKS-ARM/retarget.c @@ -1,6 +1,6 @@ /* retarget.c * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/IDE/ROWLEY-CROSSWORKS-ARM/test_main.c b/IDE/ROWLEY-CROSSWORKS-ARM/test_main.c index c3d306e46..b26835b87 100644 --- a/IDE/ROWLEY-CROSSWORKS-ARM/test_main.c +++ b/IDE/ROWLEY-CROSSWORKS-ARM/test_main.c @@ -1,6 +1,6 @@ /* test_main.c * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/IDE/Renesas/cs+/Projects/common/strings.h b/IDE/Renesas/cs+/Projects/common/strings.h index ca82580fc..fd2cf86e6 100644 --- a/IDE/Renesas/cs+/Projects/common/strings.h +++ b/IDE/Renesas/cs+/Projects/common/strings.h @@ -1,6 +1,6 @@ /* strings.h * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/IDE/Renesas/cs+/Projects/common/unistd.h b/IDE/Renesas/cs+/Projects/common/unistd.h index fe40e255b..d91dd4790 100644 --- a/IDE/Renesas/cs+/Projects/common/unistd.h +++ b/IDE/Renesas/cs+/Projects/common/unistd.h @@ -1,6 +1,6 @@ /* unistd.h * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/IDE/Renesas/cs+/Projects/common/user_settings.h b/IDE/Renesas/cs+/Projects/common/user_settings.h index 836aaff62..241316fc3 100644 --- a/IDE/Renesas/cs+/Projects/common/user_settings.h +++ b/IDE/Renesas/cs+/Projects/common/user_settings.h @@ -1,6 +1,6 @@ /* user_settings.h * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/IDE/Renesas/cs+/Projects/common/wolfssl_dummy.c b/IDE/Renesas/cs+/Projects/common/wolfssl_dummy.c index 89ab6858b..7541fccc6 100644 --- a/IDE/Renesas/cs+/Projects/common/wolfssl_dummy.c +++ b/IDE/Renesas/cs+/Projects/common/wolfssl_dummy.c @@ -1,6 +1,6 @@ /* wolfssl_dummy.c * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/IDE/Renesas/cs+/Projects/t4_demo/wolf_client.c b/IDE/Renesas/cs+/Projects/t4_demo/wolf_client.c index 35b3120a7..ac7ff1e43 100644 --- a/IDE/Renesas/cs+/Projects/t4_demo/wolf_client.c +++ b/IDE/Renesas/cs+/Projects/t4_demo/wolf_client.c @@ -1,6 +1,6 @@ /* wolf_client.c * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/IDE/Renesas/cs+/Projects/t4_demo/wolf_main.c b/IDE/Renesas/cs+/Projects/t4_demo/wolf_main.c index 6fc97c5f1..8e3f4c54b 100644 --- a/IDE/Renesas/cs+/Projects/t4_demo/wolf_main.c +++ b/IDE/Renesas/cs+/Projects/t4_demo/wolf_main.c @@ -1,6 +1,6 @@ /* wolf_main.c * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/IDE/Renesas/cs+/Projects/t4_demo/wolf_server.c b/IDE/Renesas/cs+/Projects/t4_demo/wolf_server.c index f992f4356..bcb3e3390 100644 --- a/IDE/Renesas/cs+/Projects/t4_demo/wolf_server.c +++ b/IDE/Renesas/cs+/Projects/t4_demo/wolf_server.c @@ -1,6 +1,6 @@ /* wolf_server.c * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/IDE/Renesas/cs+/Projects/test/test_main.c b/IDE/Renesas/cs+/Projects/test/test_main.c index f25a46310..8defb1d14 100644 --- a/IDE/Renesas/cs+/Projects/test/test_main.c +++ b/IDE/Renesas/cs+/Projects/test/test_main.c @@ -1,6 +1,6 @@ /* test_main.c * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/IDE/Renesas/e2studio/Projects/common/strings.h b/IDE/Renesas/e2studio/Projects/common/strings.h index ca82580fc..fd2cf86e6 100644 --- a/IDE/Renesas/e2studio/Projects/common/strings.h +++ b/IDE/Renesas/e2studio/Projects/common/strings.h @@ -1,6 +1,6 @@ /* strings.h * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/IDE/Renesas/e2studio/Projects/common/unistd.h b/IDE/Renesas/e2studio/Projects/common/unistd.h index fe40e255b..d91dd4790 100644 --- a/IDE/Renesas/e2studio/Projects/common/unistd.h +++ b/IDE/Renesas/e2studio/Projects/common/unistd.h @@ -1,6 +1,6 @@ /* unistd.h * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/IDE/Renesas/e2studio/Projects/common/user_settings.h b/IDE/Renesas/e2studio/Projects/common/user_settings.h index 6d57e1c38..3f110ef20 100644 --- a/IDE/Renesas/e2studio/Projects/common/user_settings.h +++ b/IDE/Renesas/e2studio/Projects/common/user_settings.h @@ -1,6 +1,6 @@ /* user_settings.h * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/IDE/Renesas/e2studio/Projects/common/wolfssl_dummy.c b/IDE/Renesas/e2studio/Projects/common/wolfssl_dummy.c index 06bd446f0..61cd51f74 100644 --- a/IDE/Renesas/e2studio/Projects/common/wolfssl_dummy.c +++ b/IDE/Renesas/e2studio/Projects/common/wolfssl_dummy.c @@ -1,6 +1,6 @@ /* wolfssl_dummy.c * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/IDE/Renesas/e2studio/Projects/test/src/key_data.c b/IDE/Renesas/e2studio/Projects/test/src/key_data.c index 4b541b67a..c924f8f81 100644 --- a/IDE/Renesas/e2studio/Projects/test/src/key_data.c +++ b/IDE/Renesas/e2studio/Projects/test/src/key_data.c @@ -1,6 +1,6 @@ /* key_data.c * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/IDE/Renesas/e2studio/Projects/test/src/key_data.h b/IDE/Renesas/e2studio/Projects/test/src/key_data.h index f114c0542..1c8dcfb6f 100644 --- a/IDE/Renesas/e2studio/Projects/test/src/key_data.h +++ b/IDE/Renesas/e2studio/Projects/test/src/key_data.h @@ -1,6 +1,6 @@ /* key_data.h * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/IDE/Renesas/e2studio/Projects/test/src/test_main.c b/IDE/Renesas/e2studio/Projects/test/src/test_main.c index 23df0a84c..252d08bfc 100644 --- a/IDE/Renesas/e2studio/Projects/test/src/test_main.c +++ b/IDE/Renesas/e2studio/Projects/test/src/test_main.c @@ -1,6 +1,6 @@ /* test_main.c * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/IDE/Renesas/e2studio/Projects/test/src/wolf_client.c b/IDE/Renesas/e2studio/Projects/test/src/wolf_client.c index e513e67ca..7122bd811 100644 --- a/IDE/Renesas/e2studio/Projects/test/src/wolf_client.c +++ b/IDE/Renesas/e2studio/Projects/test/src/wolf_client.c @@ -1,6 +1,6 @@ /* wolf_client.c * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/IDE/Renesas/e2studio/Projects/test/src/wolf_server.c b/IDE/Renesas/e2studio/Projects/test/src/wolf_server.c index 7060fa580..5d38b0358 100644 --- a/IDE/Renesas/e2studio/Projects/test/src/wolf_server.c +++ b/IDE/Renesas/e2studio/Projects/test/src/wolf_server.c @@ -1,6 +1,6 @@ /* wolf_server.c * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/IDE/Renesas/e2studio/Projects/test/src/wolfssl_demo.h b/IDE/Renesas/e2studio/Projects/test/src/wolfssl_demo.h index b49cd4f2e..3127a9f7c 100644 --- a/IDE/Renesas/e2studio/Projects/test/src/wolfssl_demo.h +++ b/IDE/Renesas/e2studio/Projects/test/src/wolfssl_demo.h @@ -1,6 +1,6 @@ /* wolfssl_demo.h * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/IDE/Renesas/e2studio/Projects/tools/genhexbuf.pl b/IDE/Renesas/e2studio/Projects/tools/genhexbuf.pl index f73e09a0f..ca9074b20 100755 --- a/IDE/Renesas/e2studio/Projects/tools/genhexbuf.pl +++ b/IDE/Renesas/e2studio/Projects/tools/genhexbuf.pl @@ -1,7 +1,7 @@ #!/usr/bin/perl # genhexbuf.pl -# Copyright (C) 2019 wolfSSL Inc. +# Copyright (C) 2020 wolfSSL Inc. # use strict; diff --git a/IDE/VS-AZURE-SPHERE/client/client.c b/IDE/VS-AZURE-SPHERE/client/client.c index 2861ada8c..82a236687 100644 --- a/IDE/VS-AZURE-SPHERE/client/client.c +++ b/IDE/VS-AZURE-SPHERE/client/client.c @@ -1,6 +1,6 @@ /* client.c * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/IDE/VS-AZURE-SPHERE/client/client.h b/IDE/VS-AZURE-SPHERE/client/client.h index 1a649da9f..e24aa3ac1 100644 --- a/IDE/VS-AZURE-SPHERE/client/client.h +++ b/IDE/VS-AZURE-SPHERE/client/client.h @@ -1,6 +1,6 @@ /* client.h * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/IDE/VS-AZURE-SPHERE/server/server.c b/IDE/VS-AZURE-SPHERE/server/server.c index 617394193..48a7922bf 100644 --- a/IDE/VS-AZURE-SPHERE/server/server.c +++ b/IDE/VS-AZURE-SPHERE/server/server.c @@ -1,6 +1,6 @@ /* server.c * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. (formerly known as CyaSSL) * diff --git a/IDE/VS-AZURE-SPHERE/server/server.h b/IDE/VS-AZURE-SPHERE/server/server.h index 23c18f865..29ea245be 100644 --- a/IDE/VS-AZURE-SPHERE/server/server.h +++ b/IDE/VS-AZURE-SPHERE/server/server.h @@ -1,6 +1,6 @@ /* server.h * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/IDE/XCODE/Benchmark/wolfBench/AppDelegate.h b/IDE/XCODE/Benchmark/wolfBench/AppDelegate.h index 38f77efba..ea0887488 100644 --- a/IDE/XCODE/Benchmark/wolfBench/AppDelegate.h +++ b/IDE/XCODE/Benchmark/wolfBench/AppDelegate.h @@ -1,6 +1,6 @@ /* AppDelegate.h * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/IDE/XCODE/Benchmark/wolfBench/AppDelegate.m b/IDE/XCODE/Benchmark/wolfBench/AppDelegate.m index 0b8896e48..1dc369087 100644 --- a/IDE/XCODE/Benchmark/wolfBench/AppDelegate.m +++ b/IDE/XCODE/Benchmark/wolfBench/AppDelegate.m @@ -1,6 +1,6 @@ /* AppDelegate.m * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/IDE/XCODE/Benchmark/wolfBench/ViewController.h b/IDE/XCODE/Benchmark/wolfBench/ViewController.h index ef53d7064..4990aabfd 100644 --- a/IDE/XCODE/Benchmark/wolfBench/ViewController.h +++ b/IDE/XCODE/Benchmark/wolfBench/ViewController.h @@ -1,6 +1,6 @@ /* ViewController.h * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/IDE/XCODE/Benchmark/wolfBench/ViewController.m b/IDE/XCODE/Benchmark/wolfBench/ViewController.m index 22a2cb403..fefbc87bd 100644 --- a/IDE/XCODE/Benchmark/wolfBench/ViewController.m +++ b/IDE/XCODE/Benchmark/wolfBench/ViewController.m @@ -1,6 +1,6 @@ /* ViewController.m * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/IDE/XCODE/Benchmark/wolfBench/main.m b/IDE/XCODE/Benchmark/wolfBench/main.m index 3af9eeb07..eddb4bef3 100644 --- a/IDE/XCODE/Benchmark/wolfBench/main.m +++ b/IDE/XCODE/Benchmark/wolfBench/main.m @@ -1,6 +1,6 @@ /* main.m * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/IDE/mynewt/apps.wolfcrypttest.pkg.yml b/IDE/mynewt/apps.wolfcrypttest.pkg.yml index dbcc20032..2ce68544e 100644 --- a/IDE/mynewt/apps.wolfcrypttest.pkg.yml +++ b/IDE/mynewt/apps.wolfcrypttest.pkg.yml @@ -1,4 +1,4 @@ -# Copyright (C) 2006-2019 wolfSSL Inc. +# Copyright (C) 2006-2020 wolfSSL Inc. # # This file is part of wolfSSL. # diff --git a/IDE/mynewt/crypto.wolfssl.pkg.yml b/IDE/mynewt/crypto.wolfssl.pkg.yml index 21aedfb27..0c516896a 100644 --- a/IDE/mynewt/crypto.wolfssl.pkg.yml +++ b/IDE/mynewt/crypto.wolfssl.pkg.yml @@ -1,4 +1,4 @@ -# Copyright (C) 2006-2019 wolfSSL Inc. +# Copyright (C) 2006-2020 wolfSSL Inc. # # This file is part of wolfSSL. # diff --git a/IDE/zephyr/lib/settings/user_settings-tls-generic.h b/IDE/zephyr/lib/settings/user_settings-tls-generic.h index 0ff068798..b59b88355 100644 --- a/IDE/zephyr/lib/settings/user_settings-tls-generic.h +++ b/IDE/zephyr/lib/settings/user_settings-tls-generic.h @@ -1,7 +1,7 @@ /* wolfssl options.h * generated from configure options * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/IDE/zephyr/wolfssl_tls_sock/src/tls_sock.c b/IDE/zephyr/wolfssl_tls_sock/src/tls_sock.c index 49aa18504..f8ebcfa1e 100644 --- a/IDE/zephyr/wolfssl_tls_sock/src/tls_sock.c +++ b/IDE/zephyr/wolfssl_tls_sock/src/tls_sock.c @@ -1,6 +1,6 @@ /* tls_sock.c * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/IDE/zephyr/wolfssl_tls_thread/src/tls_threaded.c b/IDE/zephyr/wolfssl_tls_thread/src/tls_threaded.c index 953d6b1f7..b1b7aa80e 100644 --- a/IDE/zephyr/wolfssl_tls_thread/src/tls_threaded.c +++ b/IDE/zephyr/wolfssl_tls_thread/src/tls_threaded.c @@ -1,6 +1,6 @@ /* tls_threaded.c * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/configure.ac b/configure.ac index e20f2a429..7eeeff259 100644 --- a/configure.ac +++ b/configure.ac @@ -5,7 +5,7 @@ # This file is part of wolfSSL. (formerly known as CyaSSL) # # -AC_COPYRIGHT([Copyright (C) 2006-2019 wolfSSL Inc.]) +AC_COPYRIGHT([Copyright (C) 2006-2020 wolfSSL Inc.]) AC_PREREQ([2.63]) AC_INIT([wolfssl],[4.3.0],[https://github.com/wolfssl/wolfssl/issues],[wolfssl],[https://www.wolfssl.com]) AC_CONFIG_AUX_DIR([build-aux]) diff --git a/ctaocrypt/src/misc.c b/ctaocrypt/src/misc.c index 474086e19..bd127625d 100644 --- a/ctaocrypt/src/misc.c +++ b/ctaocrypt/src/misc.c @@ -1,6 +1,6 @@ /* misc.c * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/ctaocrypt/src/wolfcrypt_first.c b/ctaocrypt/src/wolfcrypt_first.c index cf7b998a0..74e759a7a 100644 --- a/ctaocrypt/src/wolfcrypt_first.c +++ b/ctaocrypt/src/wolfcrypt_first.c @@ -1,6 +1,6 @@ /* wolfcrypt_first.c * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/ctaocrypt/src/wolfcrypt_last.c b/ctaocrypt/src/wolfcrypt_last.c index d9760bda0..60cb33a4e 100644 --- a/ctaocrypt/src/wolfcrypt_last.c +++ b/ctaocrypt/src/wolfcrypt_last.c @@ -1,6 +1,6 @@ /* wolfcrypt_last.c * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/cyassl/callbacks.h b/cyassl/callbacks.h index 2c4cfeb30..69dd3476b 100644 --- a/cyassl/callbacks.h +++ b/cyassl/callbacks.h @@ -1,6 +1,6 @@ /* callbacks.h * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/cyassl/crl.h b/cyassl/crl.h index 850cd3472..7f285a33e 100644 --- a/cyassl/crl.h +++ b/cyassl/crl.h @@ -1,6 +1,6 @@ /* crl.h * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/cyassl/ctaocrypt/aes.h b/cyassl/ctaocrypt/aes.h index 99019bb33..dae7812e8 100644 --- a/cyassl/ctaocrypt/aes.h +++ b/cyassl/ctaocrypt/aes.h @@ -1,6 +1,6 @@ /* aes.h * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/cyassl/ctaocrypt/arc4.h b/cyassl/ctaocrypt/arc4.h index f2c362d9c..627d79735 100644 --- a/cyassl/ctaocrypt/arc4.h +++ b/cyassl/ctaocrypt/arc4.h @@ -1,6 +1,6 @@ /* arc4.h * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/cyassl/ctaocrypt/asn.h b/cyassl/ctaocrypt/asn.h index 8aa3fb7da..673cce748 100644 --- a/cyassl/ctaocrypt/asn.h +++ b/cyassl/ctaocrypt/asn.h @@ -1,6 +1,6 @@ /* asn.h * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/cyassl/ctaocrypt/asn_public.h b/cyassl/ctaocrypt/asn_public.h index 5d5081b89..5e75943f0 100644 --- a/cyassl/ctaocrypt/asn_public.h +++ b/cyassl/ctaocrypt/asn_public.h @@ -1,6 +1,6 @@ /* asn_public.h * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/cyassl/ctaocrypt/blake2-impl.h b/cyassl/ctaocrypt/blake2-impl.h index be15515da..e815f0769 100644 --- a/cyassl/ctaocrypt/blake2-impl.h +++ b/cyassl/ctaocrypt/blake2-impl.h @@ -12,7 +12,7 @@ */ /* blake2-impl.h * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/cyassl/ctaocrypt/blake2-int.h b/cyassl/ctaocrypt/blake2-int.h index 4849cb6c3..77244a232 100644 --- a/cyassl/ctaocrypt/blake2-int.h +++ b/cyassl/ctaocrypt/blake2-int.h @@ -12,7 +12,7 @@ */ /* blake2-int.h * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/cyassl/ctaocrypt/blake2.h b/cyassl/ctaocrypt/blake2.h index e8720b019..c1378d9cd 100644 --- a/cyassl/ctaocrypt/blake2.h +++ b/cyassl/ctaocrypt/blake2.h @@ -1,6 +1,6 @@ /* blake2.h * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/cyassl/ctaocrypt/camellia.h b/cyassl/ctaocrypt/camellia.h index 87eaca557..8c0ce8d4c 100644 --- a/cyassl/ctaocrypt/camellia.h +++ b/cyassl/ctaocrypt/camellia.h @@ -1,6 +1,6 @@ /* camellia.h * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/cyassl/ctaocrypt/chacha.h b/cyassl/ctaocrypt/chacha.h index f45084c38..bfe099851 100644 --- a/cyassl/ctaocrypt/chacha.h +++ b/cyassl/ctaocrypt/chacha.h @@ -1,6 +1,6 @@ /* chacha.h * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/cyassl/ctaocrypt/coding.h b/cyassl/ctaocrypt/coding.h index c78fdab75..9902a5aba 100644 --- a/cyassl/ctaocrypt/coding.h +++ b/cyassl/ctaocrypt/coding.h @@ -1,6 +1,6 @@ /* coding.h * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/cyassl/ctaocrypt/compress.h b/cyassl/ctaocrypt/compress.h index ab6962d25..6bb26c6b0 100644 --- a/cyassl/ctaocrypt/compress.h +++ b/cyassl/ctaocrypt/compress.h @@ -1,6 +1,6 @@ /* compress.h * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/cyassl/ctaocrypt/des3.h b/cyassl/ctaocrypt/des3.h index 8479d72c2..8e355196d 100644 --- a/cyassl/ctaocrypt/des3.h +++ b/cyassl/ctaocrypt/des3.h @@ -1,6 +1,6 @@ /* des3.h * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/cyassl/ctaocrypt/dh.h b/cyassl/ctaocrypt/dh.h index 1527d5fb6..80d4e51d3 100644 --- a/cyassl/ctaocrypt/dh.h +++ b/cyassl/ctaocrypt/dh.h @@ -1,6 +1,6 @@ /* dh.h * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/cyassl/ctaocrypt/dsa.h b/cyassl/ctaocrypt/dsa.h index 30fadfd7a..d99429081 100644 --- a/cyassl/ctaocrypt/dsa.h +++ b/cyassl/ctaocrypt/dsa.h @@ -1,6 +1,6 @@ /* dsa.h * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/cyassl/ctaocrypt/ecc.h b/cyassl/ctaocrypt/ecc.h index 4297b553e..b4b2f96c4 100644 --- a/cyassl/ctaocrypt/ecc.h +++ b/cyassl/ctaocrypt/ecc.h @@ -1,6 +1,6 @@ /* ecc.h * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/cyassl/ctaocrypt/error-crypt.h b/cyassl/ctaocrypt/error-crypt.h index 2a8345ac1..55a973947 100644 --- a/cyassl/ctaocrypt/error-crypt.h +++ b/cyassl/ctaocrypt/error-crypt.h @@ -1,6 +1,6 @@ /* error-crypt.h * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/cyassl/ctaocrypt/fips_test.h b/cyassl/ctaocrypt/fips_test.h index 342f4f6e8..cdfad6cae 100644 --- a/cyassl/ctaocrypt/fips_test.h +++ b/cyassl/ctaocrypt/fips_test.h @@ -1,6 +1,6 @@ /* fips_test.h * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/cyassl/ctaocrypt/hc128.h b/cyassl/ctaocrypt/hc128.h index 8939cc3c1..af1186bde 100644 --- a/cyassl/ctaocrypt/hc128.h +++ b/cyassl/ctaocrypt/hc128.h @@ -1,6 +1,6 @@ /* hc128.h * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/cyassl/ctaocrypt/hmac.h b/cyassl/ctaocrypt/hmac.h index 5cfd0a3ec..4c0dd153a 100644 --- a/cyassl/ctaocrypt/hmac.h +++ b/cyassl/ctaocrypt/hmac.h @@ -1,6 +1,6 @@ /* hmac.h * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/cyassl/ctaocrypt/integer.h b/cyassl/ctaocrypt/integer.h index fda394c1a..2aed0cd0f 100644 --- a/cyassl/ctaocrypt/integer.h +++ b/cyassl/ctaocrypt/integer.h @@ -1,6 +1,6 @@ /* integer.h * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/cyassl/ctaocrypt/logging.h b/cyassl/ctaocrypt/logging.h index a30e3abd4..12fa22c61 100644 --- a/cyassl/ctaocrypt/logging.h +++ b/cyassl/ctaocrypt/logging.h @@ -1,6 +1,6 @@ /* logging.h * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/cyassl/ctaocrypt/md2.h b/cyassl/ctaocrypt/md2.h index 085851542..e3e7816e6 100644 --- a/cyassl/ctaocrypt/md2.h +++ b/cyassl/ctaocrypt/md2.h @@ -1,6 +1,6 @@ /* md2.h * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/cyassl/ctaocrypt/md4.h b/cyassl/ctaocrypt/md4.h index 111c0fc54..f550a71ad 100644 --- a/cyassl/ctaocrypt/md4.h +++ b/cyassl/ctaocrypt/md4.h @@ -1,6 +1,6 @@ /* md4.h * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/cyassl/ctaocrypt/md5.h b/cyassl/ctaocrypt/md5.h index 9da91d758..4f5dc4727 100644 --- a/cyassl/ctaocrypt/md5.h +++ b/cyassl/ctaocrypt/md5.h @@ -1,6 +1,6 @@ /* md5.h * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/cyassl/ctaocrypt/memory.h b/cyassl/ctaocrypt/memory.h index cbed52fd8..a7f2a8b3a 100644 --- a/cyassl/ctaocrypt/memory.h +++ b/cyassl/ctaocrypt/memory.h @@ -1,6 +1,6 @@ /* memory.h * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/cyassl/ctaocrypt/misc.h b/cyassl/ctaocrypt/misc.h index dbba678a9..02c544101 100644 --- a/cyassl/ctaocrypt/misc.h +++ b/cyassl/ctaocrypt/misc.h @@ -1,6 +1,6 @@ /* misc.h * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/cyassl/ctaocrypt/mpi_class.h b/cyassl/ctaocrypt/mpi_class.h index 2436cbdd8..01141a98b 100644 --- a/cyassl/ctaocrypt/mpi_class.h +++ b/cyassl/ctaocrypt/mpi_class.h @@ -1,6 +1,6 @@ /* mpi_class.h * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/cyassl/ctaocrypt/mpi_superclass.h b/cyassl/ctaocrypt/mpi_superclass.h index 1129ee730..ca7531c21 100644 --- a/cyassl/ctaocrypt/mpi_superclass.h +++ b/cyassl/ctaocrypt/mpi_superclass.h @@ -1,6 +1,6 @@ /* mpi_superclass.h * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/cyassl/ctaocrypt/pkcs7.h b/cyassl/ctaocrypt/pkcs7.h index abfdfb59b..4b0488f25 100644 --- a/cyassl/ctaocrypt/pkcs7.h +++ b/cyassl/ctaocrypt/pkcs7.h @@ -1,6 +1,6 @@ /* pkcs7.h * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/cyassl/ctaocrypt/poly1305.h b/cyassl/ctaocrypt/poly1305.h index 33b915c6a..72021ab27 100644 --- a/cyassl/ctaocrypt/poly1305.h +++ b/cyassl/ctaocrypt/poly1305.h @@ -1,6 +1,6 @@ /* poly1305.h * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/cyassl/ctaocrypt/port/pic32/pic32mz-crypt.h b/cyassl/ctaocrypt/port/pic32/pic32mz-crypt.h index 70ba4683f..e56e236c9 100644 --- a/cyassl/ctaocrypt/port/pic32/pic32mz-crypt.h +++ b/cyassl/ctaocrypt/port/pic32/pic32mz-crypt.h @@ -1,6 +1,6 @@ /* pic32mz-crypt.h * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/cyassl/ctaocrypt/pwdbased.h b/cyassl/ctaocrypt/pwdbased.h index 046dafe57..9f1d1de36 100644 --- a/cyassl/ctaocrypt/pwdbased.h +++ b/cyassl/ctaocrypt/pwdbased.h @@ -1,6 +1,6 @@ /* pwdbased.h * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/cyassl/ctaocrypt/rabbit.h b/cyassl/ctaocrypt/rabbit.h index 8d8d40549..109e97331 100644 --- a/cyassl/ctaocrypt/rabbit.h +++ b/cyassl/ctaocrypt/rabbit.h @@ -1,6 +1,6 @@ /* rabbit.h * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/cyassl/ctaocrypt/random.h b/cyassl/ctaocrypt/random.h index 561adb83c..9581ff92c 100644 --- a/cyassl/ctaocrypt/random.h +++ b/cyassl/ctaocrypt/random.h @@ -1,6 +1,6 @@ /* random.h * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/cyassl/ctaocrypt/ripemd.h b/cyassl/ctaocrypt/ripemd.h index 153ff1ced..25bcf990e 100644 --- a/cyassl/ctaocrypt/ripemd.h +++ b/cyassl/ctaocrypt/ripemd.h @@ -1,6 +1,6 @@ /* ripemd.h * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/cyassl/ctaocrypt/rsa.h b/cyassl/ctaocrypt/rsa.h index e0057f0a3..18949e393 100644 --- a/cyassl/ctaocrypt/rsa.h +++ b/cyassl/ctaocrypt/rsa.h @@ -1,6 +1,6 @@ /* rsa.h * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/cyassl/ctaocrypt/settings.h b/cyassl/ctaocrypt/settings.h index 129af3cdf..4cea7e201 100644 --- a/cyassl/ctaocrypt/settings.h +++ b/cyassl/ctaocrypt/settings.h @@ -1,6 +1,6 @@ /* settings.h * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/cyassl/ctaocrypt/settings_comp.h b/cyassl/ctaocrypt/settings_comp.h index 598733008..c886d8e62 100644 --- a/cyassl/ctaocrypt/settings_comp.h +++ b/cyassl/ctaocrypt/settings_comp.h @@ -1,6 +1,6 @@ /* settings_comp.h * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/cyassl/ctaocrypt/sha.h b/cyassl/ctaocrypt/sha.h index 0a42a5954..92c8e33ad 100644 --- a/cyassl/ctaocrypt/sha.h +++ b/cyassl/ctaocrypt/sha.h @@ -1,6 +1,6 @@ /* sha.h * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/cyassl/ctaocrypt/sha256.h b/cyassl/ctaocrypt/sha256.h index 04db3efaf..000e834bb 100644 --- a/cyassl/ctaocrypt/sha256.h +++ b/cyassl/ctaocrypt/sha256.h @@ -1,6 +1,6 @@ /* sha256.h * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/cyassl/ctaocrypt/sha512.h b/cyassl/ctaocrypt/sha512.h index 5b87a1e85..39c634235 100644 --- a/cyassl/ctaocrypt/sha512.h +++ b/cyassl/ctaocrypt/sha512.h @@ -1,6 +1,6 @@ /* sha512.h * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/cyassl/ctaocrypt/tfm.h b/cyassl/ctaocrypt/tfm.h index 01eace16b..5eba3d339 100644 --- a/cyassl/ctaocrypt/tfm.h +++ b/cyassl/ctaocrypt/tfm.h @@ -1,6 +1,6 @@ /* tfm.h * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/cyassl/ctaocrypt/types.h b/cyassl/ctaocrypt/types.h index d9e62b768..b6d97b51f 100644 --- a/cyassl/ctaocrypt/types.h +++ b/cyassl/ctaocrypt/types.h @@ -1,6 +1,6 @@ /* types.h * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/cyassl/ctaocrypt/visibility.h b/cyassl/ctaocrypt/visibility.h index d973320d9..f22c08481 100644 --- a/cyassl/ctaocrypt/visibility.h +++ b/cyassl/ctaocrypt/visibility.h @@ -1,6 +1,6 @@ /* visibility.h * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/cyassl/ctaocrypt/wc_port.h b/cyassl/ctaocrypt/wc_port.h index 48283dc19..50fb90ad9 100644 --- a/cyassl/ctaocrypt/wc_port.h +++ b/cyassl/ctaocrypt/wc_port.h @@ -1,6 +1,6 @@ /* port.h * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/cyassl/error-ssl.h b/cyassl/error-ssl.h index 72a89e4fc..e5189fac4 100644 --- a/cyassl/error-ssl.h +++ b/cyassl/error-ssl.h @@ -1,6 +1,6 @@ /* error-ssl.h * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/cyassl/internal.h b/cyassl/internal.h index 52c1526fe..80d451e98 100644 --- a/cyassl/internal.h +++ b/cyassl/internal.h @@ -1,6 +1,6 @@ /* internal.h * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/cyassl/ocsp.h b/cyassl/ocsp.h index 20cae772b..e06a1b53c 100644 --- a/cyassl/ocsp.h +++ b/cyassl/ocsp.h @@ -1,6 +1,6 @@ /* ocsp.h * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/cyassl/openssl/des.h b/cyassl/openssl/des.h index d8338acff..de4676402 100644 --- a/cyassl/openssl/des.h +++ b/cyassl/openssl/des.h @@ -1,6 +1,6 @@ /* des.h * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/cyassl/openssl/evp.h b/cyassl/openssl/evp.h index 88a67e5f6..b7ad1f50c 100644 --- a/cyassl/openssl/evp.h +++ b/cyassl/openssl/evp.h @@ -1,6 +1,6 @@ /* evp.h * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/cyassl/openssl/hmac.h b/cyassl/openssl/hmac.h index b62979eaa..6dd377994 100644 --- a/cyassl/openssl/hmac.h +++ b/cyassl/openssl/hmac.h @@ -1,6 +1,6 @@ /* hmac.h * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/cyassl/openssl/ssl.h b/cyassl/openssl/ssl.h index b59e1c0f7..3896292c1 100644 --- a/cyassl/openssl/ssl.h +++ b/cyassl/openssl/ssl.h @@ -1,6 +1,6 @@ /* ssl.h * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/cyassl/options.h.in b/cyassl/options.h.in index 7dad33851..ff991bdb5 100644 --- a/cyassl/options.h.in +++ b/cyassl/options.h.in @@ -1,6 +1,6 @@ /* options.h.in * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/cyassl/sniffer.h b/cyassl/sniffer.h index 6ce9b88ba..629785591 100644 --- a/cyassl/sniffer.h +++ b/cyassl/sniffer.h @@ -1,6 +1,6 @@ /* sniffer.h * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/cyassl/sniffer_error.h b/cyassl/sniffer_error.h index 865061ea3..8d7e8e159 100644 --- a/cyassl/sniffer_error.h +++ b/cyassl/sniffer_error.h @@ -1,6 +1,6 @@ /* sniffer_error.h * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/cyassl/ssl.h b/cyassl/ssl.h index dfae4c793..5d36b366e 100644 --- a/cyassl/ssl.h +++ b/cyassl/ssl.h @@ -1,6 +1,6 @@ /* ssl.h * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/cyassl/version.h b/cyassl/version.h index 32dd5a59f..0f59b121b 100644 --- a/cyassl/version.h +++ b/cyassl/version.h @@ -1,6 +1,6 @@ /* cyassl/version.h * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/cyassl/version.h.in b/cyassl/version.h.in index c7165e703..25ce7d417 100644 --- a/cyassl/version.h.in +++ b/cyassl/version.h.in @@ -1,6 +1,6 @@ /* cyassl_version.h.in * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/examples/benchmark/tls_bench.c b/examples/benchmark/tls_bench.c index 32b91c672..6f446e0f2 100644 --- a/examples/benchmark/tls_bench.c +++ b/examples/benchmark/tls_bench.c @@ -1,6 +1,6 @@ /* tls_bench.c * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/examples/benchmark/tls_bench.h b/examples/benchmark/tls_bench.h index 475907195..483a3ae4f 100644 --- a/examples/benchmark/tls_bench.h +++ b/examples/benchmark/tls_bench.h @@ -1,6 +1,6 @@ /* tls_bench.h * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/examples/client/client.c b/examples/client/client.c index f224bfbe2..8940b445e 100644 --- a/examples/client/client.c +++ b/examples/client/client.c @@ -1,6 +1,6 @@ /* client.c * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/examples/client/client.h b/examples/client/client.h index 80b13e25b..72402e99f 100644 --- a/examples/client/client.h +++ b/examples/client/client.h @@ -1,6 +1,6 @@ /* client.h * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/examples/echoclient/echoclient.c b/examples/echoclient/echoclient.c index 7f96248af..73dc2b017 100644 --- a/examples/echoclient/echoclient.c +++ b/examples/echoclient/echoclient.c @@ -1,6 +1,6 @@ /* echoclient.c * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/examples/echoclient/echoclient.h b/examples/echoclient/echoclient.h index 4303d7224..0aebffbc2 100644 --- a/examples/echoclient/echoclient.h +++ b/examples/echoclient/echoclient.h @@ -1,6 +1,6 @@ /* echoclient.h * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/examples/echoserver/echoserver.c b/examples/echoserver/echoserver.c index 30ca984d0..6be3dcb5d 100644 --- a/examples/echoserver/echoserver.c +++ b/examples/echoserver/echoserver.c @@ -1,6 +1,6 @@ /* echoserver.c * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/examples/echoserver/echoserver.h b/examples/echoserver/echoserver.h index 1f1527773..622193f61 100644 --- a/examples/echoserver/echoserver.h +++ b/examples/echoserver/echoserver.h @@ -1,6 +1,6 @@ /* echoserver.h * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/examples/sctp/sctp-client-dtls.c b/examples/sctp/sctp-client-dtls.c index 4d1ec0b8f..11e7ee841 100644 --- a/examples/sctp/sctp-client-dtls.c +++ b/examples/sctp/sctp-client-dtls.c @@ -1,6 +1,6 @@ /* sctp-client-dtls.c * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/examples/sctp/sctp-client.c b/examples/sctp/sctp-client.c index 8e355807d..21d12714b 100644 --- a/examples/sctp/sctp-client.c +++ b/examples/sctp/sctp-client.c @@ -1,6 +1,6 @@ /* sctp-client.c * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/examples/sctp/sctp-server-dtls.c b/examples/sctp/sctp-server-dtls.c index 262029d05..1a486a9a3 100644 --- a/examples/sctp/sctp-server-dtls.c +++ b/examples/sctp/sctp-server-dtls.c @@ -1,6 +1,6 @@ /* sctp-server-dtls.c * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/examples/sctp/sctp-server.c b/examples/sctp/sctp-server.c index 7c19da1cc..ac372f1d7 100644 --- a/examples/sctp/sctp-server.c +++ b/examples/sctp/sctp-server.c @@ -1,6 +1,6 @@ /* sctp-server.c * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/examples/server/server.c b/examples/server/server.c index d67818fb5..1c314c50a 100644 --- a/examples/server/server.c +++ b/examples/server/server.c @@ -1,6 +1,6 @@ /* server.c * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/examples/server/server.h b/examples/server/server.h index 4f3c3353d..91927c7ea 100644 --- a/examples/server/server.h +++ b/examples/server/server.h @@ -1,6 +1,6 @@ /* server.h * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/mcapi/crypto.c b/mcapi/crypto.c index c9dbc9b45..9437f1ede 100644 --- a/mcapi/crypto.c +++ b/mcapi/crypto.c @@ -1,6 +1,6 @@ /* crypto.c * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/mcapi/crypto.h b/mcapi/crypto.h index 26a3d000e..ddb450b63 100644 --- a/mcapi/crypto.h +++ b/mcapi/crypto.h @@ -1,6 +1,6 @@ /* crypto.h * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/mcapi/mcapi_test.c b/mcapi/mcapi_test.c index 7b3af869b..50585ea49 100644 --- a/mcapi/mcapi_test.c +++ b/mcapi/mcapi_test.c @@ -1,6 +1,6 @@ /* mcapi_test.c * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/mplabx/benchmark_main.c b/mplabx/benchmark_main.c index 1512ef276..461e53bea 100644 --- a/mplabx/benchmark_main.c +++ b/mplabx/benchmark_main.c @@ -1,6 +1,6 @@ /* benchmark_main.c * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/mplabx/test_main.c b/mplabx/test_main.c index f4981e97c..8d1881cc4 100644 --- a/mplabx/test_main.c +++ b/mplabx/test_main.c @@ -1,6 +1,6 @@ /* main.c * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/src/bio.c b/src/bio.c index 938c036ee..08936608d 100644 --- a/src/bio.c +++ b/src/bio.c @@ -1,6 +1,6 @@ /* bio.c * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/src/crl.c b/src/crl.c index 803bd0243..ade81a91a 100644 --- a/src/crl.c +++ b/src/crl.c @@ -1,6 +1,6 @@ /* crl.c * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/src/internal.c b/src/internal.c index e2687596e..a75ef67b3 100644 --- a/src/internal.c +++ b/src/internal.c @@ -1,6 +1,6 @@ /* internal.c * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * @@ -10164,7 +10164,8 @@ int ProcessPeerCerts(WOLFSSL* ssl, byte* input, word32* inOutIdx, #ifdef OPENSSL_EXTRA /* Determine untrusted depth */ - if (!alreadySigner) { + if (!alreadySigner && (!args->dCert || + !args->dCertInit || !args->dCert->selfSigned)) { args->untrustedDepth = 1; } #endif @@ -16528,6 +16529,23 @@ int SendCertificateStatus(WOLFSSL* ssl) #endif /* WOLFSSL_NO_TLS12 */ + +/* If secure renegotiation is disabled, this will always return false. + * Otherwise it checks to see if we are currently renegotiating. */ +static WC_INLINE int IsSCR(WOLFSSL* ssl) +{ +#ifndef HAVE_SECURE_RENEGOTIATION + (void)ssl; +#else /* HAVE_SECURE_RENEGOTIATION */ + if (ssl->secure_renegotiation && + ssl->secure_renegotiation->enabled && + ssl->options.handShakeState != HANDSHAKE_DONE) + return 1; +#endif /* HAVE_SECURE_RENEGOTIATION */ + return 0; +} + + int SendData(WOLFSSL* ssl, const void* data, int sz) { int sent = 0, /* plainText size */ @@ -16569,7 +16587,7 @@ int SendData(WOLFSSL* ssl, const void* data, int sz) } else #endif - if (ssl->options.handShakeState != HANDSHAKE_DONE) { + if (ssl->options.handShakeState != HANDSHAKE_DONE && !IsSCR(ssl)) { int err; WOLFSSL_MSG("handshake not complete, trying to finish"); if ( (err = wolfSSL_negotiate(ssl)) != WOLFSSL_SUCCESS) { diff --git a/src/keys.c b/src/keys.c index 725e83d74..917a40914 100644 --- a/src/keys.c +++ b/src/keys.c @@ -1,6 +1,6 @@ /* keys.c * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/src/ocsp.c b/src/ocsp.c index 81dae7b00..4035d6374 100644 --- a/src/ocsp.c +++ b/src/ocsp.c @@ -1,6 +1,6 @@ /* ocsp.c * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/src/sniffer.c b/src/sniffer.c index 7b2d8a2f8..47e94b236 100644 --- a/src/sniffer.c +++ b/src/sniffer.c @@ -1,6 +1,6 @@ /* sniffer.c * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/src/ssl.c b/src/ssl.c index da74c59ad..8cc24ead3 100644 --- a/src/ssl.c +++ b/src/ssl.c @@ -1,6 +1,6 @@ /* ssl.c * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * @@ -23553,7 +23553,9 @@ void wolfSSL_EVP_PKEY_free(WOLFSSL_EVP_PKEY* key) break; } - wc_FreeMutex(&key->refMutex); + if (wc_FreeMutex(&key->refMutex) != 0) { + WOLFSSL_MSG("Couldn't free pkey mutex"); + } XFREE(key, key->heap, DYNAMIC_TYPE_PUBLIC_KEY); } } @@ -35562,7 +35564,8 @@ err: #define PEM_END_SZ 9 #define PEM_HDR_FIN "-----" #define PEM_HDR_FIN_SZ 5 - #define PEM_HDR_FIN_EOL "-----\n" + #define PEM_HDR_FIN_EOL_NEWLINE "-----\n" + #define PEM_HDR_FIN_EOL_NULL_TERM "-----\0" #define PEM_HDR_FIN_EOL_SZ 6 int wolfSSL_PEM_read_bio(WOLFSSL_BIO* bio, char **name, char **header, @@ -35698,8 +35701,12 @@ err: ret = WOLFSSL_FAILURE; } if (ret == WOLFSSL_SUCCESS) { - if (XSTRNCMP(pem + PEM_END_SZ + nameLen, PEM_HDR_FIN_EOL, - PEM_HDR_FIN_EOL_SZ) != 0) { + if (XSTRNCMP(pem + PEM_END_SZ + nameLen, + PEM_HDR_FIN_EOL_NEWLINE, + PEM_HDR_FIN_EOL_SZ) != 0 && + XSTRNCMP(pem + PEM_END_SZ + nameLen, + PEM_HDR_FIN_EOL_NULL_TERM, + PEM_HDR_FIN_EOL_SZ) != 0) { ret = WOLFSSL_FAILURE; } } @@ -35763,8 +35770,8 @@ err: if (!err) err = wolfSSL_BIO_write(bio, name, nameLen) != nameLen; if (!err) { - err = wolfSSL_BIO_write(bio, PEM_HDR_FIN_EOL, PEM_HDR_FIN_EOL_SZ) != - (int)PEM_HDR_FIN_EOL_SZ; + err = wolfSSL_BIO_write(bio, PEM_HDR_FIN_EOL_NEWLINE, + PEM_HDR_FIN_EOL_SZ) != (int)PEM_HDR_FIN_EOL_SZ; } if (!err && headerLen > 0) { err = wolfSSL_BIO_write(bio, header, headerLen) != headerLen; @@ -35781,8 +35788,8 @@ err: if (!err) err = wolfSSL_BIO_write(bio, name, nameLen) != nameLen; if (!err) { - err = wolfSSL_BIO_write(bio, PEM_HDR_FIN_EOL, PEM_HDR_FIN_EOL_SZ) != - (int)PEM_HDR_FIN_EOL_SZ; + err = wolfSSL_BIO_write(bio, PEM_HDR_FIN_EOL_NEWLINE, + PEM_HDR_FIN_EOL_SZ) != (int)PEM_HDR_FIN_EOL_SZ; } if (!err) { diff --git a/src/tls.c b/src/tls.c index a3028dca6..9dc1d95c1 100644 --- a/src/tls.c +++ b/src/tls.c @@ -1,6 +1,6 @@ /* tls.c * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/src/tls13.c b/src/tls13.c index 5557c03ad..f9cbf86b8 100644 --- a/src/tls13.c +++ b/src/tls13.c @@ -1,6 +1,6 @@ /* tls13.c * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/src/wolfio.c b/src/wolfio.c index 8e72821fc..1d2983146 100644 --- a/src/wolfio.c +++ b/src/wolfio.c @@ -1,6 +1,6 @@ /* wolfio.c * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/sslSniffer/sslSnifferTest/snifftest.c b/sslSniffer/sslSnifferTest/snifftest.c index f6e6866ca..1b4292af1 100644 --- a/sslSniffer/sslSnifferTest/snifftest.c +++ b/sslSniffer/sslSnifferTest/snifftest.c @@ -1,6 +1,6 @@ /* snifftest.c * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/swig/wolfssl.i b/swig/wolfssl.i index 159422690..2571cda3f 100644 --- a/swig/wolfssl.i +++ b/swig/wolfssl.i @@ -1,6 +1,6 @@ /* wolfssl.i * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/swig/wolfssl_adds.c b/swig/wolfssl_adds.c index e2794ae8e..fd055ff80 100644 --- a/swig/wolfssl_adds.c +++ b/swig/wolfssl_adds.c @@ -1,6 +1,6 @@ /* wolfssl_adds.c * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/tests/api.c b/tests/api.c index dc2447a70..f59e0e9ae 100644 --- a/tests/api.c +++ b/tests/api.c @@ -1,6 +1,6 @@ /* api.c API unit tests * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * @@ -26276,9 +26276,16 @@ static void test_wolfSSL_EVP_PKEY_encrypt(void) AssertIntEQ(EVP_PKEY_CTX_set_rsa_padding(ctx, RSA_PKCS1_PADDING), WOLFSSL_SUCCESS); + /* Test pkey references count is decremented. pkey shouldn't be destroyed + since ctx uses it.*/ + AssertIntEQ(pkey->references, 2); + EVP_PKEY_free(pkey); + AssertIntEQ(pkey->references, 1); + /* Encrypt data */ AssertIntEQ(EVP_PKEY_encrypt(ctx, outEnc, &outEncLen, (const unsigned char*)in, inlen), WOLFSSL_SUCCESS); + /* Decrypt data */ AssertIntEQ(EVP_PKEY_decrypt_init(ctx), WOLFSSL_SUCCESS); @@ -26305,8 +26312,6 @@ static void test_wolfSSL_EVP_PKEY_encrypt(void) WOLFSSL_SUCCESS); AssertIntEQ(XMEMCMP(inTmp, outDecTmp, outDecLen), 0); #endif - - EVP_PKEY_free(pkey); EVP_PKEY_CTX_free(ctx); XFREE(outEnc, HEAP_HINT, DYNAMIC_TYPE_TMP_BUFFER); XFREE(outDec, HEAP_HINT, DYNAMIC_TYPE_TMP_BUFFER); diff --git a/tests/hash.c b/tests/hash.c index 6f1579de4..be9966ac5 100644 --- a/tests/hash.c +++ b/tests/hash.c @@ -1,6 +1,6 @@ /* hash.c has unit tests * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/tests/srp.c b/tests/srp.c index 9a88790ae..6fe2edb0c 100644 --- a/tests/srp.c +++ b/tests/srp.c @@ -1,6 +1,6 @@ /* srp.c SRP unit tests * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/tests/suites.c b/tests/suites.c index 5c7fa6bb7..efb8b79b4 100644 --- a/tests/suites.c +++ b/tests/suites.c @@ -1,6 +1,6 @@ /* suites.c * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/tests/unit.c b/tests/unit.c index d466a7463..670e1d198 100644 --- a/tests/unit.c +++ b/tests/unit.c @@ -1,6 +1,6 @@ /* unit.c API unit tests driver * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/tests/unit.h b/tests/unit.h index e5c26941d..e7e7687cc 100644 --- a/tests/unit.h +++ b/tests/unit.h @@ -1,6 +1,6 @@ /* unit.c API unit tests driver * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/testsuite/testsuite.c b/testsuite/testsuite.c index d89eb15cc..cabfc8044 100644 --- a/testsuite/testsuite.c +++ b/testsuite/testsuite.c @@ -1,6 +1,6 @@ /* testsuite.c * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/wolfcrypt/benchmark/benchmark.c b/wolfcrypt/benchmark/benchmark.c index 82d19244d..7a905e59c 100755 --- a/wolfcrypt/benchmark/benchmark.c +++ b/wolfcrypt/benchmark/benchmark.c @@ -1,6 +1,6 @@ /* benchmark.c * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/wolfcrypt/benchmark/benchmark.h b/wolfcrypt/benchmark/benchmark.h index e799607df..61cf96433 100644 --- a/wolfcrypt/benchmark/benchmark.h +++ b/wolfcrypt/benchmark/benchmark.h @@ -1,6 +1,6 @@ /* wolfcrypt/benchmark/benchmark.h * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/wolfcrypt/src/aes.c b/wolfcrypt/src/aes.c index dc2a27b1b..946fae4fe 100644 --- a/wolfcrypt/src/aes.c +++ b/wolfcrypt/src/aes.c @@ -1,6 +1,6 @@ /* aes.c * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/wolfcrypt/src/aes_asm.S b/wolfcrypt/src/aes_asm.S index 1ddae688c..ae1c801d6 100644 --- a/wolfcrypt/src/aes_asm.S +++ b/wolfcrypt/src/aes_asm.S @@ -1,6 +1,6 @@ /* aes_asm.S * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/wolfcrypt/src/aes_asm.asm b/wolfcrypt/src/aes_asm.asm index 874c310c6..b3cc94d9e 100644 --- a/wolfcrypt/src/aes_asm.asm +++ b/wolfcrypt/src/aes_asm.asm @@ -1,6 +1,6 @@ ; /* aes_asm.asm ; * -; * Copyright (C) 2006-2019 wolfSSL Inc. +; * Copyright (C) 2006-2020 wolfSSL Inc. ; * ; * This file is part of wolfSSL. ; * diff --git a/wolfcrypt/src/aes_gcm_asm.S b/wolfcrypt/src/aes_gcm_asm.S index 1ebedf8b8..e878690e8 100644 --- a/wolfcrypt/src/aes_gcm_asm.S +++ b/wolfcrypt/src/aes_gcm_asm.S @@ -1,6 +1,6 @@ /* aes_gcm_asm * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/wolfcrypt/src/arc4.c b/wolfcrypt/src/arc4.c index 9fcd71d86..7eb8268e3 100644 --- a/wolfcrypt/src/arc4.c +++ b/wolfcrypt/src/arc4.c @@ -1,6 +1,6 @@ /* arc4.c * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/wolfcrypt/src/asm.c b/wolfcrypt/src/asm.c index 4e51c821b..0af4447c7 100644 --- a/wolfcrypt/src/asm.c +++ b/wolfcrypt/src/asm.c @@ -1,6 +1,6 @@ /* asm.c * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/wolfcrypt/src/asn.c b/wolfcrypt/src/asn.c index 0595482e6..263af2512 100644 --- a/wolfcrypt/src/asn.c +++ b/wolfcrypt/src/asn.c @@ -1,6 +1,6 @@ /* asn.c * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * @@ -16030,17 +16030,17 @@ static int ParseCRL_Extensions(DecodedCRL* dcrl, const byte* buf, idx = *inOutIdx; + /* CRL Extensions are optional */ if ((idx + 1) > sz) - return BUFFER_E; - - if (GetASNTag(buf, &idx, &tag, sz) < 0) - return ASN_PARSE_E; - - if (tag != (ASN_CONSTRUCTED | ASN_CONTEXT_SPECIFIC | 0)) { - /* Return without error if no extensions are found */ - WOLFSSL_MSG("No CRL Extensions found"); return 0; - } + + /* CRL Extensions are optional */ + if (GetASNTag(buf, &idx, &tag, sz) < 0) + return 0; + + /* CRL Extensions are optional */ + if (tag != (ASN_CONSTRUCTED | ASN_CONTEXT_SPECIFIC | 0)) + return 0; if (GetLength(buf, &idx, &length, sz) < 0) return ASN_PARSE_E; diff --git a/wolfcrypt/src/blake2b.c b/wolfcrypt/src/blake2b.c index 59d849bca..898dba6c3 100644 --- a/wolfcrypt/src/blake2b.c +++ b/wolfcrypt/src/blake2b.c @@ -12,7 +12,7 @@ */ /* blake2b.c * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/wolfcrypt/src/blake2s.c b/wolfcrypt/src/blake2s.c index 9ef817c74..9fef77f65 100644 --- a/wolfcrypt/src/blake2s.c +++ b/wolfcrypt/src/blake2s.c @@ -12,7 +12,7 @@ */ /* blake2s.c * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/wolfcrypt/src/camellia.c b/wolfcrypt/src/camellia.c index 96f8bc929..89ee6617a 100644 --- a/wolfcrypt/src/camellia.c +++ b/wolfcrypt/src/camellia.c @@ -27,7 +27,7 @@ /* camellia.c * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/wolfcrypt/src/chacha.c b/wolfcrypt/src/chacha.c index 71b81086b..6b47e4266 100644 --- a/wolfcrypt/src/chacha.c +++ b/wolfcrypt/src/chacha.c @@ -1,6 +1,6 @@ /* chacha.c * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/wolfcrypt/src/chacha20_poly1305.c b/wolfcrypt/src/chacha20_poly1305.c index a30fbf991..e048c3067 100644 --- a/wolfcrypt/src/chacha20_poly1305.c +++ b/wolfcrypt/src/chacha20_poly1305.c @@ -1,6 +1,6 @@ /* chacha.c * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * @@ -32,8 +32,6 @@ #include #include #include -#include -#include #ifdef NO_INLINE #include @@ -42,20 +40,7 @@ #include #endif -#ifdef CHACHA_AEAD_TEST -#include -#endif - #define CHACHA20_POLY1305_AEAD_INITIAL_COUNTER 0 -#define CHACHA20_POLY1305_MAC_PADDING_ALIGNMENT 16 - -static void word32ToLittle64(const word32 inLittle32, byte outLittle64[8]); -static int calculateAuthTag( - const byte inAuthKey[CHACHA20_POLY1305_AEAD_KEYSIZE], - const byte* inAAD, const word32 inAADLen, - const byte *inCiphertext, const word32 inCiphertextLen, - byte outAuthTag[CHACHA20_POLY1305_AEAD_AUTHTAG_SIZE]); - int wc_ChaCha20Poly1305_Encrypt( const byte inKey[CHACHA20_POLY1305_AEAD_KEYSIZE], const byte inIV[CHACHA20_POLY1305_AEAD_IV_SIZE], @@ -64,12 +49,10 @@ int wc_ChaCha20Poly1305_Encrypt( byte* outCiphertext, byte outAuthTag[CHACHA20_POLY1305_AEAD_AUTHTAG_SIZE]) { - int err; - byte poly1305Key[CHACHA20_POLY1305_AEAD_KEYSIZE]; - ChaCha chaChaCtx; + int ret; + ChaChaPoly_Aead aead; /* Validate function arguments */ - if (!inKey || !inIV || !inPlaintext || !inPlaintextLen || !outCiphertext || @@ -78,35 +61,18 @@ int wc_ChaCha20Poly1305_Encrypt( return BAD_FUNC_ARG; } - XMEMSET(poly1305Key, 0, sizeof(poly1305Key)); - - /* Create the Poly1305 key */ - err = wc_Chacha_SetKey(&chaChaCtx, inKey, CHACHA20_POLY1305_AEAD_KEYSIZE); - if (err != 0) return err; - - err = wc_Chacha_SetIV(&chaChaCtx, inIV, - CHACHA20_POLY1305_AEAD_INITIAL_COUNTER); - if (err != 0) return err; - - err = wc_Chacha_Process(&chaChaCtx, poly1305Key, poly1305Key, - CHACHA20_POLY1305_AEAD_KEYSIZE); - if (err != 0) return err; - - /* Encrypt the plaintext using ChaCha20 */ - err = wc_Chacha_Process(&chaChaCtx, outCiphertext, inPlaintext, - inPlaintextLen); - /* Calculate the Poly1305 auth tag */ - if (err == 0) - err = calculateAuthTag(poly1305Key, - inAAD, inAADLen, - outCiphertext, inPlaintextLen, - outAuthTag); - ForceZero(poly1305Key, sizeof(poly1305Key)); - - return err; + ret = wc_ChaCha20Poly1305_Init(&aead, inKey, inIV, + CHACHA20_POLY1305_AEAD_ENCRYPT); + if (ret == 0) + ret = wc_ChaCha20Poly1305_UpdateAad(&aead, inAAD, inAADLen); + if (ret == 0) + ret = wc_ChaCha20Poly1305_UpdateData(&aead, inPlaintext, outCiphertext, + inPlaintextLen); + if (ret == 0) + ret = wc_ChaCha20Poly1305_Final(&aead, outAuthTag); + return ret; } - int wc_ChaCha20Poly1305_Decrypt( const byte inKey[CHACHA20_POLY1305_AEAD_KEYSIZE], const byte inIV[CHACHA20_POLY1305_AEAD_IV_SIZE], @@ -115,13 +81,11 @@ int wc_ChaCha20Poly1305_Decrypt( const byte inAuthTag[CHACHA20_POLY1305_AEAD_AUTHTAG_SIZE], byte* outPlaintext) { - int err; - byte poly1305Key[CHACHA20_POLY1305_AEAD_KEYSIZE]; - ChaCha chaChaCtx; + int ret; + ChaChaPoly_Aead aead; byte calculatedAuthTag[CHACHA20_POLY1305_AEAD_AUTHTAG_SIZE]; /* Validate function arguments */ - if (!inKey || !inIV || !inCiphertext || !inCiphertextLen || !inAuthTag || @@ -131,121 +95,186 @@ int wc_ChaCha20Poly1305_Decrypt( } XMEMSET(calculatedAuthTag, 0, sizeof(calculatedAuthTag)); - XMEMSET(poly1305Key, 0, sizeof(poly1305Key)); + + ret = wc_ChaCha20Poly1305_Init(&aead, inKey, inIV, + CHACHA20_POLY1305_AEAD_DECRYPT); + if (ret == 0) + ret = wc_ChaCha20Poly1305_UpdateAad(&aead, inAAD, inAADLen); + if (ret == 0) + ret = wc_ChaCha20Poly1305_UpdateData(&aead, inCiphertext, outPlaintext, + inCiphertextLen); + if (ret == 0) + ret = wc_ChaCha20Poly1305_Final(&aead, calculatedAuthTag); + if (ret == 0) + ret = wc_ChaCha20Poly1305_CheckTag(inAuthTag, calculatedAuthTag); + return ret; +} + +int wc_ChaCha20Poly1305_CheckTag( + const byte authTag[CHACHA20_POLY1305_AEAD_AUTHTAG_SIZE], + const byte authTagChk[CHACHA20_POLY1305_AEAD_AUTHTAG_SIZE]) +{ + int ret = 0; + if (authTag == NULL || authTagChk == NULL) { + return BAD_FUNC_ARG; + } + if (ConstantCompare(authTag, authTagChk, + CHACHA20_POLY1305_AEAD_AUTHTAG_SIZE) != 0) { + ret = MAC_CMP_FAILED_E; + } + return ret; +} + +int wc_ChaCha20Poly1305_Init(ChaChaPoly_Aead* aead, + const byte inKey[CHACHA20_POLY1305_AEAD_KEYSIZE], + const byte inIV[CHACHA20_POLY1305_AEAD_IV_SIZE], + int isEncrypt) +{ + int ret; + byte authKey[CHACHA20_POLY1305_AEAD_KEYSIZE]; + + /* check arguments */ + if (aead == NULL || inKey == NULL || inIV == NULL) { + return BAD_FUNC_ARG; + } + + /* setup aead context */ + XMEMSET(aead, 0, sizeof(ChaChaPoly_Aead)); + XMEMSET(authKey, 0, sizeof(authKey)); + aead->isEncrypt = isEncrypt; + + /* Initialize the ChaCha20 context (key and iv) */ + ret = wc_Chacha_SetKey(&aead->chacha, inKey, + CHACHA20_POLY1305_AEAD_KEYSIZE); + if (ret == 0) { + ret = wc_Chacha_SetIV(&aead->chacha, inIV, + CHACHA20_POLY1305_AEAD_INITIAL_COUNTER); + } /* Create the Poly1305 key */ - err = wc_Chacha_SetKey(&chaChaCtx, inKey, CHACHA20_POLY1305_AEAD_KEYSIZE); - if (err != 0) return err; - - err = wc_Chacha_SetIV(&chaChaCtx, inIV, - CHACHA20_POLY1305_AEAD_INITIAL_COUNTER); - if (err != 0) return err; - - err = wc_Chacha_Process(&chaChaCtx, poly1305Key, poly1305Key, - CHACHA20_POLY1305_AEAD_KEYSIZE); - if (err != 0) return err; - - /* Calculate the Poly1305 auth tag */ - err = calculateAuthTag(poly1305Key, - inAAD, inAADLen, - inCiphertext, inCiphertextLen, - calculatedAuthTag); - - /* Compare the calculated auth tag with the received one */ - if (err == 0 && ConstantCompare(inAuthTag, calculatedAuthTag, - CHACHA20_POLY1305_AEAD_AUTHTAG_SIZE) != 0) - { - err = MAC_CMP_FAILED_E; + if (ret == 0) { + ret = wc_Chacha_Process(&aead->chacha, authKey, authKey, + CHACHA20_POLY1305_AEAD_KEYSIZE); } - /* Decrypt the received ciphertext */ - if (err == 0) - err = wc_Chacha_Process(&chaChaCtx, outPlaintext, inCiphertext, - inCiphertextLen); - ForceZero(poly1305Key, sizeof(poly1305Key)); + /* Initialize Poly1305 context */ + if (ret == 0) { + ret = wc_Poly1305SetKey(&aead->poly, authKey, + CHACHA20_POLY1305_AEAD_KEYSIZE); + } - return err; + if (ret == 0) { + aead->state = CHACHA20_POLY1305_STATE_READY; + } + + return ret; } - -static int calculateAuthTag( - const byte inAuthKey[CHACHA20_POLY1305_AEAD_KEYSIZE], - const byte *inAAD, const word32 inAADLen, - const byte *inCiphertext, const word32 inCiphertextLen, - byte outAuthTag[CHACHA20_POLY1305_AEAD_AUTHTAG_SIZE]) +/* optional additional authentication data */ +int wc_ChaCha20Poly1305_UpdateAad(ChaChaPoly_Aead* aead, + const byte* inAAD, word32 inAADLen) { - int err; - Poly1305 poly1305Ctx; - byte padding[CHACHA20_POLY1305_MAC_PADDING_ALIGNMENT - 1]; - word32 paddingLen; - byte little64[16]; + int ret = 0; - XMEMSET(padding, 0, sizeof(padding)); - - /* Initialize Poly1305 */ - err = wc_Poly1305SetKey(&poly1305Ctx, inAuthKey, - CHACHA20_POLY1305_AEAD_KEYSIZE); - if (err) - return err; - - /* Create the authTag by MAC'ing the following items: */ - /* -- AAD */ - if (inAAD && inAADLen) - { - err = wc_Poly1305Update(&poly1305Ctx, inAAD, inAADLen); - /* -- padding1: pad the AAD to 16 bytes */ - paddingLen = -(int)inAADLen & - (CHACHA20_POLY1305_MAC_PADDING_ALIGNMENT - 1); - if (paddingLen) - err += wc_Poly1305Update(&poly1305Ctx, padding, paddingLen); - - if (err) - return err; + if (aead == NULL || (inAAD == NULL && inAADLen > 0)) { + return BAD_FUNC_ARG; + } + if (aead->state != CHACHA20_POLY1305_STATE_READY && + aead->state != CHACHA20_POLY1305_STATE_AAD) { + return BAD_STATE_E; } - /* -- Ciphertext */ - err = wc_Poly1305Update(&poly1305Ctx, inCiphertext, inCiphertextLen); - if (err) - return err; - - /* -- padding2: pad the ciphertext to 16 bytes */ - paddingLen = -(int)inCiphertextLen & - (CHACHA20_POLY1305_MAC_PADDING_ALIGNMENT - 1); - if (paddingLen) - { - err = wc_Poly1305Update(&poly1305Ctx, padding, paddingLen); - if (err) - return err; + if (inAAD && inAADLen > 0) { + ret = wc_Poly1305Update(&aead->poly, inAAD, inAADLen); + if (ret == 0) { + aead->aadLen += inAADLen; + aead->state = CHACHA20_POLY1305_STATE_AAD; + } } - /* -- AAD length as a 64-bit little endian integer */ - word32ToLittle64(inAADLen, little64); - /* -- Ciphertext length as a 64-bit little endian integer */ - word32ToLittle64(inCiphertextLen, little64 + 8); - err = wc_Poly1305Update(&poly1305Ctx, little64, sizeof(little64)); - if (err) - return err; + return ret; +} + +/* inData and outData can be same pointer (inline) */ +int wc_ChaCha20Poly1305_UpdateData(ChaChaPoly_Aead* aead, + const byte* inData, byte* outData, word32 dataLen) +{ + int ret = 0; + + if (aead == NULL || inData == NULL || outData == NULL) { + return BAD_FUNC_ARG; + } + if (aead->state != CHACHA20_POLY1305_STATE_READY && + aead->state != CHACHA20_POLY1305_STATE_AAD && + aead->state != CHACHA20_POLY1305_STATE_DATA) { + return BAD_STATE_E; + } + + /* Pad the AAD */ + if (aead->state == CHACHA20_POLY1305_STATE_AAD) { + ret = wc_Poly1305_Pad(&aead->poly, aead->aadLen); + } + + /* advance state */ + aead->state = CHACHA20_POLY1305_STATE_DATA; + + /* Perform ChaCha20 encrypt/decrypt and Poly1305 auth calc */ + if (ret == 0) { + if (aead->isEncrypt) { + ret = wc_Chacha_Process(&aead->chacha, outData, inData, dataLen); + if (ret == 0) + ret = wc_Poly1305Update(&aead->poly, outData, dataLen); + } + else { + ret = wc_Poly1305Update(&aead->poly, inData, dataLen); + if (ret == 0) + ret = wc_Chacha_Process(&aead->chacha, outData, inData, dataLen); + } + } + if (ret == 0) { + aead->dataLen += dataLen; + } + return ret; +} + +int wc_ChaCha20Poly1305_Final(ChaChaPoly_Aead* aead, + byte outAuthTag[CHACHA20_POLY1305_AEAD_AUTHTAG_SIZE]) +{ + int ret = 0; + + if (aead == NULL || outAuthTag == NULL) { + return BAD_FUNC_ARG; + } + if (aead->state != CHACHA20_POLY1305_STATE_AAD && + aead->state != CHACHA20_POLY1305_STATE_DATA) { + return BAD_STATE_E; + } + + /* Pad the AAD - Make sure it is done */ + if (aead->state == CHACHA20_POLY1305_STATE_AAD) { + ret = wc_Poly1305_Pad(&aead->poly, aead->aadLen); + } + + /* Pad the ciphertext to 16 bytes */ + if (ret == 0) { + ret = wc_Poly1305_Pad(&aead->poly, aead->dataLen); + } + + /* Add the aad length and plaintext/ciphertext length */ + if (ret == 0) { + ret = wc_Poly1305_EncodeSizes(&aead->poly, aead->aadLen, + aead->dataLen); + } /* Finalize the auth tag */ - err = wc_Poly1305Final(&poly1305Ctx, outAuthTag); + if (ret == 0) { + ret = wc_Poly1305Final(&aead->poly, outAuthTag); + } - return err; + /* reset and cleanup sensitive context */ + ForceZero(aead, sizeof(ChaChaPoly_Aead)); + + return ret; } - -static void word32ToLittle64(const word32 inLittle32, byte outLittle64[8]) -{ -#ifndef WOLFSSL_X86_64_BUILD - XMEMSET(outLittle64 + 4, 0, 4); - - outLittle64[0] = (byte)(inLittle32 & 0x000000FF); - outLittle64[1] = (byte)((inLittle32 & 0x0000FF00) >> 8); - outLittle64[2] = (byte)((inLittle32 & 0x00FF0000) >> 16); - outLittle64[3] = (byte)((inLittle32 & 0xFF000000) >> 24); -#else - *(word64*)outLittle64 = inLittle32; -#endif -} - - #endif /* HAVE_CHACHA && HAVE_POLY1305 */ diff --git a/wolfcrypt/src/chacha_asm.S b/wolfcrypt/src/chacha_asm.S index 0a1ee5d6e..f9d5fff81 100644 --- a/wolfcrypt/src/chacha_asm.S +++ b/wolfcrypt/src/chacha_asm.S @@ -1,6 +1,6 @@ /* chacha_asm * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/wolfcrypt/src/cmac.c b/wolfcrypt/src/cmac.c index 3fd91a5ff..9d30bb5f3 100644 --- a/wolfcrypt/src/cmac.c +++ b/wolfcrypt/src/cmac.c @@ -1,6 +1,6 @@ /* cmac.c * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/wolfcrypt/src/coding.c b/wolfcrypt/src/coding.c index a32c2efaf..4ec742ec7 100644 --- a/wolfcrypt/src/coding.c +++ b/wolfcrypt/src/coding.c @@ -1,6 +1,6 @@ /* coding.c * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/wolfcrypt/src/compress.c b/wolfcrypt/src/compress.c index 2eb92f48a..28d04f02d 100644 --- a/wolfcrypt/src/compress.c +++ b/wolfcrypt/src/compress.c @@ -1,6 +1,6 @@ /* compress.c * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/wolfcrypt/src/cpuid.c b/wolfcrypt/src/cpuid.c index b97030bc2..85c4bf2d6 100644 --- a/wolfcrypt/src/cpuid.c +++ b/wolfcrypt/src/cpuid.c @@ -1,6 +1,6 @@ /* cpuid.c * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/wolfcrypt/src/cryptocb.c b/wolfcrypt/src/cryptocb.c index a9ba73007..79f89dbb1 100644 --- a/wolfcrypt/src/cryptocb.c +++ b/wolfcrypt/src/cryptocb.c @@ -1,6 +1,6 @@ /* cryptocb.c * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/wolfcrypt/src/curve25519.c b/wolfcrypt/src/curve25519.c index 82b3597ca..39e1216a0 100644 --- a/wolfcrypt/src/curve25519.c +++ b/wolfcrypt/src/curve25519.c @@ -1,6 +1,6 @@ /* curve25519.c * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/wolfcrypt/src/des3.c b/wolfcrypt/src/des3.c index 408ac6148..f07498a5d 100644 --- a/wolfcrypt/src/des3.c +++ b/wolfcrypt/src/des3.c @@ -1,6 +1,6 @@ /* des3.c * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/wolfcrypt/src/dh.c b/wolfcrypt/src/dh.c index af3e09c0e..87df7bf6c 100644 --- a/wolfcrypt/src/dh.c +++ b/wolfcrypt/src/dh.c @@ -1,6 +1,6 @@ /* dh.c * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/wolfcrypt/src/dsa.c b/wolfcrypt/src/dsa.c index 257e8060e..b9183f8ca 100644 --- a/wolfcrypt/src/dsa.c +++ b/wolfcrypt/src/dsa.c @@ -1,6 +1,6 @@ /* dsa.c * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/wolfcrypt/src/ecc.c b/wolfcrypt/src/ecc.c index 6ddef35f4..e1df36446 100644 --- a/wolfcrypt/src/ecc.c +++ b/wolfcrypt/src/ecc.c @@ -1,6 +1,6 @@ /* ecc.c * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * @@ -5175,14 +5175,13 @@ int wc_ecc_free(ecc_key* key) #ifdef WOLFSSL_ATECC508A atmel_ecc_free(key->slot); key->slot = ATECC_INVALID_SLOT; -#else +#endif /* WOLFSSL_ATECC508A */ mp_clear(key->pubkey.x); mp_clear(key->pubkey.y); mp_clear(key->pubkey.z); mp_forcezero(&key->k); -#endif /* WOLFSSL_ATECC508A */ #ifdef WOLFSSL_CUSTOM_CURVES if (key->deallocSet && key->dp != NULL) diff --git a/wolfcrypt/src/ed25519.c b/wolfcrypt/src/ed25519.c index a6f0848d4..cdb6843dd 100644 --- a/wolfcrypt/src/ed25519.c +++ b/wolfcrypt/src/ed25519.c @@ -1,6 +1,6 @@ /* ed25519.c * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/wolfcrypt/src/error.c b/wolfcrypt/src/error.c index f22d8724b..d044e0c1f 100644 --- a/wolfcrypt/src/error.c +++ b/wolfcrypt/src/error.c @@ -1,6 +1,6 @@ /* error.c * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/wolfcrypt/src/evp.c b/wolfcrypt/src/evp.c index 7202bb16b..11d1c229c 100644 --- a/wolfcrypt/src/evp.c +++ b/wolfcrypt/src/evp.c @@ -1,6 +1,6 @@ /* evp.c * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * @@ -901,6 +901,8 @@ int wolfSSL_EVP_PKEY_CTX_free(WOLFSSL_EVP_PKEY_CTX *ctx) { if (ctx == NULL) return 0; WOLFSSL_ENTER("EVP_PKEY_CTX_free"); + if (ctx->pkey != NULL) + wolfSSL_EVP_PKEY_free(ctx->pkey); XFREE(ctx, NULL, DYNAMIC_TYPE_PUBLIC_KEY); return WOLFSSL_SUCCESS; } @@ -916,6 +918,7 @@ int wolfSSL_EVP_PKEY_CTX_free(WOLFSSL_EVP_PKEY_CTX *ctx) WOLFSSL_EVP_PKEY_CTX *wolfSSL_EVP_PKEY_CTX_new(WOLFSSL_EVP_PKEY *pkey, WOLFSSL_ENGINE *e) { WOLFSSL_EVP_PKEY_CTX* ctx; + int type = NID_undef; if (pkey == NULL) return 0; if (e != NULL) return 0; @@ -929,7 +932,18 @@ WOLFSSL_EVP_PKEY_CTX *wolfSSL_EVP_PKEY_CTX_new(WOLFSSL_EVP_PKEY *pkey, WOLFSSL_E #if !defined(NO_RSA) && !defined(HAVE_USER_RSA) ctx->padding = RSA_PKCS1_PADDING; #endif + type = wolfSSL_EVP_PKEY_type(pkey->type); + if ((type == EVP_PKEY_RSA) || + (type == EVP_PKEY_DSA) || + (type == EVP_PKEY_EC)) { + if (wc_LockMutex(&pkey->refMutex) != 0) { + WOLFSSL_MSG("Couldn't lock pkey mutex"); + } + pkey->references++; + + wc_UnLockMutex(&pkey->refMutex); + } return ctx; } diff --git a/wolfcrypt/src/fe_low_mem.c b/wolfcrypt/src/fe_low_mem.c index a78301284..13c88cbb4 100644 --- a/wolfcrypt/src/fe_low_mem.c +++ b/wolfcrypt/src/fe_low_mem.c @@ -1,6 +1,6 @@ /* fe_low_mem.c * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/wolfcrypt/src/fe_operations.c b/wolfcrypt/src/fe_operations.c index 6759abdef..c3baecefd 100644 --- a/wolfcrypt/src/fe_operations.c +++ b/wolfcrypt/src/fe_operations.c @@ -1,6 +1,6 @@ /* fe_operations.c * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/wolfcrypt/src/fe_x25519_128.i b/wolfcrypt/src/fe_x25519_128.i index 0e7475039..10e43d9cd 100644 --- a/wolfcrypt/src/fe_x25519_128.i +++ b/wolfcrypt/src/fe_x25519_128.i @@ -1,6 +1,6 @@ /* fe_x25519_128.i * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/wolfcrypt/src/fe_x25519_asm.S b/wolfcrypt/src/fe_x25519_asm.S index 0b8e9bda3..5f8251815 100644 --- a/wolfcrypt/src/fe_x25519_asm.S +++ b/wolfcrypt/src/fe_x25519_asm.S @@ -1,6 +1,6 @@ /* fe_x25519_asm * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/wolfcrypt/src/fp_mont_small.i b/wolfcrypt/src/fp_mont_small.i index 626d4e32b..380b0a25b 100644 --- a/wolfcrypt/src/fp_mont_small.i +++ b/wolfcrypt/src/fp_mont_small.i @@ -1,6 +1,6 @@ /* fp_mont_small.i * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/wolfcrypt/src/fp_mul_comba_12.i b/wolfcrypt/src/fp_mul_comba_12.i index 603e496d1..0f0683d74 100644 --- a/wolfcrypt/src/fp_mul_comba_12.i +++ b/wolfcrypt/src/fp_mul_comba_12.i @@ -1,6 +1,6 @@ /* fp_mul_comba_12.i * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/wolfcrypt/src/fp_mul_comba_17.i b/wolfcrypt/src/fp_mul_comba_17.i index 83489fae1..fb3205515 100644 --- a/wolfcrypt/src/fp_mul_comba_17.i +++ b/wolfcrypt/src/fp_mul_comba_17.i @@ -1,6 +1,6 @@ /* fp_mul_comba_17.i * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/wolfcrypt/src/fp_mul_comba_20.i b/wolfcrypt/src/fp_mul_comba_20.i index 9d0b6de71..372f51f41 100644 --- a/wolfcrypt/src/fp_mul_comba_20.i +++ b/wolfcrypt/src/fp_mul_comba_20.i @@ -1,6 +1,6 @@ /* fp_mul_comba_20.i * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/wolfcrypt/src/fp_mul_comba_24.i b/wolfcrypt/src/fp_mul_comba_24.i index 0d624ae42..17705f7df 100644 --- a/wolfcrypt/src/fp_mul_comba_24.i +++ b/wolfcrypt/src/fp_mul_comba_24.i @@ -1,6 +1,6 @@ /* fp_mul_comba_24.i * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/wolfcrypt/src/fp_mul_comba_28.i b/wolfcrypt/src/fp_mul_comba_28.i index dfd14780e..594db74ef 100644 --- a/wolfcrypt/src/fp_mul_comba_28.i +++ b/wolfcrypt/src/fp_mul_comba_28.i @@ -1,6 +1,6 @@ /* fp_mul_comba_28.i * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/wolfcrypt/src/fp_mul_comba_3.i b/wolfcrypt/src/fp_mul_comba_3.i index b53937fcd..0befff860 100644 --- a/wolfcrypt/src/fp_mul_comba_3.i +++ b/wolfcrypt/src/fp_mul_comba_3.i @@ -1,6 +1,6 @@ /* fp_mul_comba_3.i * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/wolfcrypt/src/fp_mul_comba_32.i b/wolfcrypt/src/fp_mul_comba_32.i index b2ec0056d..97dc076be 100644 --- a/wolfcrypt/src/fp_mul_comba_32.i +++ b/wolfcrypt/src/fp_mul_comba_32.i @@ -1,6 +1,6 @@ /* fp_mul_comba_32.i * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/wolfcrypt/src/fp_mul_comba_4.i b/wolfcrypt/src/fp_mul_comba_4.i index 6c4643a60..803c6151a 100644 --- a/wolfcrypt/src/fp_mul_comba_4.i +++ b/wolfcrypt/src/fp_mul_comba_4.i @@ -1,6 +1,6 @@ /* fp_mul_comba_4.i * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/wolfcrypt/src/fp_mul_comba_48.i b/wolfcrypt/src/fp_mul_comba_48.i index 8a7a010ee..0d1533458 100644 --- a/wolfcrypt/src/fp_mul_comba_48.i +++ b/wolfcrypt/src/fp_mul_comba_48.i @@ -1,6 +1,6 @@ /* fp_mul_comba_48.i * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/wolfcrypt/src/fp_mul_comba_6.i b/wolfcrypt/src/fp_mul_comba_6.i index a2fcb4a89..815badcb8 100644 --- a/wolfcrypt/src/fp_mul_comba_6.i +++ b/wolfcrypt/src/fp_mul_comba_6.i @@ -1,6 +1,6 @@ /* fp_mul_comba_6.i * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/wolfcrypt/src/fp_mul_comba_64.i b/wolfcrypt/src/fp_mul_comba_64.i index 584f8fef4..7080fa2a3 100644 --- a/wolfcrypt/src/fp_mul_comba_64.i +++ b/wolfcrypt/src/fp_mul_comba_64.i @@ -1,6 +1,6 @@ /* fp_mul_comba_64.i * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/wolfcrypt/src/fp_mul_comba_7.i b/wolfcrypt/src/fp_mul_comba_7.i index a7335cce8..b969a9a3b 100644 --- a/wolfcrypt/src/fp_mul_comba_7.i +++ b/wolfcrypt/src/fp_mul_comba_7.i @@ -1,6 +1,6 @@ /* fp_mul_comba_7.i * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/wolfcrypt/src/fp_mul_comba_8.i b/wolfcrypt/src/fp_mul_comba_8.i index 5df8293dd..1d61a7781 100644 --- a/wolfcrypt/src/fp_mul_comba_8.i +++ b/wolfcrypt/src/fp_mul_comba_8.i @@ -1,6 +1,6 @@ /* fp_mul_comba_8.i * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/wolfcrypt/src/fp_mul_comba_9.i b/wolfcrypt/src/fp_mul_comba_9.i index 9ef2eae81..0eedd7597 100644 --- a/wolfcrypt/src/fp_mul_comba_9.i +++ b/wolfcrypt/src/fp_mul_comba_9.i @@ -1,6 +1,6 @@ /* fp_mul_comba_9.i * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/wolfcrypt/src/fp_mul_comba_small_set.i b/wolfcrypt/src/fp_mul_comba_small_set.i index 1c0e0247d..62ab909cf 100644 --- a/wolfcrypt/src/fp_mul_comba_small_set.i +++ b/wolfcrypt/src/fp_mul_comba_small_set.i @@ -1,6 +1,6 @@ /* fp_mul_comba_small_set.i * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/wolfcrypt/src/fp_sqr_comba_12.i b/wolfcrypt/src/fp_sqr_comba_12.i index 82fa9fcdd..cded4b123 100644 --- a/wolfcrypt/src/fp_sqr_comba_12.i +++ b/wolfcrypt/src/fp_sqr_comba_12.i @@ -1,6 +1,6 @@ /* fp_sqr_comba_12.i * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/wolfcrypt/src/fp_sqr_comba_17.i b/wolfcrypt/src/fp_sqr_comba_17.i index 682786799..d2418d931 100644 --- a/wolfcrypt/src/fp_sqr_comba_17.i +++ b/wolfcrypt/src/fp_sqr_comba_17.i @@ -1,6 +1,6 @@ /* fp_sqr_comba_17.i * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/wolfcrypt/src/fp_sqr_comba_20.i b/wolfcrypt/src/fp_sqr_comba_20.i index e226befa9..78fd3fd96 100644 --- a/wolfcrypt/src/fp_sqr_comba_20.i +++ b/wolfcrypt/src/fp_sqr_comba_20.i @@ -1,6 +1,6 @@ /* fp_sqr_comba_20.i * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/wolfcrypt/src/fp_sqr_comba_24.i b/wolfcrypt/src/fp_sqr_comba_24.i index dc9e87af0..602b36c09 100644 --- a/wolfcrypt/src/fp_sqr_comba_24.i +++ b/wolfcrypt/src/fp_sqr_comba_24.i @@ -1,6 +1,6 @@ /* fp_sqr_comba_24.i * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/wolfcrypt/src/fp_sqr_comba_28.i b/wolfcrypt/src/fp_sqr_comba_28.i index 965537718..57c1acc30 100644 --- a/wolfcrypt/src/fp_sqr_comba_28.i +++ b/wolfcrypt/src/fp_sqr_comba_28.i @@ -1,6 +1,6 @@ /* fp_sqr_comba_28.i * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/wolfcrypt/src/fp_sqr_comba_3.i b/wolfcrypt/src/fp_sqr_comba_3.i index e0355f710..51c3d7422 100644 --- a/wolfcrypt/src/fp_sqr_comba_3.i +++ b/wolfcrypt/src/fp_sqr_comba_3.i @@ -1,6 +1,6 @@ /* fp_sqr_comba_3.i * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/wolfcrypt/src/fp_sqr_comba_32.i b/wolfcrypt/src/fp_sqr_comba_32.i index e41d92837..4fcf3497b 100644 --- a/wolfcrypt/src/fp_sqr_comba_32.i +++ b/wolfcrypt/src/fp_sqr_comba_32.i @@ -1,6 +1,6 @@ /* fp_sqr_comba_32.i * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/wolfcrypt/src/fp_sqr_comba_4.i b/wolfcrypt/src/fp_sqr_comba_4.i index a6f28ddec..b7f257288 100644 --- a/wolfcrypt/src/fp_sqr_comba_4.i +++ b/wolfcrypt/src/fp_sqr_comba_4.i @@ -1,6 +1,6 @@ /* fp_sqr_comba_4.i * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/wolfcrypt/src/fp_sqr_comba_48.i b/wolfcrypt/src/fp_sqr_comba_48.i index a00d450be..0f24532b1 100644 --- a/wolfcrypt/src/fp_sqr_comba_48.i +++ b/wolfcrypt/src/fp_sqr_comba_48.i @@ -1,6 +1,6 @@ /* fp_sqr_comba_48.i * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/wolfcrypt/src/fp_sqr_comba_6.i b/wolfcrypt/src/fp_sqr_comba_6.i index 90396d26a..b36416844 100644 --- a/wolfcrypt/src/fp_sqr_comba_6.i +++ b/wolfcrypt/src/fp_sqr_comba_6.i @@ -1,6 +1,6 @@ /* fp_sqr_comba_6.i * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/wolfcrypt/src/fp_sqr_comba_64.i b/wolfcrypt/src/fp_sqr_comba_64.i index 0ae280ac5..b9b2c8ab7 100644 --- a/wolfcrypt/src/fp_sqr_comba_64.i +++ b/wolfcrypt/src/fp_sqr_comba_64.i @@ -1,6 +1,6 @@ /* fp_sqr_comba_64.i * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/wolfcrypt/src/fp_sqr_comba_7.i b/wolfcrypt/src/fp_sqr_comba_7.i index 7410cbb50..09bf9954a 100644 --- a/wolfcrypt/src/fp_sqr_comba_7.i +++ b/wolfcrypt/src/fp_sqr_comba_7.i @@ -1,6 +1,6 @@ /* fp_sqr_comba_7.i * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/wolfcrypt/src/fp_sqr_comba_8.i b/wolfcrypt/src/fp_sqr_comba_8.i index f6a167aa1..23fd8e41d 100644 --- a/wolfcrypt/src/fp_sqr_comba_8.i +++ b/wolfcrypt/src/fp_sqr_comba_8.i @@ -1,6 +1,6 @@ /* fp_sqr_comba_8.i * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/wolfcrypt/src/fp_sqr_comba_9.i b/wolfcrypt/src/fp_sqr_comba_9.i index 37f90d02b..ed6451a77 100644 --- a/wolfcrypt/src/fp_sqr_comba_9.i +++ b/wolfcrypt/src/fp_sqr_comba_9.i @@ -1,6 +1,6 @@ /* fp_sqr_comba_9.i * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/wolfcrypt/src/fp_sqr_comba_small_set.i b/wolfcrypt/src/fp_sqr_comba_small_set.i index dd2852411..a81ee10e2 100644 --- a/wolfcrypt/src/fp_sqr_comba_small_set.i +++ b/wolfcrypt/src/fp_sqr_comba_small_set.i @@ -1,6 +1,6 @@ /* fp_sqr_comba_small_set.i * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/wolfcrypt/src/ge_low_mem.c b/wolfcrypt/src/ge_low_mem.c index 30e98ce7f..3b72b96cc 100644 --- a/wolfcrypt/src/ge_low_mem.c +++ b/wolfcrypt/src/ge_low_mem.c @@ -1,6 +1,6 @@ /* ge_low_mem.c * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/wolfcrypt/src/ge_operations.c b/wolfcrypt/src/ge_operations.c index 9d2ce8d4b..73fa06e35 100644 --- a/wolfcrypt/src/ge_operations.c +++ b/wolfcrypt/src/ge_operations.c @@ -1,6 +1,6 @@ /* ge_operations.c * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/wolfcrypt/src/hash.c b/wolfcrypt/src/hash.c index 40d43ffd8..4286af08e 100644 --- a/wolfcrypt/src/hash.c +++ b/wolfcrypt/src/hash.c @@ -1,6 +1,6 @@ /* hash.c * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/wolfcrypt/src/hc128.c b/wolfcrypt/src/hc128.c index dc36f5a52..96f02d16d 100644 --- a/wolfcrypt/src/hc128.c +++ b/wolfcrypt/src/hc128.c @@ -1,6 +1,6 @@ /* hc128.c * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/wolfcrypt/src/hmac.c b/wolfcrypt/src/hmac.c index 45200b06b..be26310cf 100644 --- a/wolfcrypt/src/hmac.c +++ b/wolfcrypt/src/hmac.c @@ -1,6 +1,6 @@ /* hmac.c * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/wolfcrypt/src/idea.c b/wolfcrypt/src/idea.c index c5a4276dc..600c90654 100644 --- a/wolfcrypt/src/idea.c +++ b/wolfcrypt/src/idea.c @@ -1,6 +1,6 @@ /* idea.c * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/wolfcrypt/src/integer.c b/wolfcrypt/src/integer.c index 1dc04d1a6..9e45ebdc2 100644 --- a/wolfcrypt/src/integer.c +++ b/wolfcrypt/src/integer.c @@ -1,6 +1,6 @@ /* integer.c * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/wolfcrypt/src/logging.c b/wolfcrypt/src/logging.c index 3f4b55d27..e29460e1c 100644 --- a/wolfcrypt/src/logging.c +++ b/wolfcrypt/src/logging.c @@ -1,6 +1,6 @@ /* logging.c * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/wolfcrypt/src/md2.c b/wolfcrypt/src/md2.c index 724eb4331..c2f34203d 100644 --- a/wolfcrypt/src/md2.c +++ b/wolfcrypt/src/md2.c @@ -1,6 +1,6 @@ /* md2.c * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/wolfcrypt/src/md4.c b/wolfcrypt/src/md4.c index b110d715c..f6f67454a 100644 --- a/wolfcrypt/src/md4.c +++ b/wolfcrypt/src/md4.c @@ -1,6 +1,6 @@ /* md4.c * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/wolfcrypt/src/md5.c b/wolfcrypt/src/md5.c index c52ebdbc1..7eb2a5120 100644 --- a/wolfcrypt/src/md5.c +++ b/wolfcrypt/src/md5.c @@ -1,6 +1,6 @@ /* md5.c * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/wolfcrypt/src/memory.c b/wolfcrypt/src/memory.c index 9cbda6154..03267dd2f 100644 --- a/wolfcrypt/src/memory.c +++ b/wolfcrypt/src/memory.c @@ -1,6 +1,6 @@ /* memory.c * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/wolfcrypt/src/misc.c b/wolfcrypt/src/misc.c index c4baa0563..6e1f41a55 100644 --- a/wolfcrypt/src/misc.c +++ b/wolfcrypt/src/misc.c @@ -1,6 +1,6 @@ /* misc.c * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/wolfcrypt/src/pkcs12.c b/wolfcrypt/src/pkcs12.c index bd27fdd46..99860fe28 100644 --- a/wolfcrypt/src/pkcs12.c +++ b/wolfcrypt/src/pkcs12.c @@ -1,6 +1,6 @@ /* pkcs12.c * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/wolfcrypt/src/pkcs7.c b/wolfcrypt/src/pkcs7.c index f52115947..3a79d8fc9 100644 --- a/wolfcrypt/src/pkcs7.c +++ b/wolfcrypt/src/pkcs7.c @@ -1,6 +1,6 @@ /* pkcs7.c * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/wolfcrypt/src/poly1305.c b/wolfcrypt/src/poly1305.c index b3a4752b8..174b912b6 100644 --- a/wolfcrypt/src/poly1305.c +++ b/wolfcrypt/src/poly1305.c @@ -1,6 +1,6 @@ /* poly1305.c * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * @@ -235,16 +235,24 @@ extern void poly1305_final_avx2(Poly1305* ctx, byte* mac); } #endif - -static void U32TO64(word32 v, byte* p) +/* convert 32-bit unsigned to little endian 64 bit type as byte array */ +static WC_INLINE void u32tole64(const word32 inLe32, byte outLe64[8]) { - XMEMSET(p, 0, 8); - p[0] = (v & 0xFF); - p[1] = (v >> 8) & 0xFF; - p[2] = (v >> 16) & 0xFF; - p[3] = (v >> 24) & 0xFF; +#ifndef WOLFSSL_X86_64_BUILD + outLe64[0] = (byte)(inLe32 & 0x000000FF); + outLe64[1] = (byte)((inLe32 & 0x0000FF00) >> 8); + outLe64[2] = (byte)((inLe32 & 0x00FF0000) >> 16); + outLe64[3] = (byte)((inLe32 & 0xFF000000) >> 24); + outLe64[4] = 0; + outLe64[5] = 0; + outLe64[6] = 0; + outLe64[7] = 0; +#else + *(word64*)outLe64 = inLe32; +#endif } + #if !defined(WOLFSSL_ARMASM) || !defined(__aarch64__) void poly1305_blocks(Poly1305* ctx, const unsigned char *m, size_t bytes) @@ -749,6 +757,56 @@ int wc_Poly1305Update(Poly1305* ctx, const byte* m, word32 bytes) return 0; } +/* Takes a Poly1305 struct that has a key loaded and pads the provided length + ctx : Initialized Poly1305 struct to use + lenToPad : Current number of bytes updated that needs padding to 16 + */ +int wc_Poly1305_Pad(Poly1305* ctx, word32 lenToPad) +{ + int ret = 0; + word32 paddingLen; + byte padding[WC_POLY1305_PAD_SZ - 1]; + + if (ctx == NULL) { + return BAD_FUNC_ARG; + } + if (lenToPad == 0) { + return 0; /* nothing needs to be done */ + } + + XMEMSET(padding, 0, sizeof(padding)); + + /* Pad length to 16 bytes */ + paddingLen = -(int)lenToPad & (WC_POLY1305_PAD_SZ - 1); + if (paddingLen > 0) { + ret = wc_Poly1305Update(ctx, padding, paddingLen); + } + return ret; +} + +/* Takes a Poly1305 struct that has a key loaded and adds the AEAD length + encoding in 64-bit little endian + aadSz : Size of the additional authentication data + dataSz : Size of the plaintext or ciphertext + */ +int wc_Poly1305_EncodeSizes(Poly1305* ctx, word32 aadSz, word32 dataSz) +{ + int ret; + byte little64[16]; /* sizeof(word64) * 2 */ + + if (ctx == NULL) { + return BAD_FUNC_ARG; + } + + XMEMSET(little64, 0, sizeof(little64)); + + /* size of additional data and input data as little endian 64 bit types */ + u32tole64(aadSz, little64); + u32tole64(dataSz, little64 + 8); + ret = wc_Poly1305Update(ctx, little64, sizeof(little64)); + + return ret; +} /* Takes in an initialized Poly1305 struct that has a key loaded and creates a MAC (tag) using recent TLS AEAD padding scheme. @@ -765,11 +823,6 @@ int wc_Poly1305_MAC(Poly1305* ctx, byte* additional, word32 addSz, byte* input, word32 sz, byte* tag, word32 tagSz) { int ret; - byte padding[WC_POLY1305_PAD_SZ - 1]; - word32 paddingLen; - byte little64[16]; - - XMEMSET(padding, 0, sizeof(padding)); /* sanity check on arguments */ if (ctx == NULL || input == NULL || tag == NULL || @@ -786,11 +839,9 @@ int wc_Poly1305_MAC(Poly1305* ctx, byte* additional, word32 addSz, if ((ret = wc_Poly1305Update(ctx, additional, addSz)) != 0) { return ret; } - paddingLen = -((int)addSz) & (WC_POLY1305_PAD_SZ - 1); - if (paddingLen) { - if ((ret = wc_Poly1305Update(ctx, padding, paddingLen)) != 0) { - return ret; - } + /* pad additional data */ + if ((ret = wc_Poly1305_Pad(ctx, addSz)) != 0) { + return ret; } } @@ -798,19 +849,13 @@ int wc_Poly1305_MAC(Poly1305* ctx, byte* additional, word32 addSz, if ((ret = wc_Poly1305Update(ctx, input, sz)) != 0) { return ret; } - paddingLen = -((int)sz) & (WC_POLY1305_PAD_SZ - 1); - if (paddingLen) { - if ((ret = wc_Poly1305Update(ctx, padding, paddingLen)) != 0) { - return ret; - } + /* pad input data */ + if ((ret = wc_Poly1305_Pad(ctx, sz)) != 0) { + return ret; } - /* size of additional data and input as little endian 64 bit types */ - U32TO64(addSz, little64); - U32TO64(sz, little64 + 8); - ret = wc_Poly1305Update(ctx, little64, sizeof(little64)); - if (ret) - { + /* encode size of AAD and input data as little endian 64 bit types */ + if ((ret = wc_Poly1305_EncodeSizes(ctx, addSz, sz)) != 0) { return ret; } diff --git a/wolfcrypt/src/poly1305_asm.S b/wolfcrypt/src/poly1305_asm.S index 5ed46f1ee..95711075b 100644 --- a/wolfcrypt/src/poly1305_asm.S +++ b/wolfcrypt/src/poly1305_asm.S @@ -1,6 +1,6 @@ /* poly1305_asm * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/wolfcrypt/src/port/Espressif/esp32_aes.c b/wolfcrypt/src/port/Espressif/esp32_aes.c index c6483da71..f2fb8a5be 100644 --- a/wolfcrypt/src/port/Espressif/esp32_aes.c +++ b/wolfcrypt/src/port/Espressif/esp32_aes.c @@ -1,6 +1,6 @@ /* esp32_aes.c * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/wolfcrypt/src/port/Espressif/esp32_mp.c b/wolfcrypt/src/port/Espressif/esp32_mp.c index 4464b03ce..2174089b1 100644 --- a/wolfcrypt/src/port/Espressif/esp32_mp.c +++ b/wolfcrypt/src/port/Espressif/esp32_mp.c @@ -1,6 +1,6 @@ /* esp32_mp.c * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/wolfcrypt/src/port/Espressif/esp32_sha.c b/wolfcrypt/src/port/Espressif/esp32_sha.c index 57377aef6..94789cd64 100644 --- a/wolfcrypt/src/port/Espressif/esp32_sha.c +++ b/wolfcrypt/src/port/Espressif/esp32_sha.c @@ -1,6 +1,6 @@ /* esp32_sha.c * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/wolfcrypt/src/port/Espressif/esp32_util.c b/wolfcrypt/src/port/Espressif/esp32_util.c index ac3c0de35..b501b5ea6 100644 --- a/wolfcrypt/src/port/Espressif/esp32_util.c +++ b/wolfcrypt/src/port/Espressif/esp32_util.c @@ -1,6 +1,6 @@ /* esp32_util.c * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/wolfcrypt/src/port/Renesas/renesas_tsip_aes.c b/wolfcrypt/src/port/Renesas/renesas_tsip_aes.c index d2d46bea1..ce04ff54f 100644 --- a/wolfcrypt/src/port/Renesas/renesas_tsip_aes.c +++ b/wolfcrypt/src/port/Renesas/renesas_tsip_aes.c @@ -1,6 +1,6 @@ /* renesas_tsip_aes.c * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/wolfcrypt/src/port/Renesas/renesas_tsip_sha.c b/wolfcrypt/src/port/Renesas/renesas_tsip_sha.c index b9d212a4e..b12d8eee9 100644 --- a/wolfcrypt/src/port/Renesas/renesas_tsip_sha.c +++ b/wolfcrypt/src/port/Renesas/renesas_tsip_sha.c @@ -1,6 +1,6 @@ /* renesas_tsip_sha.c * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/wolfcrypt/src/port/Renesas/renesas_tsip_util.c b/wolfcrypt/src/port/Renesas/renesas_tsip_util.c index 0dd6aa75b..d87a0179b 100644 --- a/wolfcrypt/src/port/Renesas/renesas_tsip_util.c +++ b/wolfcrypt/src/port/Renesas/renesas_tsip_util.c @@ -1,6 +1,6 @@ /* renesas_tsip_util.c * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/wolfcrypt/src/port/af_alg/afalg_aes.c b/wolfcrypt/src/port/af_alg/afalg_aes.c index 1a05ccb9e..2d1d41a6a 100644 --- a/wolfcrypt/src/port/af_alg/afalg_aes.c +++ b/wolfcrypt/src/port/af_alg/afalg_aes.c @@ -1,6 +1,6 @@ /* afalg_aes.c * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/wolfcrypt/src/port/af_alg/afalg_hash.c b/wolfcrypt/src/port/af_alg/afalg_hash.c index 917ced829..41e57bc80 100644 --- a/wolfcrypt/src/port/af_alg/afalg_hash.c +++ b/wolfcrypt/src/port/af_alg/afalg_hash.c @@ -1,6 +1,6 @@ /* afalg_hash.c * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/wolfcrypt/src/port/af_alg/wc_afalg.c b/wolfcrypt/src/port/af_alg/wc_afalg.c index 6c6983415..0a91b5180 100644 --- a/wolfcrypt/src/port/af_alg/wc_afalg.c +++ b/wolfcrypt/src/port/af_alg/wc_afalg.c @@ -1,6 +1,6 @@ /* wc_afalg.c * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/wolfcrypt/src/port/arm/armv8-32-curve25519.S b/wolfcrypt/src/port/arm/armv8-32-curve25519.S index fde159fd2..6fd1ed3f2 100644 --- a/wolfcrypt/src/port/arm/armv8-32-curve25519.S +++ b/wolfcrypt/src/port/arm/armv8-32-curve25519.S @@ -1,6 +1,6 @@ /* armv8-32-curve25519 * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/wolfcrypt/src/port/arm/armv8-32-curve25519.c b/wolfcrypt/src/port/arm/armv8-32-curve25519.c index ade2b62cb..f7ef3795c 100644 --- a/wolfcrypt/src/port/arm/armv8-32-curve25519.c +++ b/wolfcrypt/src/port/arm/armv8-32-curve25519.c @@ -1,6 +1,6 @@ /* armv8-32-curve25519 * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/wolfcrypt/src/port/arm/armv8-32-sha512-asm.S b/wolfcrypt/src/port/arm/armv8-32-sha512-asm.S index 5107d3c80..d2b899c12 100644 --- a/wolfcrypt/src/port/arm/armv8-32-sha512-asm.S +++ b/wolfcrypt/src/port/arm/armv8-32-sha512-asm.S @@ -1,6 +1,6 @@ /* armv8-32-sha512-asm * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/wolfcrypt/src/port/arm/armv8-32-sha512-asm.c b/wolfcrypt/src/port/arm/armv8-32-sha512-asm.c index 3bfbb7d42..c502a3997 100644 --- a/wolfcrypt/src/port/arm/armv8-32-sha512-asm.c +++ b/wolfcrypt/src/port/arm/armv8-32-sha512-asm.c @@ -1,6 +1,6 @@ /* armv8-32-sha512-asm * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/wolfcrypt/src/port/arm/armv8-aes.c b/wolfcrypt/src/port/arm/armv8-aes.c index 3170113b3..d0f8a9c5c 100644 --- a/wolfcrypt/src/port/arm/armv8-aes.c +++ b/wolfcrypt/src/port/arm/armv8-aes.c @@ -1,6 +1,6 @@ /* armv8-aes.c * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/wolfcrypt/src/port/arm/armv8-chacha.c b/wolfcrypt/src/port/arm/armv8-chacha.c index 0e343f2a3..d1118a4ba 100644 --- a/wolfcrypt/src/port/arm/armv8-chacha.c +++ b/wolfcrypt/src/port/arm/armv8-chacha.c @@ -1,6 +1,6 @@ /* armv8-chacha.c * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/wolfcrypt/src/port/arm/armv8-curve25519.S b/wolfcrypt/src/port/arm/armv8-curve25519.S index f68ccfca4..891c6d815 100644 --- a/wolfcrypt/src/port/arm/armv8-curve25519.S +++ b/wolfcrypt/src/port/arm/armv8-curve25519.S @@ -1,6 +1,6 @@ /* armv8-curve25519 * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/wolfcrypt/src/port/arm/armv8-curve25519.c b/wolfcrypt/src/port/arm/armv8-curve25519.c index 6c62a50dc..4d8a3ae08 100644 --- a/wolfcrypt/src/port/arm/armv8-curve25519.c +++ b/wolfcrypt/src/port/arm/armv8-curve25519.c @@ -1,6 +1,6 @@ /* armv8-curve25519 * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/wolfcrypt/src/port/arm/armv8-poly1305.c b/wolfcrypt/src/port/arm/armv8-poly1305.c index b257c8b45..3df07f701 100644 --- a/wolfcrypt/src/port/arm/armv8-poly1305.c +++ b/wolfcrypt/src/port/arm/armv8-poly1305.c @@ -1,6 +1,6 @@ /* armv8-poly1305.c * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/wolfcrypt/src/port/arm/armv8-sha256.c b/wolfcrypt/src/port/arm/armv8-sha256.c index 00402d876..42a64c36e 100644 --- a/wolfcrypt/src/port/arm/armv8-sha256.c +++ b/wolfcrypt/src/port/arm/armv8-sha256.c @@ -1,6 +1,6 @@ /* armv8-sha256.c * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/wolfcrypt/src/port/arm/armv8-sha512-asm.S b/wolfcrypt/src/port/arm/armv8-sha512-asm.S index ba2744acb..a35bccbda 100644 --- a/wolfcrypt/src/port/arm/armv8-sha512-asm.S +++ b/wolfcrypt/src/port/arm/armv8-sha512-asm.S @@ -1,6 +1,6 @@ /* armv8-sha512-asm * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/wolfcrypt/src/port/arm/armv8-sha512-asm.c b/wolfcrypt/src/port/arm/armv8-sha512-asm.c index fa490c635..d47d966d3 100644 --- a/wolfcrypt/src/port/arm/armv8-sha512-asm.c +++ b/wolfcrypt/src/port/arm/armv8-sha512-asm.c @@ -1,6 +1,6 @@ /* armv8-sha512-asm * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/wolfcrypt/src/port/arm/armv8-sha512.c b/wolfcrypt/src/port/arm/armv8-sha512.c index eab85863d..e909c7c25 100644 --- a/wolfcrypt/src/port/arm/armv8-sha512.c +++ b/wolfcrypt/src/port/arm/armv8-sha512.c @@ -1,6 +1,6 @@ /* sha512.c * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/wolfcrypt/src/port/arm/cryptoCell.c b/wolfcrypt/src/port/arm/cryptoCell.c index 3a6e12513..c3bd2d9c5 100644 --- a/wolfcrypt/src/port/arm/cryptoCell.c +++ b/wolfcrypt/src/port/arm/cryptoCell.c @@ -1,6 +1,6 @@ /* cryptoCell.c * - * Copyright (C) 2019 wolfSSL Inc. + * Copyright (C) 2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/wolfcrypt/src/port/arm/cryptoCellHash.c b/wolfcrypt/src/port/arm/cryptoCellHash.c index 8796e1eeb..bc729f7f0 100644 --- a/wolfcrypt/src/port/arm/cryptoCellHash.c +++ b/wolfcrypt/src/port/arm/cryptoCellHash.c @@ -1,6 +1,6 @@ /* cryptoCellHash.c * - * Copyright (C) 2019 wolfSSL Inc. + * Copyright (C) 2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/wolfcrypt/src/port/atmel/atmel.c b/wolfcrypt/src/port/atmel/atmel.c index a7f335b5e..cfe0a93c7 100644 --- a/wolfcrypt/src/port/atmel/atmel.c +++ b/wolfcrypt/src/port/atmel/atmel.c @@ -1,6 +1,6 @@ /* atmel.c * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/wolfcrypt/src/port/caam/caam_aes.c b/wolfcrypt/src/port/caam/caam_aes.c index a0c0cef59..e00214df3 100644 --- a/wolfcrypt/src/port/caam/caam_aes.c +++ b/wolfcrypt/src/port/caam/caam_aes.c @@ -1,6 +1,6 @@ /* caam_aes.c * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/wolfcrypt/src/port/caam/caam_driver.c b/wolfcrypt/src/port/caam/caam_driver.c index 64e67edd0..5d44f2da8 100644 --- a/wolfcrypt/src/port/caam/caam_driver.c +++ b/wolfcrypt/src/port/caam/caam_driver.c @@ -1,6 +1,6 @@ /* caam_driver.c * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/wolfcrypt/src/port/caam/caam_init.c b/wolfcrypt/src/port/caam/caam_init.c index 3328c9805..014341cd6 100644 --- a/wolfcrypt/src/port/caam/caam_init.c +++ b/wolfcrypt/src/port/caam/caam_init.c @@ -1,6 +1,6 @@ /* caam_init.c * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/wolfcrypt/src/port/caam/caam_sha.c b/wolfcrypt/src/port/caam/caam_sha.c index ce42678a5..74d62fb97 100644 --- a/wolfcrypt/src/port/caam/caam_sha.c +++ b/wolfcrypt/src/port/caam/caam_sha.c @@ -1,6 +1,6 @@ /* caam_sha.c * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/wolfcrypt/src/port/cavium/cavium_octeon_sync.c b/wolfcrypt/src/port/cavium/cavium_octeon_sync.c index 105b9c0fa..078e8cb52 100644 --- a/wolfcrypt/src/port/cavium/cavium_octeon_sync.c +++ b/wolfcrypt/src/port/cavium/cavium_octeon_sync.c @@ -1,6 +1,6 @@ /* cavium_octeon_sync.c * - * Copyright(C) 2006-2019 wolfSSL Inc. + * Copyright(C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL.(formerly known as CyaSSL) * diff --git a/wolfcrypt/src/port/devcrypto/devcrypto_aes.c b/wolfcrypt/src/port/devcrypto/devcrypto_aes.c index d5061f364..1f6d09d72 100644 --- a/wolfcrypt/src/port/devcrypto/devcrypto_aes.c +++ b/wolfcrypt/src/port/devcrypto/devcrypto_aes.c @@ -1,6 +1,6 @@ /* devcrypto_aes.c * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/wolfcrypt/src/port/devcrypto/devcrypto_hash.c b/wolfcrypt/src/port/devcrypto/devcrypto_hash.c index 094d7b719..f73224dd8 100644 --- a/wolfcrypt/src/port/devcrypto/devcrypto_hash.c +++ b/wolfcrypt/src/port/devcrypto/devcrypto_hash.c @@ -1,6 +1,6 @@ /* devcrypto_hash.c * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/wolfcrypt/src/port/devcrypto/wc_devcrypto.c b/wolfcrypt/src/port/devcrypto/wc_devcrypto.c index 547c02fc6..2c80518a3 100644 --- a/wolfcrypt/src/port/devcrypto/wc_devcrypto.c +++ b/wolfcrypt/src/port/devcrypto/wc_devcrypto.c @@ -1,6 +1,6 @@ /* wc_devcrypto.c * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/wolfcrypt/src/port/intel/quickassist_sync.c b/wolfcrypt/src/port/intel/quickassist_sync.c index a148d0b83..4bb50085c 100644 --- a/wolfcrypt/src/port/intel/quickassist_sync.c +++ b/wolfcrypt/src/port/intel/quickassist_sync.c @@ -1,6 +1,6 @@ /* quickassist_sync.c * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. (formerly known as CyaSSL) * diff --git a/wolfcrypt/src/port/mynewt/mynewt_port.c b/wolfcrypt/src/port/mynewt/mynewt_port.c index 77900402b..0bd92e612 100644 --- a/wolfcrypt/src/port/mynewt/mynewt_port.c +++ b/wolfcrypt/src/port/mynewt/mynewt_port.c @@ -1,6 +1,6 @@ /* mynewt_port.c * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/wolfcrypt/src/port/nrf51.c b/wolfcrypt/src/port/nrf51.c index 878b32a54..c7db4b067 100644 --- a/wolfcrypt/src/port/nrf51.c +++ b/wolfcrypt/src/port/nrf51.c @@ -1,6 +1,6 @@ /* nrf51.c * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/wolfcrypt/src/port/nxp/ksdk_port.c b/wolfcrypt/src/port/nxp/ksdk_port.c index a9c9a3adf..f313a59ce 100644 --- a/wolfcrypt/src/port/nxp/ksdk_port.c +++ b/wolfcrypt/src/port/nxp/ksdk_port.c @@ -1,6 +1,6 @@ /* ksdk_port.c * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/wolfcrypt/src/port/pic32/pic32mz-crypt.c b/wolfcrypt/src/port/pic32/pic32mz-crypt.c index 0dd73189d..319e6ca3a 100644 --- a/wolfcrypt/src/port/pic32/pic32mz-crypt.c +++ b/wolfcrypt/src/port/pic32/pic32mz-crypt.c @@ -1,6 +1,6 @@ /* pic32mz-crypt.c * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/wolfcrypt/src/port/st/stm32.c b/wolfcrypt/src/port/st/stm32.c index 2108a0cba..5e2ca9a39 100644 --- a/wolfcrypt/src/port/st/stm32.c +++ b/wolfcrypt/src/port/st/stm32.c @@ -1,6 +1,6 @@ /* stm32.c * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/wolfcrypt/src/port/st/stsafe.c b/wolfcrypt/src/port/st/stsafe.c index 2ab74130f..239b159ae 100644 --- a/wolfcrypt/src/port/st/stsafe.c +++ b/wolfcrypt/src/port/st/stsafe.c @@ -1,6 +1,6 @@ /* stsafe.c * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/wolfcrypt/src/port/ti/ti-aes.c b/wolfcrypt/src/port/ti/ti-aes.c index d15f5229b..52f2ceb97 100644 --- a/wolfcrypt/src/port/ti/ti-aes.c +++ b/wolfcrypt/src/port/ti/ti-aes.c @@ -1,6 +1,6 @@ /* port/ti/ti-aes.c * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/wolfcrypt/src/port/ti/ti-ccm.c b/wolfcrypt/src/port/ti/ti-ccm.c index be5f217a4..5c0051e03 100644 --- a/wolfcrypt/src/port/ti/ti-ccm.c +++ b/wolfcrypt/src/port/ti/ti-ccm.c @@ -1,6 +1,6 @@ /* port/ti/ti_ccm.c * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/wolfcrypt/src/port/ti/ti-des3.c b/wolfcrypt/src/port/ti/ti-des3.c index 34f130b9f..0e3c81dcd 100644 --- a/wolfcrypt/src/port/ti/ti-des3.c +++ b/wolfcrypt/src/port/ti/ti-des3.c @@ -1,6 +1,6 @@ /* port/ti/ti-des.c * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/wolfcrypt/src/port/ti/ti-hash.c b/wolfcrypt/src/port/ti/ti-hash.c index a350e6ac1..ab8f2cc22 100644 --- a/wolfcrypt/src/port/ti/ti-hash.c +++ b/wolfcrypt/src/port/ti/ti-hash.c @@ -1,6 +1,6 @@ /* port/ti/ti-hash.c * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/wolfcrypt/src/port/xilinx/xil-aesgcm.c b/wolfcrypt/src/port/xilinx/xil-aesgcm.c index c8f570828..ef51cd14b 100644 --- a/wolfcrypt/src/port/xilinx/xil-aesgcm.c +++ b/wolfcrypt/src/port/xilinx/xil-aesgcm.c @@ -1,6 +1,6 @@ /* xil-aesgcm.c * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/wolfcrypt/src/port/xilinx/xil-sha3.c b/wolfcrypt/src/port/xilinx/xil-sha3.c index 8aff8926b..a9db6b955 100644 --- a/wolfcrypt/src/port/xilinx/xil-sha3.c +++ b/wolfcrypt/src/port/xilinx/xil-sha3.c @@ -1,6 +1,6 @@ /* xil-sha3.c * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/wolfcrypt/src/pwdbased.c b/wolfcrypt/src/pwdbased.c index 5c194de64..c672c2285 100644 --- a/wolfcrypt/src/pwdbased.c +++ b/wolfcrypt/src/pwdbased.c @@ -1,6 +1,6 @@ /* pwdbased.c * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/wolfcrypt/src/rabbit.c b/wolfcrypt/src/rabbit.c index f3357e41e..820fd0ac3 100644 --- a/wolfcrypt/src/rabbit.c +++ b/wolfcrypt/src/rabbit.c @@ -1,6 +1,6 @@ /* rabbit.c * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/wolfcrypt/src/random.c b/wolfcrypt/src/random.c index 501237abe..a9dcac362 100644 --- a/wolfcrypt/src/random.c +++ b/wolfcrypt/src/random.c @@ -1,6 +1,6 @@ /* random.c * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/wolfcrypt/src/ripemd.c b/wolfcrypt/src/ripemd.c index 670b318a7..484c62fe4 100644 --- a/wolfcrypt/src/ripemd.c +++ b/wolfcrypt/src/ripemd.c @@ -1,6 +1,6 @@ /* ripemd.c * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/wolfcrypt/src/rsa.c b/wolfcrypt/src/rsa.c index f3d606899..2f0595cba 100644 --- a/wolfcrypt/src/rsa.c +++ b/wolfcrypt/src/rsa.c @@ -1,6 +1,6 @@ /* rsa.c * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * @@ -4018,13 +4018,42 @@ int wc_MakeRsaKey(RsaKey* key, int size, long e, WC_RNG* rng) err = mp_sub_d(&p, 1, &tmp1); if (err == MP_OKAY) /* tmp2 = q-1 */ err = mp_sub_d(&q, 1, &tmp2); +#ifndef WC_RSA_BLINDING + if (err == MP_OKAY) /* tmp3 = order of n */ + err = mp_mul(&tmp1, &tmp2, &tmp3); +#else if (err == MP_OKAY) /* tmp3 = lcm(p-1, q-1), last loop */ err = mp_lcm(&tmp1, &tmp2, &tmp3); +#endif /* make key */ if (err == MP_OKAY) /* key->e = e */ err = mp_set_int(&key->e, (mp_digit)e); +#ifdef WC_RSA_BLINDING + /* Blind the inverse operation with a value that is invertable */ + if (err == MP_OKAY) { + do { + err = mp_rand(&key->p, get_digit_count(&tmp3), rng); + if (err == MP_OKAY) + err = mp_set_bit(&key->p, 0); + if (err == MP_OKAY) + err = mp_set_bit(&key->p, size - 1); + if (err == MP_OKAY) + err = mp_gcd(&key->p, &tmp3, &key->q); + } + while ((err == MP_OKAY) && !mp_isone(&key->q)); + } + if (err == MP_OKAY) + err = mp_mul_d(&key->p, (mp_digit)e, &key->e); +#endif if (err == MP_OKAY) /* key->d = 1/e mod lcm(p-1, q-1) */ err = mp_invmod(&key->e, &tmp3, &key->d); +#ifdef WC_RSA_BLINDING + /* Take off blinding from d and reset e */ + if (err == MP_OKAY) + err = mp_mulmod(&key->d, &key->p, &tmp3, &key->d); + if (err == MP_OKAY) + err = mp_set_int(&key->e, (mp_digit)e); +#endif if (err == MP_OKAY) /* key->n = pq */ err = mp_mul(&p, &q, &key->n); if (err == MP_OKAY) /* key->dP = d mod(p-1) */ diff --git a/wolfcrypt/src/sha.c b/wolfcrypt/src/sha.c index 303acfa6f..5c80563e1 100644 --- a/wolfcrypt/src/sha.c +++ b/wolfcrypt/src/sha.c @@ -1,6 +1,6 @@ /* sha.c * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/wolfcrypt/src/sha256.c b/wolfcrypt/src/sha256.c index 47cc0eaf2..de49e3283 100644 --- a/wolfcrypt/src/sha256.c +++ b/wolfcrypt/src/sha256.c @@ -1,6 +1,6 @@ /* sha256.c * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * @@ -410,6 +410,7 @@ static int InitSha256(wc_Sha256* sha256) if (ret != 0) { return ret; } + #ifdef FREESCALE_MMCAU_CLASSIC_SHA cau_sha256_initialize_output(sha256->digest); #else @@ -420,6 +421,9 @@ static int InitSha256(wc_Sha256* sha256) sha256->buffLen = 0; sha256->loLen = 0; sha256->hiLen = 0; + #ifdef WOLFSSL_SMALL_STACK_CACHE + sha256->W = NULL; + #endif return ret; } diff --git a/wolfcrypt/src/sha256_asm.S b/wolfcrypt/src/sha256_asm.S index 5ea7e0ad0..c433d341c 100644 --- a/wolfcrypt/src/sha256_asm.S +++ b/wolfcrypt/src/sha256_asm.S @@ -1,6 +1,6 @@ /* sha256_asm * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/wolfcrypt/src/sha3.c b/wolfcrypt/src/sha3.c index ef9a9a6f4..4e6ec6e41 100644 --- a/wolfcrypt/src/sha3.c +++ b/wolfcrypt/src/sha3.c @@ -1,6 +1,6 @@ /* sha3.c * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/wolfcrypt/src/sha512.c b/wolfcrypt/src/sha512.c index 62b6c7d52..9bbc003f3 100644 --- a/wolfcrypt/src/sha512.c +++ b/wolfcrypt/src/sha512.c @@ -1,6 +1,6 @@ /* sha512.c * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/wolfcrypt/src/sha512_asm.S b/wolfcrypt/src/sha512_asm.S index c0afb3dc5..6a27ce42a 100644 --- a/wolfcrypt/src/sha512_asm.S +++ b/wolfcrypt/src/sha512_asm.S @@ -1,6 +1,6 @@ /* sha512_asm * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/wolfcrypt/src/signature.c b/wolfcrypt/src/signature.c index 0c260100c..07c9b409e 100644 --- a/wolfcrypt/src/signature.c +++ b/wolfcrypt/src/signature.c @@ -1,6 +1,6 @@ /* signature.c * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/wolfcrypt/src/sp_arm32.c b/wolfcrypt/src/sp_arm32.c index 486d5b8e1..3fad88e18 100644 --- a/wolfcrypt/src/sp_arm32.c +++ b/wolfcrypt/src/sp_arm32.c @@ -1,6 +1,6 @@ /* sp.c * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/wolfcrypt/src/sp_arm64.c b/wolfcrypt/src/sp_arm64.c index 216258b80..0778575c9 100644 --- a/wolfcrypt/src/sp_arm64.c +++ b/wolfcrypt/src/sp_arm64.c @@ -1,6 +1,6 @@ /* sp.c * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/wolfcrypt/src/sp_armthumb.c b/wolfcrypt/src/sp_armthumb.c index ac3e4769e..3aca80b66 100644 --- a/wolfcrypt/src/sp_armthumb.c +++ b/wolfcrypt/src/sp_armthumb.c @@ -1,6 +1,6 @@ /* sp.c * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/wolfcrypt/src/sp_c32.c b/wolfcrypt/src/sp_c32.c index 98d6da599..f7aae3d5d 100644 --- a/wolfcrypt/src/sp_c32.c +++ b/wolfcrypt/src/sp_c32.c @@ -1,6 +1,6 @@ /* sp.c * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * @@ -3859,11 +3859,14 @@ int sp_ModExp_2048(mp_int* base, mp_int* exp, mp_int* mod, mp_int* res) err = sp_2048_to_mp(r, res); } - XMEMSET(e, 0, sizeof(sp_digit) * 90U); #ifdef WOLFSSL_SMALL_STACK - if (d != NULL) + if (d != NULL) { + XMEMSET(e, 0, sizeof(sp_digit) * 90U); XFREE(d, NULL, DYNAMIC_TYPE_DH); + } +#else + XMEMSET(e, 0, sizeof(sp_digit) * 90U); #endif return err; @@ -4105,12 +4108,13 @@ static int sp_2048_mod_exp_2_90(sp_digit* r, const sp_digit* e, int bits, const #ifdef WOLFSSL_SMALL_STACK norm = td; tmp = td + 180; + XMEMSET(td, 0, sizeof(sp_digit) * 271); #else norm = nd; tmp = td; + XMEMSET(td, 0, sizeof(td)); #endif - XMEMSET(td, 0, sizeof(td)); sp_2048_mont_setup(m, &mp); sp_2048_mont_norm_90(norm, m); @@ -4332,11 +4336,13 @@ int sp_DhExp_2048(mp_int* base, const byte* exp, word32 expLen, XMEMMOVE(out, out + i, *outLen); } - XMEMSET(e, 0, sizeof(sp_digit) * 90U); - #ifdef WOLFSSL_SMALL_STACK - if (d != NULL) + if (d != NULL) { + XMEMSET(e, 0, sizeof(sp_digit) * 90U); XFREE(d, NULL, DYNAMIC_TYPE_DH); + } +#else + XMEMSET(e, 0, sizeof(sp_digit) * 90U); #endif return err; @@ -4471,11 +4477,14 @@ int sp_ModExp_1024(mp_int* base, mp_int* exp, mp_int* mod, mp_int* res) err = sp_2048_to_mp(r, res); } - XMEMSET(e, 0, sizeof(sp_digit) * 45U); #ifdef WOLFSSL_SMALL_STACK - if (d != NULL) + if (d != NULL) { + XMEMSET(e, 0, sizeof(sp_digit) * 45U); XFREE(d, NULL, DYNAMIC_TYPE_DH); + } +#else + XMEMSET(e, 0, sizeof(sp_digit) * 45U); #endif return err; @@ -7723,11 +7732,14 @@ int sp_ModExp_3072(mp_int* base, mp_int* exp, mp_int* mod, mp_int* res) err = sp_3072_to_mp(r, res); } - XMEMSET(e, 0, sizeof(sp_digit) * 134U); #ifdef WOLFSSL_SMALL_STACK - if (d != NULL) + if (d != NULL) { + XMEMSET(e, 0, sizeof(sp_digit) * 134U); XFREE(d, NULL, DYNAMIC_TYPE_DH); + } +#else + XMEMSET(e, 0, sizeof(sp_digit) * 134U); #endif return err; @@ -8057,12 +8069,13 @@ static int sp_3072_mod_exp_2_134(sp_digit* r, const sp_digit* e, int bits, const #ifdef WOLFSSL_SMALL_STACK norm = td; tmp = td + 268; + XMEMSET(td, 0, sizeof(sp_digit) * 403); #else norm = nd; tmp = td; + XMEMSET(td, 0, sizeof(td)); #endif - XMEMSET(td, 0, sizeof(td)); sp_3072_mont_setup(m, &mp); sp_3072_mont_norm_134(norm, m); @@ -8284,11 +8297,13 @@ int sp_DhExp_3072(mp_int* base, const byte* exp, word32 expLen, XMEMMOVE(out, out + i, *outLen); } - XMEMSET(e, 0, sizeof(sp_digit) * 134U); - #ifdef WOLFSSL_SMALL_STACK - if (d != NULL) + if (d != NULL) { + XMEMSET(e, 0, sizeof(sp_digit) * 134U); XFREE(d, NULL, DYNAMIC_TYPE_DH); + } +#else + XMEMSET(e, 0, sizeof(sp_digit) * 134U); #endif return err; @@ -8423,11 +8438,14 @@ int sp_ModExp_1536(mp_int* base, mp_int* exp, mp_int* mod, mp_int* res) err = sp_3072_to_mp(r, res); } - XMEMSET(e, 0, sizeof(sp_digit) * 67U); #ifdef WOLFSSL_SMALL_STACK - if (d != NULL) + if (d != NULL) { + XMEMSET(e, 0, sizeof(sp_digit) * 67U); XFREE(d, NULL, DYNAMIC_TYPE_DH); + } +#else + XMEMSET(e, 0, sizeof(sp_digit) * 67U); #endif return err; @@ -11746,11 +11764,14 @@ int sp_ModExp_4096(mp_int* base, mp_int* exp, mp_int* mod, mp_int* res) err = sp_4096_to_mp(r, res); } - XMEMSET(e, 0, sizeof(sp_digit) * 196U); #ifdef WOLFSSL_SMALL_STACK - if (d != NULL) + if (d != NULL) { + XMEMSET(e, 0, sizeof(sp_digit) * 196U); XFREE(d, NULL, DYNAMIC_TYPE_DH); + } +#else + XMEMSET(e, 0, sizeof(sp_digit) * 196U); #endif return err; @@ -12204,12 +12225,13 @@ static int sp_4096_mod_exp_2_196(sp_digit* r, const sp_digit* e, int bits, const #ifdef WOLFSSL_SMALL_STACK norm = td; tmp = td + 392; + XMEMSET(td, 0, sizeof(sp_digit) * 589); #else norm = nd; tmp = td; + XMEMSET(td, 0, sizeof(td)); #endif - XMEMSET(td, 0, sizeof(td)); sp_4096_mont_setup(m, &mp); sp_4096_mont_norm_196(norm, m); @@ -12431,11 +12453,13 @@ int sp_DhExp_4096(mp_int* base, const byte* exp, word32 expLen, XMEMMOVE(out, out + i, *outLen); } - XMEMSET(e, 0, sizeof(sp_digit) * 196U); - #ifdef WOLFSSL_SMALL_STACK - if (d != NULL) + if (d != NULL) { + XMEMSET(e, 0, sizeof(sp_digit) * 196U); XFREE(d, NULL, DYNAMIC_TYPE_DH); + } +#else + XMEMSET(e, 0, sizeof(sp_digit) * 196U); #endif return err; diff --git a/wolfcrypt/src/sp_c64.c b/wolfcrypt/src/sp_c64.c index 6b6392ff7..ca98ecb27 100644 --- a/wolfcrypt/src/sp_c64.c +++ b/wolfcrypt/src/sp_c64.c @@ -1,6 +1,6 @@ /* sp.c * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * @@ -3402,11 +3402,14 @@ int sp_ModExp_2048(mp_int* base, mp_int* exp, mp_int* mod, mp_int* res) err = sp_2048_to_mp(r, res); } - XMEMSET(e, 0, sizeof(sp_digit) * 36U); #ifdef WOLFSSL_SMALL_STACK - if (d != NULL) + if (d != NULL) { + XMEMSET(e, 0, sizeof(sp_digit) * 36U); XFREE(d, NULL, DYNAMIC_TYPE_DH); + } +#else + XMEMSET(e, 0, sizeof(sp_digit) * 36U); #endif return err; @@ -3540,12 +3543,13 @@ static int sp_2048_mod_exp_2_36(sp_digit* r, const sp_digit* e, int bits, const #ifdef WOLFSSL_SMALL_STACK norm = td; tmp = td + 72; + XMEMSET(td, 0, sizeof(sp_digit) * 109); #else norm = nd; tmp = td; + XMEMSET(td, 0, sizeof(td)); #endif - XMEMSET(td, 0, sizeof(td)); sp_2048_mont_setup(m, &mp); sp_2048_mont_norm_36(norm, m); @@ -3768,11 +3772,13 @@ int sp_DhExp_2048(mp_int* base, const byte* exp, word32 expLen, XMEMMOVE(out, out + i, *outLen); } - XMEMSET(e, 0, sizeof(sp_digit) * 36U); - #ifdef WOLFSSL_SMALL_STACK - if (d != NULL) + if (d != NULL) { + XMEMSET(e, 0, sizeof(sp_digit) * 36U); XFREE(d, NULL, DYNAMIC_TYPE_DH); + } +#else + XMEMSET(e, 0, sizeof(sp_digit) * 36U); #endif return err; @@ -3907,11 +3913,14 @@ int sp_ModExp_1024(mp_int* base, mp_int* exp, mp_int* mod, mp_int* res) err = sp_2048_to_mp(r, res); } - XMEMSET(e, 0, sizeof(sp_digit) * 18U); #ifdef WOLFSSL_SMALL_STACK - if (d != NULL) + if (d != NULL) { + XMEMSET(e, 0, sizeof(sp_digit) * 18U); XFREE(d, NULL, DYNAMIC_TYPE_DH); + } +#else + XMEMSET(e, 0, sizeof(sp_digit) * 18U); #endif return err; @@ -7446,11 +7455,14 @@ int sp_ModExp_3072(mp_int* base, mp_int* exp, mp_int* mod, mp_int* res) err = sp_3072_to_mp(r, res); } - XMEMSET(e, 0, sizeof(sp_digit) * 54U); #ifdef WOLFSSL_SMALL_STACK - if (d != NULL) + if (d != NULL) { + XMEMSET(e, 0, sizeof(sp_digit) * 54U); XFREE(d, NULL, DYNAMIC_TYPE_DH); + } +#else + XMEMSET(e, 0, sizeof(sp_digit) * 54U); #endif return err; @@ -7620,12 +7632,13 @@ static int sp_3072_mod_exp_2_54(sp_digit* r, const sp_digit* e, int bits, const #ifdef WOLFSSL_SMALL_STACK norm = td; tmp = td + 108; + XMEMSET(td, 0, sizeof(sp_digit) * 163); #else norm = nd; tmp = td; + XMEMSET(td, 0, sizeof(td)); #endif - XMEMSET(td, 0, sizeof(td)); sp_3072_mont_setup(m, &mp); sp_3072_mont_norm_54(norm, m); @@ -7848,11 +7861,13 @@ int sp_DhExp_3072(mp_int* base, const byte* exp, word32 expLen, XMEMMOVE(out, out + i, *outLen); } - XMEMSET(e, 0, sizeof(sp_digit) * 54U); - #ifdef WOLFSSL_SMALL_STACK - if (d != NULL) + if (d != NULL) { + XMEMSET(e, 0, sizeof(sp_digit) * 54U); XFREE(d, NULL, DYNAMIC_TYPE_DH); + } +#else + XMEMSET(e, 0, sizeof(sp_digit) * 54U); #endif return err; @@ -7987,11 +8002,14 @@ int sp_ModExp_1536(mp_int* base, mp_int* exp, mp_int* mod, mp_int* res) err = sp_3072_to_mp(r, res); } - XMEMSET(e, 0, sizeof(sp_digit) * 27U); #ifdef WOLFSSL_SMALL_STACK - if (d != NULL) + if (d != NULL) { + XMEMSET(e, 0, sizeof(sp_digit) * 27U); XFREE(d, NULL, DYNAMIC_TYPE_DH); + } +#else + XMEMSET(e, 0, sizeof(sp_digit) * 27U); #endif return err; @@ -11799,11 +11817,14 @@ int sp_ModExp_4096(mp_int* base, mp_int* exp, mp_int* mod, mp_int* res) err = sp_4096_to_mp(r, res); } - XMEMSET(e, 0, sizeof(sp_digit) * 78U); #ifdef WOLFSSL_SMALL_STACK - if (d != NULL) + if (d != NULL) { + XMEMSET(e, 0, sizeof(sp_digit) * 78U); XFREE(d, NULL, DYNAMIC_TYPE_DH); + } +#else + XMEMSET(e, 0, sizeof(sp_digit) * 78U); #endif return err; @@ -12021,12 +12042,13 @@ static int sp_4096_mod_exp_2_78(sp_digit* r, const sp_digit* e, int bits, const #ifdef WOLFSSL_SMALL_STACK norm = td; tmp = td + 156; + XMEMSET(td, 0, sizeof(sp_digit) * 235); #else norm = nd; tmp = td; + XMEMSET(td, 0, sizeof(td)); #endif - XMEMSET(td, 0, sizeof(td)); sp_4096_mont_setup(m, &mp); sp_4096_mont_norm_78(norm, m); @@ -12249,11 +12271,13 @@ int sp_DhExp_4096(mp_int* base, const byte* exp, word32 expLen, XMEMMOVE(out, out + i, *outLen); } - XMEMSET(e, 0, sizeof(sp_digit) * 78U); - #ifdef WOLFSSL_SMALL_STACK - if (d != NULL) + if (d != NULL) { + XMEMSET(e, 0, sizeof(sp_digit) * 78U); XFREE(d, NULL, DYNAMIC_TYPE_DH); + } +#else + XMEMSET(e, 0, sizeof(sp_digit) * 78U); #endif return err; diff --git a/wolfcrypt/src/sp_cortexm.c b/wolfcrypt/src/sp_cortexm.c index 1c57daa70..a8679d977 100644 --- a/wolfcrypt/src/sp_cortexm.c +++ b/wolfcrypt/src/sp_cortexm.c @@ -1,6 +1,6 @@ /* sp.c * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * @@ -224,475 +224,475 @@ SP_NOINLINE static void sp_2048_mul_8(sp_digit* r, const sp_digit* a, __asm__ __volatile__ ( /* A[0] * B[0] */ "ldr r6, [%[a], #0]\n\t" - "ldr r7, [%[b], #0]\n\t" - "umull r3, r4, r6, r7\n\t" + "ldr r8, [%[b], #0]\n\t" + "umull r3, r4, r6, r8\n\t" "mov r5, #0\n\t" "str r3, [%[tmp], #0]\n\t" "mov r3, #0\n\t" /* A[0] * B[1] */ - "ldr r7, [%[b], #4]\n\t" - "umull r6, r7, r6, r7\n\t" + "ldr r8, [%[b], #4]\n\t" + "umull r6, r8, r6, r8\n\t" "adds r4, r4, r6\n\t" - "adc r5, r5, r7\n\t" + "adc r5, r5, r8\n\t" /* A[1] * B[0] */ "ldr r6, [%[a], #4]\n\t" - "ldr r7, [%[b], #0]\n\t" - "umull r6, r7, r6, r7\n\t" + "ldr r8, [%[b], #0]\n\t" + "umull r6, r8, r6, r8\n\t" "adds r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "adc r3, r3, #0\n\t" "str r4, [%[tmp], #4]\n\t" "mov r4, #0\n\t" /* A[0] * B[2] */ "ldr r6, [%[a], #0]\n\t" - "ldr r7, [%[b], #8]\n\t" - "umull r6, r7, r6, r7\n\t" + "ldr r8, [%[b], #8]\n\t" + "umull r6, r8, r6, r8\n\t" "adds r5, r5, r6\n\t" - "adcs r3, r3, r7\n\t" + "adcs r3, r3, r8\n\t" "adc r4, r4, #0\n\t" /* A[1] * B[1] */ "ldr r6, [%[a], #4]\n\t" - "ldr r7, [%[b], #4]\n\t" - "umull r6, r7, r6, r7\n\t" + "ldr r8, [%[b], #4]\n\t" + "umull r6, r8, r6, r8\n\t" "adds r5, r5, r6\n\t" - "adcs r3, r3, r7\n\t" + "adcs r3, r3, r8\n\t" "adc r4, r4, #0\n\t" /* A[2] * B[0] */ "ldr r6, [%[a], #8]\n\t" - "ldr r7, [%[b], #0]\n\t" - "umull r6, r7, r6, r7\n\t" + "ldr r8, [%[b], #0]\n\t" + "umull r6, r8, r6, r8\n\t" "adds r5, r5, r6\n\t" - "adcs r3, r3, r7\n\t" + "adcs r3, r3, r8\n\t" "adc r4, r4, #0\n\t" "str r5, [%[tmp], #8]\n\t" "mov r5, #0\n\t" /* A[0] * B[3] */ "ldr r6, [%[a], #0]\n\t" - "ldr r7, [%[b], #12]\n\t" - "umull r6, r7, r6, r7\n\t" + "ldr r8, [%[b], #12]\n\t" + "umull r6, r8, r6, r8\n\t" "adds r3, r3, r6\n\t" - "adcs r4, r4, r7\n\t" + "adcs r4, r4, r8\n\t" "adc r5, r5, #0\n\t" /* A[1] * B[2] */ "ldr r6, [%[a], #4]\n\t" - "ldr r7, [%[b], #8]\n\t" - "umull r6, r7, r6, r7\n\t" + "ldr r8, [%[b], #8]\n\t" + "umull r6, r8, r6, r8\n\t" "adds r3, r3, r6\n\t" - "adcs r4, r4, r7\n\t" + "adcs r4, r4, r8\n\t" "adc r5, r5, #0\n\t" /* A[2] * B[1] */ "ldr r6, [%[a], #8]\n\t" - "ldr r7, [%[b], #4]\n\t" - "umull r6, r7, r6, r7\n\t" + "ldr r8, [%[b], #4]\n\t" + "umull r6, r8, r6, r8\n\t" "adds r3, r3, r6\n\t" - "adcs r4, r4, r7\n\t" + "adcs r4, r4, r8\n\t" "adc r5, r5, #0\n\t" /* A[3] * B[0] */ "ldr r6, [%[a], #12]\n\t" - "ldr r7, [%[b], #0]\n\t" - "umull r6, r7, r6, r7\n\t" + "ldr r8, [%[b], #0]\n\t" + "umull r6, r8, r6, r8\n\t" "adds r3, r3, r6\n\t" - "adcs r4, r4, r7\n\t" + "adcs r4, r4, r8\n\t" "adc r5, r5, #0\n\t" "str r3, [%[tmp], #12]\n\t" "mov r3, #0\n\t" /* A[0] * B[4] */ "ldr r6, [%[a], #0]\n\t" - "ldr r7, [%[b], #16]\n\t" - "umull r6, r7, r6, r7\n\t" + "ldr r8, [%[b], #16]\n\t" + "umull r6, r8, r6, r8\n\t" "adds r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "adc r3, r3, #0\n\t" /* A[1] * B[3] */ "ldr r6, [%[a], #4]\n\t" - "ldr r7, [%[b], #12]\n\t" - "umull r6, r7, r6, r7\n\t" + "ldr r8, [%[b], #12]\n\t" + "umull r6, r8, r6, r8\n\t" "adds r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "adc r3, r3, #0\n\t" /* A[2] * B[2] */ "ldr r6, [%[a], #8]\n\t" - "ldr r7, [%[b], #8]\n\t" - "umull r6, r7, r6, r7\n\t" + "ldr r8, [%[b], #8]\n\t" + "umull r6, r8, r6, r8\n\t" "adds r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "adc r3, r3, #0\n\t" /* A[3] * B[1] */ "ldr r6, [%[a], #12]\n\t" - "ldr r7, [%[b], #4]\n\t" - "umull r6, r7, r6, r7\n\t" + "ldr r8, [%[b], #4]\n\t" + "umull r6, r8, r6, r8\n\t" "adds r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "adc r3, r3, #0\n\t" /* A[4] * B[0] */ "ldr r6, [%[a], #16]\n\t" - "ldr r7, [%[b], #0]\n\t" - "umull r6, r7, r6, r7\n\t" + "ldr r8, [%[b], #0]\n\t" + "umull r6, r8, r6, r8\n\t" "adds r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "adc r3, r3, #0\n\t" "str r4, [%[tmp], #16]\n\t" "mov r4, #0\n\t" /* A[0] * B[5] */ "ldr r6, [%[a], #0]\n\t" - "ldr r7, [%[b], #20]\n\t" - "umull r6, r7, r6, r7\n\t" + "ldr r8, [%[b], #20]\n\t" + "umull r6, r8, r6, r8\n\t" "adds r5, r5, r6\n\t" - "adcs r3, r3, r7\n\t" + "adcs r3, r3, r8\n\t" "adc r4, r4, #0\n\t" /* A[1] * B[4] */ "ldr r6, [%[a], #4]\n\t" - "ldr r7, [%[b], #16]\n\t" - "umull r6, r7, r6, r7\n\t" + "ldr r8, [%[b], #16]\n\t" + "umull r6, r8, r6, r8\n\t" "adds r5, r5, r6\n\t" - "adcs r3, r3, r7\n\t" + "adcs r3, r3, r8\n\t" "adc r4, r4, #0\n\t" /* A[2] * B[3] */ "ldr r6, [%[a], #8]\n\t" - "ldr r7, [%[b], #12]\n\t" - "umull r6, r7, r6, r7\n\t" + "ldr r8, [%[b], #12]\n\t" + "umull r6, r8, r6, r8\n\t" "adds r5, r5, r6\n\t" - "adcs r3, r3, r7\n\t" + "adcs r3, r3, r8\n\t" "adc r4, r4, #0\n\t" /* A[3] * B[2] */ "ldr r6, [%[a], #12]\n\t" - "ldr r7, [%[b], #8]\n\t" - "umull r6, r7, r6, r7\n\t" + "ldr r8, [%[b], #8]\n\t" + "umull r6, r8, r6, r8\n\t" "adds r5, r5, r6\n\t" - "adcs r3, r3, r7\n\t" + "adcs r3, r3, r8\n\t" "adc r4, r4, #0\n\t" /* A[4] * B[1] */ "ldr r6, [%[a], #16]\n\t" - "ldr r7, [%[b], #4]\n\t" - "umull r6, r7, r6, r7\n\t" + "ldr r8, [%[b], #4]\n\t" + "umull r6, r8, r6, r8\n\t" "adds r5, r5, r6\n\t" - "adcs r3, r3, r7\n\t" + "adcs r3, r3, r8\n\t" "adc r4, r4, #0\n\t" /* A[5] * B[0] */ "ldr r6, [%[a], #20]\n\t" - "ldr r7, [%[b], #0]\n\t" - "umull r6, r7, r6, r7\n\t" + "ldr r8, [%[b], #0]\n\t" + "umull r6, r8, r6, r8\n\t" "adds r5, r5, r6\n\t" - "adcs r3, r3, r7\n\t" + "adcs r3, r3, r8\n\t" "adc r4, r4, #0\n\t" "str r5, [%[tmp], #20]\n\t" "mov r5, #0\n\t" /* A[0] * B[6] */ "ldr r6, [%[a], #0]\n\t" - "ldr r7, [%[b], #24]\n\t" - "umull r6, r7, r6, r7\n\t" + "ldr r8, [%[b], #24]\n\t" + "umull r6, r8, r6, r8\n\t" "adds r3, r3, r6\n\t" - "adcs r4, r4, r7\n\t" + "adcs r4, r4, r8\n\t" "adc r5, r5, #0\n\t" /* A[1] * B[5] */ "ldr r6, [%[a], #4]\n\t" - "ldr r7, [%[b], #20]\n\t" - "umull r6, r7, r6, r7\n\t" + "ldr r8, [%[b], #20]\n\t" + "umull r6, r8, r6, r8\n\t" "adds r3, r3, r6\n\t" - "adcs r4, r4, r7\n\t" + "adcs r4, r4, r8\n\t" "adc r5, r5, #0\n\t" /* A[2] * B[4] */ "ldr r6, [%[a], #8]\n\t" - "ldr r7, [%[b], #16]\n\t" - "umull r6, r7, r6, r7\n\t" + "ldr r8, [%[b], #16]\n\t" + "umull r6, r8, r6, r8\n\t" "adds r3, r3, r6\n\t" - "adcs r4, r4, r7\n\t" + "adcs r4, r4, r8\n\t" "adc r5, r5, #0\n\t" /* A[3] * B[3] */ "ldr r6, [%[a], #12]\n\t" - "ldr r7, [%[b], #12]\n\t" - "umull r6, r7, r6, r7\n\t" + "ldr r8, [%[b], #12]\n\t" + "umull r6, r8, r6, r8\n\t" "adds r3, r3, r6\n\t" - "adcs r4, r4, r7\n\t" + "adcs r4, r4, r8\n\t" "adc r5, r5, #0\n\t" /* A[4] * B[2] */ "ldr r6, [%[a], #16]\n\t" - "ldr r7, [%[b], #8]\n\t" - "umull r6, r7, r6, r7\n\t" + "ldr r8, [%[b], #8]\n\t" + "umull r6, r8, r6, r8\n\t" "adds r3, r3, r6\n\t" - "adcs r4, r4, r7\n\t" + "adcs r4, r4, r8\n\t" "adc r5, r5, #0\n\t" /* A[5] * B[1] */ "ldr r6, [%[a], #20]\n\t" - "ldr r7, [%[b], #4]\n\t" - "umull r6, r7, r6, r7\n\t" + "ldr r8, [%[b], #4]\n\t" + "umull r6, r8, r6, r8\n\t" "adds r3, r3, r6\n\t" - "adcs r4, r4, r7\n\t" + "adcs r4, r4, r8\n\t" "adc r5, r5, #0\n\t" /* A[6] * B[0] */ "ldr r6, [%[a], #24]\n\t" - "ldr r7, [%[b], #0]\n\t" - "umull r6, r7, r6, r7\n\t" + "ldr r8, [%[b], #0]\n\t" + "umull r6, r8, r6, r8\n\t" "adds r3, r3, r6\n\t" - "adcs r4, r4, r7\n\t" + "adcs r4, r4, r8\n\t" "adc r5, r5, #0\n\t" "str r3, [%[tmp], #24]\n\t" "mov r3, #0\n\t" /* A[0] * B[7] */ "ldr r6, [%[a], #0]\n\t" - "ldr r7, [%[b], #28]\n\t" - "umull r6, r7, r6, r7\n\t" + "ldr r8, [%[b], #28]\n\t" + "umull r6, r8, r6, r8\n\t" "adds r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "adc r3, r3, #0\n\t" /* A[1] * B[6] */ "ldr r6, [%[a], #4]\n\t" - "ldr r7, [%[b], #24]\n\t" - "umull r6, r7, r6, r7\n\t" + "ldr r8, [%[b], #24]\n\t" + "umull r6, r8, r6, r8\n\t" "adds r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "adc r3, r3, #0\n\t" /* A[2] * B[5] */ "ldr r6, [%[a], #8]\n\t" - "ldr r7, [%[b], #20]\n\t" - "umull r6, r7, r6, r7\n\t" + "ldr r8, [%[b], #20]\n\t" + "umull r6, r8, r6, r8\n\t" "adds r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "adc r3, r3, #0\n\t" /* A[3] * B[4] */ "ldr r6, [%[a], #12]\n\t" - "ldr r7, [%[b], #16]\n\t" - "umull r6, r7, r6, r7\n\t" + "ldr r8, [%[b], #16]\n\t" + "umull r6, r8, r6, r8\n\t" "adds r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "adc r3, r3, #0\n\t" /* A[4] * B[3] */ "ldr r6, [%[a], #16]\n\t" - "ldr r7, [%[b], #12]\n\t" - "umull r6, r7, r6, r7\n\t" + "ldr r8, [%[b], #12]\n\t" + "umull r6, r8, r6, r8\n\t" "adds r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "adc r3, r3, #0\n\t" /* A[5] * B[2] */ "ldr r6, [%[a], #20]\n\t" - "ldr r7, [%[b], #8]\n\t" - "umull r6, r7, r6, r7\n\t" + "ldr r8, [%[b], #8]\n\t" + "umull r6, r8, r6, r8\n\t" "adds r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "adc r3, r3, #0\n\t" /* A[6] * B[1] */ "ldr r6, [%[a], #24]\n\t" - "ldr r7, [%[b], #4]\n\t" - "umull r6, r7, r6, r7\n\t" + "ldr r8, [%[b], #4]\n\t" + "umull r6, r8, r6, r8\n\t" "adds r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "adc r3, r3, #0\n\t" /* A[7] * B[0] */ "ldr r6, [%[a], #28]\n\t" - "ldr r7, [%[b], #0]\n\t" - "umull r6, r7, r6, r7\n\t" + "ldr r8, [%[b], #0]\n\t" + "umull r6, r8, r6, r8\n\t" "adds r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "adc r3, r3, #0\n\t" "str r4, [%[tmp], #28]\n\t" "mov r4, #0\n\t" /* A[1] * B[7] */ "ldr r6, [%[a], #4]\n\t" - "ldr r7, [%[b], #28]\n\t" - "umull r6, r7, r6, r7\n\t" + "ldr r8, [%[b], #28]\n\t" + "umull r6, r8, r6, r8\n\t" "adds r5, r5, r6\n\t" - "adcs r3, r3, r7\n\t" + "adcs r3, r3, r8\n\t" "adc r4, r4, #0\n\t" /* A[2] * B[6] */ "ldr r6, [%[a], #8]\n\t" - "ldr r7, [%[b], #24]\n\t" - "umull r6, r7, r6, r7\n\t" + "ldr r8, [%[b], #24]\n\t" + "umull r6, r8, r6, r8\n\t" "adds r5, r5, r6\n\t" - "adcs r3, r3, r7\n\t" + "adcs r3, r3, r8\n\t" "adc r4, r4, #0\n\t" /* A[3] * B[5] */ "ldr r6, [%[a], #12]\n\t" - "ldr r7, [%[b], #20]\n\t" - "umull r6, r7, r6, r7\n\t" + "ldr r8, [%[b], #20]\n\t" + "umull r6, r8, r6, r8\n\t" "adds r5, r5, r6\n\t" - "adcs r3, r3, r7\n\t" + "adcs r3, r3, r8\n\t" "adc r4, r4, #0\n\t" /* A[4] * B[4] */ "ldr r6, [%[a], #16]\n\t" - "ldr r7, [%[b], #16]\n\t" - "umull r6, r7, r6, r7\n\t" + "ldr r8, [%[b], #16]\n\t" + "umull r6, r8, r6, r8\n\t" "adds r5, r5, r6\n\t" - "adcs r3, r3, r7\n\t" + "adcs r3, r3, r8\n\t" "adc r4, r4, #0\n\t" /* A[5] * B[3] */ "ldr r6, [%[a], #20]\n\t" - "ldr r7, [%[b], #12]\n\t" - "umull r6, r7, r6, r7\n\t" + "ldr r8, [%[b], #12]\n\t" + "umull r6, r8, r6, r8\n\t" "adds r5, r5, r6\n\t" - "adcs r3, r3, r7\n\t" + "adcs r3, r3, r8\n\t" "adc r4, r4, #0\n\t" /* A[6] * B[2] */ "ldr r6, [%[a], #24]\n\t" - "ldr r7, [%[b], #8]\n\t" - "umull r6, r7, r6, r7\n\t" + "ldr r8, [%[b], #8]\n\t" + "umull r6, r8, r6, r8\n\t" "adds r5, r5, r6\n\t" - "adcs r3, r3, r7\n\t" + "adcs r3, r3, r8\n\t" "adc r4, r4, #0\n\t" /* A[7] * B[1] */ "ldr r6, [%[a], #28]\n\t" - "ldr r7, [%[b], #4]\n\t" - "umull r6, r7, r6, r7\n\t" + "ldr r8, [%[b], #4]\n\t" + "umull r6, r8, r6, r8\n\t" "adds r5, r5, r6\n\t" - "adcs r3, r3, r7\n\t" + "adcs r3, r3, r8\n\t" "adc r4, r4, #0\n\t" "str r5, [%[r], #32]\n\t" "mov r5, #0\n\t" /* A[2] * B[7] */ "ldr r6, [%[a], #8]\n\t" - "ldr r7, [%[b], #28]\n\t" - "umull r6, r7, r6, r7\n\t" + "ldr r8, [%[b], #28]\n\t" + "umull r6, r8, r6, r8\n\t" "adds r3, r3, r6\n\t" - "adcs r4, r4, r7\n\t" + "adcs r4, r4, r8\n\t" "adc r5, r5, #0\n\t" /* A[3] * B[6] */ "ldr r6, [%[a], #12]\n\t" - "ldr r7, [%[b], #24]\n\t" - "umull r6, r7, r6, r7\n\t" + "ldr r8, [%[b], #24]\n\t" + "umull r6, r8, r6, r8\n\t" "adds r3, r3, r6\n\t" - "adcs r4, r4, r7\n\t" + "adcs r4, r4, r8\n\t" "adc r5, r5, #0\n\t" /* A[4] * B[5] */ "ldr r6, [%[a], #16]\n\t" - "ldr r7, [%[b], #20]\n\t" - "umull r6, r7, r6, r7\n\t" + "ldr r8, [%[b], #20]\n\t" + "umull r6, r8, r6, r8\n\t" "adds r3, r3, r6\n\t" - "adcs r4, r4, r7\n\t" + "adcs r4, r4, r8\n\t" "adc r5, r5, #0\n\t" /* A[5] * B[4] */ "ldr r6, [%[a], #20]\n\t" - "ldr r7, [%[b], #16]\n\t" - "umull r6, r7, r6, r7\n\t" + "ldr r8, [%[b], #16]\n\t" + "umull r6, r8, r6, r8\n\t" "adds r3, r3, r6\n\t" - "adcs r4, r4, r7\n\t" + "adcs r4, r4, r8\n\t" "adc r5, r5, #0\n\t" /* A[6] * B[3] */ "ldr r6, [%[a], #24]\n\t" - "ldr r7, [%[b], #12]\n\t" - "umull r6, r7, r6, r7\n\t" + "ldr r8, [%[b], #12]\n\t" + "umull r6, r8, r6, r8\n\t" "adds r3, r3, r6\n\t" - "adcs r4, r4, r7\n\t" + "adcs r4, r4, r8\n\t" "adc r5, r5, #0\n\t" /* A[7] * B[2] */ "ldr r6, [%[a], #28]\n\t" - "ldr r7, [%[b], #8]\n\t" - "umull r6, r7, r6, r7\n\t" + "ldr r8, [%[b], #8]\n\t" + "umull r6, r8, r6, r8\n\t" "adds r3, r3, r6\n\t" - "adcs r4, r4, r7\n\t" + "adcs r4, r4, r8\n\t" "adc r5, r5, #0\n\t" "str r3, [%[r], #36]\n\t" "mov r3, #0\n\t" /* A[3] * B[7] */ "ldr r6, [%[a], #12]\n\t" - "ldr r7, [%[b], #28]\n\t" - "umull r6, r7, r6, r7\n\t" + "ldr r8, [%[b], #28]\n\t" + "umull r6, r8, r6, r8\n\t" "adds r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "adc r3, r3, #0\n\t" /* A[4] * B[6] */ "ldr r6, [%[a], #16]\n\t" - "ldr r7, [%[b], #24]\n\t" - "umull r6, r7, r6, r7\n\t" + "ldr r8, [%[b], #24]\n\t" + "umull r6, r8, r6, r8\n\t" "adds r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "adc r3, r3, #0\n\t" /* A[5] * B[5] */ "ldr r6, [%[a], #20]\n\t" - "ldr r7, [%[b], #20]\n\t" - "umull r6, r7, r6, r7\n\t" + "ldr r8, [%[b], #20]\n\t" + "umull r6, r8, r6, r8\n\t" "adds r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "adc r3, r3, #0\n\t" /* A[6] * B[4] */ "ldr r6, [%[a], #24]\n\t" - "ldr r7, [%[b], #16]\n\t" - "umull r6, r7, r6, r7\n\t" + "ldr r8, [%[b], #16]\n\t" + "umull r6, r8, r6, r8\n\t" "adds r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "adc r3, r3, #0\n\t" /* A[7] * B[3] */ "ldr r6, [%[a], #28]\n\t" - "ldr r7, [%[b], #12]\n\t" - "umull r6, r7, r6, r7\n\t" + "ldr r8, [%[b], #12]\n\t" + "umull r6, r8, r6, r8\n\t" "adds r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "adc r3, r3, #0\n\t" "str r4, [%[r], #40]\n\t" "mov r4, #0\n\t" /* A[4] * B[7] */ "ldr r6, [%[a], #16]\n\t" - "ldr r7, [%[b], #28]\n\t" - "umull r6, r7, r6, r7\n\t" + "ldr r8, [%[b], #28]\n\t" + "umull r6, r8, r6, r8\n\t" "adds r5, r5, r6\n\t" - "adcs r3, r3, r7\n\t" + "adcs r3, r3, r8\n\t" "adc r4, r4, #0\n\t" /* A[5] * B[6] */ "ldr r6, [%[a], #20]\n\t" - "ldr r7, [%[b], #24]\n\t" - "umull r6, r7, r6, r7\n\t" + "ldr r8, [%[b], #24]\n\t" + "umull r6, r8, r6, r8\n\t" "adds r5, r5, r6\n\t" - "adcs r3, r3, r7\n\t" + "adcs r3, r3, r8\n\t" "adc r4, r4, #0\n\t" /* A[6] * B[5] */ "ldr r6, [%[a], #24]\n\t" - "ldr r7, [%[b], #20]\n\t" - "umull r6, r7, r6, r7\n\t" + "ldr r8, [%[b], #20]\n\t" + "umull r6, r8, r6, r8\n\t" "adds r5, r5, r6\n\t" - "adcs r3, r3, r7\n\t" + "adcs r3, r3, r8\n\t" "adc r4, r4, #0\n\t" /* A[7] * B[4] */ "ldr r6, [%[a], #28]\n\t" - "ldr r7, [%[b], #16]\n\t" - "umull r6, r7, r6, r7\n\t" + "ldr r8, [%[b], #16]\n\t" + "umull r6, r8, r6, r8\n\t" "adds r5, r5, r6\n\t" - "adcs r3, r3, r7\n\t" + "adcs r3, r3, r8\n\t" "adc r4, r4, #0\n\t" "str r5, [%[r], #44]\n\t" "mov r5, #0\n\t" /* A[5] * B[7] */ "ldr r6, [%[a], #20]\n\t" - "ldr r7, [%[b], #28]\n\t" - "umull r6, r7, r6, r7\n\t" + "ldr r8, [%[b], #28]\n\t" + "umull r6, r8, r6, r8\n\t" "adds r3, r3, r6\n\t" - "adcs r4, r4, r7\n\t" + "adcs r4, r4, r8\n\t" "adc r5, r5, #0\n\t" /* A[6] * B[6] */ "ldr r6, [%[a], #24]\n\t" - "ldr r7, [%[b], #24]\n\t" - "umull r6, r7, r6, r7\n\t" + "ldr r8, [%[b], #24]\n\t" + "umull r6, r8, r6, r8\n\t" "adds r3, r3, r6\n\t" - "adcs r4, r4, r7\n\t" + "adcs r4, r4, r8\n\t" "adc r5, r5, #0\n\t" /* A[7] * B[5] */ "ldr r6, [%[a], #28]\n\t" - "ldr r7, [%[b], #20]\n\t" - "umull r6, r7, r6, r7\n\t" + "ldr r8, [%[b], #20]\n\t" + "umull r6, r8, r6, r8\n\t" "adds r3, r3, r6\n\t" - "adcs r4, r4, r7\n\t" + "adcs r4, r4, r8\n\t" "adc r5, r5, #0\n\t" "str r3, [%[r], #48]\n\t" "mov r3, #0\n\t" /* A[6] * B[7] */ "ldr r6, [%[a], #24]\n\t" - "ldr r7, [%[b], #28]\n\t" - "umull r6, r7, r6, r7\n\t" + "ldr r8, [%[b], #28]\n\t" + "umull r6, r8, r6, r8\n\t" "adds r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "adc r3, r3, #0\n\t" /* A[7] * B[6] */ "ldr r6, [%[a], #28]\n\t" - "ldr r7, [%[b], #24]\n\t" - "umull r6, r7, r6, r7\n\t" + "ldr r8, [%[b], #24]\n\t" + "umull r6, r8, r6, r8\n\t" "adds r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "adc r3, r3, #0\n\t" "str r4, [%[r], #52]\n\t" "mov r4, #0\n\t" /* A[7] * B[7] */ "ldr r6, [%[a], #28]\n\t" - "ldr r7, [%[b], #28]\n\t" - "umull r6, r7, r6, r7\n\t" + "ldr r8, [%[b], #28]\n\t" + "umull r6, r8, r6, r8\n\t" "adds r5, r5, r6\n\t" - "adc r3, r3, r7\n\t" + "adc r3, r3, r8\n\t" "str r5, [%[r], #56]\n\t" "str r3, [%[r], #60]\n\t" /* Transfer tmp to r */ @@ -714,7 +714,7 @@ SP_NOINLINE static void sp_2048_mul_8(sp_digit* r, const sp_digit* a, "str r6, [%[r], #28]\n\t" : : [r] "r" (r), [a] "r" (a), [b] "r" (b), [tmp] "r" (tmp) - : "memory", "r3", "r4", "r5", "r6", "r7" + : "memory", "r3", "r4", "r5", "r6", "r8" ); } @@ -734,315 +734,315 @@ SP_NOINLINE static void sp_2048_sqr_8(sp_digit* r, const sp_digit* a) "str r3, [%[tmp], #0]\n\t" "mov r3, #0\n\t" /* A[0] * A[1] */ - "ldr r7, [%[a], #4]\n\t" - "umull r6, r7, r6, r7\n\t" + "ldr r8, [%[a], #4]\n\t" + "umull r6, r8, r6, r8\n\t" "adds r4, r4, r6\n\t" - "adc r5, r5, r7\n\t" + "adc r5, r5, r8\n\t" "adds r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "adc r3, r3, #0\n\t" "str r4, [%[tmp], #4]\n\t" "mov r4, #0\n\t" /* A[0] * A[2] */ "ldr r6, [%[a], #0]\n\t" - "ldr r7, [%[a], #8]\n\t" - "umull r6, r7, r6, r7\n\t" + "ldr r8, [%[a], #8]\n\t" + "umull r6, r8, r6, r8\n\t" "adds r5, r5, r6\n\t" - "adc r3, r3, r7\n\t" + "adc r3, r3, r8\n\t" "adds r5, r5, r6\n\t" - "adcs r3, r3, r7\n\t" + "adcs r3, r3, r8\n\t" "adc r4, r4, #0\n\t" /* A[1] * A[1] */ "ldr r6, [%[a], #4]\n\t" - "umull r6, r7, r6, r6\n\t" + "umull r6, r8, r6, r6\n\t" "adds r5, r5, r6\n\t" - "adcs r3, r3, r7\n\t" + "adcs r3, r3, r8\n\t" "adc r4, r4, #0\n\t" "str r5, [%[tmp], #8]\n\t" "mov r5, #0\n\t" /* A[0] * A[3] */ "ldr r6, [%[a], #0]\n\t" - "ldr r7, [%[a], #12]\n\t" - "umull r8, r9, r6, r7\n\t" - "mov r10, #0\n\t" + "ldr r8, [%[a], #12]\n\t" + "umull r9, r10, r6, r8\n\t" + "mov r11, #0\n\t" /* A[1] * A[2] */ "ldr r6, [%[a], #4]\n\t" - "ldr r7, [%[a], #8]\n\t" - "umull r6, r7, r6, r7\n\t" - "adds r8, r8, r6\n\t" - "adcs r9, r9, r7\n\t" - "adc r10, r10, #0\n\t" - "adds r8, r8, r8\n\t" - "adcs r9, r9, r9\n\t" - "adc r10, r10, r10\n\t" - "adds r3, r3, r8\n\t" - "adcs r4, r4, r9\n\t" - "adc r5, r5, r10\n\t" + "ldr r8, [%[a], #8]\n\t" + "umull r6, r8, r6, r8\n\t" + "adds r9, r9, r6\n\t" + "adcs r10, r10, r8\n\t" + "adc r11, r11, #0\n\t" + "adds r9, r9, r9\n\t" + "adcs r10, r10, r10\n\t" + "adc r11, r11, r11\n\t" + "adds r3, r3, r9\n\t" + "adcs r4, r4, r10\n\t" + "adc r5, r5, r11\n\t" "str r3, [%[tmp], #12]\n\t" "mov r3, #0\n\t" /* A[0] * A[4] */ "ldr r6, [%[a], #0]\n\t" - "ldr r7, [%[a], #16]\n\t" - "umull r8, r9, r6, r7\n\t" - "mov r10, #0\n\t" + "ldr r8, [%[a], #16]\n\t" + "umull r9, r10, r6, r8\n\t" + "mov r11, #0\n\t" /* A[1] * A[3] */ "ldr r6, [%[a], #4]\n\t" - "ldr r7, [%[a], #12]\n\t" - "umull r6, r7, r6, r7\n\t" - "adds r8, r8, r6\n\t" - "adcs r9, r9, r7\n\t" - "adc r10, r10, #0\n\t" + "ldr r8, [%[a], #12]\n\t" + "umull r6, r8, r6, r8\n\t" + "adds r9, r9, r6\n\t" + "adcs r10, r10, r8\n\t" + "adc r11, r11, #0\n\t" /* A[2] * A[2] */ "ldr r6, [%[a], #8]\n\t" - "umull r6, r7, r6, r6\n\t" + "umull r6, r8, r6, r6\n\t" "adds r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "adc r3, r3, #0\n\t" - "adds r8, r8, r8\n\t" - "adcs r9, r9, r9\n\t" - "adc r10, r10, r10\n\t" - "adds r4, r4, r8\n\t" - "adcs r5, r5, r9\n\t" - "adc r3, r3, r10\n\t" + "adds r9, r9, r9\n\t" + "adcs r10, r10, r10\n\t" + "adc r11, r11, r11\n\t" + "adds r4, r4, r9\n\t" + "adcs r5, r5, r10\n\t" + "adc r3, r3, r11\n\t" "str r4, [%[tmp], #16]\n\t" "mov r4, #0\n\t" /* A[0] * A[5] */ "ldr r6, [%[a], #0]\n\t" - "ldr r7, [%[a], #20]\n\t" - "umull r8, r9, r6, r7\n\t" - "mov r10, #0\n\t" + "ldr r8, [%[a], #20]\n\t" + "umull r9, r10, r6, r8\n\t" + "mov r11, #0\n\t" /* A[1] * A[4] */ "ldr r6, [%[a], #4]\n\t" - "ldr r7, [%[a], #16]\n\t" - "umull r6, r7, r6, r7\n\t" - "adds r8, r8, r6\n\t" - "adcs r9, r9, r7\n\t" - "adc r10, r10, #0\n\t" + "ldr r8, [%[a], #16]\n\t" + "umull r6, r8, r6, r8\n\t" + "adds r9, r9, r6\n\t" + "adcs r10, r10, r8\n\t" + "adc r11, r11, #0\n\t" /* A[2] * A[3] */ "ldr r6, [%[a], #8]\n\t" - "ldr r7, [%[a], #12]\n\t" - "umull r6, r7, r6, r7\n\t" - "adds r8, r8, r6\n\t" - "adcs r9, r9, r7\n\t" - "adc r10, r10, #0\n\t" - "adds r8, r8, r8\n\t" - "adcs r9, r9, r9\n\t" - "adc r10, r10, r10\n\t" - "adds r5, r5, r8\n\t" - "adcs r3, r3, r9\n\t" - "adc r4, r4, r10\n\t" + "ldr r8, [%[a], #12]\n\t" + "umull r6, r8, r6, r8\n\t" + "adds r9, r9, r6\n\t" + "adcs r10, r10, r8\n\t" + "adc r11, r11, #0\n\t" + "adds r9, r9, r9\n\t" + "adcs r10, r10, r10\n\t" + "adc r11, r11, r11\n\t" + "adds r5, r5, r9\n\t" + "adcs r3, r3, r10\n\t" + "adc r4, r4, r11\n\t" "str r5, [%[tmp], #20]\n\t" "mov r5, #0\n\t" /* A[0] * A[6] */ "ldr r6, [%[a], #0]\n\t" - "ldr r7, [%[a], #24]\n\t" - "umull r8, r9, r6, r7\n\t" - "mov r10, #0\n\t" + "ldr r8, [%[a], #24]\n\t" + "umull r9, r10, r6, r8\n\t" + "mov r11, #0\n\t" /* A[1] * A[5] */ "ldr r6, [%[a], #4]\n\t" - "ldr r7, [%[a], #20]\n\t" - "umull r6, r7, r6, r7\n\t" - "adds r8, r8, r6\n\t" - "adcs r9, r9, r7\n\t" - "adc r10, r10, #0\n\t" + "ldr r8, [%[a], #20]\n\t" + "umull r6, r8, r6, r8\n\t" + "adds r9, r9, r6\n\t" + "adcs r10, r10, r8\n\t" + "adc r11, r11, #0\n\t" /* A[2] * A[4] */ "ldr r6, [%[a], #8]\n\t" - "ldr r7, [%[a], #16]\n\t" - "umull r6, r7, r6, r7\n\t" - "adds r8, r8, r6\n\t" - "adcs r9, r9, r7\n\t" - "adc r10, r10, #0\n\t" + "ldr r8, [%[a], #16]\n\t" + "umull r6, r8, r6, r8\n\t" + "adds r9, r9, r6\n\t" + "adcs r10, r10, r8\n\t" + "adc r11, r11, #0\n\t" /* A[3] * A[3] */ "ldr r6, [%[a], #12]\n\t" - "umull r6, r7, r6, r6\n\t" + "umull r6, r8, r6, r6\n\t" "adds r3, r3, r6\n\t" - "adcs r4, r4, r7\n\t" + "adcs r4, r4, r8\n\t" "adc r5, r5, #0\n\t" - "adds r8, r8, r8\n\t" - "adcs r9, r9, r9\n\t" - "adc r10, r10, r10\n\t" - "adds r3, r3, r8\n\t" - "adcs r4, r4, r9\n\t" - "adc r5, r5, r10\n\t" + "adds r9, r9, r9\n\t" + "adcs r10, r10, r10\n\t" + "adc r11, r11, r11\n\t" + "adds r3, r3, r9\n\t" + "adcs r4, r4, r10\n\t" + "adc r5, r5, r11\n\t" "str r3, [%[tmp], #24]\n\t" "mov r3, #0\n\t" /* A[0] * A[7] */ "ldr r6, [%[a], #0]\n\t" - "ldr r7, [%[a], #28]\n\t" - "umull r8, r9, r6, r7\n\t" - "mov r10, #0\n\t" + "ldr r8, [%[a], #28]\n\t" + "umull r9, r10, r6, r8\n\t" + "mov r11, #0\n\t" /* A[1] * A[6] */ "ldr r6, [%[a], #4]\n\t" - "ldr r7, [%[a], #24]\n\t" - "umull r6, r7, r6, r7\n\t" - "adds r8, r8, r6\n\t" - "adcs r9, r9, r7\n\t" - "adc r10, r10, #0\n\t" + "ldr r8, [%[a], #24]\n\t" + "umull r6, r8, r6, r8\n\t" + "adds r9, r9, r6\n\t" + "adcs r10, r10, r8\n\t" + "adc r11, r11, #0\n\t" /* A[2] * A[5] */ "ldr r6, [%[a], #8]\n\t" - "ldr r7, [%[a], #20]\n\t" - "umull r6, r7, r6, r7\n\t" - "adds r8, r8, r6\n\t" - "adcs r9, r9, r7\n\t" - "adc r10, r10, #0\n\t" + "ldr r8, [%[a], #20]\n\t" + "umull r6, r8, r6, r8\n\t" + "adds r9, r9, r6\n\t" + "adcs r10, r10, r8\n\t" + "adc r11, r11, #0\n\t" /* A[3] * A[4] */ "ldr r6, [%[a], #12]\n\t" - "ldr r7, [%[a], #16]\n\t" - "umull r6, r7, r6, r7\n\t" - "adds r8, r8, r6\n\t" - "adcs r9, r9, r7\n\t" - "adc r10, r10, #0\n\t" - "adds r8, r8, r8\n\t" - "adcs r9, r9, r9\n\t" - "adc r10, r10, r10\n\t" - "adds r4, r4, r8\n\t" - "adcs r5, r5, r9\n\t" - "adc r3, r3, r10\n\t" + "ldr r8, [%[a], #16]\n\t" + "umull r6, r8, r6, r8\n\t" + "adds r9, r9, r6\n\t" + "adcs r10, r10, r8\n\t" + "adc r11, r11, #0\n\t" + "adds r9, r9, r9\n\t" + "adcs r10, r10, r10\n\t" + "adc r11, r11, r11\n\t" + "adds r4, r4, r9\n\t" + "adcs r5, r5, r10\n\t" + "adc r3, r3, r11\n\t" "str r4, [%[tmp], #28]\n\t" "mov r4, #0\n\t" /* A[1] * A[7] */ "ldr r6, [%[a], #4]\n\t" - "ldr r7, [%[a], #28]\n\t" - "umull r8, r9, r6, r7\n\t" - "mov r10, #0\n\t" + "ldr r8, [%[a], #28]\n\t" + "umull r9, r10, r6, r8\n\t" + "mov r11, #0\n\t" /* A[2] * A[6] */ "ldr r6, [%[a], #8]\n\t" - "ldr r7, [%[a], #24]\n\t" - "umull r6, r7, r6, r7\n\t" - "adds r8, r8, r6\n\t" - "adcs r9, r9, r7\n\t" - "adc r10, r10, #0\n\t" + "ldr r8, [%[a], #24]\n\t" + "umull r6, r8, r6, r8\n\t" + "adds r9, r9, r6\n\t" + "adcs r10, r10, r8\n\t" + "adc r11, r11, #0\n\t" /* A[3] * A[5] */ "ldr r6, [%[a], #12]\n\t" - "ldr r7, [%[a], #20]\n\t" - "umull r6, r7, r6, r7\n\t" - "adds r8, r8, r6\n\t" - "adcs r9, r9, r7\n\t" - "adc r10, r10, #0\n\t" + "ldr r8, [%[a], #20]\n\t" + "umull r6, r8, r6, r8\n\t" + "adds r9, r9, r6\n\t" + "adcs r10, r10, r8\n\t" + "adc r11, r11, #0\n\t" /* A[4] * A[4] */ "ldr r6, [%[a], #16]\n\t" - "umull r6, r7, r6, r6\n\t" + "umull r6, r8, r6, r6\n\t" "adds r5, r5, r6\n\t" - "adcs r3, r3, r7\n\t" + "adcs r3, r3, r8\n\t" "adc r4, r4, #0\n\t" - "adds r8, r8, r8\n\t" - "adcs r9, r9, r9\n\t" - "adc r10, r10, r10\n\t" - "adds r5, r5, r8\n\t" - "adcs r3, r3, r9\n\t" - "adc r4, r4, r10\n\t" + "adds r9, r9, r9\n\t" + "adcs r10, r10, r10\n\t" + "adc r11, r11, r11\n\t" + "adds r5, r5, r9\n\t" + "adcs r3, r3, r10\n\t" + "adc r4, r4, r11\n\t" "str r5, [%[r], #32]\n\t" "mov r5, #0\n\t" /* A[2] * A[7] */ "ldr r6, [%[a], #8]\n\t" - "ldr r7, [%[a], #28]\n\t" - "umull r8, r9, r6, r7\n\t" - "mov r10, #0\n\t" + "ldr r8, [%[a], #28]\n\t" + "umull r9, r10, r6, r8\n\t" + "mov r11, #0\n\t" /* A[3] * A[6] */ "ldr r6, [%[a], #12]\n\t" - "ldr r7, [%[a], #24]\n\t" - "umull r6, r7, r6, r7\n\t" - "adds r8, r8, r6\n\t" - "adcs r9, r9, r7\n\t" - "adc r10, r10, #0\n\t" + "ldr r8, [%[a], #24]\n\t" + "umull r6, r8, r6, r8\n\t" + "adds r9, r9, r6\n\t" + "adcs r10, r10, r8\n\t" + "adc r11, r11, #0\n\t" /* A[4] * A[5] */ "ldr r6, [%[a], #16]\n\t" - "ldr r7, [%[a], #20]\n\t" - "umull r6, r7, r6, r7\n\t" - "adds r8, r8, r6\n\t" - "adcs r9, r9, r7\n\t" - "adc r10, r10, #0\n\t" - "adds r8, r8, r8\n\t" - "adcs r9, r9, r9\n\t" - "adc r10, r10, r10\n\t" - "adds r3, r3, r8\n\t" - "adcs r4, r4, r9\n\t" - "adc r5, r5, r10\n\t" + "ldr r8, [%[a], #20]\n\t" + "umull r6, r8, r6, r8\n\t" + "adds r9, r9, r6\n\t" + "adcs r10, r10, r8\n\t" + "adc r11, r11, #0\n\t" + "adds r9, r9, r9\n\t" + "adcs r10, r10, r10\n\t" + "adc r11, r11, r11\n\t" + "adds r3, r3, r9\n\t" + "adcs r4, r4, r10\n\t" + "adc r5, r5, r11\n\t" "str r3, [%[r], #36]\n\t" "mov r3, #0\n\t" /* A[3] * A[7] */ "ldr r6, [%[a], #12]\n\t" - "ldr r7, [%[a], #28]\n\t" - "umull r8, r9, r6, r7\n\t" - "mov r10, #0\n\t" + "ldr r8, [%[a], #28]\n\t" + "umull r9, r10, r6, r8\n\t" + "mov r11, #0\n\t" /* A[4] * A[6] */ "ldr r6, [%[a], #16]\n\t" - "ldr r7, [%[a], #24]\n\t" - "umull r6, r7, r6, r7\n\t" - "adds r8, r8, r6\n\t" - "adcs r9, r9, r7\n\t" - "adc r10, r10, #0\n\t" + "ldr r8, [%[a], #24]\n\t" + "umull r6, r8, r6, r8\n\t" + "adds r9, r9, r6\n\t" + "adcs r10, r10, r8\n\t" + "adc r11, r11, #0\n\t" /* A[5] * A[5] */ "ldr r6, [%[a], #20]\n\t" - "umull r6, r7, r6, r6\n\t" + "umull r6, r8, r6, r6\n\t" "adds r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "adc r3, r3, #0\n\t" - "adds r8, r8, r8\n\t" - "adcs r9, r9, r9\n\t" - "adc r10, r10, r10\n\t" - "adds r4, r4, r8\n\t" - "adcs r5, r5, r9\n\t" - "adc r3, r3, r10\n\t" + "adds r9, r9, r9\n\t" + "adcs r10, r10, r10\n\t" + "adc r11, r11, r11\n\t" + "adds r4, r4, r9\n\t" + "adcs r5, r5, r10\n\t" + "adc r3, r3, r11\n\t" "str r4, [%[r], #40]\n\t" "mov r4, #0\n\t" /* A[4] * A[7] */ "ldr r6, [%[a], #16]\n\t" - "ldr r7, [%[a], #28]\n\t" - "umull r6, r7, r6, r7\n\t" + "ldr r8, [%[a], #28]\n\t" + "umull r6, r8, r6, r8\n\t" "adds r5, r5, r6\n\t" - "adcs r3, r3, r7\n\t" + "adcs r3, r3, r8\n\t" "adc r4, r4, #0\n\t" "adds r5, r5, r6\n\t" - "adcs r3, r3, r7\n\t" + "adcs r3, r3, r8\n\t" "adc r4, r4, #0\n\t" /* A[5] * A[6] */ "ldr r6, [%[a], #20]\n\t" - "ldr r7, [%[a], #24]\n\t" - "umull r6, r7, r6, r7\n\t" + "ldr r8, [%[a], #24]\n\t" + "umull r6, r8, r6, r8\n\t" "adds r5, r5, r6\n\t" - "adcs r3, r3, r7\n\t" + "adcs r3, r3, r8\n\t" "adc r4, r4, #0\n\t" "adds r5, r5, r6\n\t" - "adcs r3, r3, r7\n\t" + "adcs r3, r3, r8\n\t" "adc r4, r4, #0\n\t" "str r5, [%[r], #44]\n\t" "mov r5, #0\n\t" /* A[5] * A[7] */ "ldr r6, [%[a], #20]\n\t" - "ldr r7, [%[a], #28]\n\t" - "umull r6, r7, r6, r7\n\t" + "ldr r8, [%[a], #28]\n\t" + "umull r6, r8, r6, r8\n\t" "adds r3, r3, r6\n\t" - "adcs r4, r4, r7\n\t" + "adcs r4, r4, r8\n\t" "adc r5, r5, #0\n\t" "adds r3, r3, r6\n\t" - "adcs r4, r4, r7\n\t" + "adcs r4, r4, r8\n\t" "adc r5, r5, #0\n\t" /* A[6] * A[6] */ "ldr r6, [%[a], #24]\n\t" - "umull r6, r7, r6, r6\n\t" + "umull r6, r8, r6, r6\n\t" "adds r3, r3, r6\n\t" - "adcs r4, r4, r7\n\t" + "adcs r4, r4, r8\n\t" "adc r5, r5, #0\n\t" "str r3, [%[r], #48]\n\t" "mov r3, #0\n\t" /* A[6] * A[7] */ "ldr r6, [%[a], #24]\n\t" - "ldr r7, [%[a], #28]\n\t" - "umull r6, r7, r6, r7\n\t" + "ldr r8, [%[a], #28]\n\t" + "umull r6, r8, r6, r8\n\t" "adds r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "adc r3, r3, #0\n\t" "adds r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "adc r3, r3, #0\n\t" "str r4, [%[r], #52]\n\t" "mov r4, #0\n\t" /* A[7] * A[7] */ "ldr r6, [%[a], #28]\n\t" - "umull r6, r7, r6, r6\n\t" + "umull r6, r8, r6, r6\n\t" "adds r5, r5, r6\n\t" - "adc r3, r3, r7\n\t" + "adc r3, r3, r8\n\t" "str r5, [%[r], #56]\n\t" "str r3, [%[r], #60]\n\t" /* Transfer tmp to r */ @@ -1064,7 +1064,7 @@ SP_NOINLINE static void sp_2048_sqr_8(sp_digit* r, const sp_digit* a) "str r6, [%[r], #28]\n\t" : : [r] "r" (r), [a] "r" (a), [tmp] "r" (tmp) - : "memory", "r3", "r4", "r5", "r6", "r7", "r8", "r9", "r10" + : "memory", "r3", "r4", "r5", "r6", "r8", "r9", "r10", "r11" ); } @@ -1081,30 +1081,30 @@ SP_NOINLINE static sp_digit sp_2048_add_8(sp_digit* r, const sp_digit* a, __asm__ __volatile__ ( "ldm %[a]!, {r4, r5}\n\t" - "ldm %[b]!, {r6, r7}\n\t" + "ldm %[b]!, {r6, r8}\n\t" "adds r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "stm %[r]!, {r4, r5}\n\t" "ldm %[a]!, {r4, r5}\n\t" - "ldm %[b]!, {r6, r7}\n\t" + "ldm %[b]!, {r6, r8}\n\t" "adcs r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "stm %[r]!, {r4, r5}\n\t" "ldm %[a]!, {r4, r5}\n\t" - "ldm %[b]!, {r6, r7}\n\t" + "ldm %[b]!, {r6, r8}\n\t" "adcs r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "stm %[r]!, {r4, r5}\n\t" "ldm %[a]!, {r4, r5}\n\t" - "ldm %[b]!, {r6, r7}\n\t" + "ldm %[b]!, {r6, r8}\n\t" "adcs r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "stm %[r]!, {r4, r5}\n\t" "mov %[c], #0\n\t" "adc %[c], %[c], %[c]\n\t" : [c] "+r" (c), [r] "+r" (r), [a] "+r" (a), [b] "+r" (b) : - : "memory", "r4", "r5", "r6", "r7" + : "memory", "r4", "r5", "r6", "r8" ); return c; @@ -1184,50 +1184,50 @@ SP_NOINLINE static sp_digit sp_2048_add_16(sp_digit* r, const sp_digit* a, __asm__ __volatile__ ( "ldm %[a]!, {r4, r5}\n\t" - "ldm %[b]!, {r6, r7}\n\t" + "ldm %[b]!, {r6, r8}\n\t" "adds r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "stm %[r]!, {r4, r5}\n\t" "ldm %[a]!, {r4, r5}\n\t" - "ldm %[b]!, {r6, r7}\n\t" + "ldm %[b]!, {r6, r8}\n\t" "adcs r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "stm %[r]!, {r4, r5}\n\t" "ldm %[a]!, {r4, r5}\n\t" - "ldm %[b]!, {r6, r7}\n\t" + "ldm %[b]!, {r6, r8}\n\t" "adcs r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "stm %[r]!, {r4, r5}\n\t" "ldm %[a]!, {r4, r5}\n\t" - "ldm %[b]!, {r6, r7}\n\t" + "ldm %[b]!, {r6, r8}\n\t" "adcs r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "stm %[r]!, {r4, r5}\n\t" "ldm %[a]!, {r4, r5}\n\t" - "ldm %[b]!, {r6, r7}\n\t" + "ldm %[b]!, {r6, r8}\n\t" "adcs r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "stm %[r]!, {r4, r5}\n\t" "ldm %[a]!, {r4, r5}\n\t" - "ldm %[b]!, {r6, r7}\n\t" + "ldm %[b]!, {r6, r8}\n\t" "adcs r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "stm %[r]!, {r4, r5}\n\t" "ldm %[a]!, {r4, r5}\n\t" - "ldm %[b]!, {r6, r7}\n\t" + "ldm %[b]!, {r6, r8}\n\t" "adcs r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "stm %[r]!, {r4, r5}\n\t" "ldm %[a]!, {r4, r5}\n\t" - "ldm %[b]!, {r6, r7}\n\t" + "ldm %[b]!, {r6, r8}\n\t" "adcs r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "stm %[r]!, {r4, r5}\n\t" "mov %[c], #0\n\t" "adc %[c], %[c], %[c]\n\t" : [c] "+r" (c), [r] "+r" (r), [a] "+r" (a), [b] "+r" (b) : - : "memory", "r4", "r5", "r6", "r7" + : "memory", "r4", "r5", "r6", "r8" ); return c; @@ -1433,90 +1433,90 @@ SP_NOINLINE static sp_digit sp_2048_add_32(sp_digit* r, const sp_digit* a, __asm__ __volatile__ ( "ldm %[a]!, {r4, r5}\n\t" - "ldm %[b]!, {r6, r7}\n\t" + "ldm %[b]!, {r6, r8}\n\t" "adds r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "stm %[r]!, {r4, r5}\n\t" "ldm %[a]!, {r4, r5}\n\t" - "ldm %[b]!, {r6, r7}\n\t" + "ldm %[b]!, {r6, r8}\n\t" "adcs r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "stm %[r]!, {r4, r5}\n\t" "ldm %[a]!, {r4, r5}\n\t" - "ldm %[b]!, {r6, r7}\n\t" + "ldm %[b]!, {r6, r8}\n\t" "adcs r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "stm %[r]!, {r4, r5}\n\t" "ldm %[a]!, {r4, r5}\n\t" - "ldm %[b]!, {r6, r7}\n\t" + "ldm %[b]!, {r6, r8}\n\t" "adcs r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "stm %[r]!, {r4, r5}\n\t" "ldm %[a]!, {r4, r5}\n\t" - "ldm %[b]!, {r6, r7}\n\t" + "ldm %[b]!, {r6, r8}\n\t" "adcs r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "stm %[r]!, {r4, r5}\n\t" "ldm %[a]!, {r4, r5}\n\t" - "ldm %[b]!, {r6, r7}\n\t" + "ldm %[b]!, {r6, r8}\n\t" "adcs r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "stm %[r]!, {r4, r5}\n\t" "ldm %[a]!, {r4, r5}\n\t" - "ldm %[b]!, {r6, r7}\n\t" + "ldm %[b]!, {r6, r8}\n\t" "adcs r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "stm %[r]!, {r4, r5}\n\t" "ldm %[a]!, {r4, r5}\n\t" - "ldm %[b]!, {r6, r7}\n\t" + "ldm %[b]!, {r6, r8}\n\t" "adcs r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "stm %[r]!, {r4, r5}\n\t" "ldm %[a]!, {r4, r5}\n\t" - "ldm %[b]!, {r6, r7}\n\t" + "ldm %[b]!, {r6, r8}\n\t" "adcs r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "stm %[r]!, {r4, r5}\n\t" "ldm %[a]!, {r4, r5}\n\t" - "ldm %[b]!, {r6, r7}\n\t" + "ldm %[b]!, {r6, r8}\n\t" "adcs r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "stm %[r]!, {r4, r5}\n\t" "ldm %[a]!, {r4, r5}\n\t" - "ldm %[b]!, {r6, r7}\n\t" + "ldm %[b]!, {r6, r8}\n\t" "adcs r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "stm %[r]!, {r4, r5}\n\t" "ldm %[a]!, {r4, r5}\n\t" - "ldm %[b]!, {r6, r7}\n\t" + "ldm %[b]!, {r6, r8}\n\t" "adcs r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "stm %[r]!, {r4, r5}\n\t" "ldm %[a]!, {r4, r5}\n\t" - "ldm %[b]!, {r6, r7}\n\t" + "ldm %[b]!, {r6, r8}\n\t" "adcs r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "stm %[r]!, {r4, r5}\n\t" "ldm %[a]!, {r4, r5}\n\t" - "ldm %[b]!, {r6, r7}\n\t" + "ldm %[b]!, {r6, r8}\n\t" "adcs r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "stm %[r]!, {r4, r5}\n\t" "ldm %[a]!, {r4, r5}\n\t" - "ldm %[b]!, {r6, r7}\n\t" + "ldm %[b]!, {r6, r8}\n\t" "adcs r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "stm %[r]!, {r4, r5}\n\t" "ldm %[a]!, {r4, r5}\n\t" - "ldm %[b]!, {r6, r7}\n\t" + "ldm %[b]!, {r6, r8}\n\t" "adcs r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "stm %[r]!, {r4, r5}\n\t" "mov %[c], #0\n\t" "adc %[c], %[c], %[c]\n\t" : [c] "+r" (c), [r] "+r" (r), [a] "+r" (a), [b] "+r" (b) : - : "memory", "r4", "r5", "r6", "r7" + : "memory", "r4", "r5", "r6", "r8" ); return c; @@ -1806,170 +1806,170 @@ SP_NOINLINE static sp_digit sp_2048_add_64(sp_digit* r, const sp_digit* a, __asm__ __volatile__ ( "ldm %[a]!, {r4, r5}\n\t" - "ldm %[b]!, {r6, r7}\n\t" + "ldm %[b]!, {r6, r8}\n\t" "adds r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "stm %[r]!, {r4, r5}\n\t" "ldm %[a]!, {r4, r5}\n\t" - "ldm %[b]!, {r6, r7}\n\t" + "ldm %[b]!, {r6, r8}\n\t" "adcs r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "stm %[r]!, {r4, r5}\n\t" "ldm %[a]!, {r4, r5}\n\t" - "ldm %[b]!, {r6, r7}\n\t" + "ldm %[b]!, {r6, r8}\n\t" "adcs r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "stm %[r]!, {r4, r5}\n\t" "ldm %[a]!, {r4, r5}\n\t" - "ldm %[b]!, {r6, r7}\n\t" + "ldm %[b]!, {r6, r8}\n\t" "adcs r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "stm %[r]!, {r4, r5}\n\t" "ldm %[a]!, {r4, r5}\n\t" - "ldm %[b]!, {r6, r7}\n\t" + "ldm %[b]!, {r6, r8}\n\t" "adcs r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "stm %[r]!, {r4, r5}\n\t" "ldm %[a]!, {r4, r5}\n\t" - "ldm %[b]!, {r6, r7}\n\t" + "ldm %[b]!, {r6, r8}\n\t" "adcs r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "stm %[r]!, {r4, r5}\n\t" "ldm %[a]!, {r4, r5}\n\t" - "ldm %[b]!, {r6, r7}\n\t" + "ldm %[b]!, {r6, r8}\n\t" "adcs r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "stm %[r]!, {r4, r5}\n\t" "ldm %[a]!, {r4, r5}\n\t" - "ldm %[b]!, {r6, r7}\n\t" + "ldm %[b]!, {r6, r8}\n\t" "adcs r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "stm %[r]!, {r4, r5}\n\t" "ldm %[a]!, {r4, r5}\n\t" - "ldm %[b]!, {r6, r7}\n\t" + "ldm %[b]!, {r6, r8}\n\t" "adcs r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "stm %[r]!, {r4, r5}\n\t" "ldm %[a]!, {r4, r5}\n\t" - "ldm %[b]!, {r6, r7}\n\t" + "ldm %[b]!, {r6, r8}\n\t" "adcs r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "stm %[r]!, {r4, r5}\n\t" "ldm %[a]!, {r4, r5}\n\t" - "ldm %[b]!, {r6, r7}\n\t" + "ldm %[b]!, {r6, r8}\n\t" "adcs r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "stm %[r]!, {r4, r5}\n\t" "ldm %[a]!, {r4, r5}\n\t" - "ldm %[b]!, {r6, r7}\n\t" + "ldm %[b]!, {r6, r8}\n\t" "adcs r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "stm %[r]!, {r4, r5}\n\t" "ldm %[a]!, {r4, r5}\n\t" - "ldm %[b]!, {r6, r7}\n\t" + "ldm %[b]!, {r6, r8}\n\t" "adcs r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "stm %[r]!, {r4, r5}\n\t" "ldm %[a]!, {r4, r5}\n\t" - "ldm %[b]!, {r6, r7}\n\t" + "ldm %[b]!, {r6, r8}\n\t" "adcs r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "stm %[r]!, {r4, r5}\n\t" "ldm %[a]!, {r4, r5}\n\t" - "ldm %[b]!, {r6, r7}\n\t" + "ldm %[b]!, {r6, r8}\n\t" "adcs r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "stm %[r]!, {r4, r5}\n\t" "ldm %[a]!, {r4, r5}\n\t" - "ldm %[b]!, {r6, r7}\n\t" + "ldm %[b]!, {r6, r8}\n\t" "adcs r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "stm %[r]!, {r4, r5}\n\t" "ldm %[a]!, {r4, r5}\n\t" - "ldm %[b]!, {r6, r7}\n\t" + "ldm %[b]!, {r6, r8}\n\t" "adcs r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "stm %[r]!, {r4, r5}\n\t" "ldm %[a]!, {r4, r5}\n\t" - "ldm %[b]!, {r6, r7}\n\t" + "ldm %[b]!, {r6, r8}\n\t" "adcs r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "stm %[r]!, {r4, r5}\n\t" "ldm %[a]!, {r4, r5}\n\t" - "ldm %[b]!, {r6, r7}\n\t" + "ldm %[b]!, {r6, r8}\n\t" "adcs r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "stm %[r]!, {r4, r5}\n\t" "ldm %[a]!, {r4, r5}\n\t" - "ldm %[b]!, {r6, r7}\n\t" + "ldm %[b]!, {r6, r8}\n\t" "adcs r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "stm %[r]!, {r4, r5}\n\t" "ldm %[a]!, {r4, r5}\n\t" - "ldm %[b]!, {r6, r7}\n\t" + "ldm %[b]!, {r6, r8}\n\t" "adcs r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "stm %[r]!, {r4, r5}\n\t" "ldm %[a]!, {r4, r5}\n\t" - "ldm %[b]!, {r6, r7}\n\t" + "ldm %[b]!, {r6, r8}\n\t" "adcs r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "stm %[r]!, {r4, r5}\n\t" "ldm %[a]!, {r4, r5}\n\t" - "ldm %[b]!, {r6, r7}\n\t" + "ldm %[b]!, {r6, r8}\n\t" "adcs r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "stm %[r]!, {r4, r5}\n\t" "ldm %[a]!, {r4, r5}\n\t" - "ldm %[b]!, {r6, r7}\n\t" + "ldm %[b]!, {r6, r8}\n\t" "adcs r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "stm %[r]!, {r4, r5}\n\t" "ldm %[a]!, {r4, r5}\n\t" - "ldm %[b]!, {r6, r7}\n\t" + "ldm %[b]!, {r6, r8}\n\t" "adcs r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "stm %[r]!, {r4, r5}\n\t" "ldm %[a]!, {r4, r5}\n\t" - "ldm %[b]!, {r6, r7}\n\t" + "ldm %[b]!, {r6, r8}\n\t" "adcs r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "stm %[r]!, {r4, r5}\n\t" "ldm %[a]!, {r4, r5}\n\t" - "ldm %[b]!, {r6, r7}\n\t" + "ldm %[b]!, {r6, r8}\n\t" "adcs r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "stm %[r]!, {r4, r5}\n\t" "ldm %[a]!, {r4, r5}\n\t" - "ldm %[b]!, {r6, r7}\n\t" + "ldm %[b]!, {r6, r8}\n\t" "adcs r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "stm %[r]!, {r4, r5}\n\t" "ldm %[a]!, {r4, r5}\n\t" - "ldm %[b]!, {r6, r7}\n\t" + "ldm %[b]!, {r6, r8}\n\t" "adcs r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "stm %[r]!, {r4, r5}\n\t" "ldm %[a]!, {r4, r5}\n\t" - "ldm %[b]!, {r6, r7}\n\t" + "ldm %[b]!, {r6, r8}\n\t" "adcs r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "stm %[r]!, {r4, r5}\n\t" "ldm %[a]!, {r4, r5}\n\t" - "ldm %[b]!, {r6, r7}\n\t" + "ldm %[b]!, {r6, r8}\n\t" "adcs r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "stm %[r]!, {r4, r5}\n\t" "ldm %[a]!, {r4, r5}\n\t" - "ldm %[b]!, {r6, r7}\n\t" + "ldm %[b]!, {r6, r8}\n\t" "adcs r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "stm %[r]!, {r4, r5}\n\t" "mov %[c], #0\n\t" "adc %[c], %[c], %[c]\n\t" : [c] "+r" (c), [r] "+r" (r), [a] "+r" (a), [b] "+r" (b) : - : "memory", "r4", "r5", "r6", "r7" + : "memory", "r4", "r5", "r6", "r8" ); return c; @@ -2080,11 +2080,11 @@ SP_NOINLINE static sp_digit sp_2048_add_64(sp_digit* r, const sp_digit* a, __asm__ __volatile__ ( "mov r6, %[a]\n\t" - "mov r7, #0\n\t" + "mov r8, #0\n\t" "add r6, r6, #256\n\t" - "sub r7, r7, #1\n\t" + "sub r8, r8, #1\n\t" "\n1:\n\t" - "adds %[c], %[c], r7\n\t" + "adds %[c], %[c], r8\n\t" "ldr r4, [%[a]]\n\t" "ldr r5, [%[b]]\n\t" "adcs r4, r4, r5\n\t" @@ -2098,7 +2098,7 @@ SP_NOINLINE static sp_digit sp_2048_add_64(sp_digit* r, const sp_digit* a, "bne 1b\n\t" : [c] "+r" (c), [r] "+r" (r), [a] "+r" (a), [b] "+r" (b) : - : "memory", "r4", "r5", "r6", "r7" + : "memory", "r4", "r5", "r6", "r8" ); return c; @@ -2116,8 +2116,8 @@ SP_NOINLINE static sp_digit sp_2048_sub_in_place_64(sp_digit* a, { sp_digit c = 0; __asm__ __volatile__ ( - "mov r7, %[a]\n\t" - "add r7, r7, #256\n\t" + "mov r8, %[a]\n\t" + "add r8, r8, #256\n\t" "\n1:\n\t" "mov r5, #0\n\t" "subs r5, r5, %[c]\n\t" @@ -2132,11 +2132,11 @@ SP_NOINLINE static sp_digit sp_2048_sub_in_place_64(sp_digit* a, "sbc %[c], %[c], %[c]\n\t" "add %[a], %[a], #8\n\t" "add %[b], %[b], #8\n\t" - "cmp %[a], r7\n\t" + "cmp %[a], r8\n\t" "bne 1b\n\t" : [c] "+r" (c), [a] "+r" (a), [b] "+r" (b) : - : "memory", "r3", "r4", "r5", "r6", "r7" + : "memory", "r3", "r4", "r5", "r6", "r8" ); return c; @@ -2157,63 +2157,63 @@ SP_NOINLINE static void sp_2048_mul_64(sp_digit* r, const sp_digit* a, __asm__ __volatile__ ( "mov r3, #0\n\t" "mov r4, #0\n\t" - "mov r8, r3\n\t" - "mov r11, %[r]\n\t" - "mov r9, %[a]\n\t" - "mov r10, %[b]\n\t" + "mov r9, r3\n\t" + "mov r12, %[r]\n\t" + "mov r10, %[a]\n\t" + "mov r11, %[b]\n\t" "mov r6, #1\n\t" "lsl r6, r6, #8\n\t" - "add r6, r6, r9\n\t" - "mov r12, r6\n\t" + "add r6, r6, r10\n\t" + "mov r14, r6\n\t" "\n1:\n\t" "mov %[r], #0\n\t" "mov r5, #0\n\t" "mov r6, #252\n\t" - "mov %[a], r8\n\t" + "mov %[a], r9\n\t" "subs %[a], %[a], r6\n\t" "sbc r6, r6, r6\n\t" "mvn r6, r6\n\t" "and %[a], %[a], r6\n\t" - "mov %[b], r8\n\t" + "mov %[b], r9\n\t" "sub %[b], %[b], %[a]\n\t" - "add %[a], %[a], r9\n\t" - "add %[b], %[b], r10\n\t" + "add %[a], %[a], r10\n\t" + "add %[b], %[b], r11\n\t" "\n2:\n\t" /* Multiply Start */ "ldr r6, [%[a]]\n\t" - "ldr r7, [%[b]]\n\t" - "umull r6, r7, r6, r7\n\t" + "ldr r8, [%[b]]\n\t" + "umull r6, r8, r6, r8\n\t" "adds r3, r3, r6\n\t" - "adcs r4, r4, r7\n\t" + "adcs r4, r4, r8\n\t" "adc r5, r5, %[r]\n\t" /* Multiply Done */ "add %[a], %[a], #4\n\t" "sub %[b], %[b], #4\n\t" - "cmp %[a], r12\n\t" + "cmp %[a], r14\n\t" "beq 3f\n\t" - "mov r6, r8\n\t" - "add r6, r6, r9\n\t" + "mov r6, r9\n\t" + "add r6, r6, r10\n\t" "cmp %[a], r6\n\t" "ble 2b\n\t" "\n3:\n\t" - "mov %[r], r11\n\t" - "mov r7, r8\n\t" - "str r3, [%[r], r7]\n\t" + "mov %[r], r12\n\t" + "mov r8, r9\n\t" + "str r3, [%[r], r8]\n\t" "mov r3, r4\n\t" "mov r4, r5\n\t" - "add r7, r7, #4\n\t" - "mov r8, r7\n\t" + "add r8, r8, #4\n\t" + "mov r9, r8\n\t" "mov r6, #1\n\t" "lsl r6, r6, #8\n\t" "add r6, r6, #248\n\t" - "cmp r7, r6\n\t" + "cmp r8, r6\n\t" "ble 1b\n\t" - "str r3, [%[r], r7]\n\t" - "mov %[a], r9\n\t" - "mov %[b], r10\n\t" + "str r3, [%[r], r8]\n\t" + "mov %[a], r10\n\t" + "mov %[b], r11\n\t" : : [r] "r" (tmp), [a] "r" (a), [b] "r" (b) - : "memory", "r3", "r4", "r5", "r6", "r7", "r8", "r9", "r10", "r11", "r12" + : "memory", "r3", "r4", "r5", "r6", "r8", "r9", "r10", "r11", "r12", "r14" ); XMEMCPY(r, tmp, sizeof(tmp)); @@ -2230,47 +2230,47 @@ SP_NOINLINE static void sp_2048_sqr_64(sp_digit* r, const sp_digit* a) "mov r3, #0\n\t" "mov r4, #0\n\t" "mov r5, #0\n\t" - "mov r8, r3\n\t" - "mov r11, %[r]\n\t" + "mov r9, r3\n\t" + "mov r12, %[r]\n\t" "mov r6, #2\n\t" "lsl r6, r6, #8\n\t" "neg r6, r6\n\t" "add sp, sp, r6\n\t" - "mov r10, sp\n\t" - "mov r9, %[a]\n\t" + "mov r11, sp\n\t" + "mov r10, %[a]\n\t" "\n1:\n\t" "mov %[r], #0\n\t" "mov r6, #252\n\t" - "mov %[a], r8\n\t" + "mov %[a], r9\n\t" "subs %[a], %[a], r6\n\t" "sbc r6, r6, r6\n\t" "mvn r6, r6\n\t" "and %[a], %[a], r6\n\t" - "mov r2, r8\n\t" + "mov r2, r9\n\t" "sub r2, r2, %[a]\n\t" - "add %[a], %[a], r9\n\t" - "add r2, r2, r9\n\t" + "add %[a], %[a], r10\n\t" + "add r2, r2, r10\n\t" "\n2:\n\t" "cmp r2, %[a]\n\t" "beq 4f\n\t" /* Multiply * 2: Start */ "ldr r6, [%[a]]\n\t" - "ldr r7, [r2]\n\t" - "umull r6, r7, r6, r7\n\t" + "ldr r8, [r2]\n\t" + "umull r6, r8, r6, r8\n\t" "adds r3, r3, r6\n\t" - "adcs r4, r4, r7\n\t" + "adcs r4, r4, r8\n\t" "adc r5, r5, %[r]\n\t" "adds r3, r3, r6\n\t" - "adcs r4, r4, r7\n\t" + "adcs r4, r4, r8\n\t" "adc r5, r5, %[r]\n\t" /* Multiply * 2: Done */ "bal 5f\n\t" "\n4:\n\t" /* Square: Start */ "ldr r6, [%[a]]\n\t" - "umull r6, r7, r6, r6\n\t" + "umull r6, r8, r6, r6\n\t" "adds r3, r3, r6\n\t" - "adcs r4, r4, r7\n\t" + "adcs r4, r4, r8\n\t" "adc r5, r5, %[r]\n\t" /* Square: Done */ "\n5:\n\t" @@ -2278,33 +2278,33 @@ SP_NOINLINE static void sp_2048_sqr_64(sp_digit* r, const sp_digit* a) "sub r2, r2, #4\n\t" "mov r6, #1\n\t" "lsl r6, r6, #8\n\t" - "add r6, r6, r9\n\t" + "add r6, r6, r10\n\t" "cmp %[a], r6\n\t" "beq 3f\n\t" "cmp %[a], r2\n\t" "bgt 3f\n\t" - "mov r7, r8\n\t" - "add r7, r7, r9\n\t" - "cmp %[a], r7\n\t" + "mov r8, r9\n\t" + "add r8, r8, r10\n\t" + "cmp %[a], r8\n\t" "ble 2b\n\t" "\n3:\n\t" - "mov %[r], r10\n\t" - "mov r7, r8\n\t" - "str r3, [%[r], r7]\n\t" + "mov %[r], r11\n\t" + "mov r8, r9\n\t" + "str r3, [%[r], r8]\n\t" "mov r3, r4\n\t" "mov r4, r5\n\t" "mov r5, #0\n\t" - "add r7, r7, #4\n\t" - "mov r8, r7\n\t" + "add r8, r8, #4\n\t" + "mov r9, r8\n\t" "mov r6, #1\n\t" "lsl r6, r6, #8\n\t" "add r6, r6, #248\n\t" - "cmp r7, r6\n\t" + "cmp r8, r6\n\t" "ble 1b\n\t" - "mov %[a], r9\n\t" - "str r3, [%[r], r7]\n\t" - "mov %[r], r11\n\t" "mov %[a], r10\n\t" + "str r3, [%[r], r8]\n\t" + "mov %[r], r12\n\t" + "mov %[a], r11\n\t" "mov r3, #1\n\t" "lsl r3, r3, #8\n\t" "add r3, r3, #252\n\t" @@ -2318,7 +2318,7 @@ SP_NOINLINE static void sp_2048_sqr_64(sp_digit* r, const sp_digit* a) "add sp, sp, r6\n\t" : : [r] "r" (r), [a] "r" (a) - : "memory", "r2", "r3", "r4", "r5", "r6", "r7", "r8", "r9", "r10", "r11" + : "memory", "r2", "r3", "r4", "r5", "r6", "r8", "r9", "r10", "r11", "r12" ); } @@ -2355,11 +2355,11 @@ SP_NOINLINE static sp_digit sp_2048_add_32(sp_digit* r, const sp_digit* a, __asm__ __volatile__ ( "mov r6, %[a]\n\t" - "mov r7, #0\n\t" + "mov r8, #0\n\t" "add r6, r6, #128\n\t" - "sub r7, r7, #1\n\t" + "sub r8, r8, #1\n\t" "\n1:\n\t" - "adds %[c], %[c], r7\n\t" + "adds %[c], %[c], r8\n\t" "ldr r4, [%[a]]\n\t" "ldr r5, [%[b]]\n\t" "adcs r4, r4, r5\n\t" @@ -2373,7 +2373,7 @@ SP_NOINLINE static sp_digit sp_2048_add_32(sp_digit* r, const sp_digit* a, "bne 1b\n\t" : [c] "+r" (c), [r] "+r" (r), [a] "+r" (a), [b] "+r" (b) : - : "memory", "r4", "r5", "r6", "r7" + : "memory", "r4", "r5", "r6", "r8" ); return c; @@ -2391,8 +2391,8 @@ SP_NOINLINE static sp_digit sp_2048_sub_in_place_32(sp_digit* a, { sp_digit c = 0; __asm__ __volatile__ ( - "mov r7, %[a]\n\t" - "add r7, r7, #128\n\t" + "mov r8, %[a]\n\t" + "add r8, r8, #128\n\t" "\n1:\n\t" "mov r5, #0\n\t" "subs r5, r5, %[c]\n\t" @@ -2407,11 +2407,11 @@ SP_NOINLINE static sp_digit sp_2048_sub_in_place_32(sp_digit* a, "sbc %[c], %[c], %[c]\n\t" "add %[a], %[a], #8\n\t" "add %[b], %[b], #8\n\t" - "cmp %[a], r7\n\t" + "cmp %[a], r8\n\t" "bne 1b\n\t" : [c] "+r" (c), [a] "+r" (a), [b] "+r" (b) : - : "memory", "r3", "r4", "r5", "r6", "r7" + : "memory", "r3", "r4", "r5", "r6", "r8" ); return c; @@ -2432,60 +2432,60 @@ SP_NOINLINE static void sp_2048_mul_32(sp_digit* r, const sp_digit* a, __asm__ __volatile__ ( "mov r3, #0\n\t" "mov r4, #0\n\t" - "mov r8, r3\n\t" - "mov r11, %[r]\n\t" - "mov r9, %[a]\n\t" - "mov r10, %[b]\n\t" + "mov r9, r3\n\t" + "mov r12, %[r]\n\t" + "mov r10, %[a]\n\t" + "mov r11, %[b]\n\t" "mov r6, #128\n\t" - "add r6, r6, r9\n\t" - "mov r12, r6\n\t" + "add r6, r6, r10\n\t" + "mov r14, r6\n\t" "\n1:\n\t" "mov %[r], #0\n\t" "mov r5, #0\n\t" "mov r6, #124\n\t" - "mov %[a], r8\n\t" + "mov %[a], r9\n\t" "subs %[a], %[a], r6\n\t" "sbc r6, r6, r6\n\t" "mvn r6, r6\n\t" "and %[a], %[a], r6\n\t" - "mov %[b], r8\n\t" + "mov %[b], r9\n\t" "sub %[b], %[b], %[a]\n\t" - "add %[a], %[a], r9\n\t" - "add %[b], %[b], r10\n\t" + "add %[a], %[a], r10\n\t" + "add %[b], %[b], r11\n\t" "\n2:\n\t" /* Multiply Start */ "ldr r6, [%[a]]\n\t" - "ldr r7, [%[b]]\n\t" - "umull r6, r7, r6, r7\n\t" + "ldr r8, [%[b]]\n\t" + "umull r6, r8, r6, r8\n\t" "adds r3, r3, r6\n\t" - "adcs r4, r4, r7\n\t" + "adcs r4, r4, r8\n\t" "adc r5, r5, %[r]\n\t" /* Multiply Done */ "add %[a], %[a], #4\n\t" "sub %[b], %[b], #4\n\t" - "cmp %[a], r12\n\t" + "cmp %[a], r14\n\t" "beq 3f\n\t" - "mov r6, r8\n\t" - "add r6, r6, r9\n\t" + "mov r6, r9\n\t" + "add r6, r6, r10\n\t" "cmp %[a], r6\n\t" "ble 2b\n\t" "\n3:\n\t" - "mov %[r], r11\n\t" - "mov r7, r8\n\t" - "str r3, [%[r], r7]\n\t" + "mov %[r], r12\n\t" + "mov r8, r9\n\t" + "str r3, [%[r], r8]\n\t" "mov r3, r4\n\t" "mov r4, r5\n\t" - "add r7, r7, #4\n\t" - "mov r8, r7\n\t" + "add r8, r8, #4\n\t" + "mov r9, r8\n\t" "mov r6, #248\n\t" - "cmp r7, r6\n\t" + "cmp r8, r6\n\t" "ble 1b\n\t" - "str r3, [%[r], r7]\n\t" - "mov %[a], r9\n\t" - "mov %[b], r10\n\t" + "str r3, [%[r], r8]\n\t" + "mov %[a], r10\n\t" + "mov %[b], r11\n\t" : : [r] "r" (tmp), [a] "r" (a), [b] "r" (b) - : "memory", "r3", "r4", "r5", "r6", "r7", "r8", "r9", "r10", "r11", "r12" + : "memory", "r3", "r4", "r5", "r6", "r8", "r9", "r10", "r11", "r12", "r14" ); XMEMCPY(r, tmp, sizeof(tmp)); @@ -2502,78 +2502,78 @@ SP_NOINLINE static void sp_2048_sqr_32(sp_digit* r, const sp_digit* a) "mov r3, #0\n\t" "mov r4, #0\n\t" "mov r5, #0\n\t" - "mov r8, r3\n\t" - "mov r11, %[r]\n\t" + "mov r9, r3\n\t" + "mov r12, %[r]\n\t" "mov r6, #1\n\t" "lsl r6, r6, #8\n\t" "neg r6, r6\n\t" "add sp, sp, r6\n\t" - "mov r10, sp\n\t" - "mov r9, %[a]\n\t" + "mov r11, sp\n\t" + "mov r10, %[a]\n\t" "\n1:\n\t" "mov %[r], #0\n\t" "mov r6, #124\n\t" - "mov %[a], r8\n\t" + "mov %[a], r9\n\t" "subs %[a], %[a], r6\n\t" "sbc r6, r6, r6\n\t" "mvn r6, r6\n\t" "and %[a], %[a], r6\n\t" - "mov r2, r8\n\t" + "mov r2, r9\n\t" "sub r2, r2, %[a]\n\t" - "add %[a], %[a], r9\n\t" - "add r2, r2, r9\n\t" + "add %[a], %[a], r10\n\t" + "add r2, r2, r10\n\t" "\n2:\n\t" "cmp r2, %[a]\n\t" "beq 4f\n\t" /* Multiply * 2: Start */ "ldr r6, [%[a]]\n\t" - "ldr r7, [r2]\n\t" - "umull r6, r7, r6, r7\n\t" + "ldr r8, [r2]\n\t" + "umull r6, r8, r6, r8\n\t" "adds r3, r3, r6\n\t" - "adcs r4, r4, r7\n\t" + "adcs r4, r4, r8\n\t" "adc r5, r5, %[r]\n\t" "adds r3, r3, r6\n\t" - "adcs r4, r4, r7\n\t" + "adcs r4, r4, r8\n\t" "adc r5, r5, %[r]\n\t" /* Multiply * 2: Done */ "bal 5f\n\t" "\n4:\n\t" /* Square: Start */ "ldr r6, [%[a]]\n\t" - "umull r6, r7, r6, r6\n\t" + "umull r6, r8, r6, r6\n\t" "adds r3, r3, r6\n\t" - "adcs r4, r4, r7\n\t" + "adcs r4, r4, r8\n\t" "adc r5, r5, %[r]\n\t" /* Square: Done */ "\n5:\n\t" "add %[a], %[a], #4\n\t" "sub r2, r2, #4\n\t" "mov r6, #128\n\t" - "add r6, r6, r9\n\t" + "add r6, r6, r10\n\t" "cmp %[a], r6\n\t" "beq 3f\n\t" "cmp %[a], r2\n\t" "bgt 3f\n\t" - "mov r7, r8\n\t" - "add r7, r7, r9\n\t" - "cmp %[a], r7\n\t" + "mov r8, r9\n\t" + "add r8, r8, r10\n\t" + "cmp %[a], r8\n\t" "ble 2b\n\t" "\n3:\n\t" - "mov %[r], r10\n\t" - "mov r7, r8\n\t" - "str r3, [%[r], r7]\n\t" + "mov %[r], r11\n\t" + "mov r8, r9\n\t" + "str r3, [%[r], r8]\n\t" "mov r3, r4\n\t" "mov r4, r5\n\t" "mov r5, #0\n\t" - "add r7, r7, #4\n\t" - "mov r8, r7\n\t" + "add r8, r8, #4\n\t" + "mov r9, r8\n\t" "mov r6, #248\n\t" - "cmp r7, r6\n\t" + "cmp r8, r6\n\t" "ble 1b\n\t" - "mov %[a], r9\n\t" - "str r3, [%[r], r7]\n\t" - "mov %[r], r11\n\t" "mov %[a], r10\n\t" + "str r3, [%[r], r8]\n\t" + "mov %[r], r12\n\t" + "mov %[a], r11\n\t" "mov r3, #252\n\t" "\n4:\n\t" "ldr r6, [%[a], r3]\n\t" @@ -2585,7 +2585,7 @@ SP_NOINLINE static void sp_2048_sqr_32(sp_digit* r, const sp_digit* a) "add sp, sp, r6\n\t" : : [r] "r" (r), [a] "r" (a) - : "memory", "r2", "r3", "r4", "r5", "r6", "r7", "r8", "r9", "r10", "r11" + : "memory", "r2", "r3", "r4", "r5", "r6", "r8", "r9", "r10", "r11", "r12" ); } @@ -2621,7 +2621,7 @@ SP_NOINLINE static void sp_2048_mul_d_64(sp_digit* r, const sp_digit* a, sp_digit b) { __asm__ __volatile__ ( - "add r8, %[a], #256\n\t" + "add r9, %[a], #256\n\t" /* A[0] * B */ "ldr r6, [%[a]], #4\n\t" "umull r5, r3, r6, %[b]\n\t" @@ -2632,20 +2632,20 @@ SP_NOINLINE static void sp_2048_mul_d_64(sp_digit* r, const sp_digit* a, "mov r5, #0\n\t" /* A[] * B */ "ldr r6, [%[a]], #4\n\t" - "umull r6, r7, r6, %[b]\n\t" + "umull r6, r8, r6, %[b]\n\t" "adds r3, r3, r6\n\t" - "adcs r4, r4, r7\n\t" + "adcs r4, r4, r8\n\t" "adc r5, r5, #0\n\t" /* A[] * B - Done */ "str r3, [%[r]], #4\n\t" "mov r3, r4\n\t" "mov r4, r5\n\t" - "cmp %[a], r8\n\t" + "cmp %[a], r9\n\t" "blt 1b\n\t" "str r3, [%[r]]\n\t" : [r] "+r" (r), [a] "+r" (a) : [b] "r" (b) - : "memory", "r3", "r4", "r5", "r6", "r7", "r8" + : "memory", "r3", "r4", "r5", "r6", "r8", "r9" ); } @@ -2679,23 +2679,23 @@ SP_NOINLINE static sp_digit sp_2048_cond_sub_32(sp_digit* r, const sp_digit* a, __asm__ __volatile__ ( "mov r5, #128\n\t" - "mov r8, r5\n\t" - "mov r7, #0\n\t" + "mov r9, r5\n\t" + "mov r8, #0\n\t" "\n1:\n\t" - "ldr r6, [%[b], r7]\n\t" + "ldr r6, [%[b], r8]\n\t" "and r6, r6, %[m]\n\t" "mov r5, #0\n\t" "subs r5, r5, %[c]\n\t" - "ldr r5, [%[a], r7]\n\t" + "ldr r5, [%[a], r8]\n\t" "sbcs r5, r5, r6\n\t" "sbcs %[c], %[c], %[c]\n\t" - "str r5, [%[r], r7]\n\t" - "add r7, r7, #4\n\t" - "cmp r7, r8\n\t" + "str r5, [%[r], r8]\n\t" + "add r8, r8, #4\n\t" + "cmp r8, r9\n\t" "blt 1b\n\t" : [c] "+r" (c) : [r] "r" (r), [a] "r" (a), [b] "r" (b), [m] "r" (m) - : "memory", "r5", "r6", "r7", "r8" + : "memory", "r5", "r6", "r8", "r9" ); return c; @@ -2713,28 +2713,27 @@ SP_NOINLINE static void sp_2048_mont_reduce_32(sp_digit* a, const sp_digit* m, sp_digit ca = 0; __asm__ __volatile__ ( - "mov r8, %[mp]\n\t" + "mov r9, %[mp]\n\t" "mov r12, %[m]\n\t" - "mov r9, %[a]\n\t" + "mov r10, %[a]\n\t" "mov r4, #0\n\t" - "add r11, r9, #128\n\t" + "add r11, r10, #128\n\t" "\n1:\n\t" /* mu = a[i] * mp */ - "mov %[mp], r8\n\t" - "ldr %[a], [r9]\n\t" + "mov %[mp], r9\n\t" + "ldr %[a], [r10]\n\t" "mul %[mp], %[mp], %[a]\n\t" "mov %[m], r12\n\t" - "mov r10, r9\n\t" - "add r14, r9, #120\n\t" + "add r14, r10, #120\n\t" "\n2:\n\t" /* a[i+j] += m[j] * mu */ "ldr %[a], [r10]\n\t" "mov r5, #0\n\t" /* Multiply m[j] and mu - Start */ - "ldr r7, [%[m]], #4\n\t" - "umull r6, r7, %[mp], r7\n\t" + "ldr r8, [%[m]], #4\n\t" + "umull r6, r8, %[mp], r8\n\t" "adds %[a], %[a], r6\n\t" - "adc r5, r5, r7\n\t" + "adc r5, r5, r8\n\t" /* Multiply m[j] and mu - Done */ "adds r4, r4, %[a]\n\t" "adc r5, r5, #0\n\t" @@ -2743,10 +2742,10 @@ SP_NOINLINE static void sp_2048_mont_reduce_32(sp_digit* a, const sp_digit* m, "ldr %[a], [r10]\n\t" "mov r4, #0\n\t" /* Multiply m[j] and mu - Start */ - "ldr r7, [%[m]], #4\n\t" - "umull r6, r7, %[mp], r7\n\t" + "ldr r8, [%[m]], #4\n\t" + "umull r6, r8, %[mp], r8\n\t" "adds %[a], %[a], r6\n\t" - "adc r4, r4, r7\n\t" + "adc r4, r4, r8\n\t" /* Multiply m[j] and mu - Done */ "adds r5, r5, %[a]\n\t" "adc r4, r4, #0\n\t" @@ -2757,10 +2756,10 @@ SP_NOINLINE static void sp_2048_mont_reduce_32(sp_digit* a, const sp_digit* m, "ldr %[a], [r10]\n\t" "mov r5, #0\n\t" /* Multiply m[j] and mu - Start */ - "ldr r7, [%[m]], #4\n\t" - "umull r6, r7, %[mp], r7\n\t" + "ldr r8, [%[m]], #4\n\t" + "umull r6, r8, %[mp], r8\n\t" "adds %[a], %[a], r6\n\t" - "adc r5, r5, r7\n\t" + "adc r5, r5, r8\n\t" /* Multiply m[j] and mu - Done */ "adds r4, r4, %[a]\n\t" "adc r5, r5, #0\n\t" @@ -2769,28 +2768,28 @@ SP_NOINLINE static void sp_2048_mont_reduce_32(sp_digit* a, const sp_digit* m, "mov r4, %[ca]\n\t" "mov %[ca], #0\n\t" /* Multiply m[31] and mu - Start */ - "ldr r7, [%[m]]\n\t" - "umull r6, r7, %[mp], r7\n\t" + "ldr r8, [%[m]]\n\t" + "umull r6, r8, %[mp], r8\n\t" "adds r5, r5, r6\n\t" - "adcs r4, r4, r7\n\t" + "adcs r4, r4, r8\n\t" "adc %[ca], %[ca], #0\n\t" /* Multiply m[31] and mu - Done */ "ldr r6, [r10]\n\t" - "ldr r7, [r10, #4]\n\t" + "ldr r8, [r10, #4]\n\t" "adds r6, r6, r5\n\t" - "adcs r7, r7, r4\n\t" + "adcs r8, r8, r4\n\t" "adc %[ca], %[ca], #0\n\t" "str r6, [r10]\n\t" - "str r7, [r10, #4]\n\t" + "str r8, [r10, #4]\n\t" /* Next word in a */ - "add r9, r9, #4\n\t" - "cmp r9, r11\n\t" + "sub r10, r10, #120\n\t" + "cmp r10, r11\n\t" "blt 1b\n\t" - "mov %[a], r9\n\t" + "mov %[a], r10\n\t" "mov %[m], r12\n\t" : [ca] "+r" (ca), [a] "+r" (a) : [m] "r" (m), [mp] "r" (mp) - : "memory", "r4", "r5", "r6", "r7", "r8", "r9", "r10", "r11", "r12", "r14" + : "memory", "r4", "r5", "r6", "r8", "r9", "r10", "r11", "r12", "r14" ); sp_2048_cond_sub_32(a - 32, a, m, (sp_digit)0 - ca); @@ -2836,7 +2835,7 @@ SP_NOINLINE static void sp_2048_mul_d_32(sp_digit* r, const sp_digit* a, sp_digit b) { __asm__ __volatile__ ( - "add r8, %[a], #128\n\t" + "add r9, %[a], #128\n\t" /* A[0] * B */ "ldr r6, [%[a]], #4\n\t" "umull r5, r3, r6, %[b]\n\t" @@ -2847,20 +2846,20 @@ SP_NOINLINE static void sp_2048_mul_d_32(sp_digit* r, const sp_digit* a, "mov r5, #0\n\t" /* A[] * B */ "ldr r6, [%[a]], #4\n\t" - "umull r6, r7, r6, %[b]\n\t" + "umull r6, r8, r6, %[b]\n\t" "adds r3, r3, r6\n\t" - "adcs r4, r4, r7\n\t" + "adcs r4, r4, r8\n\t" "adc r5, r5, #0\n\t" /* A[] * B - Done */ "str r3, [%[r]], #4\n\t" "mov r3, r4\n\t" "mov r4, r5\n\t" - "cmp %[a], r8\n\t" + "cmp %[a], r9\n\t" "blt 1b\n\t" "str r3, [%[r]]\n\t" : [r] "+r" (r), [a] "+r" (a) : [b] "r" (b) - : "memory", "r3", "r4", "r5", "r6", "r7", "r8" + : "memory", "r3", "r4", "r5", "r6", "r8", "r9" ); } @@ -2882,36 +2881,36 @@ SP_NOINLINE static sp_digit div_2048_word_32(sp_digit d1, sp_digit d0, "lsr r6, %[div], #16\n\t" "add r6, r6, #1\n\t" "udiv r4, %[d1], r6\n\t" - "lsl r7, r4, #16\n\t" - "umull r4, r5, %[div], r7\n\t" + "lsl r8, r4, #16\n\t" + "umull r4, r5, %[div], r8\n\t" "subs %[d0], %[d0], r4\n\t" "sbc %[d1], %[d1], r5\n\t" "udiv r5, %[d1], r6\n\t" "lsl r4, r5, #16\n\t" - "add r7, r7, r4\n\t" + "add r8, r8, r4\n\t" "umull r4, r5, %[div], r4\n\t" "subs %[d0], %[d0], r4\n\t" "sbc %[d1], %[d1], r5\n\t" "lsl r4, %[d1], #16\n\t" "orr r4, r4, %[d0], lsr #16\n\t" "udiv r4, r4, r6\n\t" - "add r7, r7, r4\n\t" + "add r8, r8, r4\n\t" "umull r4, r5, %[div], r4\n\t" "subs %[d0], %[d0], r4\n\t" "sbc %[d1], %[d1], r5\n\t" "lsl r4, %[d1], #16\n\t" "orr r4, r4, %[d0], lsr #16\n\t" "udiv r4, r4, r6\n\t" - "add r7, r7, r4\n\t" + "add r8, r8, r4\n\t" "umull r4, r5, %[div], r4\n\t" "subs %[d0], %[d0], r4\n\t" "sbc %[d1], %[d1], r5\n\t" "udiv r4, %[d0], %[div]\n\t" - "add r7, r7, r4\n\t" - "mov %[r], r7\n\t" + "add r8, r8, r4\n\t" + "mov %[r], r8\n\t" : [r] "+r" (r) : [d1] "r" (d1), [d0] "r" (d0), [div] "r" (div) - : "r4", "r5", "r6", "r7" + : "r4", "r5", "r6", "r8" ); return r; } @@ -2933,27 +2932,27 @@ SP_NOINLINE static int32_t sp_2048_cmp_32(const sp_digit* a, const sp_digit* b) "mvn r3, r3\n\t" "mov r6, #124\n\t" "\n1:\n\t" - "ldr r7, [%[a], r6]\n\t" + "ldr r8, [%[a], r6]\n\t" "ldr r5, [%[b], r6]\n\t" - "and r7, r7, r3\n\t" + "and r8, r8, r3\n\t" "and r5, r5, r3\n\t" - "mov r4, r7\n\t" - "subs r7, r7, r5\n\t" - "sbc r7, r7, r7\n\t" - "add %[r], %[r], r7\n\t" - "mvn r7, r7\n\t" - "and r3, r3, r7\n\t" + "mov r4, r8\n\t" + "subs r8, r8, r5\n\t" + "sbc r8, r8, r8\n\t" + "add %[r], %[r], r8\n\t" + "mvn r8, r8\n\t" + "and r3, r3, r8\n\t" "subs r5, r5, r4\n\t" - "sbc r7, r7, r7\n\t" - "sub %[r], %[r], r7\n\t" - "mvn r7, r7\n\t" - "and r3, r3, r7\n\t" + "sbc r8, r8, r8\n\t" + "sub %[r], %[r], r8\n\t" + "mvn r8, r8\n\t" + "and r3, r3, r8\n\t" "sub r6, r6, #4\n\t" "cmp r6, #0\n\t" "bge 1b\n\t" : [r] "+r" (r) : [a] "r" (a), [b] "r" (b) - : "r3", "r4", "r5", "r6", "r7" + : "r3", "r4", "r5", "r6", "r8" ); return r; @@ -3326,23 +3325,23 @@ SP_NOINLINE static sp_digit sp_2048_cond_sub_64(sp_digit* r, const sp_digit* a, __asm__ __volatile__ ( "mov r5, #1\n\t" "lsl r5, r5, #8\n\t" - "mov r8, r5\n\t" - "mov r7, #0\n\t" + "mov r9, r5\n\t" + "mov r8, #0\n\t" "\n1:\n\t" - "ldr r6, [%[b], r7]\n\t" + "ldr r6, [%[b], r8]\n\t" "and r6, r6, %[m]\n\t" "mov r5, #0\n\t" "subs r5, r5, %[c]\n\t" - "ldr r5, [%[a], r7]\n\t" + "ldr r5, [%[a], r8]\n\t" "sbcs r5, r5, r6\n\t" "sbcs %[c], %[c], %[c]\n\t" - "str r5, [%[r], r7]\n\t" - "add r7, r7, #4\n\t" - "cmp r7, r8\n\t" + "str r5, [%[r], r8]\n\t" + "add r8, r8, #4\n\t" + "cmp r8, r9\n\t" "blt 1b\n\t" : [c] "+r" (c) : [r] "r" (r), [a] "r" (a), [b] "r" (b), [m] "r" (m) - : "memory", "r5", "r6", "r7", "r8" + : "memory", "r5", "r6", "r8", "r9" ); return c; @@ -3360,28 +3359,27 @@ SP_NOINLINE static void sp_2048_mont_reduce_64(sp_digit* a, const sp_digit* m, sp_digit ca = 0; __asm__ __volatile__ ( - "mov r8, %[mp]\n\t" + "mov r9, %[mp]\n\t" "mov r12, %[m]\n\t" - "mov r9, %[a]\n\t" + "mov r10, %[a]\n\t" "mov r4, #0\n\t" - "add r11, r9, #256\n\t" + "add r11, r10, #256\n\t" "\n1:\n\t" /* mu = a[i] * mp */ - "mov %[mp], r8\n\t" - "ldr %[a], [r9]\n\t" + "mov %[mp], r9\n\t" + "ldr %[a], [r10]\n\t" "mul %[mp], %[mp], %[a]\n\t" "mov %[m], r12\n\t" - "mov r10, r9\n\t" - "add r14, r9, #248\n\t" + "add r14, r10, #248\n\t" "\n2:\n\t" /* a[i+j] += m[j] * mu */ "ldr %[a], [r10]\n\t" "mov r5, #0\n\t" /* Multiply m[j] and mu - Start */ - "ldr r7, [%[m]], #4\n\t" - "umull r6, r7, %[mp], r7\n\t" + "ldr r8, [%[m]], #4\n\t" + "umull r6, r8, %[mp], r8\n\t" "adds %[a], %[a], r6\n\t" - "adc r5, r5, r7\n\t" + "adc r5, r5, r8\n\t" /* Multiply m[j] and mu - Done */ "adds r4, r4, %[a]\n\t" "adc r5, r5, #0\n\t" @@ -3390,10 +3388,10 @@ SP_NOINLINE static void sp_2048_mont_reduce_64(sp_digit* a, const sp_digit* m, "ldr %[a], [r10]\n\t" "mov r4, #0\n\t" /* Multiply m[j] and mu - Start */ - "ldr r7, [%[m]], #4\n\t" - "umull r6, r7, %[mp], r7\n\t" + "ldr r8, [%[m]], #4\n\t" + "umull r6, r8, %[mp], r8\n\t" "adds %[a], %[a], r6\n\t" - "adc r4, r4, r7\n\t" + "adc r4, r4, r8\n\t" /* Multiply m[j] and mu - Done */ "adds r5, r5, %[a]\n\t" "adc r4, r4, #0\n\t" @@ -3404,10 +3402,10 @@ SP_NOINLINE static void sp_2048_mont_reduce_64(sp_digit* a, const sp_digit* m, "ldr %[a], [r10]\n\t" "mov r5, #0\n\t" /* Multiply m[j] and mu - Start */ - "ldr r7, [%[m]], #4\n\t" - "umull r6, r7, %[mp], r7\n\t" + "ldr r8, [%[m]], #4\n\t" + "umull r6, r8, %[mp], r8\n\t" "adds %[a], %[a], r6\n\t" - "adc r5, r5, r7\n\t" + "adc r5, r5, r8\n\t" /* Multiply m[j] and mu - Done */ "adds r4, r4, %[a]\n\t" "adc r5, r5, #0\n\t" @@ -3416,28 +3414,28 @@ SP_NOINLINE static void sp_2048_mont_reduce_64(sp_digit* a, const sp_digit* m, "mov r4, %[ca]\n\t" "mov %[ca], #0\n\t" /* Multiply m[63] and mu - Start */ - "ldr r7, [%[m]]\n\t" - "umull r6, r7, %[mp], r7\n\t" + "ldr r8, [%[m]]\n\t" + "umull r6, r8, %[mp], r8\n\t" "adds r5, r5, r6\n\t" - "adcs r4, r4, r7\n\t" + "adcs r4, r4, r8\n\t" "adc %[ca], %[ca], #0\n\t" /* Multiply m[63] and mu - Done */ "ldr r6, [r10]\n\t" - "ldr r7, [r10, #4]\n\t" + "ldr r8, [r10, #4]\n\t" "adds r6, r6, r5\n\t" - "adcs r7, r7, r4\n\t" + "adcs r8, r8, r4\n\t" "adc %[ca], %[ca], #0\n\t" "str r6, [r10]\n\t" - "str r7, [r10, #4]\n\t" + "str r8, [r10, #4]\n\t" /* Next word in a */ - "add r9, r9, #4\n\t" - "cmp r9, r11\n\t" + "sub r10, r10, #248\n\t" + "cmp r10, r11\n\t" "blt 1b\n\t" - "mov %[a], r9\n\t" + "mov %[a], r10\n\t" "mov %[m], r12\n\t" : [ca] "+r" (ca), [a] "+r" (a) : [m] "r" (m), [mp] "r" (mp) - : "memory", "r4", "r5", "r6", "r7", "r8", "r9", "r10", "r11", "r12", "r14" + : "memory", "r4", "r5", "r6", "r8", "r9", "r10", "r11", "r12", "r14" ); sp_2048_cond_sub_64(a - 64, a, m, (sp_digit)0 - ca); @@ -3491,36 +3489,36 @@ SP_NOINLINE static sp_digit div_2048_word_64(sp_digit d1, sp_digit d0, "lsr r6, %[div], #16\n\t" "add r6, r6, #1\n\t" "udiv r4, %[d1], r6\n\t" - "lsl r7, r4, #16\n\t" - "umull r4, r5, %[div], r7\n\t" + "lsl r8, r4, #16\n\t" + "umull r4, r5, %[div], r8\n\t" "subs %[d0], %[d0], r4\n\t" "sbc %[d1], %[d1], r5\n\t" "udiv r5, %[d1], r6\n\t" "lsl r4, r5, #16\n\t" - "add r7, r7, r4\n\t" + "add r8, r8, r4\n\t" "umull r4, r5, %[div], r4\n\t" "subs %[d0], %[d0], r4\n\t" "sbc %[d1], %[d1], r5\n\t" "lsl r4, %[d1], #16\n\t" "orr r4, r4, %[d0], lsr #16\n\t" "udiv r4, r4, r6\n\t" - "add r7, r7, r4\n\t" + "add r8, r8, r4\n\t" "umull r4, r5, %[div], r4\n\t" "subs %[d0], %[d0], r4\n\t" "sbc %[d1], %[d1], r5\n\t" "lsl r4, %[d1], #16\n\t" "orr r4, r4, %[d0], lsr #16\n\t" "udiv r4, r4, r6\n\t" - "add r7, r7, r4\n\t" + "add r8, r8, r4\n\t" "umull r4, r5, %[div], r4\n\t" "subs %[d0], %[d0], r4\n\t" "sbc %[d1], %[d1], r5\n\t" "udiv r4, %[d0], %[div]\n\t" - "add r7, r7, r4\n\t" - "mov %[r], r7\n\t" + "add r8, r8, r4\n\t" + "mov %[r], r8\n\t" : [r] "+r" (r) : [d1] "r" (d1), [d0] "r" (d0), [div] "r" (div) - : "r4", "r5", "r6", "r7" + : "r4", "r5", "r6", "r8" ); return r; } @@ -3572,27 +3570,27 @@ SP_NOINLINE static int32_t sp_2048_cmp_64(const sp_digit* a, const sp_digit* b) "mvn r3, r3\n\t" "mov r6, #252\n\t" "\n1:\n\t" - "ldr r7, [%[a], r6]\n\t" + "ldr r8, [%[a], r6]\n\t" "ldr r5, [%[b], r6]\n\t" - "and r7, r7, r3\n\t" + "and r8, r8, r3\n\t" "and r5, r5, r3\n\t" - "mov r4, r7\n\t" - "subs r7, r7, r5\n\t" - "sbc r7, r7, r7\n\t" - "add %[r], %[r], r7\n\t" - "mvn r7, r7\n\t" - "and r3, r3, r7\n\t" + "mov r4, r8\n\t" + "subs r8, r8, r5\n\t" + "sbc r8, r8, r8\n\t" + "add %[r], %[r], r8\n\t" + "mvn r8, r8\n\t" + "and r3, r3, r8\n\t" "subs r5, r5, r4\n\t" - "sbc r7, r7, r7\n\t" - "sub %[r], %[r], r7\n\t" - "mvn r7, r7\n\t" - "and r3, r3, r7\n\t" + "sbc r8, r8, r8\n\t" + "sub %[r], %[r], r8\n\t" + "mvn r8, r8\n\t" + "and r3, r3, r8\n\t" "sub r6, r6, #4\n\t" "cmp r6, #0\n\t" "bge 1b\n\t" : [r] "+r" (r) : [a] "r" (a), [b] "r" (b) - : "r3", "r4", "r5", "r6", "r7" + : "r3", "r4", "r5", "r6", "r8" ); return r; @@ -5156,60 +5154,60 @@ SP_NOINLINE static void sp_3072_mul_12(sp_digit* r, const sp_digit* a, __asm__ __volatile__ ( "mov r3, #0\n\t" "mov r4, #0\n\t" - "mov r8, r3\n\t" - "mov r11, %[r]\n\t" - "mov r9, %[a]\n\t" - "mov r10, %[b]\n\t" + "mov r9, r3\n\t" + "mov r12, %[r]\n\t" + "mov r10, %[a]\n\t" + "mov r11, %[b]\n\t" "mov r6, #48\n\t" - "add r6, r6, r9\n\t" - "mov r12, r6\n\t" + "add r6, r6, r10\n\t" + "mov r14, r6\n\t" "\n1:\n\t" "mov %[r], #0\n\t" "mov r5, #0\n\t" "mov r6, #44\n\t" - "mov %[a], r8\n\t" + "mov %[a], r9\n\t" "subs %[a], %[a], r6\n\t" "sbc r6, r6, r6\n\t" "mvn r6, r6\n\t" "and %[a], %[a], r6\n\t" - "mov %[b], r8\n\t" + "mov %[b], r9\n\t" "sub %[b], %[b], %[a]\n\t" - "add %[a], %[a], r9\n\t" - "add %[b], %[b], r10\n\t" + "add %[a], %[a], r10\n\t" + "add %[b], %[b], r11\n\t" "\n2:\n\t" /* Multiply Start */ "ldr r6, [%[a]]\n\t" - "ldr r7, [%[b]]\n\t" - "umull r6, r7, r6, r7\n\t" + "ldr r8, [%[b]]\n\t" + "umull r6, r8, r6, r8\n\t" "adds r3, r3, r6\n\t" - "adcs r4, r4, r7\n\t" + "adcs r4, r4, r8\n\t" "adc r5, r5, %[r]\n\t" /* Multiply Done */ "add %[a], %[a], #4\n\t" "sub %[b], %[b], #4\n\t" - "cmp %[a], r12\n\t" + "cmp %[a], r14\n\t" "beq 3f\n\t" - "mov r6, r8\n\t" - "add r6, r6, r9\n\t" + "mov r6, r9\n\t" + "add r6, r6, r10\n\t" "cmp %[a], r6\n\t" "ble 2b\n\t" "\n3:\n\t" - "mov %[r], r11\n\t" - "mov r7, r8\n\t" - "str r3, [%[r], r7]\n\t" + "mov %[r], r12\n\t" + "mov r8, r9\n\t" + "str r3, [%[r], r8]\n\t" "mov r3, r4\n\t" "mov r4, r5\n\t" - "add r7, r7, #4\n\t" - "mov r8, r7\n\t" + "add r8, r8, #4\n\t" + "mov r9, r8\n\t" "mov r6, #88\n\t" - "cmp r7, r6\n\t" + "cmp r8, r6\n\t" "ble 1b\n\t" - "str r3, [%[r], r7]\n\t" - "mov %[a], r9\n\t" - "mov %[b], r10\n\t" + "str r3, [%[r], r8]\n\t" + "mov %[a], r10\n\t" + "mov %[b], r11\n\t" : : [r] "r" (tmp), [a] "r" (a), [b] "r" (b) - : "memory", "r3", "r4", "r5", "r6", "r7", "r8", "r9", "r10", "r11", "r12" + : "memory", "r3", "r4", "r5", "r6", "r8", "r9", "r10", "r11", "r12", "r14" ); XMEMCPY(r, tmp, sizeof(tmp)); @@ -5226,77 +5224,77 @@ SP_NOINLINE static void sp_3072_sqr_12(sp_digit* r, const sp_digit* a) "mov r3, #0\n\t" "mov r4, #0\n\t" "mov r5, #0\n\t" - "mov r8, r3\n\t" - "mov r11, %[r]\n\t" + "mov r9, r3\n\t" + "mov r12, %[r]\n\t" "mov r6, #96\n\t" "neg r6, r6\n\t" "add sp, sp, r6\n\t" - "mov r10, sp\n\t" - "mov r9, %[a]\n\t" + "mov r11, sp\n\t" + "mov r10, %[a]\n\t" "\n1:\n\t" "mov %[r], #0\n\t" "mov r6, #44\n\t" - "mov %[a], r8\n\t" + "mov %[a], r9\n\t" "subs %[a], %[a], r6\n\t" "sbc r6, r6, r6\n\t" "mvn r6, r6\n\t" "and %[a], %[a], r6\n\t" - "mov r2, r8\n\t" + "mov r2, r9\n\t" "sub r2, r2, %[a]\n\t" - "add %[a], %[a], r9\n\t" - "add r2, r2, r9\n\t" + "add %[a], %[a], r10\n\t" + "add r2, r2, r10\n\t" "\n2:\n\t" "cmp r2, %[a]\n\t" "beq 4f\n\t" /* Multiply * 2: Start */ "ldr r6, [%[a]]\n\t" - "ldr r7, [r2]\n\t" - "umull r6, r7, r6, r7\n\t" + "ldr r8, [r2]\n\t" + "umull r6, r8, r6, r8\n\t" "adds r3, r3, r6\n\t" - "adcs r4, r4, r7\n\t" + "adcs r4, r4, r8\n\t" "adc r5, r5, %[r]\n\t" "adds r3, r3, r6\n\t" - "adcs r4, r4, r7\n\t" + "adcs r4, r4, r8\n\t" "adc r5, r5, %[r]\n\t" /* Multiply * 2: Done */ "bal 5f\n\t" "\n4:\n\t" /* Square: Start */ "ldr r6, [%[a]]\n\t" - "umull r6, r7, r6, r6\n\t" + "umull r6, r8, r6, r6\n\t" "adds r3, r3, r6\n\t" - "adcs r4, r4, r7\n\t" + "adcs r4, r4, r8\n\t" "adc r5, r5, %[r]\n\t" /* Square: Done */ "\n5:\n\t" "add %[a], %[a], #4\n\t" "sub r2, r2, #4\n\t" "mov r6, #48\n\t" - "add r6, r6, r9\n\t" + "add r6, r6, r10\n\t" "cmp %[a], r6\n\t" "beq 3f\n\t" "cmp %[a], r2\n\t" "bgt 3f\n\t" - "mov r7, r8\n\t" - "add r7, r7, r9\n\t" - "cmp %[a], r7\n\t" + "mov r8, r9\n\t" + "add r8, r8, r10\n\t" + "cmp %[a], r8\n\t" "ble 2b\n\t" "\n3:\n\t" - "mov %[r], r10\n\t" - "mov r7, r8\n\t" - "str r3, [%[r], r7]\n\t" + "mov %[r], r11\n\t" + "mov r8, r9\n\t" + "str r3, [%[r], r8]\n\t" "mov r3, r4\n\t" "mov r4, r5\n\t" "mov r5, #0\n\t" - "add r7, r7, #4\n\t" - "mov r8, r7\n\t" + "add r8, r8, #4\n\t" + "mov r9, r8\n\t" "mov r6, #88\n\t" - "cmp r7, r6\n\t" + "cmp r8, r6\n\t" "ble 1b\n\t" - "mov %[a], r9\n\t" - "str r3, [%[r], r7]\n\t" - "mov %[r], r11\n\t" "mov %[a], r10\n\t" + "str r3, [%[r], r8]\n\t" + "mov %[r], r12\n\t" + "mov %[a], r11\n\t" "mov r3, #92\n\t" "\n4:\n\t" "ldr r6, [%[a], r3]\n\t" @@ -5307,7 +5305,7 @@ SP_NOINLINE static void sp_3072_sqr_12(sp_digit* r, const sp_digit* a) "add sp, sp, r6\n\t" : : [r] "r" (r), [a] "r" (a) - : "memory", "r2", "r3", "r4", "r5", "r6", "r7", "r8", "r9", "r10", "r11" + : "memory", "r2", "r3", "r4", "r5", "r6", "r8", "r9", "r10", "r11", "r12" ); } @@ -5324,40 +5322,40 @@ SP_NOINLINE static sp_digit sp_3072_add_12(sp_digit* r, const sp_digit* a, __asm__ __volatile__ ( "ldm %[a]!, {r4, r5}\n\t" - "ldm %[b]!, {r6, r7}\n\t" + "ldm %[b]!, {r6, r8}\n\t" "adds r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "stm %[r]!, {r4, r5}\n\t" "ldm %[a]!, {r4, r5}\n\t" - "ldm %[b]!, {r6, r7}\n\t" + "ldm %[b]!, {r6, r8}\n\t" "adcs r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "stm %[r]!, {r4, r5}\n\t" "ldm %[a]!, {r4, r5}\n\t" - "ldm %[b]!, {r6, r7}\n\t" + "ldm %[b]!, {r6, r8}\n\t" "adcs r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "stm %[r]!, {r4, r5}\n\t" "ldm %[a]!, {r4, r5}\n\t" - "ldm %[b]!, {r6, r7}\n\t" + "ldm %[b]!, {r6, r8}\n\t" "adcs r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "stm %[r]!, {r4, r5}\n\t" "ldm %[a]!, {r4, r5}\n\t" - "ldm %[b]!, {r6, r7}\n\t" + "ldm %[b]!, {r6, r8}\n\t" "adcs r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "stm %[r]!, {r4, r5}\n\t" "ldm %[a]!, {r4, r5}\n\t" - "ldm %[b]!, {r6, r7}\n\t" + "ldm %[b]!, {r6, r8}\n\t" "adcs r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "stm %[r]!, {r4, r5}\n\t" "mov %[c], #0\n\t" "adc %[c], %[c], %[c]\n\t" : [c] "+r" (c), [r] "+r" (r), [a] "+r" (a), [b] "+r" (b) : - : "memory", "r4", "r5", "r6", "r7" + : "memory", "r4", "r5", "r6", "r8" ); return c; @@ -5457,70 +5455,70 @@ SP_NOINLINE static sp_digit sp_3072_add_24(sp_digit* r, const sp_digit* a, __asm__ __volatile__ ( "ldm %[a]!, {r4, r5}\n\t" - "ldm %[b]!, {r6, r7}\n\t" + "ldm %[b]!, {r6, r8}\n\t" "adds r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "stm %[r]!, {r4, r5}\n\t" "ldm %[a]!, {r4, r5}\n\t" - "ldm %[b]!, {r6, r7}\n\t" + "ldm %[b]!, {r6, r8}\n\t" "adcs r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "stm %[r]!, {r4, r5}\n\t" "ldm %[a]!, {r4, r5}\n\t" - "ldm %[b]!, {r6, r7}\n\t" + "ldm %[b]!, {r6, r8}\n\t" "adcs r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "stm %[r]!, {r4, r5}\n\t" "ldm %[a]!, {r4, r5}\n\t" - "ldm %[b]!, {r6, r7}\n\t" + "ldm %[b]!, {r6, r8}\n\t" "adcs r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "stm %[r]!, {r4, r5}\n\t" "ldm %[a]!, {r4, r5}\n\t" - "ldm %[b]!, {r6, r7}\n\t" + "ldm %[b]!, {r6, r8}\n\t" "adcs r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "stm %[r]!, {r4, r5}\n\t" "ldm %[a]!, {r4, r5}\n\t" - "ldm %[b]!, {r6, r7}\n\t" + "ldm %[b]!, {r6, r8}\n\t" "adcs r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "stm %[r]!, {r4, r5}\n\t" "ldm %[a]!, {r4, r5}\n\t" - "ldm %[b]!, {r6, r7}\n\t" + "ldm %[b]!, {r6, r8}\n\t" "adcs r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "stm %[r]!, {r4, r5}\n\t" "ldm %[a]!, {r4, r5}\n\t" - "ldm %[b]!, {r6, r7}\n\t" + "ldm %[b]!, {r6, r8}\n\t" "adcs r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "stm %[r]!, {r4, r5}\n\t" "ldm %[a]!, {r4, r5}\n\t" - "ldm %[b]!, {r6, r7}\n\t" + "ldm %[b]!, {r6, r8}\n\t" "adcs r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "stm %[r]!, {r4, r5}\n\t" "ldm %[a]!, {r4, r5}\n\t" - "ldm %[b]!, {r6, r7}\n\t" + "ldm %[b]!, {r6, r8}\n\t" "adcs r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "stm %[r]!, {r4, r5}\n\t" "ldm %[a]!, {r4, r5}\n\t" - "ldm %[b]!, {r6, r7}\n\t" + "ldm %[b]!, {r6, r8}\n\t" "adcs r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "stm %[r]!, {r4, r5}\n\t" "ldm %[a]!, {r4, r5}\n\t" - "ldm %[b]!, {r6, r7}\n\t" + "ldm %[b]!, {r6, r8}\n\t" "adcs r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "stm %[r]!, {r4, r5}\n\t" "mov %[c], #0\n\t" "adc %[c], %[c], %[c]\n\t" : [c] "+r" (c), [r] "+r" (r), [a] "+r" (a), [b] "+r" (b) : - : "memory", "r4", "r5", "r6", "r7" + : "memory", "r4", "r5", "r6", "r8" ); return c; @@ -5770,130 +5768,130 @@ SP_NOINLINE static sp_digit sp_3072_add_48(sp_digit* r, const sp_digit* a, __asm__ __volatile__ ( "ldm %[a]!, {r4, r5}\n\t" - "ldm %[b]!, {r6, r7}\n\t" + "ldm %[b]!, {r6, r8}\n\t" "adds r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "stm %[r]!, {r4, r5}\n\t" "ldm %[a]!, {r4, r5}\n\t" - "ldm %[b]!, {r6, r7}\n\t" + "ldm %[b]!, {r6, r8}\n\t" "adcs r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "stm %[r]!, {r4, r5}\n\t" "ldm %[a]!, {r4, r5}\n\t" - "ldm %[b]!, {r6, r7}\n\t" + "ldm %[b]!, {r6, r8}\n\t" "adcs r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "stm %[r]!, {r4, r5}\n\t" "ldm %[a]!, {r4, r5}\n\t" - "ldm %[b]!, {r6, r7}\n\t" + "ldm %[b]!, {r6, r8}\n\t" "adcs r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "stm %[r]!, {r4, r5}\n\t" "ldm %[a]!, {r4, r5}\n\t" - "ldm %[b]!, {r6, r7}\n\t" + "ldm %[b]!, {r6, r8}\n\t" "adcs r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "stm %[r]!, {r4, r5}\n\t" "ldm %[a]!, {r4, r5}\n\t" - "ldm %[b]!, {r6, r7}\n\t" + "ldm %[b]!, {r6, r8}\n\t" "adcs r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "stm %[r]!, {r4, r5}\n\t" "ldm %[a]!, {r4, r5}\n\t" - "ldm %[b]!, {r6, r7}\n\t" + "ldm %[b]!, {r6, r8}\n\t" "adcs r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "stm %[r]!, {r4, r5}\n\t" "ldm %[a]!, {r4, r5}\n\t" - "ldm %[b]!, {r6, r7}\n\t" + "ldm %[b]!, {r6, r8}\n\t" "adcs r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "stm %[r]!, {r4, r5}\n\t" "ldm %[a]!, {r4, r5}\n\t" - "ldm %[b]!, {r6, r7}\n\t" + "ldm %[b]!, {r6, r8}\n\t" "adcs r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "stm %[r]!, {r4, r5}\n\t" "ldm %[a]!, {r4, r5}\n\t" - "ldm %[b]!, {r6, r7}\n\t" + "ldm %[b]!, {r6, r8}\n\t" "adcs r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "stm %[r]!, {r4, r5}\n\t" "ldm %[a]!, {r4, r5}\n\t" - "ldm %[b]!, {r6, r7}\n\t" + "ldm %[b]!, {r6, r8}\n\t" "adcs r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "stm %[r]!, {r4, r5}\n\t" "ldm %[a]!, {r4, r5}\n\t" - "ldm %[b]!, {r6, r7}\n\t" + "ldm %[b]!, {r6, r8}\n\t" "adcs r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "stm %[r]!, {r4, r5}\n\t" "ldm %[a]!, {r4, r5}\n\t" - "ldm %[b]!, {r6, r7}\n\t" + "ldm %[b]!, {r6, r8}\n\t" "adcs r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "stm %[r]!, {r4, r5}\n\t" "ldm %[a]!, {r4, r5}\n\t" - "ldm %[b]!, {r6, r7}\n\t" + "ldm %[b]!, {r6, r8}\n\t" "adcs r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "stm %[r]!, {r4, r5}\n\t" "ldm %[a]!, {r4, r5}\n\t" - "ldm %[b]!, {r6, r7}\n\t" + "ldm %[b]!, {r6, r8}\n\t" "adcs r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "stm %[r]!, {r4, r5}\n\t" "ldm %[a]!, {r4, r5}\n\t" - "ldm %[b]!, {r6, r7}\n\t" + "ldm %[b]!, {r6, r8}\n\t" "adcs r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "stm %[r]!, {r4, r5}\n\t" "ldm %[a]!, {r4, r5}\n\t" - "ldm %[b]!, {r6, r7}\n\t" + "ldm %[b]!, {r6, r8}\n\t" "adcs r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "stm %[r]!, {r4, r5}\n\t" "ldm %[a]!, {r4, r5}\n\t" - "ldm %[b]!, {r6, r7}\n\t" + "ldm %[b]!, {r6, r8}\n\t" "adcs r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "stm %[r]!, {r4, r5}\n\t" "ldm %[a]!, {r4, r5}\n\t" - "ldm %[b]!, {r6, r7}\n\t" + "ldm %[b]!, {r6, r8}\n\t" "adcs r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "stm %[r]!, {r4, r5}\n\t" "ldm %[a]!, {r4, r5}\n\t" - "ldm %[b]!, {r6, r7}\n\t" + "ldm %[b]!, {r6, r8}\n\t" "adcs r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "stm %[r]!, {r4, r5}\n\t" "ldm %[a]!, {r4, r5}\n\t" - "ldm %[b]!, {r6, r7}\n\t" + "ldm %[b]!, {r6, r8}\n\t" "adcs r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "stm %[r]!, {r4, r5}\n\t" "ldm %[a]!, {r4, r5}\n\t" - "ldm %[b]!, {r6, r7}\n\t" + "ldm %[b]!, {r6, r8}\n\t" "adcs r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "stm %[r]!, {r4, r5}\n\t" "ldm %[a]!, {r4, r5}\n\t" - "ldm %[b]!, {r6, r7}\n\t" + "ldm %[b]!, {r6, r8}\n\t" "adcs r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "stm %[r]!, {r4, r5}\n\t" "ldm %[a]!, {r4, r5}\n\t" - "ldm %[b]!, {r6, r7}\n\t" + "ldm %[b]!, {r6, r8}\n\t" "adcs r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "stm %[r]!, {r4, r5}\n\t" "mov %[c], #0\n\t" "adc %[c], %[c], %[c]\n\t" : [c] "+r" (c), [r] "+r" (r), [a] "+r" (a), [b] "+r" (b) : - : "memory", "r4", "r5", "r6", "r7" + : "memory", "r4", "r5", "r6", "r8" ); return c; @@ -6263,250 +6261,250 @@ SP_NOINLINE static sp_digit sp_3072_add_96(sp_digit* r, const sp_digit* a, __asm__ __volatile__ ( "ldm %[a]!, {r4, r5}\n\t" - "ldm %[b]!, {r6, r7}\n\t" + "ldm %[b]!, {r6, r8}\n\t" "adds r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "stm %[r]!, {r4, r5}\n\t" "ldm %[a]!, {r4, r5}\n\t" - "ldm %[b]!, {r6, r7}\n\t" + "ldm %[b]!, {r6, r8}\n\t" "adcs r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "stm %[r]!, {r4, r5}\n\t" "ldm %[a]!, {r4, r5}\n\t" - "ldm %[b]!, {r6, r7}\n\t" + "ldm %[b]!, {r6, r8}\n\t" "adcs r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "stm %[r]!, {r4, r5}\n\t" "ldm %[a]!, {r4, r5}\n\t" - "ldm %[b]!, {r6, r7}\n\t" + "ldm %[b]!, {r6, r8}\n\t" "adcs r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "stm %[r]!, {r4, r5}\n\t" "ldm %[a]!, {r4, r5}\n\t" - "ldm %[b]!, {r6, r7}\n\t" + "ldm %[b]!, {r6, r8}\n\t" "adcs r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "stm %[r]!, {r4, r5}\n\t" "ldm %[a]!, {r4, r5}\n\t" - "ldm %[b]!, {r6, r7}\n\t" + "ldm %[b]!, {r6, r8}\n\t" "adcs r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "stm %[r]!, {r4, r5}\n\t" "ldm %[a]!, {r4, r5}\n\t" - "ldm %[b]!, {r6, r7}\n\t" + "ldm %[b]!, {r6, r8}\n\t" "adcs r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "stm %[r]!, {r4, r5}\n\t" "ldm %[a]!, {r4, r5}\n\t" - "ldm %[b]!, {r6, r7}\n\t" + "ldm %[b]!, {r6, r8}\n\t" "adcs r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "stm %[r]!, {r4, r5}\n\t" "ldm %[a]!, {r4, r5}\n\t" - "ldm %[b]!, {r6, r7}\n\t" + "ldm %[b]!, {r6, r8}\n\t" "adcs r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "stm %[r]!, {r4, r5}\n\t" "ldm %[a]!, {r4, r5}\n\t" - "ldm %[b]!, {r6, r7}\n\t" + "ldm %[b]!, {r6, r8}\n\t" "adcs r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "stm %[r]!, {r4, r5}\n\t" "ldm %[a]!, {r4, r5}\n\t" - "ldm %[b]!, {r6, r7}\n\t" + "ldm %[b]!, {r6, r8}\n\t" "adcs r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "stm %[r]!, {r4, r5}\n\t" "ldm %[a]!, {r4, r5}\n\t" - "ldm %[b]!, {r6, r7}\n\t" + "ldm %[b]!, {r6, r8}\n\t" "adcs r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "stm %[r]!, {r4, r5}\n\t" "ldm %[a]!, {r4, r5}\n\t" - "ldm %[b]!, {r6, r7}\n\t" + "ldm %[b]!, {r6, r8}\n\t" "adcs r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "stm %[r]!, {r4, r5}\n\t" "ldm %[a]!, {r4, r5}\n\t" - "ldm %[b]!, {r6, r7}\n\t" + "ldm %[b]!, {r6, r8}\n\t" "adcs r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "stm %[r]!, {r4, r5}\n\t" "ldm %[a]!, {r4, r5}\n\t" - "ldm %[b]!, {r6, r7}\n\t" + "ldm %[b]!, {r6, r8}\n\t" "adcs r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "stm %[r]!, {r4, r5}\n\t" "ldm %[a]!, {r4, r5}\n\t" - "ldm %[b]!, {r6, r7}\n\t" + "ldm %[b]!, {r6, r8}\n\t" "adcs r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "stm %[r]!, {r4, r5}\n\t" "ldm %[a]!, {r4, r5}\n\t" - "ldm %[b]!, {r6, r7}\n\t" + "ldm %[b]!, {r6, r8}\n\t" "adcs r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "stm %[r]!, {r4, r5}\n\t" "ldm %[a]!, {r4, r5}\n\t" - "ldm %[b]!, {r6, r7}\n\t" + "ldm %[b]!, {r6, r8}\n\t" "adcs r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "stm %[r]!, {r4, r5}\n\t" "ldm %[a]!, {r4, r5}\n\t" - "ldm %[b]!, {r6, r7}\n\t" + "ldm %[b]!, {r6, r8}\n\t" "adcs r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "stm %[r]!, {r4, r5}\n\t" "ldm %[a]!, {r4, r5}\n\t" - "ldm %[b]!, {r6, r7}\n\t" + "ldm %[b]!, {r6, r8}\n\t" "adcs r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "stm %[r]!, {r4, r5}\n\t" "ldm %[a]!, {r4, r5}\n\t" - "ldm %[b]!, {r6, r7}\n\t" + "ldm %[b]!, {r6, r8}\n\t" "adcs r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "stm %[r]!, {r4, r5}\n\t" "ldm %[a]!, {r4, r5}\n\t" - "ldm %[b]!, {r6, r7}\n\t" + "ldm %[b]!, {r6, r8}\n\t" "adcs r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "stm %[r]!, {r4, r5}\n\t" "ldm %[a]!, {r4, r5}\n\t" - "ldm %[b]!, {r6, r7}\n\t" + "ldm %[b]!, {r6, r8}\n\t" "adcs r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "stm %[r]!, {r4, r5}\n\t" "ldm %[a]!, {r4, r5}\n\t" - "ldm %[b]!, {r6, r7}\n\t" + "ldm %[b]!, {r6, r8}\n\t" "adcs r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "stm %[r]!, {r4, r5}\n\t" "ldm %[a]!, {r4, r5}\n\t" - "ldm %[b]!, {r6, r7}\n\t" + "ldm %[b]!, {r6, r8}\n\t" "adcs r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "stm %[r]!, {r4, r5}\n\t" "ldm %[a]!, {r4, r5}\n\t" - "ldm %[b]!, {r6, r7}\n\t" + "ldm %[b]!, {r6, r8}\n\t" "adcs r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "stm %[r]!, {r4, r5}\n\t" "ldm %[a]!, {r4, r5}\n\t" - "ldm %[b]!, {r6, r7}\n\t" + "ldm %[b]!, {r6, r8}\n\t" "adcs r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "stm %[r]!, {r4, r5}\n\t" "ldm %[a]!, {r4, r5}\n\t" - "ldm %[b]!, {r6, r7}\n\t" + "ldm %[b]!, {r6, r8}\n\t" "adcs r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "stm %[r]!, {r4, r5}\n\t" "ldm %[a]!, {r4, r5}\n\t" - "ldm %[b]!, {r6, r7}\n\t" + "ldm %[b]!, {r6, r8}\n\t" "adcs r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "stm %[r]!, {r4, r5}\n\t" "ldm %[a]!, {r4, r5}\n\t" - "ldm %[b]!, {r6, r7}\n\t" + "ldm %[b]!, {r6, r8}\n\t" "adcs r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "stm %[r]!, {r4, r5}\n\t" "ldm %[a]!, {r4, r5}\n\t" - "ldm %[b]!, {r6, r7}\n\t" + "ldm %[b]!, {r6, r8}\n\t" "adcs r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "stm %[r]!, {r4, r5}\n\t" "ldm %[a]!, {r4, r5}\n\t" - "ldm %[b]!, {r6, r7}\n\t" + "ldm %[b]!, {r6, r8}\n\t" "adcs r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "stm %[r]!, {r4, r5}\n\t" "ldm %[a]!, {r4, r5}\n\t" - "ldm %[b]!, {r6, r7}\n\t" + "ldm %[b]!, {r6, r8}\n\t" "adcs r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "stm %[r]!, {r4, r5}\n\t" "ldm %[a]!, {r4, r5}\n\t" - "ldm %[b]!, {r6, r7}\n\t" + "ldm %[b]!, {r6, r8}\n\t" "adcs r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "stm %[r]!, {r4, r5}\n\t" "ldm %[a]!, {r4, r5}\n\t" - "ldm %[b]!, {r6, r7}\n\t" + "ldm %[b]!, {r6, r8}\n\t" "adcs r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "stm %[r]!, {r4, r5}\n\t" "ldm %[a]!, {r4, r5}\n\t" - "ldm %[b]!, {r6, r7}\n\t" + "ldm %[b]!, {r6, r8}\n\t" "adcs r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "stm %[r]!, {r4, r5}\n\t" "ldm %[a]!, {r4, r5}\n\t" - "ldm %[b]!, {r6, r7}\n\t" + "ldm %[b]!, {r6, r8}\n\t" "adcs r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "stm %[r]!, {r4, r5}\n\t" "ldm %[a]!, {r4, r5}\n\t" - "ldm %[b]!, {r6, r7}\n\t" + "ldm %[b]!, {r6, r8}\n\t" "adcs r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "stm %[r]!, {r4, r5}\n\t" "ldm %[a]!, {r4, r5}\n\t" - "ldm %[b]!, {r6, r7}\n\t" + "ldm %[b]!, {r6, r8}\n\t" "adcs r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "stm %[r]!, {r4, r5}\n\t" "ldm %[a]!, {r4, r5}\n\t" - "ldm %[b]!, {r6, r7}\n\t" + "ldm %[b]!, {r6, r8}\n\t" "adcs r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "stm %[r]!, {r4, r5}\n\t" "ldm %[a]!, {r4, r5}\n\t" - "ldm %[b]!, {r6, r7}\n\t" + "ldm %[b]!, {r6, r8}\n\t" "adcs r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "stm %[r]!, {r4, r5}\n\t" "ldm %[a]!, {r4, r5}\n\t" - "ldm %[b]!, {r6, r7}\n\t" + "ldm %[b]!, {r6, r8}\n\t" "adcs r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "stm %[r]!, {r4, r5}\n\t" "ldm %[a]!, {r4, r5}\n\t" - "ldm %[b]!, {r6, r7}\n\t" + "ldm %[b]!, {r6, r8}\n\t" "adcs r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "stm %[r]!, {r4, r5}\n\t" "ldm %[a]!, {r4, r5}\n\t" - "ldm %[b]!, {r6, r7}\n\t" + "ldm %[b]!, {r6, r8}\n\t" "adcs r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "stm %[r]!, {r4, r5}\n\t" "ldm %[a]!, {r4, r5}\n\t" - "ldm %[b]!, {r6, r7}\n\t" + "ldm %[b]!, {r6, r8}\n\t" "adcs r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "stm %[r]!, {r4, r5}\n\t" "ldm %[a]!, {r4, r5}\n\t" - "ldm %[b]!, {r6, r7}\n\t" + "ldm %[b]!, {r6, r8}\n\t" "adcs r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "stm %[r]!, {r4, r5}\n\t" "ldm %[a]!, {r4, r5}\n\t" - "ldm %[b]!, {r6, r7}\n\t" + "ldm %[b]!, {r6, r8}\n\t" "adcs r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "stm %[r]!, {r4, r5}\n\t" "ldm %[a]!, {r4, r5}\n\t" - "ldm %[b]!, {r6, r7}\n\t" + "ldm %[b]!, {r6, r8}\n\t" "adcs r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "stm %[r]!, {r4, r5}\n\t" "mov %[c], #0\n\t" "adc %[c], %[c], %[c]\n\t" : [c] "+r" (c), [r] "+r" (r), [a] "+r" (a), [b] "+r" (b) : - : "memory", "r4", "r5", "r6", "r7" + : "memory", "r4", "r5", "r6", "r8" ); return c; @@ -6617,11 +6615,11 @@ SP_NOINLINE static sp_digit sp_3072_add_96(sp_digit* r, const sp_digit* a, __asm__ __volatile__ ( "mov r6, %[a]\n\t" - "mov r7, #0\n\t" + "mov r8, #0\n\t" "add r6, r6, #384\n\t" - "sub r7, r7, #1\n\t" + "sub r8, r8, #1\n\t" "\n1:\n\t" - "adds %[c], %[c], r7\n\t" + "adds %[c], %[c], r8\n\t" "ldr r4, [%[a]]\n\t" "ldr r5, [%[b]]\n\t" "adcs r4, r4, r5\n\t" @@ -6635,7 +6633,7 @@ SP_NOINLINE static sp_digit sp_3072_add_96(sp_digit* r, const sp_digit* a, "bne 1b\n\t" : [c] "+r" (c), [r] "+r" (r), [a] "+r" (a), [b] "+r" (b) : - : "memory", "r4", "r5", "r6", "r7" + : "memory", "r4", "r5", "r6", "r8" ); return c; @@ -6653,8 +6651,8 @@ SP_NOINLINE static sp_digit sp_3072_sub_in_place_96(sp_digit* a, { sp_digit c = 0; __asm__ __volatile__ ( - "mov r7, %[a]\n\t" - "add r7, r7, #384\n\t" + "mov r8, %[a]\n\t" + "add r8, r8, #384\n\t" "\n1:\n\t" "mov r5, #0\n\t" "subs r5, r5, %[c]\n\t" @@ -6669,11 +6667,11 @@ SP_NOINLINE static sp_digit sp_3072_sub_in_place_96(sp_digit* a, "sbc %[c], %[c], %[c]\n\t" "add %[a], %[a], #8\n\t" "add %[b], %[b], #8\n\t" - "cmp %[a], r7\n\t" + "cmp %[a], r8\n\t" "bne 1b\n\t" : [c] "+r" (c), [a] "+r" (a), [b] "+r" (b) : - : "memory", "r3", "r4", "r5", "r6", "r7" + : "memory", "r3", "r4", "r5", "r6", "r8" ); return c; @@ -6694,66 +6692,66 @@ SP_NOINLINE static void sp_3072_mul_96(sp_digit* r, const sp_digit* a, __asm__ __volatile__ ( "mov r3, #0\n\t" "mov r4, #0\n\t" - "mov r8, r3\n\t" - "mov r11, %[r]\n\t" - "mov r9, %[a]\n\t" - "mov r10, %[b]\n\t" + "mov r9, r3\n\t" + "mov r12, %[r]\n\t" + "mov r10, %[a]\n\t" + "mov r11, %[b]\n\t" "mov r6, #1\n\t" "lsl r6, r6, #8\n\t" "add r6, r6, #128\n\t" - "add r6, r6, r9\n\t" - "mov r12, r6\n\t" + "add r6, r6, r10\n\t" + "mov r14, r6\n\t" "\n1:\n\t" "mov %[r], #0\n\t" "mov r5, #0\n\t" "mov r6, #1\n\t" "lsl r6, r6, #8\n\t" "add r6, r6, #124\n\t" - "mov %[a], r8\n\t" + "mov %[a], r9\n\t" "subs %[a], %[a], r6\n\t" "sbc r6, r6, r6\n\t" "mvn r6, r6\n\t" "and %[a], %[a], r6\n\t" - "mov %[b], r8\n\t" + "mov %[b], r9\n\t" "sub %[b], %[b], %[a]\n\t" - "add %[a], %[a], r9\n\t" - "add %[b], %[b], r10\n\t" + "add %[a], %[a], r10\n\t" + "add %[b], %[b], r11\n\t" "\n2:\n\t" /* Multiply Start */ "ldr r6, [%[a]]\n\t" - "ldr r7, [%[b]]\n\t" - "umull r6, r7, r6, r7\n\t" + "ldr r8, [%[b]]\n\t" + "umull r6, r8, r6, r8\n\t" "adds r3, r3, r6\n\t" - "adcs r4, r4, r7\n\t" + "adcs r4, r4, r8\n\t" "adc r5, r5, %[r]\n\t" /* Multiply Done */ "add %[a], %[a], #4\n\t" "sub %[b], %[b], #4\n\t" - "cmp %[a], r12\n\t" + "cmp %[a], r14\n\t" "beq 3f\n\t" - "mov r6, r8\n\t" - "add r6, r6, r9\n\t" + "mov r6, r9\n\t" + "add r6, r6, r10\n\t" "cmp %[a], r6\n\t" "ble 2b\n\t" "\n3:\n\t" - "mov %[r], r11\n\t" - "mov r7, r8\n\t" - "str r3, [%[r], r7]\n\t" + "mov %[r], r12\n\t" + "mov r8, r9\n\t" + "str r3, [%[r], r8]\n\t" "mov r3, r4\n\t" "mov r4, r5\n\t" - "add r7, r7, #4\n\t" - "mov r8, r7\n\t" + "add r8, r8, #4\n\t" + "mov r9, r8\n\t" "mov r6, #2\n\t" "lsl r6, r6, #8\n\t" "add r6, r6, #248\n\t" - "cmp r7, r6\n\t" + "cmp r8, r6\n\t" "ble 1b\n\t" - "str r3, [%[r], r7]\n\t" - "mov %[a], r9\n\t" - "mov %[b], r10\n\t" + "str r3, [%[r], r8]\n\t" + "mov %[a], r10\n\t" + "mov %[b], r11\n\t" : : [r] "r" (tmp), [a] "r" (a), [b] "r" (b) - : "memory", "r3", "r4", "r5", "r6", "r7", "r8", "r9", "r10", "r11", "r12" + : "memory", "r3", "r4", "r5", "r6", "r8", "r9", "r10", "r11", "r12", "r14" ); XMEMCPY(r, tmp, sizeof(tmp)); @@ -6770,49 +6768,49 @@ SP_NOINLINE static void sp_3072_sqr_96(sp_digit* r, const sp_digit* a) "mov r3, #0\n\t" "mov r4, #0\n\t" "mov r5, #0\n\t" - "mov r8, r3\n\t" - "mov r11, %[r]\n\t" + "mov r9, r3\n\t" + "mov r12, %[r]\n\t" "mov r6, #3\n\t" "lsl r6, r6, #8\n\t" "neg r6, r6\n\t" "add sp, sp, r6\n\t" - "mov r10, sp\n\t" - "mov r9, %[a]\n\t" + "mov r11, sp\n\t" + "mov r10, %[a]\n\t" "\n1:\n\t" "mov %[r], #0\n\t" "mov r6, #1\n\t" "lsl r6, r6, #8\n\t" "add r6, r6, #124\n\t" - "mov %[a], r8\n\t" + "mov %[a], r9\n\t" "subs %[a], %[a], r6\n\t" "sbc r6, r6, r6\n\t" "mvn r6, r6\n\t" "and %[a], %[a], r6\n\t" - "mov r2, r8\n\t" + "mov r2, r9\n\t" "sub r2, r2, %[a]\n\t" - "add %[a], %[a], r9\n\t" - "add r2, r2, r9\n\t" + "add %[a], %[a], r10\n\t" + "add r2, r2, r10\n\t" "\n2:\n\t" "cmp r2, %[a]\n\t" "beq 4f\n\t" /* Multiply * 2: Start */ "ldr r6, [%[a]]\n\t" - "ldr r7, [r2]\n\t" - "umull r6, r7, r6, r7\n\t" + "ldr r8, [r2]\n\t" + "umull r6, r8, r6, r8\n\t" "adds r3, r3, r6\n\t" - "adcs r4, r4, r7\n\t" + "adcs r4, r4, r8\n\t" "adc r5, r5, %[r]\n\t" "adds r3, r3, r6\n\t" - "adcs r4, r4, r7\n\t" + "adcs r4, r4, r8\n\t" "adc r5, r5, %[r]\n\t" /* Multiply * 2: Done */ "bal 5f\n\t" "\n4:\n\t" /* Square: Start */ "ldr r6, [%[a]]\n\t" - "umull r6, r7, r6, r6\n\t" + "umull r6, r8, r6, r6\n\t" "adds r3, r3, r6\n\t" - "adcs r4, r4, r7\n\t" + "adcs r4, r4, r8\n\t" "adc r5, r5, %[r]\n\t" /* Square: Done */ "\n5:\n\t" @@ -6821,33 +6819,33 @@ SP_NOINLINE static void sp_3072_sqr_96(sp_digit* r, const sp_digit* a) "mov r6, #1\n\t" "lsl r6, r6, #8\n\t" "add r6, r6, #128\n\t" - "add r6, r6, r9\n\t" + "add r6, r6, r10\n\t" "cmp %[a], r6\n\t" "beq 3f\n\t" "cmp %[a], r2\n\t" "bgt 3f\n\t" - "mov r7, r8\n\t" - "add r7, r7, r9\n\t" - "cmp %[a], r7\n\t" + "mov r8, r9\n\t" + "add r8, r8, r10\n\t" + "cmp %[a], r8\n\t" "ble 2b\n\t" "\n3:\n\t" - "mov %[r], r10\n\t" - "mov r7, r8\n\t" - "str r3, [%[r], r7]\n\t" + "mov %[r], r11\n\t" + "mov r8, r9\n\t" + "str r3, [%[r], r8]\n\t" "mov r3, r4\n\t" "mov r4, r5\n\t" "mov r5, #0\n\t" - "add r7, r7, #4\n\t" - "mov r8, r7\n\t" + "add r8, r8, #4\n\t" + "mov r9, r8\n\t" "mov r6, #2\n\t" "lsl r6, r6, #8\n\t" "add r6, r6, #248\n\t" - "cmp r7, r6\n\t" + "cmp r8, r6\n\t" "ble 1b\n\t" - "mov %[a], r9\n\t" - "str r3, [%[r], r7]\n\t" - "mov %[r], r11\n\t" "mov %[a], r10\n\t" + "str r3, [%[r], r8]\n\t" + "mov %[r], r12\n\t" + "mov %[a], r11\n\t" "mov r3, #2\n\t" "lsl r3, r3, #8\n\t" "add r3, r3, #252\n\t" @@ -6861,7 +6859,7 @@ SP_NOINLINE static void sp_3072_sqr_96(sp_digit* r, const sp_digit* a) "add sp, sp, r6\n\t" : : [r] "r" (r), [a] "r" (a) - : "memory", "r2", "r3", "r4", "r5", "r6", "r7", "r8", "r9", "r10", "r11" + : "memory", "r2", "r3", "r4", "r5", "r6", "r8", "r9", "r10", "r11", "r12" ); } @@ -6898,11 +6896,11 @@ SP_NOINLINE static sp_digit sp_3072_add_48(sp_digit* r, const sp_digit* a, __asm__ __volatile__ ( "mov r6, %[a]\n\t" - "mov r7, #0\n\t" + "mov r8, #0\n\t" "add r6, r6, #192\n\t" - "sub r7, r7, #1\n\t" + "sub r8, r8, #1\n\t" "\n1:\n\t" - "adds %[c], %[c], r7\n\t" + "adds %[c], %[c], r8\n\t" "ldr r4, [%[a]]\n\t" "ldr r5, [%[b]]\n\t" "adcs r4, r4, r5\n\t" @@ -6916,7 +6914,7 @@ SP_NOINLINE static sp_digit sp_3072_add_48(sp_digit* r, const sp_digit* a, "bne 1b\n\t" : [c] "+r" (c), [r] "+r" (r), [a] "+r" (a), [b] "+r" (b) : - : "memory", "r4", "r5", "r6", "r7" + : "memory", "r4", "r5", "r6", "r8" ); return c; @@ -6934,8 +6932,8 @@ SP_NOINLINE static sp_digit sp_3072_sub_in_place_48(sp_digit* a, { sp_digit c = 0; __asm__ __volatile__ ( - "mov r7, %[a]\n\t" - "add r7, r7, #192\n\t" + "mov r8, %[a]\n\t" + "add r8, r8, #192\n\t" "\n1:\n\t" "mov r5, #0\n\t" "subs r5, r5, %[c]\n\t" @@ -6950,11 +6948,11 @@ SP_NOINLINE static sp_digit sp_3072_sub_in_place_48(sp_digit* a, "sbc %[c], %[c], %[c]\n\t" "add %[a], %[a], #8\n\t" "add %[b], %[b], #8\n\t" - "cmp %[a], r7\n\t" + "cmp %[a], r8\n\t" "bne 1b\n\t" : [c] "+r" (c), [a] "+r" (a), [b] "+r" (b) : - : "memory", "r3", "r4", "r5", "r6", "r7" + : "memory", "r3", "r4", "r5", "r6", "r8" ); return c; @@ -6975,62 +6973,62 @@ SP_NOINLINE static void sp_3072_mul_48(sp_digit* r, const sp_digit* a, __asm__ __volatile__ ( "mov r3, #0\n\t" "mov r4, #0\n\t" - "mov r8, r3\n\t" - "mov r11, %[r]\n\t" - "mov r9, %[a]\n\t" - "mov r10, %[b]\n\t" + "mov r9, r3\n\t" + "mov r12, %[r]\n\t" + "mov r10, %[a]\n\t" + "mov r11, %[b]\n\t" "mov r6, #192\n\t" - "add r6, r6, r9\n\t" - "mov r12, r6\n\t" + "add r6, r6, r10\n\t" + "mov r14, r6\n\t" "\n1:\n\t" "mov %[r], #0\n\t" "mov r5, #0\n\t" "mov r6, #188\n\t" - "mov %[a], r8\n\t" + "mov %[a], r9\n\t" "subs %[a], %[a], r6\n\t" "sbc r6, r6, r6\n\t" "mvn r6, r6\n\t" "and %[a], %[a], r6\n\t" - "mov %[b], r8\n\t" + "mov %[b], r9\n\t" "sub %[b], %[b], %[a]\n\t" - "add %[a], %[a], r9\n\t" - "add %[b], %[b], r10\n\t" + "add %[a], %[a], r10\n\t" + "add %[b], %[b], r11\n\t" "\n2:\n\t" /* Multiply Start */ "ldr r6, [%[a]]\n\t" - "ldr r7, [%[b]]\n\t" - "umull r6, r7, r6, r7\n\t" + "ldr r8, [%[b]]\n\t" + "umull r6, r8, r6, r8\n\t" "adds r3, r3, r6\n\t" - "adcs r4, r4, r7\n\t" + "adcs r4, r4, r8\n\t" "adc r5, r5, %[r]\n\t" /* Multiply Done */ "add %[a], %[a], #4\n\t" "sub %[b], %[b], #4\n\t" - "cmp %[a], r12\n\t" + "cmp %[a], r14\n\t" "beq 3f\n\t" - "mov r6, r8\n\t" - "add r6, r6, r9\n\t" + "mov r6, r9\n\t" + "add r6, r6, r10\n\t" "cmp %[a], r6\n\t" "ble 2b\n\t" "\n3:\n\t" - "mov %[r], r11\n\t" - "mov r7, r8\n\t" - "str r3, [%[r], r7]\n\t" + "mov %[r], r12\n\t" + "mov r8, r9\n\t" + "str r3, [%[r], r8]\n\t" "mov r3, r4\n\t" "mov r4, r5\n\t" - "add r7, r7, #4\n\t" - "mov r8, r7\n\t" + "add r8, r8, #4\n\t" + "mov r9, r8\n\t" "mov r6, #1\n\t" "lsl r6, r6, #8\n\t" "add r6, r6, #120\n\t" - "cmp r7, r6\n\t" + "cmp r8, r6\n\t" "ble 1b\n\t" - "str r3, [%[r], r7]\n\t" - "mov %[a], r9\n\t" - "mov %[b], r10\n\t" + "str r3, [%[r], r8]\n\t" + "mov %[a], r10\n\t" + "mov %[b], r11\n\t" : : [r] "r" (tmp), [a] "r" (a), [b] "r" (b) - : "memory", "r3", "r4", "r5", "r6", "r7", "r8", "r9", "r10", "r11", "r12" + : "memory", "r3", "r4", "r5", "r6", "r8", "r9", "r10", "r11", "r12", "r14" ); XMEMCPY(r, tmp, sizeof(tmp)); @@ -7047,81 +7045,81 @@ SP_NOINLINE static void sp_3072_sqr_48(sp_digit* r, const sp_digit* a) "mov r3, #0\n\t" "mov r4, #0\n\t" "mov r5, #0\n\t" - "mov r8, r3\n\t" - "mov r11, %[r]\n\t" + "mov r9, r3\n\t" + "mov r12, %[r]\n\t" "mov r6, #1\n\t" "lsl r6, r6, #8\n\t" "add r6, r6, #128\n\t" "neg r6, r6\n\t" "add sp, sp, r6\n\t" - "mov r10, sp\n\t" - "mov r9, %[a]\n\t" + "mov r11, sp\n\t" + "mov r10, %[a]\n\t" "\n1:\n\t" "mov %[r], #0\n\t" "mov r6, #188\n\t" - "mov %[a], r8\n\t" + "mov %[a], r9\n\t" "subs %[a], %[a], r6\n\t" "sbc r6, r6, r6\n\t" "mvn r6, r6\n\t" "and %[a], %[a], r6\n\t" - "mov r2, r8\n\t" + "mov r2, r9\n\t" "sub r2, r2, %[a]\n\t" - "add %[a], %[a], r9\n\t" - "add r2, r2, r9\n\t" + "add %[a], %[a], r10\n\t" + "add r2, r2, r10\n\t" "\n2:\n\t" "cmp r2, %[a]\n\t" "beq 4f\n\t" /* Multiply * 2: Start */ "ldr r6, [%[a]]\n\t" - "ldr r7, [r2]\n\t" - "umull r6, r7, r6, r7\n\t" + "ldr r8, [r2]\n\t" + "umull r6, r8, r6, r8\n\t" "adds r3, r3, r6\n\t" - "adcs r4, r4, r7\n\t" + "adcs r4, r4, r8\n\t" "adc r5, r5, %[r]\n\t" "adds r3, r3, r6\n\t" - "adcs r4, r4, r7\n\t" + "adcs r4, r4, r8\n\t" "adc r5, r5, %[r]\n\t" /* Multiply * 2: Done */ "bal 5f\n\t" "\n4:\n\t" /* Square: Start */ "ldr r6, [%[a]]\n\t" - "umull r6, r7, r6, r6\n\t" + "umull r6, r8, r6, r6\n\t" "adds r3, r3, r6\n\t" - "adcs r4, r4, r7\n\t" + "adcs r4, r4, r8\n\t" "adc r5, r5, %[r]\n\t" /* Square: Done */ "\n5:\n\t" "add %[a], %[a], #4\n\t" "sub r2, r2, #4\n\t" "mov r6, #192\n\t" - "add r6, r6, r9\n\t" + "add r6, r6, r10\n\t" "cmp %[a], r6\n\t" "beq 3f\n\t" "cmp %[a], r2\n\t" "bgt 3f\n\t" - "mov r7, r8\n\t" - "add r7, r7, r9\n\t" - "cmp %[a], r7\n\t" + "mov r8, r9\n\t" + "add r8, r8, r10\n\t" + "cmp %[a], r8\n\t" "ble 2b\n\t" "\n3:\n\t" - "mov %[r], r10\n\t" - "mov r7, r8\n\t" - "str r3, [%[r], r7]\n\t" + "mov %[r], r11\n\t" + "mov r8, r9\n\t" + "str r3, [%[r], r8]\n\t" "mov r3, r4\n\t" "mov r4, r5\n\t" "mov r5, #0\n\t" - "add r7, r7, #4\n\t" - "mov r8, r7\n\t" + "add r8, r8, #4\n\t" + "mov r9, r8\n\t" "mov r6, #1\n\t" "lsl r6, r6, #8\n\t" "add r6, r6, #120\n\t" - "cmp r7, r6\n\t" + "cmp r8, r6\n\t" "ble 1b\n\t" - "mov %[a], r9\n\t" - "str r3, [%[r], r7]\n\t" - "mov %[r], r11\n\t" "mov %[a], r10\n\t" + "str r3, [%[r], r8]\n\t" + "mov %[r], r12\n\t" + "mov %[a], r11\n\t" "mov r3, #1\n\t" "lsl r3, r3, #8\n\t" "add r3, r3, #124\n\t" @@ -7136,7 +7134,7 @@ SP_NOINLINE static void sp_3072_sqr_48(sp_digit* r, const sp_digit* a) "add sp, sp, r6\n\t" : : [r] "r" (r), [a] "r" (a) - : "memory", "r2", "r3", "r4", "r5", "r6", "r7", "r8", "r9", "r10", "r11" + : "memory", "r2", "r3", "r4", "r5", "r6", "r8", "r9", "r10", "r11", "r12" ); } @@ -7172,7 +7170,7 @@ SP_NOINLINE static void sp_3072_mul_d_96(sp_digit* r, const sp_digit* a, sp_digit b) { __asm__ __volatile__ ( - "add r8, %[a], #384\n\t" + "add r9, %[a], #384\n\t" /* A[0] * B */ "ldr r6, [%[a]], #4\n\t" "umull r5, r3, r6, %[b]\n\t" @@ -7183,20 +7181,20 @@ SP_NOINLINE static void sp_3072_mul_d_96(sp_digit* r, const sp_digit* a, "mov r5, #0\n\t" /* A[] * B */ "ldr r6, [%[a]], #4\n\t" - "umull r6, r7, r6, %[b]\n\t" + "umull r6, r8, r6, %[b]\n\t" "adds r3, r3, r6\n\t" - "adcs r4, r4, r7\n\t" + "adcs r4, r4, r8\n\t" "adc r5, r5, #0\n\t" /* A[] * B - Done */ "str r3, [%[r]], #4\n\t" "mov r3, r4\n\t" "mov r4, r5\n\t" - "cmp %[a], r8\n\t" + "cmp %[a], r9\n\t" "blt 1b\n\t" "str r3, [%[r]]\n\t" : [r] "+r" (r), [a] "+r" (a) : [b] "r" (b) - : "memory", "r3", "r4", "r5", "r6", "r7", "r8" + : "memory", "r3", "r4", "r5", "r6", "r8", "r9" ); } @@ -7230,23 +7228,23 @@ SP_NOINLINE static sp_digit sp_3072_cond_sub_48(sp_digit* r, const sp_digit* a, __asm__ __volatile__ ( "mov r5, #192\n\t" - "mov r8, r5\n\t" - "mov r7, #0\n\t" + "mov r9, r5\n\t" + "mov r8, #0\n\t" "\n1:\n\t" - "ldr r6, [%[b], r7]\n\t" + "ldr r6, [%[b], r8]\n\t" "and r6, r6, %[m]\n\t" "mov r5, #0\n\t" "subs r5, r5, %[c]\n\t" - "ldr r5, [%[a], r7]\n\t" + "ldr r5, [%[a], r8]\n\t" "sbcs r5, r5, r6\n\t" "sbcs %[c], %[c], %[c]\n\t" - "str r5, [%[r], r7]\n\t" - "add r7, r7, #4\n\t" - "cmp r7, r8\n\t" + "str r5, [%[r], r8]\n\t" + "add r8, r8, #4\n\t" + "cmp r8, r9\n\t" "blt 1b\n\t" : [c] "+r" (c) : [r] "r" (r), [a] "r" (a), [b] "r" (b), [m] "r" (m) - : "memory", "r5", "r6", "r7", "r8" + : "memory", "r5", "r6", "r8", "r9" ); return c; @@ -7264,28 +7262,27 @@ SP_NOINLINE static void sp_3072_mont_reduce_48(sp_digit* a, const sp_digit* m, sp_digit ca = 0; __asm__ __volatile__ ( - "mov r8, %[mp]\n\t" + "mov r9, %[mp]\n\t" "mov r12, %[m]\n\t" - "mov r9, %[a]\n\t" + "mov r10, %[a]\n\t" "mov r4, #0\n\t" - "add r11, r9, #192\n\t" + "add r11, r10, #192\n\t" "\n1:\n\t" /* mu = a[i] * mp */ - "mov %[mp], r8\n\t" - "ldr %[a], [r9]\n\t" + "mov %[mp], r9\n\t" + "ldr %[a], [r10]\n\t" "mul %[mp], %[mp], %[a]\n\t" "mov %[m], r12\n\t" - "mov r10, r9\n\t" - "add r14, r9, #184\n\t" + "add r14, r10, #184\n\t" "\n2:\n\t" /* a[i+j] += m[j] * mu */ "ldr %[a], [r10]\n\t" "mov r5, #0\n\t" /* Multiply m[j] and mu - Start */ - "ldr r7, [%[m]], #4\n\t" - "umull r6, r7, %[mp], r7\n\t" + "ldr r8, [%[m]], #4\n\t" + "umull r6, r8, %[mp], r8\n\t" "adds %[a], %[a], r6\n\t" - "adc r5, r5, r7\n\t" + "adc r5, r5, r8\n\t" /* Multiply m[j] and mu - Done */ "adds r4, r4, %[a]\n\t" "adc r5, r5, #0\n\t" @@ -7294,10 +7291,10 @@ SP_NOINLINE static void sp_3072_mont_reduce_48(sp_digit* a, const sp_digit* m, "ldr %[a], [r10]\n\t" "mov r4, #0\n\t" /* Multiply m[j] and mu - Start */ - "ldr r7, [%[m]], #4\n\t" - "umull r6, r7, %[mp], r7\n\t" + "ldr r8, [%[m]], #4\n\t" + "umull r6, r8, %[mp], r8\n\t" "adds %[a], %[a], r6\n\t" - "adc r4, r4, r7\n\t" + "adc r4, r4, r8\n\t" /* Multiply m[j] and mu - Done */ "adds r5, r5, %[a]\n\t" "adc r4, r4, #0\n\t" @@ -7308,10 +7305,10 @@ SP_NOINLINE static void sp_3072_mont_reduce_48(sp_digit* a, const sp_digit* m, "ldr %[a], [r10]\n\t" "mov r5, #0\n\t" /* Multiply m[j] and mu - Start */ - "ldr r7, [%[m]], #4\n\t" - "umull r6, r7, %[mp], r7\n\t" + "ldr r8, [%[m]], #4\n\t" + "umull r6, r8, %[mp], r8\n\t" "adds %[a], %[a], r6\n\t" - "adc r5, r5, r7\n\t" + "adc r5, r5, r8\n\t" /* Multiply m[j] and mu - Done */ "adds r4, r4, %[a]\n\t" "adc r5, r5, #0\n\t" @@ -7320,28 +7317,28 @@ SP_NOINLINE static void sp_3072_mont_reduce_48(sp_digit* a, const sp_digit* m, "mov r4, %[ca]\n\t" "mov %[ca], #0\n\t" /* Multiply m[47] and mu - Start */ - "ldr r7, [%[m]]\n\t" - "umull r6, r7, %[mp], r7\n\t" + "ldr r8, [%[m]]\n\t" + "umull r6, r8, %[mp], r8\n\t" "adds r5, r5, r6\n\t" - "adcs r4, r4, r7\n\t" + "adcs r4, r4, r8\n\t" "adc %[ca], %[ca], #0\n\t" /* Multiply m[47] and mu - Done */ "ldr r6, [r10]\n\t" - "ldr r7, [r10, #4]\n\t" + "ldr r8, [r10, #4]\n\t" "adds r6, r6, r5\n\t" - "adcs r7, r7, r4\n\t" + "adcs r8, r8, r4\n\t" "adc %[ca], %[ca], #0\n\t" "str r6, [r10]\n\t" - "str r7, [r10, #4]\n\t" + "str r8, [r10, #4]\n\t" /* Next word in a */ - "add r9, r9, #4\n\t" - "cmp r9, r11\n\t" + "sub r10, r10, #184\n\t" + "cmp r10, r11\n\t" "blt 1b\n\t" - "mov %[a], r9\n\t" + "mov %[a], r10\n\t" "mov %[m], r12\n\t" : [ca] "+r" (ca), [a] "+r" (a) : [m] "r" (m), [mp] "r" (mp) - : "memory", "r4", "r5", "r6", "r7", "r8", "r9", "r10", "r11", "r12", "r14" + : "memory", "r4", "r5", "r6", "r8", "r9", "r10", "r11", "r12", "r14" ); sp_3072_cond_sub_48(a - 48, a, m, (sp_digit)0 - ca); @@ -7387,7 +7384,7 @@ SP_NOINLINE static void sp_3072_mul_d_48(sp_digit* r, const sp_digit* a, sp_digit b) { __asm__ __volatile__ ( - "add r8, %[a], #192\n\t" + "add r9, %[a], #192\n\t" /* A[0] * B */ "ldr r6, [%[a]], #4\n\t" "umull r5, r3, r6, %[b]\n\t" @@ -7398,20 +7395,20 @@ SP_NOINLINE static void sp_3072_mul_d_48(sp_digit* r, const sp_digit* a, "mov r5, #0\n\t" /* A[] * B */ "ldr r6, [%[a]], #4\n\t" - "umull r6, r7, r6, %[b]\n\t" + "umull r6, r8, r6, %[b]\n\t" "adds r3, r3, r6\n\t" - "adcs r4, r4, r7\n\t" + "adcs r4, r4, r8\n\t" "adc r5, r5, #0\n\t" /* A[] * B - Done */ "str r3, [%[r]], #4\n\t" "mov r3, r4\n\t" "mov r4, r5\n\t" - "cmp %[a], r8\n\t" + "cmp %[a], r9\n\t" "blt 1b\n\t" "str r3, [%[r]]\n\t" : [r] "+r" (r), [a] "+r" (a) : [b] "r" (b) - : "memory", "r3", "r4", "r5", "r6", "r7", "r8" + : "memory", "r3", "r4", "r5", "r6", "r8", "r9" ); } @@ -7433,36 +7430,36 @@ SP_NOINLINE static sp_digit div_3072_word_48(sp_digit d1, sp_digit d0, "lsr r6, %[div], #16\n\t" "add r6, r6, #1\n\t" "udiv r4, %[d1], r6\n\t" - "lsl r7, r4, #16\n\t" - "umull r4, r5, %[div], r7\n\t" + "lsl r8, r4, #16\n\t" + "umull r4, r5, %[div], r8\n\t" "subs %[d0], %[d0], r4\n\t" "sbc %[d1], %[d1], r5\n\t" "udiv r5, %[d1], r6\n\t" "lsl r4, r5, #16\n\t" - "add r7, r7, r4\n\t" + "add r8, r8, r4\n\t" "umull r4, r5, %[div], r4\n\t" "subs %[d0], %[d0], r4\n\t" "sbc %[d1], %[d1], r5\n\t" "lsl r4, %[d1], #16\n\t" "orr r4, r4, %[d0], lsr #16\n\t" "udiv r4, r4, r6\n\t" - "add r7, r7, r4\n\t" + "add r8, r8, r4\n\t" "umull r4, r5, %[div], r4\n\t" "subs %[d0], %[d0], r4\n\t" "sbc %[d1], %[d1], r5\n\t" "lsl r4, %[d1], #16\n\t" "orr r4, r4, %[d0], lsr #16\n\t" "udiv r4, r4, r6\n\t" - "add r7, r7, r4\n\t" + "add r8, r8, r4\n\t" "umull r4, r5, %[div], r4\n\t" "subs %[d0], %[d0], r4\n\t" "sbc %[d1], %[d1], r5\n\t" "udiv r4, %[d0], %[div]\n\t" - "add r7, r7, r4\n\t" - "mov %[r], r7\n\t" + "add r8, r8, r4\n\t" + "mov %[r], r8\n\t" : [r] "+r" (r) : [d1] "r" (d1), [d0] "r" (d0), [div] "r" (div) - : "r4", "r5", "r6", "r7" + : "r4", "r5", "r6", "r8" ); return r; } @@ -7484,27 +7481,27 @@ SP_NOINLINE static int32_t sp_3072_cmp_48(const sp_digit* a, const sp_digit* b) "mvn r3, r3\n\t" "mov r6, #188\n\t" "\n1:\n\t" - "ldr r7, [%[a], r6]\n\t" + "ldr r8, [%[a], r6]\n\t" "ldr r5, [%[b], r6]\n\t" - "and r7, r7, r3\n\t" + "and r8, r8, r3\n\t" "and r5, r5, r3\n\t" - "mov r4, r7\n\t" - "subs r7, r7, r5\n\t" - "sbc r7, r7, r7\n\t" - "add %[r], %[r], r7\n\t" - "mvn r7, r7\n\t" - "and r3, r3, r7\n\t" + "mov r4, r8\n\t" + "subs r8, r8, r5\n\t" + "sbc r8, r8, r8\n\t" + "add %[r], %[r], r8\n\t" + "mvn r8, r8\n\t" + "and r3, r3, r8\n\t" "subs r5, r5, r4\n\t" - "sbc r7, r7, r7\n\t" - "sub %[r], %[r], r7\n\t" - "mvn r7, r7\n\t" - "and r3, r3, r7\n\t" + "sbc r8, r8, r8\n\t" + "sub %[r], %[r], r8\n\t" + "mvn r8, r8\n\t" + "and r3, r3, r8\n\t" "sub r6, r6, #4\n\t" "cmp r6, #0\n\t" "bge 1b\n\t" : [r] "+r" (r) : [a] "r" (a), [b] "r" (b) - : "r3", "r4", "r5", "r6", "r7" + : "r3", "r4", "r5", "r6", "r8" ); return r; @@ -7878,23 +7875,23 @@ SP_NOINLINE static sp_digit sp_3072_cond_sub_96(sp_digit* r, const sp_digit* a, "mov r5, #1\n\t" "lsl r5, r5, #8\n\t" "add r5, r5, #128\n\t" - "mov r8, r5\n\t" - "mov r7, #0\n\t" + "mov r9, r5\n\t" + "mov r8, #0\n\t" "\n1:\n\t" - "ldr r6, [%[b], r7]\n\t" + "ldr r6, [%[b], r8]\n\t" "and r6, r6, %[m]\n\t" "mov r5, #0\n\t" "subs r5, r5, %[c]\n\t" - "ldr r5, [%[a], r7]\n\t" + "ldr r5, [%[a], r8]\n\t" "sbcs r5, r5, r6\n\t" "sbcs %[c], %[c], %[c]\n\t" - "str r5, [%[r], r7]\n\t" - "add r7, r7, #4\n\t" - "cmp r7, r8\n\t" + "str r5, [%[r], r8]\n\t" + "add r8, r8, #4\n\t" + "cmp r8, r9\n\t" "blt 1b\n\t" : [c] "+r" (c) : [r] "r" (r), [a] "r" (a), [b] "r" (b), [m] "r" (m) - : "memory", "r5", "r6", "r7", "r8" + : "memory", "r5", "r6", "r8", "r9" ); return c; @@ -7912,28 +7909,27 @@ SP_NOINLINE static void sp_3072_mont_reduce_96(sp_digit* a, const sp_digit* m, sp_digit ca = 0; __asm__ __volatile__ ( - "mov r8, %[mp]\n\t" + "mov r9, %[mp]\n\t" "mov r12, %[m]\n\t" - "mov r9, %[a]\n\t" + "mov r10, %[a]\n\t" "mov r4, #0\n\t" - "add r11, r9, #384\n\t" + "add r11, r10, #384\n\t" "\n1:\n\t" /* mu = a[i] * mp */ - "mov %[mp], r8\n\t" - "ldr %[a], [r9]\n\t" + "mov %[mp], r9\n\t" + "ldr %[a], [r10]\n\t" "mul %[mp], %[mp], %[a]\n\t" "mov %[m], r12\n\t" - "mov r10, r9\n\t" - "add r14, r9, #376\n\t" + "add r14, r10, #376\n\t" "\n2:\n\t" /* a[i+j] += m[j] * mu */ "ldr %[a], [r10]\n\t" "mov r5, #0\n\t" /* Multiply m[j] and mu - Start */ - "ldr r7, [%[m]], #4\n\t" - "umull r6, r7, %[mp], r7\n\t" + "ldr r8, [%[m]], #4\n\t" + "umull r6, r8, %[mp], r8\n\t" "adds %[a], %[a], r6\n\t" - "adc r5, r5, r7\n\t" + "adc r5, r5, r8\n\t" /* Multiply m[j] and mu - Done */ "adds r4, r4, %[a]\n\t" "adc r5, r5, #0\n\t" @@ -7942,10 +7938,10 @@ SP_NOINLINE static void sp_3072_mont_reduce_96(sp_digit* a, const sp_digit* m, "ldr %[a], [r10]\n\t" "mov r4, #0\n\t" /* Multiply m[j] and mu - Start */ - "ldr r7, [%[m]], #4\n\t" - "umull r6, r7, %[mp], r7\n\t" + "ldr r8, [%[m]], #4\n\t" + "umull r6, r8, %[mp], r8\n\t" "adds %[a], %[a], r6\n\t" - "adc r4, r4, r7\n\t" + "adc r4, r4, r8\n\t" /* Multiply m[j] and mu - Done */ "adds r5, r5, %[a]\n\t" "adc r4, r4, #0\n\t" @@ -7956,10 +7952,10 @@ SP_NOINLINE static void sp_3072_mont_reduce_96(sp_digit* a, const sp_digit* m, "ldr %[a], [r10]\n\t" "mov r5, #0\n\t" /* Multiply m[j] and mu - Start */ - "ldr r7, [%[m]], #4\n\t" - "umull r6, r7, %[mp], r7\n\t" + "ldr r8, [%[m]], #4\n\t" + "umull r6, r8, %[mp], r8\n\t" "adds %[a], %[a], r6\n\t" - "adc r5, r5, r7\n\t" + "adc r5, r5, r8\n\t" /* Multiply m[j] and mu - Done */ "adds r4, r4, %[a]\n\t" "adc r5, r5, #0\n\t" @@ -7968,28 +7964,28 @@ SP_NOINLINE static void sp_3072_mont_reduce_96(sp_digit* a, const sp_digit* m, "mov r4, %[ca]\n\t" "mov %[ca], #0\n\t" /* Multiply m[95] and mu - Start */ - "ldr r7, [%[m]]\n\t" - "umull r6, r7, %[mp], r7\n\t" + "ldr r8, [%[m]]\n\t" + "umull r6, r8, %[mp], r8\n\t" "adds r5, r5, r6\n\t" - "adcs r4, r4, r7\n\t" + "adcs r4, r4, r8\n\t" "adc %[ca], %[ca], #0\n\t" /* Multiply m[95] and mu - Done */ "ldr r6, [r10]\n\t" - "ldr r7, [r10, #4]\n\t" + "ldr r8, [r10, #4]\n\t" "adds r6, r6, r5\n\t" - "adcs r7, r7, r4\n\t" + "adcs r8, r8, r4\n\t" "adc %[ca], %[ca], #0\n\t" "str r6, [r10]\n\t" - "str r7, [r10, #4]\n\t" + "str r8, [r10, #4]\n\t" /* Next word in a */ - "add r9, r9, #4\n\t" - "cmp r9, r11\n\t" + "sub r10, r10, #376\n\t" + "cmp r10, r11\n\t" "blt 1b\n\t" - "mov %[a], r9\n\t" + "mov %[a], r10\n\t" "mov %[m], r12\n\t" : [ca] "+r" (ca), [a] "+r" (a) : [m] "r" (m), [mp] "r" (mp) - : "memory", "r4", "r5", "r6", "r7", "r8", "r9", "r10", "r11", "r12", "r14" + : "memory", "r4", "r5", "r6", "r8", "r9", "r10", "r11", "r12", "r14" ); sp_3072_cond_sub_96(a - 96, a, m, (sp_digit)0 - ca); @@ -8043,36 +8039,36 @@ SP_NOINLINE static sp_digit div_3072_word_96(sp_digit d1, sp_digit d0, "lsr r6, %[div], #16\n\t" "add r6, r6, #1\n\t" "udiv r4, %[d1], r6\n\t" - "lsl r7, r4, #16\n\t" - "umull r4, r5, %[div], r7\n\t" + "lsl r8, r4, #16\n\t" + "umull r4, r5, %[div], r8\n\t" "subs %[d0], %[d0], r4\n\t" "sbc %[d1], %[d1], r5\n\t" "udiv r5, %[d1], r6\n\t" "lsl r4, r5, #16\n\t" - "add r7, r7, r4\n\t" + "add r8, r8, r4\n\t" "umull r4, r5, %[div], r4\n\t" "subs %[d0], %[d0], r4\n\t" "sbc %[d1], %[d1], r5\n\t" "lsl r4, %[d1], #16\n\t" "orr r4, r4, %[d0], lsr #16\n\t" "udiv r4, r4, r6\n\t" - "add r7, r7, r4\n\t" + "add r8, r8, r4\n\t" "umull r4, r5, %[div], r4\n\t" "subs %[d0], %[d0], r4\n\t" "sbc %[d1], %[d1], r5\n\t" "lsl r4, %[d1], #16\n\t" "orr r4, r4, %[d0], lsr #16\n\t" "udiv r4, r4, r6\n\t" - "add r7, r7, r4\n\t" + "add r8, r8, r4\n\t" "umull r4, r5, %[div], r4\n\t" "subs %[d0], %[d0], r4\n\t" "sbc %[d1], %[d1], r5\n\t" "udiv r4, %[d0], %[div]\n\t" - "add r7, r7, r4\n\t" - "mov %[r], r7\n\t" + "add r8, r8, r4\n\t" + "mov %[r], r8\n\t" : [r] "+r" (r) : [d1] "r" (d1), [d0] "r" (d0), [div] "r" (div) - : "r4", "r5", "r6", "r7" + : "r4", "r5", "r6", "r8" ); return r; } @@ -8126,27 +8122,27 @@ SP_NOINLINE static int32_t sp_3072_cmp_96(const sp_digit* a, const sp_digit* b) "lsl r6, r6, #8\n\t" "add r6, r6, #124\n\t" "\n1:\n\t" - "ldr r7, [%[a], r6]\n\t" + "ldr r8, [%[a], r6]\n\t" "ldr r5, [%[b], r6]\n\t" - "and r7, r7, r3\n\t" + "and r8, r8, r3\n\t" "and r5, r5, r3\n\t" - "mov r4, r7\n\t" - "subs r7, r7, r5\n\t" - "sbc r7, r7, r7\n\t" - "add %[r], %[r], r7\n\t" - "mvn r7, r7\n\t" - "and r3, r3, r7\n\t" + "mov r4, r8\n\t" + "subs r8, r8, r5\n\t" + "sbc r8, r8, r8\n\t" + "add %[r], %[r], r8\n\t" + "mvn r8, r8\n\t" + "and r3, r3, r8\n\t" "subs r5, r5, r4\n\t" - "sbc r7, r7, r7\n\t" - "sub %[r], %[r], r7\n\t" - "mvn r7, r7\n\t" - "and r3, r3, r7\n\t" + "sbc r8, r8, r8\n\t" + "sub %[r], %[r], r8\n\t" + "mvn r8, r8\n\t" + "and r3, r3, r8\n\t" "sub r6, r6, #4\n\t" "cmp r6, #0\n\t" "bge 1b\n\t" : [r] "+r" (r) : [a] "r" (a), [b] "r" (b) - : "r3", "r4", "r5", "r6", "r7" + : "r3", "r4", "r5", "r6", "r8" ); return r; @@ -9906,170 +9902,170 @@ SP_NOINLINE static sp_digit sp_4096_add_64(sp_digit* r, const sp_digit* a, __asm__ __volatile__ ( "ldm %[a]!, {r4, r5}\n\t" - "ldm %[b]!, {r6, r7}\n\t" + "ldm %[b]!, {r6, r8}\n\t" "adds r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "stm %[r]!, {r4, r5}\n\t" "ldm %[a]!, {r4, r5}\n\t" - "ldm %[b]!, {r6, r7}\n\t" + "ldm %[b]!, {r6, r8}\n\t" "adcs r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "stm %[r]!, {r4, r5}\n\t" "ldm %[a]!, {r4, r5}\n\t" - "ldm %[b]!, {r6, r7}\n\t" + "ldm %[b]!, {r6, r8}\n\t" "adcs r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "stm %[r]!, {r4, r5}\n\t" "ldm %[a]!, {r4, r5}\n\t" - "ldm %[b]!, {r6, r7}\n\t" + "ldm %[b]!, {r6, r8}\n\t" "adcs r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "stm %[r]!, {r4, r5}\n\t" "ldm %[a]!, {r4, r5}\n\t" - "ldm %[b]!, {r6, r7}\n\t" + "ldm %[b]!, {r6, r8}\n\t" "adcs r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "stm %[r]!, {r4, r5}\n\t" "ldm %[a]!, {r4, r5}\n\t" - "ldm %[b]!, {r6, r7}\n\t" + "ldm %[b]!, {r6, r8}\n\t" "adcs r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "stm %[r]!, {r4, r5}\n\t" "ldm %[a]!, {r4, r5}\n\t" - "ldm %[b]!, {r6, r7}\n\t" + "ldm %[b]!, {r6, r8}\n\t" "adcs r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "stm %[r]!, {r4, r5}\n\t" "ldm %[a]!, {r4, r5}\n\t" - "ldm %[b]!, {r6, r7}\n\t" + "ldm %[b]!, {r6, r8}\n\t" "adcs r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "stm %[r]!, {r4, r5}\n\t" "ldm %[a]!, {r4, r5}\n\t" - "ldm %[b]!, {r6, r7}\n\t" + "ldm %[b]!, {r6, r8}\n\t" "adcs r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "stm %[r]!, {r4, r5}\n\t" "ldm %[a]!, {r4, r5}\n\t" - "ldm %[b]!, {r6, r7}\n\t" + "ldm %[b]!, {r6, r8}\n\t" "adcs r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "stm %[r]!, {r4, r5}\n\t" "ldm %[a]!, {r4, r5}\n\t" - "ldm %[b]!, {r6, r7}\n\t" + "ldm %[b]!, {r6, r8}\n\t" "adcs r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "stm %[r]!, {r4, r5}\n\t" "ldm %[a]!, {r4, r5}\n\t" - "ldm %[b]!, {r6, r7}\n\t" + "ldm %[b]!, {r6, r8}\n\t" "adcs r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "stm %[r]!, {r4, r5}\n\t" "ldm %[a]!, {r4, r5}\n\t" - "ldm %[b]!, {r6, r7}\n\t" + "ldm %[b]!, {r6, r8}\n\t" "adcs r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "stm %[r]!, {r4, r5}\n\t" "ldm %[a]!, {r4, r5}\n\t" - "ldm %[b]!, {r6, r7}\n\t" + "ldm %[b]!, {r6, r8}\n\t" "adcs r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "stm %[r]!, {r4, r5}\n\t" "ldm %[a]!, {r4, r5}\n\t" - "ldm %[b]!, {r6, r7}\n\t" + "ldm %[b]!, {r6, r8}\n\t" "adcs r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "stm %[r]!, {r4, r5}\n\t" "ldm %[a]!, {r4, r5}\n\t" - "ldm %[b]!, {r6, r7}\n\t" + "ldm %[b]!, {r6, r8}\n\t" "adcs r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "stm %[r]!, {r4, r5}\n\t" "ldm %[a]!, {r4, r5}\n\t" - "ldm %[b]!, {r6, r7}\n\t" + "ldm %[b]!, {r6, r8}\n\t" "adcs r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "stm %[r]!, {r4, r5}\n\t" "ldm %[a]!, {r4, r5}\n\t" - "ldm %[b]!, {r6, r7}\n\t" + "ldm %[b]!, {r6, r8}\n\t" "adcs r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "stm %[r]!, {r4, r5}\n\t" "ldm %[a]!, {r4, r5}\n\t" - "ldm %[b]!, {r6, r7}\n\t" + "ldm %[b]!, {r6, r8}\n\t" "adcs r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "stm %[r]!, {r4, r5}\n\t" "ldm %[a]!, {r4, r5}\n\t" - "ldm %[b]!, {r6, r7}\n\t" + "ldm %[b]!, {r6, r8}\n\t" "adcs r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "stm %[r]!, {r4, r5}\n\t" "ldm %[a]!, {r4, r5}\n\t" - "ldm %[b]!, {r6, r7}\n\t" + "ldm %[b]!, {r6, r8}\n\t" "adcs r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "stm %[r]!, {r4, r5}\n\t" "ldm %[a]!, {r4, r5}\n\t" - "ldm %[b]!, {r6, r7}\n\t" + "ldm %[b]!, {r6, r8}\n\t" "adcs r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "stm %[r]!, {r4, r5}\n\t" "ldm %[a]!, {r4, r5}\n\t" - "ldm %[b]!, {r6, r7}\n\t" + "ldm %[b]!, {r6, r8}\n\t" "adcs r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "stm %[r]!, {r4, r5}\n\t" "ldm %[a]!, {r4, r5}\n\t" - "ldm %[b]!, {r6, r7}\n\t" + "ldm %[b]!, {r6, r8}\n\t" "adcs r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "stm %[r]!, {r4, r5}\n\t" "ldm %[a]!, {r4, r5}\n\t" - "ldm %[b]!, {r6, r7}\n\t" + "ldm %[b]!, {r6, r8}\n\t" "adcs r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "stm %[r]!, {r4, r5}\n\t" "ldm %[a]!, {r4, r5}\n\t" - "ldm %[b]!, {r6, r7}\n\t" + "ldm %[b]!, {r6, r8}\n\t" "adcs r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "stm %[r]!, {r4, r5}\n\t" "ldm %[a]!, {r4, r5}\n\t" - "ldm %[b]!, {r6, r7}\n\t" + "ldm %[b]!, {r6, r8}\n\t" "adcs r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "stm %[r]!, {r4, r5}\n\t" "ldm %[a]!, {r4, r5}\n\t" - "ldm %[b]!, {r6, r7}\n\t" + "ldm %[b]!, {r6, r8}\n\t" "adcs r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "stm %[r]!, {r4, r5}\n\t" "ldm %[a]!, {r4, r5}\n\t" - "ldm %[b]!, {r6, r7}\n\t" + "ldm %[b]!, {r6, r8}\n\t" "adcs r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "stm %[r]!, {r4, r5}\n\t" "ldm %[a]!, {r4, r5}\n\t" - "ldm %[b]!, {r6, r7}\n\t" + "ldm %[b]!, {r6, r8}\n\t" "adcs r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "stm %[r]!, {r4, r5}\n\t" "ldm %[a]!, {r4, r5}\n\t" - "ldm %[b]!, {r6, r7}\n\t" + "ldm %[b]!, {r6, r8}\n\t" "adcs r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "stm %[r]!, {r4, r5}\n\t" "ldm %[a]!, {r4, r5}\n\t" - "ldm %[b]!, {r6, r7}\n\t" + "ldm %[b]!, {r6, r8}\n\t" "adcs r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "stm %[r]!, {r4, r5}\n\t" "mov %[c], #0\n\t" "adc %[c], %[c], %[c]\n\t" : [c] "+r" (c), [r] "+r" (r), [a] "+r" (a), [b] "+r" (b) : - : "memory", "r4", "r5", "r6", "r7" + : "memory", "r4", "r5", "r6", "r8" ); return c; @@ -10429,330 +10425,330 @@ SP_NOINLINE static sp_digit sp_4096_add_128(sp_digit* r, const sp_digit* a, __asm__ __volatile__ ( "ldm %[a]!, {r4, r5}\n\t" - "ldm %[b]!, {r6, r7}\n\t" + "ldm %[b]!, {r6, r8}\n\t" "adds r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "stm %[r]!, {r4, r5}\n\t" "ldm %[a]!, {r4, r5}\n\t" - "ldm %[b]!, {r6, r7}\n\t" + "ldm %[b]!, {r6, r8}\n\t" "adcs r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "stm %[r]!, {r4, r5}\n\t" "ldm %[a]!, {r4, r5}\n\t" - "ldm %[b]!, {r6, r7}\n\t" + "ldm %[b]!, {r6, r8}\n\t" "adcs r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "stm %[r]!, {r4, r5}\n\t" "ldm %[a]!, {r4, r5}\n\t" - "ldm %[b]!, {r6, r7}\n\t" + "ldm %[b]!, {r6, r8}\n\t" "adcs r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "stm %[r]!, {r4, r5}\n\t" "ldm %[a]!, {r4, r5}\n\t" - "ldm %[b]!, {r6, r7}\n\t" + "ldm %[b]!, {r6, r8}\n\t" "adcs r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "stm %[r]!, {r4, r5}\n\t" "ldm %[a]!, {r4, r5}\n\t" - "ldm %[b]!, {r6, r7}\n\t" + "ldm %[b]!, {r6, r8}\n\t" "adcs r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "stm %[r]!, {r4, r5}\n\t" "ldm %[a]!, {r4, r5}\n\t" - "ldm %[b]!, {r6, r7}\n\t" + "ldm %[b]!, {r6, r8}\n\t" "adcs r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "stm %[r]!, {r4, r5}\n\t" "ldm %[a]!, {r4, r5}\n\t" - "ldm %[b]!, {r6, r7}\n\t" + "ldm %[b]!, {r6, r8}\n\t" "adcs r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "stm %[r]!, {r4, r5}\n\t" "ldm %[a]!, {r4, r5}\n\t" - "ldm %[b]!, {r6, r7}\n\t" + "ldm %[b]!, {r6, r8}\n\t" "adcs r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "stm %[r]!, {r4, r5}\n\t" "ldm %[a]!, {r4, r5}\n\t" - "ldm %[b]!, {r6, r7}\n\t" + "ldm %[b]!, {r6, r8}\n\t" "adcs r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "stm %[r]!, {r4, r5}\n\t" "ldm %[a]!, {r4, r5}\n\t" - "ldm %[b]!, {r6, r7}\n\t" + "ldm %[b]!, {r6, r8}\n\t" "adcs r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "stm %[r]!, {r4, r5}\n\t" "ldm %[a]!, {r4, r5}\n\t" - "ldm %[b]!, {r6, r7}\n\t" + "ldm %[b]!, {r6, r8}\n\t" "adcs r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "stm %[r]!, {r4, r5}\n\t" "ldm %[a]!, {r4, r5}\n\t" - "ldm %[b]!, {r6, r7}\n\t" + "ldm %[b]!, {r6, r8}\n\t" "adcs r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "stm %[r]!, {r4, r5}\n\t" "ldm %[a]!, {r4, r5}\n\t" - "ldm %[b]!, {r6, r7}\n\t" + "ldm %[b]!, {r6, r8}\n\t" "adcs r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "stm %[r]!, {r4, r5}\n\t" "ldm %[a]!, {r4, r5}\n\t" - "ldm %[b]!, {r6, r7}\n\t" + "ldm %[b]!, {r6, r8}\n\t" "adcs r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "stm %[r]!, {r4, r5}\n\t" "ldm %[a]!, {r4, r5}\n\t" - "ldm %[b]!, {r6, r7}\n\t" + "ldm %[b]!, {r6, r8}\n\t" "adcs r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "stm %[r]!, {r4, r5}\n\t" "ldm %[a]!, {r4, r5}\n\t" - "ldm %[b]!, {r6, r7}\n\t" + "ldm %[b]!, {r6, r8}\n\t" "adcs r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "stm %[r]!, {r4, r5}\n\t" "ldm %[a]!, {r4, r5}\n\t" - "ldm %[b]!, {r6, r7}\n\t" + "ldm %[b]!, {r6, r8}\n\t" "adcs r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "stm %[r]!, {r4, r5}\n\t" "ldm %[a]!, {r4, r5}\n\t" - "ldm %[b]!, {r6, r7}\n\t" + "ldm %[b]!, {r6, r8}\n\t" "adcs r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "stm %[r]!, {r4, r5}\n\t" "ldm %[a]!, {r4, r5}\n\t" - "ldm %[b]!, {r6, r7}\n\t" + "ldm %[b]!, {r6, r8}\n\t" "adcs r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "stm %[r]!, {r4, r5}\n\t" "ldm %[a]!, {r4, r5}\n\t" - "ldm %[b]!, {r6, r7}\n\t" + "ldm %[b]!, {r6, r8}\n\t" "adcs r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "stm %[r]!, {r4, r5}\n\t" "ldm %[a]!, {r4, r5}\n\t" - "ldm %[b]!, {r6, r7}\n\t" + "ldm %[b]!, {r6, r8}\n\t" "adcs r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "stm %[r]!, {r4, r5}\n\t" "ldm %[a]!, {r4, r5}\n\t" - "ldm %[b]!, {r6, r7}\n\t" + "ldm %[b]!, {r6, r8}\n\t" "adcs r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "stm %[r]!, {r4, r5}\n\t" "ldm %[a]!, {r4, r5}\n\t" - "ldm %[b]!, {r6, r7}\n\t" + "ldm %[b]!, {r6, r8}\n\t" "adcs r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "stm %[r]!, {r4, r5}\n\t" "ldm %[a]!, {r4, r5}\n\t" - "ldm %[b]!, {r6, r7}\n\t" + "ldm %[b]!, {r6, r8}\n\t" "adcs r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "stm %[r]!, {r4, r5}\n\t" "ldm %[a]!, {r4, r5}\n\t" - "ldm %[b]!, {r6, r7}\n\t" + "ldm %[b]!, {r6, r8}\n\t" "adcs r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "stm %[r]!, {r4, r5}\n\t" "ldm %[a]!, {r4, r5}\n\t" - "ldm %[b]!, {r6, r7}\n\t" + "ldm %[b]!, {r6, r8}\n\t" "adcs r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "stm %[r]!, {r4, r5}\n\t" "ldm %[a]!, {r4, r5}\n\t" - "ldm %[b]!, {r6, r7}\n\t" + "ldm %[b]!, {r6, r8}\n\t" "adcs r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "stm %[r]!, {r4, r5}\n\t" "ldm %[a]!, {r4, r5}\n\t" - "ldm %[b]!, {r6, r7}\n\t" + "ldm %[b]!, {r6, r8}\n\t" "adcs r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "stm %[r]!, {r4, r5}\n\t" "ldm %[a]!, {r4, r5}\n\t" - "ldm %[b]!, {r6, r7}\n\t" + "ldm %[b]!, {r6, r8}\n\t" "adcs r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "stm %[r]!, {r4, r5}\n\t" "ldm %[a]!, {r4, r5}\n\t" - "ldm %[b]!, {r6, r7}\n\t" + "ldm %[b]!, {r6, r8}\n\t" "adcs r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "stm %[r]!, {r4, r5}\n\t" "ldm %[a]!, {r4, r5}\n\t" - "ldm %[b]!, {r6, r7}\n\t" + "ldm %[b]!, {r6, r8}\n\t" "adcs r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "stm %[r]!, {r4, r5}\n\t" "ldm %[a]!, {r4, r5}\n\t" - "ldm %[b]!, {r6, r7}\n\t" + "ldm %[b]!, {r6, r8}\n\t" "adcs r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "stm %[r]!, {r4, r5}\n\t" "ldm %[a]!, {r4, r5}\n\t" - "ldm %[b]!, {r6, r7}\n\t" + "ldm %[b]!, {r6, r8}\n\t" "adcs r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "stm %[r]!, {r4, r5}\n\t" "ldm %[a]!, {r4, r5}\n\t" - "ldm %[b]!, {r6, r7}\n\t" + "ldm %[b]!, {r6, r8}\n\t" "adcs r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "stm %[r]!, {r4, r5}\n\t" "ldm %[a]!, {r4, r5}\n\t" - "ldm %[b]!, {r6, r7}\n\t" + "ldm %[b]!, {r6, r8}\n\t" "adcs r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "stm %[r]!, {r4, r5}\n\t" "ldm %[a]!, {r4, r5}\n\t" - "ldm %[b]!, {r6, r7}\n\t" + "ldm %[b]!, {r6, r8}\n\t" "adcs r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "stm %[r]!, {r4, r5}\n\t" "ldm %[a]!, {r4, r5}\n\t" - "ldm %[b]!, {r6, r7}\n\t" + "ldm %[b]!, {r6, r8}\n\t" "adcs r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "stm %[r]!, {r4, r5}\n\t" "ldm %[a]!, {r4, r5}\n\t" - "ldm %[b]!, {r6, r7}\n\t" + "ldm %[b]!, {r6, r8}\n\t" "adcs r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "stm %[r]!, {r4, r5}\n\t" "ldm %[a]!, {r4, r5}\n\t" - "ldm %[b]!, {r6, r7}\n\t" + "ldm %[b]!, {r6, r8}\n\t" "adcs r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "stm %[r]!, {r4, r5}\n\t" "ldm %[a]!, {r4, r5}\n\t" - "ldm %[b]!, {r6, r7}\n\t" + "ldm %[b]!, {r6, r8}\n\t" "adcs r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "stm %[r]!, {r4, r5}\n\t" "ldm %[a]!, {r4, r5}\n\t" - "ldm %[b]!, {r6, r7}\n\t" + "ldm %[b]!, {r6, r8}\n\t" "adcs r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "stm %[r]!, {r4, r5}\n\t" "ldm %[a]!, {r4, r5}\n\t" - "ldm %[b]!, {r6, r7}\n\t" + "ldm %[b]!, {r6, r8}\n\t" "adcs r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "stm %[r]!, {r4, r5}\n\t" "ldm %[a]!, {r4, r5}\n\t" - "ldm %[b]!, {r6, r7}\n\t" + "ldm %[b]!, {r6, r8}\n\t" "adcs r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "stm %[r]!, {r4, r5}\n\t" "ldm %[a]!, {r4, r5}\n\t" - "ldm %[b]!, {r6, r7}\n\t" + "ldm %[b]!, {r6, r8}\n\t" "adcs r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "stm %[r]!, {r4, r5}\n\t" "ldm %[a]!, {r4, r5}\n\t" - "ldm %[b]!, {r6, r7}\n\t" + "ldm %[b]!, {r6, r8}\n\t" "adcs r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "stm %[r]!, {r4, r5}\n\t" "ldm %[a]!, {r4, r5}\n\t" - "ldm %[b]!, {r6, r7}\n\t" + "ldm %[b]!, {r6, r8}\n\t" "adcs r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "stm %[r]!, {r4, r5}\n\t" "ldm %[a]!, {r4, r5}\n\t" - "ldm %[b]!, {r6, r7}\n\t" + "ldm %[b]!, {r6, r8}\n\t" "adcs r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "stm %[r]!, {r4, r5}\n\t" "ldm %[a]!, {r4, r5}\n\t" - "ldm %[b]!, {r6, r7}\n\t" + "ldm %[b]!, {r6, r8}\n\t" "adcs r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "stm %[r]!, {r4, r5}\n\t" "ldm %[a]!, {r4, r5}\n\t" - "ldm %[b]!, {r6, r7}\n\t" + "ldm %[b]!, {r6, r8}\n\t" "adcs r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "stm %[r]!, {r4, r5}\n\t" "ldm %[a]!, {r4, r5}\n\t" - "ldm %[b]!, {r6, r7}\n\t" + "ldm %[b]!, {r6, r8}\n\t" "adcs r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "stm %[r]!, {r4, r5}\n\t" "ldm %[a]!, {r4, r5}\n\t" - "ldm %[b]!, {r6, r7}\n\t" + "ldm %[b]!, {r6, r8}\n\t" "adcs r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "stm %[r]!, {r4, r5}\n\t" "ldm %[a]!, {r4, r5}\n\t" - "ldm %[b]!, {r6, r7}\n\t" + "ldm %[b]!, {r6, r8}\n\t" "adcs r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "stm %[r]!, {r4, r5}\n\t" "ldm %[a]!, {r4, r5}\n\t" - "ldm %[b]!, {r6, r7}\n\t" + "ldm %[b]!, {r6, r8}\n\t" "adcs r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "stm %[r]!, {r4, r5}\n\t" "ldm %[a]!, {r4, r5}\n\t" - "ldm %[b]!, {r6, r7}\n\t" + "ldm %[b]!, {r6, r8}\n\t" "adcs r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "stm %[r]!, {r4, r5}\n\t" "ldm %[a]!, {r4, r5}\n\t" - "ldm %[b]!, {r6, r7}\n\t" + "ldm %[b]!, {r6, r8}\n\t" "adcs r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "stm %[r]!, {r4, r5}\n\t" "ldm %[a]!, {r4, r5}\n\t" - "ldm %[b]!, {r6, r7}\n\t" + "ldm %[b]!, {r6, r8}\n\t" "adcs r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "stm %[r]!, {r4, r5}\n\t" "ldm %[a]!, {r4, r5}\n\t" - "ldm %[b]!, {r6, r7}\n\t" + "ldm %[b]!, {r6, r8}\n\t" "adcs r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "stm %[r]!, {r4, r5}\n\t" "ldm %[a]!, {r4, r5}\n\t" - "ldm %[b]!, {r6, r7}\n\t" + "ldm %[b]!, {r6, r8}\n\t" "adcs r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "stm %[r]!, {r4, r5}\n\t" "ldm %[a]!, {r4, r5}\n\t" - "ldm %[b]!, {r6, r7}\n\t" + "ldm %[b]!, {r6, r8}\n\t" "adcs r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "stm %[r]!, {r4, r5}\n\t" "ldm %[a]!, {r4, r5}\n\t" - "ldm %[b]!, {r6, r7}\n\t" + "ldm %[b]!, {r6, r8}\n\t" "adcs r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "stm %[r]!, {r4, r5}\n\t" "ldm %[a]!, {r4, r5}\n\t" - "ldm %[b]!, {r6, r7}\n\t" + "ldm %[b]!, {r6, r8}\n\t" "adcs r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "stm %[r]!, {r4, r5}\n\t" "ldm %[a]!, {r4, r5}\n\t" - "ldm %[b]!, {r6, r7}\n\t" + "ldm %[b]!, {r6, r8}\n\t" "adcs r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "stm %[r]!, {r4, r5}\n\t" "ldm %[a]!, {r4, r5}\n\t" - "ldm %[b]!, {r6, r7}\n\t" + "ldm %[b]!, {r6, r8}\n\t" "adcs r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "stm %[r]!, {r4, r5}\n\t" "mov %[c], #0\n\t" "adc %[c], %[c], %[c]\n\t" : [c] "+r" (c), [r] "+r" (r), [a] "+r" (a), [b] "+r" (b) : - : "memory", "r4", "r5", "r6", "r7" + : "memory", "r4", "r5", "r6", "r8" ); return c; @@ -10771,63 +10767,63 @@ SP_NOINLINE static void sp_4096_mul_64(sp_digit* r, const sp_digit* a, __asm__ __volatile__ ( "mov r3, #0\n\t" "mov r4, #0\n\t" - "mov r8, r3\n\t" - "mov r11, %[r]\n\t" - "mov r9, %[a]\n\t" - "mov r10, %[b]\n\t" + "mov r9, r3\n\t" + "mov r12, %[r]\n\t" + "mov r10, %[a]\n\t" + "mov r11, %[b]\n\t" "mov r6, #1\n\t" "lsl r6, r6, #8\n\t" - "add r6, r6, r9\n\t" - "mov r12, r6\n\t" + "add r6, r6, r10\n\t" + "mov r14, r6\n\t" "\n1:\n\t" "mov %[r], #0\n\t" "mov r5, #0\n\t" "mov r6, #252\n\t" - "mov %[a], r8\n\t" + "mov %[a], r9\n\t" "subs %[a], %[a], r6\n\t" "sbc r6, r6, r6\n\t" "mvn r6, r6\n\t" "and %[a], %[a], r6\n\t" - "mov %[b], r8\n\t" + "mov %[b], r9\n\t" "sub %[b], %[b], %[a]\n\t" - "add %[a], %[a], r9\n\t" - "add %[b], %[b], r10\n\t" + "add %[a], %[a], r10\n\t" + "add %[b], %[b], r11\n\t" "\n2:\n\t" /* Multiply Start */ "ldr r6, [%[a]]\n\t" - "ldr r7, [%[b]]\n\t" - "umull r6, r7, r6, r7\n\t" + "ldr r8, [%[b]]\n\t" + "umull r6, r8, r6, r8\n\t" "adds r3, r3, r6\n\t" - "adcs r4, r4, r7\n\t" + "adcs r4, r4, r8\n\t" "adc r5, r5, %[r]\n\t" /* Multiply Done */ "add %[a], %[a], #4\n\t" "sub %[b], %[b], #4\n\t" - "cmp %[a], r12\n\t" + "cmp %[a], r14\n\t" "beq 3f\n\t" - "mov r6, r8\n\t" - "add r6, r6, r9\n\t" + "mov r6, r9\n\t" + "add r6, r6, r10\n\t" "cmp %[a], r6\n\t" "ble 2b\n\t" "\n3:\n\t" - "mov %[r], r11\n\t" - "mov r7, r8\n\t" - "str r3, [%[r], r7]\n\t" + "mov %[r], r12\n\t" + "mov r8, r9\n\t" + "str r3, [%[r], r8]\n\t" "mov r3, r4\n\t" "mov r4, r5\n\t" - "add r7, r7, #4\n\t" - "mov r8, r7\n\t" + "add r8, r8, #4\n\t" + "mov r9, r8\n\t" "mov r6, #1\n\t" "lsl r6, r6, #8\n\t" "add r6, r6, #248\n\t" - "cmp r7, r6\n\t" + "cmp r8, r6\n\t" "ble 1b\n\t" - "str r3, [%[r], r7]\n\t" - "mov %[a], r9\n\t" - "mov %[b], r10\n\t" + "str r3, [%[r], r8]\n\t" + "mov %[a], r10\n\t" + "mov %[b], r11\n\t" : : [r] "r" (tmp), [a] "r" (a), [b] "r" (b) - : "memory", "r3", "r4", "r5", "r6", "r7", "r8", "r9", "r10", "r11", "r12" + : "memory", "r3", "r4", "r5", "r6", "r8", "r9", "r10", "r11", "r12", "r14" ); XMEMCPY(r, tmp, sizeof(tmp)); @@ -10907,47 +10903,47 @@ SP_NOINLINE static void sp_4096_sqr_64(sp_digit* r, const sp_digit* a) "mov r3, #0\n\t" "mov r4, #0\n\t" "mov r5, #0\n\t" - "mov r8, r3\n\t" - "mov r11, %[r]\n\t" + "mov r9, r3\n\t" + "mov r12, %[r]\n\t" "mov r6, #2\n\t" "lsl r6, r6, #8\n\t" "neg r6, r6\n\t" "add sp, sp, r6\n\t" - "mov r10, sp\n\t" - "mov r9, %[a]\n\t" + "mov r11, sp\n\t" + "mov r10, %[a]\n\t" "\n1:\n\t" "mov %[r], #0\n\t" "mov r6, #252\n\t" - "mov %[a], r8\n\t" + "mov %[a], r9\n\t" "subs %[a], %[a], r6\n\t" "sbc r6, r6, r6\n\t" "mvn r6, r6\n\t" "and %[a], %[a], r6\n\t" - "mov r2, r8\n\t" + "mov r2, r9\n\t" "sub r2, r2, %[a]\n\t" - "add %[a], %[a], r9\n\t" - "add r2, r2, r9\n\t" + "add %[a], %[a], r10\n\t" + "add r2, r2, r10\n\t" "\n2:\n\t" "cmp r2, %[a]\n\t" "beq 4f\n\t" /* Multiply * 2: Start */ "ldr r6, [%[a]]\n\t" - "ldr r7, [r2]\n\t" - "umull r6, r7, r6, r7\n\t" + "ldr r8, [r2]\n\t" + "umull r6, r8, r6, r8\n\t" "adds r3, r3, r6\n\t" - "adcs r4, r4, r7\n\t" + "adcs r4, r4, r8\n\t" "adc r5, r5, %[r]\n\t" "adds r3, r3, r6\n\t" - "adcs r4, r4, r7\n\t" + "adcs r4, r4, r8\n\t" "adc r5, r5, %[r]\n\t" /* Multiply * 2: Done */ "bal 5f\n\t" "\n4:\n\t" /* Square: Start */ "ldr r6, [%[a]]\n\t" - "umull r6, r7, r6, r6\n\t" + "umull r6, r8, r6, r6\n\t" "adds r3, r3, r6\n\t" - "adcs r4, r4, r7\n\t" + "adcs r4, r4, r8\n\t" "adc r5, r5, %[r]\n\t" /* Square: Done */ "\n5:\n\t" @@ -10955,33 +10951,33 @@ SP_NOINLINE static void sp_4096_sqr_64(sp_digit* r, const sp_digit* a) "sub r2, r2, #4\n\t" "mov r6, #1\n\t" "lsl r6, r6, #8\n\t" - "add r6, r6, r9\n\t" + "add r6, r6, r10\n\t" "cmp %[a], r6\n\t" "beq 3f\n\t" "cmp %[a], r2\n\t" "bgt 3f\n\t" - "mov r7, r8\n\t" - "add r7, r7, r9\n\t" - "cmp %[a], r7\n\t" + "mov r8, r9\n\t" + "add r8, r8, r10\n\t" + "cmp %[a], r8\n\t" "ble 2b\n\t" "\n3:\n\t" - "mov %[r], r10\n\t" - "mov r7, r8\n\t" - "str r3, [%[r], r7]\n\t" + "mov %[r], r11\n\t" + "mov r8, r9\n\t" + "str r3, [%[r], r8]\n\t" "mov r3, r4\n\t" "mov r4, r5\n\t" "mov r5, #0\n\t" - "add r7, r7, #4\n\t" - "mov r8, r7\n\t" + "add r8, r8, #4\n\t" + "mov r9, r8\n\t" "mov r6, #1\n\t" "lsl r6, r6, #8\n\t" "add r6, r6, #248\n\t" - "cmp r7, r6\n\t" + "cmp r8, r6\n\t" "ble 1b\n\t" - "mov %[a], r9\n\t" - "str r3, [%[r], r7]\n\t" - "mov %[r], r11\n\t" "mov %[a], r10\n\t" + "str r3, [%[r], r8]\n\t" + "mov %[r], r12\n\t" + "mov %[a], r11\n\t" "mov r3, #1\n\t" "lsl r3, r3, #8\n\t" "add r3, r3, #252\n\t" @@ -10995,7 +10991,7 @@ SP_NOINLINE static void sp_4096_sqr_64(sp_digit* r, const sp_digit* a) "add sp, sp, r6\n\t" : : [r] "r" (r), [a] "r" (a) - : "memory", "r2", "r3", "r4", "r5", "r6", "r7", "r8", "r9", "r10", "r11" + : "memory", "r2", "r3", "r4", "r5", "r6", "r8", "r9", "r10", "r11", "r12" ); } @@ -11041,11 +11037,11 @@ SP_NOINLINE static sp_digit sp_4096_add_128(sp_digit* r, const sp_digit* a, __asm__ __volatile__ ( "mov r6, %[a]\n\t" - "mov r7, #0\n\t" + "mov r8, #0\n\t" "add r6, r6, #512\n\t" - "sub r7, r7, #1\n\t" + "sub r8, r8, #1\n\t" "\n1:\n\t" - "adds %[c], %[c], r7\n\t" + "adds %[c], %[c], r8\n\t" "ldr r4, [%[a]]\n\t" "ldr r5, [%[b]]\n\t" "adcs r4, r4, r5\n\t" @@ -11059,7 +11055,7 @@ SP_NOINLINE static sp_digit sp_4096_add_128(sp_digit* r, const sp_digit* a, "bne 1b\n\t" : [c] "+r" (c), [r] "+r" (r), [a] "+r" (a), [b] "+r" (b) : - : "memory", "r4", "r5", "r6", "r7" + : "memory", "r4", "r5", "r6", "r8" ); return c; @@ -11077,8 +11073,8 @@ SP_NOINLINE static sp_digit sp_4096_sub_in_place_128(sp_digit* a, { sp_digit c = 0; __asm__ __volatile__ ( - "mov r7, %[a]\n\t" - "add r7, r7, #512\n\t" + "mov r8, %[a]\n\t" + "add r8, r8, #512\n\t" "\n1:\n\t" "mov r5, #0\n\t" "subs r5, r5, %[c]\n\t" @@ -11093,11 +11089,11 @@ SP_NOINLINE static sp_digit sp_4096_sub_in_place_128(sp_digit* a, "sbc %[c], %[c], %[c]\n\t" "add %[a], %[a], #8\n\t" "add %[b], %[b], #8\n\t" - "cmp %[a], r7\n\t" + "cmp %[a], r8\n\t" "bne 1b\n\t" : [c] "+r" (c), [a] "+r" (a), [b] "+r" (b) : - : "memory", "r3", "r4", "r5", "r6", "r7" + : "memory", "r3", "r4", "r5", "r6", "r8" ); return c; @@ -11118,65 +11114,65 @@ SP_NOINLINE static void sp_4096_mul_128(sp_digit* r, const sp_digit* a, __asm__ __volatile__ ( "mov r3, #0\n\t" "mov r4, #0\n\t" - "mov r8, r3\n\t" - "mov r11, %[r]\n\t" - "mov r9, %[a]\n\t" - "mov r10, %[b]\n\t" + "mov r9, r3\n\t" + "mov r12, %[r]\n\t" + "mov r10, %[a]\n\t" + "mov r11, %[b]\n\t" "mov r6, #2\n\t" "lsl r6, r6, #8\n\t" - "add r6, r6, r9\n\t" - "mov r12, r6\n\t" + "add r6, r6, r10\n\t" + "mov r14, r6\n\t" "\n1:\n\t" "mov %[r], #0\n\t" "mov r5, #0\n\t" "mov r6, #1\n\t" "lsl r6, r6, #8\n\t" "add r6, r6, #252\n\t" - "mov %[a], r8\n\t" + "mov %[a], r9\n\t" "subs %[a], %[a], r6\n\t" "sbc r6, r6, r6\n\t" "mvn r6, r6\n\t" "and %[a], %[a], r6\n\t" - "mov %[b], r8\n\t" + "mov %[b], r9\n\t" "sub %[b], %[b], %[a]\n\t" - "add %[a], %[a], r9\n\t" - "add %[b], %[b], r10\n\t" + "add %[a], %[a], r10\n\t" + "add %[b], %[b], r11\n\t" "\n2:\n\t" /* Multiply Start */ "ldr r6, [%[a]]\n\t" - "ldr r7, [%[b]]\n\t" - "umull r6, r7, r6, r7\n\t" + "ldr r8, [%[b]]\n\t" + "umull r6, r8, r6, r8\n\t" "adds r3, r3, r6\n\t" - "adcs r4, r4, r7\n\t" + "adcs r4, r4, r8\n\t" "adc r5, r5, %[r]\n\t" /* Multiply Done */ "add %[a], %[a], #4\n\t" "sub %[b], %[b], #4\n\t" - "cmp %[a], r12\n\t" + "cmp %[a], r14\n\t" "beq 3f\n\t" - "mov r6, r8\n\t" - "add r6, r6, r9\n\t" + "mov r6, r9\n\t" + "add r6, r6, r10\n\t" "cmp %[a], r6\n\t" "ble 2b\n\t" "\n3:\n\t" - "mov %[r], r11\n\t" - "mov r7, r8\n\t" - "str r3, [%[r], r7]\n\t" + "mov %[r], r12\n\t" + "mov r8, r9\n\t" + "str r3, [%[r], r8]\n\t" "mov r3, r4\n\t" "mov r4, r5\n\t" - "add r7, r7, #4\n\t" - "mov r8, r7\n\t" + "add r8, r8, #4\n\t" + "mov r9, r8\n\t" "mov r6, #3\n\t" "lsl r6, r6, #8\n\t" "add r6, r6, #248\n\t" - "cmp r7, r6\n\t" + "cmp r8, r6\n\t" "ble 1b\n\t" - "str r3, [%[r], r7]\n\t" - "mov %[a], r9\n\t" - "mov %[b], r10\n\t" + "str r3, [%[r], r8]\n\t" + "mov %[a], r10\n\t" + "mov %[b], r11\n\t" : : [r] "r" (tmp), [a] "r" (a), [b] "r" (b) - : "memory", "r3", "r4", "r5", "r6", "r7", "r8", "r9", "r10", "r11", "r12" + : "memory", "r3", "r4", "r5", "r6", "r8", "r9", "r10", "r11", "r12", "r14" ); XMEMCPY(r, tmp, sizeof(tmp)); @@ -11193,49 +11189,49 @@ SP_NOINLINE static void sp_4096_sqr_128(sp_digit* r, const sp_digit* a) "mov r3, #0\n\t" "mov r4, #0\n\t" "mov r5, #0\n\t" - "mov r8, r3\n\t" - "mov r11, %[r]\n\t" + "mov r9, r3\n\t" + "mov r12, %[r]\n\t" "mov r6, #4\n\t" "lsl r6, r6, #8\n\t" "neg r6, r6\n\t" "add sp, sp, r6\n\t" - "mov r10, sp\n\t" - "mov r9, %[a]\n\t" + "mov r11, sp\n\t" + "mov r10, %[a]\n\t" "\n1:\n\t" "mov %[r], #0\n\t" "mov r6, #1\n\t" "lsl r6, r6, #8\n\t" "add r6, r6, #252\n\t" - "mov %[a], r8\n\t" + "mov %[a], r9\n\t" "subs %[a], %[a], r6\n\t" "sbc r6, r6, r6\n\t" "mvn r6, r6\n\t" "and %[a], %[a], r6\n\t" - "mov r2, r8\n\t" + "mov r2, r9\n\t" "sub r2, r2, %[a]\n\t" - "add %[a], %[a], r9\n\t" - "add r2, r2, r9\n\t" + "add %[a], %[a], r10\n\t" + "add r2, r2, r10\n\t" "\n2:\n\t" "cmp r2, %[a]\n\t" "beq 4f\n\t" /* Multiply * 2: Start */ "ldr r6, [%[a]]\n\t" - "ldr r7, [r2]\n\t" - "umull r6, r7, r6, r7\n\t" + "ldr r8, [r2]\n\t" + "umull r6, r8, r6, r8\n\t" "adds r3, r3, r6\n\t" - "adcs r4, r4, r7\n\t" + "adcs r4, r4, r8\n\t" "adc r5, r5, %[r]\n\t" "adds r3, r3, r6\n\t" - "adcs r4, r4, r7\n\t" + "adcs r4, r4, r8\n\t" "adc r5, r5, %[r]\n\t" /* Multiply * 2: Done */ "bal 5f\n\t" "\n4:\n\t" /* Square: Start */ "ldr r6, [%[a]]\n\t" - "umull r6, r7, r6, r6\n\t" + "umull r6, r8, r6, r6\n\t" "adds r3, r3, r6\n\t" - "adcs r4, r4, r7\n\t" + "adcs r4, r4, r8\n\t" "adc r5, r5, %[r]\n\t" /* Square: Done */ "\n5:\n\t" @@ -11243,33 +11239,33 @@ SP_NOINLINE static void sp_4096_sqr_128(sp_digit* r, const sp_digit* a) "sub r2, r2, #4\n\t" "mov r6, #2\n\t" "lsl r6, r6, #8\n\t" - "add r6, r6, r9\n\t" + "add r6, r6, r10\n\t" "cmp %[a], r6\n\t" "beq 3f\n\t" "cmp %[a], r2\n\t" "bgt 3f\n\t" - "mov r7, r8\n\t" - "add r7, r7, r9\n\t" - "cmp %[a], r7\n\t" + "mov r8, r9\n\t" + "add r8, r8, r10\n\t" + "cmp %[a], r8\n\t" "ble 2b\n\t" "\n3:\n\t" - "mov %[r], r10\n\t" - "mov r7, r8\n\t" - "str r3, [%[r], r7]\n\t" + "mov %[r], r11\n\t" + "mov r8, r9\n\t" + "str r3, [%[r], r8]\n\t" "mov r3, r4\n\t" "mov r4, r5\n\t" "mov r5, #0\n\t" - "add r7, r7, #4\n\t" - "mov r8, r7\n\t" + "add r8, r8, #4\n\t" + "mov r9, r8\n\t" "mov r6, #3\n\t" "lsl r6, r6, #8\n\t" "add r6, r6, #248\n\t" - "cmp r7, r6\n\t" + "cmp r8, r6\n\t" "ble 1b\n\t" - "mov %[a], r9\n\t" - "str r3, [%[r], r7]\n\t" - "mov %[r], r11\n\t" "mov %[a], r10\n\t" + "str r3, [%[r], r8]\n\t" + "mov %[r], r12\n\t" + "mov %[a], r11\n\t" "mov r3, #3\n\t" "lsl r3, r3, #8\n\t" "add r3, r3, #252\n\t" @@ -11283,7 +11279,7 @@ SP_NOINLINE static void sp_4096_sqr_128(sp_digit* r, const sp_digit* a) "add sp, sp, r6\n\t" : : [r] "r" (r), [a] "r" (a) - : "memory", "r2", "r3", "r4", "r5", "r6", "r7", "r8", "r9", "r10", "r11" + : "memory", "r2", "r3", "r4", "r5", "r6", "r8", "r9", "r10", "r11", "r12" ); } @@ -11317,7 +11313,7 @@ SP_NOINLINE static void sp_4096_mul_d_128(sp_digit* r, const sp_digit* a, sp_digit b) { __asm__ __volatile__ ( - "add r8, %[a], #512\n\t" + "add r9, %[a], #512\n\t" /* A[0] * B */ "ldr r6, [%[a]], #4\n\t" "umull r5, r3, r6, %[b]\n\t" @@ -11328,20 +11324,20 @@ SP_NOINLINE static void sp_4096_mul_d_128(sp_digit* r, const sp_digit* a, "mov r5, #0\n\t" /* A[] * B */ "ldr r6, [%[a]], #4\n\t" - "umull r6, r7, r6, %[b]\n\t" + "umull r6, r8, r6, %[b]\n\t" "adds r3, r3, r6\n\t" - "adcs r4, r4, r7\n\t" + "adcs r4, r4, r8\n\t" "adc r5, r5, #0\n\t" /* A[] * B - Done */ "str r3, [%[r]], #4\n\t" "mov r3, r4\n\t" "mov r4, r5\n\t" - "cmp %[a], r8\n\t" + "cmp %[a], r9\n\t" "blt 1b\n\t" "str r3, [%[r]]\n\t" : [r] "+r" (r), [a] "+r" (a) : [b] "r" (b) - : "memory", "r3", "r4", "r5", "r6", "r7", "r8" + : "memory", "r3", "r4", "r5", "r6", "r8", "r9" ); } @@ -11377,23 +11373,23 @@ SP_NOINLINE static sp_digit sp_4096_cond_sub_128(sp_digit* r, const sp_digit* a, __asm__ __volatile__ ( "mov r5, #2\n\t" "lsl r5, r5, #8\n\t" - "mov r8, r5\n\t" - "mov r7, #0\n\t" + "mov r9, r5\n\t" + "mov r8, #0\n\t" "\n1:\n\t" - "ldr r6, [%[b], r7]\n\t" + "ldr r6, [%[b], r8]\n\t" "and r6, r6, %[m]\n\t" "mov r5, #0\n\t" "subs r5, r5, %[c]\n\t" - "ldr r5, [%[a], r7]\n\t" + "ldr r5, [%[a], r8]\n\t" "sbcs r5, r5, r6\n\t" "sbcs %[c], %[c], %[c]\n\t" - "str r5, [%[r], r7]\n\t" - "add r7, r7, #4\n\t" - "cmp r7, r8\n\t" + "str r5, [%[r], r8]\n\t" + "add r8, r8, #4\n\t" + "cmp r8, r9\n\t" "blt 1b\n\t" : [c] "+r" (c) : [r] "r" (r), [a] "r" (a), [b] "r" (b), [m] "r" (m) - : "memory", "r5", "r6", "r7", "r8" + : "memory", "r5", "r6", "r8", "r9" ); return c; @@ -11411,28 +11407,27 @@ SP_NOINLINE static void sp_4096_mont_reduce_128(sp_digit* a, const sp_digit* m, sp_digit ca = 0; __asm__ __volatile__ ( - "mov r8, %[mp]\n\t" + "mov r9, %[mp]\n\t" "mov r12, %[m]\n\t" - "mov r9, %[a]\n\t" + "mov r10, %[a]\n\t" "mov r4, #0\n\t" - "add r11, r9, #512\n\t" + "add r11, r10, #512\n\t" "\n1:\n\t" /* mu = a[i] * mp */ - "mov %[mp], r8\n\t" - "ldr %[a], [r9]\n\t" + "mov %[mp], r9\n\t" + "ldr %[a], [r10]\n\t" "mul %[mp], %[mp], %[a]\n\t" "mov %[m], r12\n\t" - "mov r10, r9\n\t" - "add r14, r9, #504\n\t" + "add r14, r10, #504\n\t" "\n2:\n\t" /* a[i+j] += m[j] * mu */ "ldr %[a], [r10]\n\t" "mov r5, #0\n\t" /* Multiply m[j] and mu - Start */ - "ldr r7, [%[m]], #4\n\t" - "umull r6, r7, %[mp], r7\n\t" + "ldr r8, [%[m]], #4\n\t" + "umull r6, r8, %[mp], r8\n\t" "adds %[a], %[a], r6\n\t" - "adc r5, r5, r7\n\t" + "adc r5, r5, r8\n\t" /* Multiply m[j] and mu - Done */ "adds r4, r4, %[a]\n\t" "adc r5, r5, #0\n\t" @@ -11441,10 +11436,10 @@ SP_NOINLINE static void sp_4096_mont_reduce_128(sp_digit* a, const sp_digit* m, "ldr %[a], [r10]\n\t" "mov r4, #0\n\t" /* Multiply m[j] and mu - Start */ - "ldr r7, [%[m]], #4\n\t" - "umull r6, r7, %[mp], r7\n\t" + "ldr r8, [%[m]], #4\n\t" + "umull r6, r8, %[mp], r8\n\t" "adds %[a], %[a], r6\n\t" - "adc r4, r4, r7\n\t" + "adc r4, r4, r8\n\t" /* Multiply m[j] and mu - Done */ "adds r5, r5, %[a]\n\t" "adc r4, r4, #0\n\t" @@ -11455,10 +11450,10 @@ SP_NOINLINE static void sp_4096_mont_reduce_128(sp_digit* a, const sp_digit* m, "ldr %[a], [r10]\n\t" "mov r5, #0\n\t" /* Multiply m[j] and mu - Start */ - "ldr r7, [%[m]], #4\n\t" - "umull r6, r7, %[mp], r7\n\t" + "ldr r8, [%[m]], #4\n\t" + "umull r6, r8, %[mp], r8\n\t" "adds %[a], %[a], r6\n\t" - "adc r5, r5, r7\n\t" + "adc r5, r5, r8\n\t" /* Multiply m[j] and mu - Done */ "adds r4, r4, %[a]\n\t" "adc r5, r5, #0\n\t" @@ -11467,28 +11462,28 @@ SP_NOINLINE static void sp_4096_mont_reduce_128(sp_digit* a, const sp_digit* m, "mov r4, %[ca]\n\t" "mov %[ca], #0\n\t" /* Multiply m[127] and mu - Start */ - "ldr r7, [%[m]]\n\t" - "umull r6, r7, %[mp], r7\n\t" + "ldr r8, [%[m]]\n\t" + "umull r6, r8, %[mp], r8\n\t" "adds r5, r5, r6\n\t" - "adcs r4, r4, r7\n\t" + "adcs r4, r4, r8\n\t" "adc %[ca], %[ca], #0\n\t" /* Multiply m[127] and mu - Done */ "ldr r6, [r10]\n\t" - "ldr r7, [r10, #4]\n\t" + "ldr r8, [r10, #4]\n\t" "adds r6, r6, r5\n\t" - "adcs r7, r7, r4\n\t" + "adcs r8, r8, r4\n\t" "adc %[ca], %[ca], #0\n\t" "str r6, [r10]\n\t" - "str r7, [r10, #4]\n\t" + "str r8, [r10, #4]\n\t" /* Next word in a */ - "add r9, r9, #4\n\t" - "cmp r9, r11\n\t" + "sub r10, r10, #504\n\t" + "cmp r10, r11\n\t" "blt 1b\n\t" - "mov %[a], r9\n\t" + "mov %[a], r10\n\t" "mov %[m], r12\n\t" : [ca] "+r" (ca), [a] "+r" (a) : [m] "r" (m), [mp] "r" (mp) - : "memory", "r4", "r5", "r6", "r7", "r8", "r9", "r10", "r11", "r12", "r14" + : "memory", "r4", "r5", "r6", "r8", "r9", "r10", "r11", "r12", "r14" ); sp_4096_cond_sub_128(a - 128, a, m, (sp_digit)0 - ca); @@ -11542,36 +11537,36 @@ SP_NOINLINE static sp_digit div_4096_word_128(sp_digit d1, sp_digit d0, "lsr r6, %[div], #16\n\t" "add r6, r6, #1\n\t" "udiv r4, %[d1], r6\n\t" - "lsl r7, r4, #16\n\t" - "umull r4, r5, %[div], r7\n\t" + "lsl r8, r4, #16\n\t" + "umull r4, r5, %[div], r8\n\t" "subs %[d0], %[d0], r4\n\t" "sbc %[d1], %[d1], r5\n\t" "udiv r5, %[d1], r6\n\t" "lsl r4, r5, #16\n\t" - "add r7, r7, r4\n\t" + "add r8, r8, r4\n\t" "umull r4, r5, %[div], r4\n\t" "subs %[d0], %[d0], r4\n\t" "sbc %[d1], %[d1], r5\n\t" "lsl r4, %[d1], #16\n\t" "orr r4, r4, %[d0], lsr #16\n\t" "udiv r4, r4, r6\n\t" - "add r7, r7, r4\n\t" + "add r8, r8, r4\n\t" "umull r4, r5, %[div], r4\n\t" "subs %[d0], %[d0], r4\n\t" "sbc %[d1], %[d1], r5\n\t" "lsl r4, %[d1], #16\n\t" "orr r4, r4, %[d0], lsr #16\n\t" "udiv r4, r4, r6\n\t" - "add r7, r7, r4\n\t" + "add r8, r8, r4\n\t" "umull r4, r5, %[div], r4\n\t" "subs %[d0], %[d0], r4\n\t" "sbc %[d1], %[d1], r5\n\t" "udiv r4, %[d0], %[div]\n\t" - "add r7, r7, r4\n\t" - "mov %[r], r7\n\t" + "add r8, r8, r4\n\t" + "mov %[r], r8\n\t" : [r] "+r" (r) : [d1] "r" (d1), [d0] "r" (d0), [div] "r" (div) - : "r4", "r5", "r6", "r7" + : "r4", "r5", "r6", "r8" ); return r; } @@ -11625,27 +11620,27 @@ SP_NOINLINE static int32_t sp_4096_cmp_128(const sp_digit* a, const sp_digit* b) "lsl r6, r6, #8\n\t" "add r6, r6, #252\n\t" "\n1:\n\t" - "ldr r7, [%[a], r6]\n\t" + "ldr r8, [%[a], r6]\n\t" "ldr r5, [%[b], r6]\n\t" - "and r7, r7, r3\n\t" + "and r8, r8, r3\n\t" "and r5, r5, r3\n\t" - "mov r4, r7\n\t" - "subs r7, r7, r5\n\t" - "sbc r7, r7, r7\n\t" - "add %[r], %[r], r7\n\t" - "mvn r7, r7\n\t" - "and r3, r3, r7\n\t" + "mov r4, r8\n\t" + "subs r8, r8, r5\n\t" + "sbc r8, r8, r8\n\t" + "add %[r], %[r], r8\n\t" + "mvn r8, r8\n\t" + "and r3, r3, r8\n\t" "subs r5, r5, r4\n\t" - "sbc r7, r7, r7\n\t" - "sub %[r], %[r], r7\n\t" - "mvn r7, r7\n\t" - "and r3, r3, r7\n\t" + "sbc r8, r8, r8\n\t" + "sub %[r], %[r], r8\n\t" + "mvn r8, r8\n\t" + "and r3, r3, r8\n\t" "sub r6, r6, #4\n\t" "cmp r6, #0\n\t" "bge 1b\n\t" : [r] "+r" (r) : [a] "r" (a), [b] "r" (b) - : "r3", "r4", "r5", "r6", "r7" + : "r3", "r4", "r5", "r6", "r8" ); return r; @@ -13774,27 +13769,27 @@ SP_NOINLINE static int32_t sp_256_cmp_8(const sp_digit* a, const sp_digit* b) "mvn r3, r3\n\t" "mov r6, #28\n\t" "\n1:\n\t" - "ldr r7, [%[a], r6]\n\t" + "ldr r8, [%[a], r6]\n\t" "ldr r5, [%[b], r6]\n\t" - "and r7, r7, r3\n\t" + "and r8, r8, r3\n\t" "and r5, r5, r3\n\t" - "mov r4, r7\n\t" - "subs r7, r7, r5\n\t" - "sbc r7, r7, r7\n\t" - "add %[r], %[r], r7\n\t" - "mvn r7, r7\n\t" - "and r3, r3, r7\n\t" + "mov r4, r8\n\t" + "subs r8, r8, r5\n\t" + "sbc r8, r8, r8\n\t" + "add %[r], %[r], r8\n\t" + "mvn r8, r8\n\t" + "and r3, r3, r8\n\t" "subs r5, r5, r4\n\t" - "sbc r7, r7, r7\n\t" - "sub %[r], %[r], r7\n\t" - "mvn r7, r7\n\t" - "and r3, r3, r7\n\t" + "sbc r8, r8, r8\n\t" + "sub %[r], %[r], r8\n\t" + "mvn r8, r8\n\t" + "and r3, r3, r8\n\t" "sub r6, r6, #4\n\t" "cmp r6, #0\n\t" "bge 1b\n\t" : [r] "+r" (r) : [a] "r" (a), [b] "r" (b) - : "r3", "r4", "r5", "r6", "r7" + : "r3", "r4", "r5", "r6", "r8" ); return r; @@ -13821,23 +13816,23 @@ SP_NOINLINE static sp_digit sp_256_cond_sub_8(sp_digit* r, const sp_digit* a, __asm__ __volatile__ ( "mov r5, #32\n\t" - "mov r8, r5\n\t" - "mov r7, #0\n\t" + "mov r9, r5\n\t" + "mov r8, #0\n\t" "\n1:\n\t" - "ldr r6, [%[b], r7]\n\t" + "ldr r6, [%[b], r8]\n\t" "and r6, r6, %[m]\n\t" "mov r5, #0\n\t" "subs r5, r5, %[c]\n\t" - "ldr r5, [%[a], r7]\n\t" + "ldr r5, [%[a], r8]\n\t" "sbcs r5, r5, r6\n\t" "sbcs %[c], %[c], %[c]\n\t" - "str r5, [%[r], r7]\n\t" - "add r7, r7, #4\n\t" - "cmp r7, r8\n\t" + "str r5, [%[r], r8]\n\t" + "add r8, r8, #4\n\t" + "cmp r8, r9\n\t" "blt 1b\n\t" : [c] "+r" (c) : [r] "r" (r), [a] "r" (a), [b] "r" (b), [m] "r" (m) - : "memory", "r5", "r6", "r7", "r8" + : "memory", "r5", "r6", "r8", "r9" ); return c; @@ -13859,7 +13854,7 @@ SP_NOINLINE static void sp_256_mont_reduce_8(sp_digit* a, const sp_digit* m, "mov r2, #0\n\t" "mov r1, #0\n\t" /* i = 0 */ - "mov r8, r2\n\t" + "mov r9, r2\n\t" "\n1:\n\t" "mov r4, #0\n\t" /* mu = a[i] * 1 (mp) = a[i] */ @@ -13907,7 +13902,7 @@ SP_NOINLINE static void sp_256_mont_reduce_8(sp_digit* a, const sp_digit* m, "str r5, [%[a], #24]\n\t" /* a[i+7] += -1 * mu */ "ldr r6, [%[a], #28]\n\t" - "ldr r7, [%[a], #32]\n\t" + "ldr r8, [%[a], #32]\n\t" "adds r5, r1, r3\n\t" "mov r1, #0\n\t" "adc r1, r1, r2\n\t" @@ -13915,15 +13910,15 @@ SP_NOINLINE static void sp_256_mont_reduce_8(sp_digit* a, const sp_digit* m, "sbcs r5, r5, r2\n\t" "sbc r1, r1, r2\n\t" "adds r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "adc r1, r1, r2\n\t" "str r4, [%[a], #28]\n\t" "str r5, [%[a], #32]\n\t" /* i += 1 */ - "add r8, r8, #1\n\t" + "add r9, r9, #1\n\t" "add %[a], %[a], #4\n\t" "mov r6, #8\n\t" - "cmp r8, r6\n\t" + "cmp r9, r6\n\t" "blt 1b\n\t" "sub %[a], %[a], #32\n\t" "mov r3, r1\n\t" @@ -13932,30 +13927,30 @@ SP_NOINLINE static void sp_256_mont_reduce_8(sp_digit* a, const sp_digit* m, "ldr r4, [%[a],#32]\n\t" "ldr r5, [%[a],#36]\n\t" "ldr r6, [%[a],#40]\n\t" - "ldr r7, [%[a],#44]\n\t" + "ldr r8, [%[a],#44]\n\t" "subs r4, r4, r1\n\t" "sbcs r5, r5, r1\n\t" "sbcs r6, r6, r1\n\t" - "sbcs r7, r7, r2\n\t" + "sbcs r8, r8, r2\n\t" "str r4, [%[a],#0]\n\t" "str r5, [%[a],#4]\n\t" "str r6, [%[a],#8]\n\t" - "str r7, [%[a],#12]\n\t" + "str r8, [%[a],#12]\n\t" "ldr r4, [%[a],#48]\n\t" "ldr r5, [%[a],#52]\n\t" "ldr r6, [%[a],#56]\n\t" - "ldr r7, [%[a],#60]\n\t" + "ldr r8, [%[a],#60]\n\t" "sbcs r4, r4, r2\n\t" "sbcs r5, r5, r2\n\t" "sbcs r6, r6, r3\n\t" - "sbc r7, r7, r1\n\t" + "sbc r8, r8, r1\n\t" "str r4, [%[a],#16]\n\t" "str r5, [%[a],#20]\n\t" "str r6, [%[a],#24]\n\t" - "str r7, [%[a],#28]\n\t" + "str r8, [%[a],#28]\n\t" : [a] "+r" (a) : - : "memory", "r1", "r2", "r3", "r4", "r5", "r6", "r7", "r8" + : "memory", "r1", "r2", "r3", "r4", "r5", "r6", "r8", "r9" ); @@ -13975,28 +13970,27 @@ SP_NOINLINE static void sp_256_mont_reduce_order_8(sp_digit* a, const sp_digit* sp_digit ca = 0; __asm__ __volatile__ ( - "mov r8, %[mp]\n\t" + "mov r9, %[mp]\n\t" "mov r12, %[m]\n\t" - "mov r9, %[a]\n\t" + "mov r10, %[a]\n\t" "mov r4, #0\n\t" - "add r11, r9, #32\n\t" + "add r11, r10, #32\n\t" "\n1:\n\t" /* mu = a[i] * mp */ - "mov %[mp], r8\n\t" - "ldr %[a], [r9]\n\t" + "mov %[mp], r9\n\t" + "ldr %[a], [r10]\n\t" "mul %[mp], %[mp], %[a]\n\t" "mov %[m], r12\n\t" - "mov r10, r9\n\t" - "add r14, r9, #24\n\t" + "add r14, r10, #24\n\t" "\n2:\n\t" /* a[i+j] += m[j] * mu */ "ldr %[a], [r10]\n\t" "mov r5, #0\n\t" /* Multiply m[j] and mu - Start */ - "ldr r7, [%[m]], #4\n\t" - "umull r6, r7, %[mp], r7\n\t" + "ldr r8, [%[m]], #4\n\t" + "umull r6, r8, %[mp], r8\n\t" "adds %[a], %[a], r6\n\t" - "adc r5, r5, r7\n\t" + "adc r5, r5, r8\n\t" /* Multiply m[j] and mu - Done */ "adds r4, r4, %[a]\n\t" "adc r5, r5, #0\n\t" @@ -14005,10 +13999,10 @@ SP_NOINLINE static void sp_256_mont_reduce_order_8(sp_digit* a, const sp_digit* "ldr %[a], [r10]\n\t" "mov r4, #0\n\t" /* Multiply m[j] and mu - Start */ - "ldr r7, [%[m]], #4\n\t" - "umull r6, r7, %[mp], r7\n\t" + "ldr r8, [%[m]], #4\n\t" + "umull r6, r8, %[mp], r8\n\t" "adds %[a], %[a], r6\n\t" - "adc r4, r4, r7\n\t" + "adc r4, r4, r8\n\t" /* Multiply m[j] and mu - Done */ "adds r5, r5, %[a]\n\t" "adc r4, r4, #0\n\t" @@ -14019,10 +14013,10 @@ SP_NOINLINE static void sp_256_mont_reduce_order_8(sp_digit* a, const sp_digit* "ldr %[a], [r10]\n\t" "mov r5, #0\n\t" /* Multiply m[j] and mu - Start */ - "ldr r7, [%[m]], #4\n\t" - "umull r6, r7, %[mp], r7\n\t" + "ldr r8, [%[m]], #4\n\t" + "umull r6, r8, %[mp], r8\n\t" "adds %[a], %[a], r6\n\t" - "adc r5, r5, r7\n\t" + "adc r5, r5, r8\n\t" /* Multiply m[j] and mu - Done */ "adds r4, r4, %[a]\n\t" "adc r5, r5, #0\n\t" @@ -14031,28 +14025,28 @@ SP_NOINLINE static void sp_256_mont_reduce_order_8(sp_digit* a, const sp_digit* "mov r4, %[ca]\n\t" "mov %[ca], #0\n\t" /* Multiply m[7] and mu - Start */ - "ldr r7, [%[m]]\n\t" - "umull r6, r7, %[mp], r7\n\t" + "ldr r8, [%[m]]\n\t" + "umull r6, r8, %[mp], r8\n\t" "adds r5, r5, r6\n\t" - "adcs r4, r4, r7\n\t" + "adcs r4, r4, r8\n\t" "adc %[ca], %[ca], #0\n\t" /* Multiply m[7] and mu - Done */ "ldr r6, [r10]\n\t" - "ldr r7, [r10, #4]\n\t" + "ldr r8, [r10, #4]\n\t" "adds r6, r6, r5\n\t" - "adcs r7, r7, r4\n\t" + "adcs r8, r8, r4\n\t" "adc %[ca], %[ca], #0\n\t" "str r6, [r10]\n\t" - "str r7, [r10, #4]\n\t" + "str r8, [r10, #4]\n\t" /* Next word in a */ - "add r9, r9, #4\n\t" - "cmp r9, r11\n\t" + "sub r10, r10, #24\n\t" + "cmp r10, r11\n\t" "blt 1b\n\t" - "mov %[a], r9\n\t" + "mov %[a], r10\n\t" "mov %[m], r12\n\t" : [ca] "+r" (ca), [a] "+r" (a) : [m] "r" (m), [mp] "r" (mp) - : "memory", "r4", "r5", "r6", "r7", "r8", "r9", "r10", "r11", "r12", "r14" + : "memory", "r4", "r5", "r6", "r8", "r9", "r10", "r11", "r12", "r14" ); sp_256_cond_sub_8(a - 8, a, m, (sp_digit)0 - ca); @@ -14072,475 +14066,475 @@ SP_NOINLINE static void sp_256_mul_8(sp_digit* r, const sp_digit* a, __asm__ __volatile__ ( /* A[0] * B[0] */ "ldr r6, [%[a], #0]\n\t" - "ldr r7, [%[b], #0]\n\t" - "umull r3, r4, r6, r7\n\t" + "ldr r8, [%[b], #0]\n\t" + "umull r3, r4, r6, r8\n\t" "mov r5, #0\n\t" "str r3, [%[tmp], #0]\n\t" "mov r3, #0\n\t" /* A[0] * B[1] */ - "ldr r7, [%[b], #4]\n\t" - "umull r6, r7, r6, r7\n\t" + "ldr r8, [%[b], #4]\n\t" + "umull r6, r8, r6, r8\n\t" "adds r4, r4, r6\n\t" - "adc r5, r5, r7\n\t" + "adc r5, r5, r8\n\t" /* A[1] * B[0] */ "ldr r6, [%[a], #4]\n\t" - "ldr r7, [%[b], #0]\n\t" - "umull r6, r7, r6, r7\n\t" + "ldr r8, [%[b], #0]\n\t" + "umull r6, r8, r6, r8\n\t" "adds r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "adc r3, r3, #0\n\t" "str r4, [%[tmp], #4]\n\t" "mov r4, #0\n\t" /* A[0] * B[2] */ "ldr r6, [%[a], #0]\n\t" - "ldr r7, [%[b], #8]\n\t" - "umull r6, r7, r6, r7\n\t" + "ldr r8, [%[b], #8]\n\t" + "umull r6, r8, r6, r8\n\t" "adds r5, r5, r6\n\t" - "adcs r3, r3, r7\n\t" + "adcs r3, r3, r8\n\t" "adc r4, r4, #0\n\t" /* A[1] * B[1] */ "ldr r6, [%[a], #4]\n\t" - "ldr r7, [%[b], #4]\n\t" - "umull r6, r7, r6, r7\n\t" + "ldr r8, [%[b], #4]\n\t" + "umull r6, r8, r6, r8\n\t" "adds r5, r5, r6\n\t" - "adcs r3, r3, r7\n\t" + "adcs r3, r3, r8\n\t" "adc r4, r4, #0\n\t" /* A[2] * B[0] */ "ldr r6, [%[a], #8]\n\t" - "ldr r7, [%[b], #0]\n\t" - "umull r6, r7, r6, r7\n\t" + "ldr r8, [%[b], #0]\n\t" + "umull r6, r8, r6, r8\n\t" "adds r5, r5, r6\n\t" - "adcs r3, r3, r7\n\t" + "adcs r3, r3, r8\n\t" "adc r4, r4, #0\n\t" "str r5, [%[tmp], #8]\n\t" "mov r5, #0\n\t" /* A[0] * B[3] */ "ldr r6, [%[a], #0]\n\t" - "ldr r7, [%[b], #12]\n\t" - "umull r6, r7, r6, r7\n\t" + "ldr r8, [%[b], #12]\n\t" + "umull r6, r8, r6, r8\n\t" "adds r3, r3, r6\n\t" - "adcs r4, r4, r7\n\t" + "adcs r4, r4, r8\n\t" "adc r5, r5, #0\n\t" /* A[1] * B[2] */ "ldr r6, [%[a], #4]\n\t" - "ldr r7, [%[b], #8]\n\t" - "umull r6, r7, r6, r7\n\t" + "ldr r8, [%[b], #8]\n\t" + "umull r6, r8, r6, r8\n\t" "adds r3, r3, r6\n\t" - "adcs r4, r4, r7\n\t" + "adcs r4, r4, r8\n\t" "adc r5, r5, #0\n\t" /* A[2] * B[1] */ "ldr r6, [%[a], #8]\n\t" - "ldr r7, [%[b], #4]\n\t" - "umull r6, r7, r6, r7\n\t" + "ldr r8, [%[b], #4]\n\t" + "umull r6, r8, r6, r8\n\t" "adds r3, r3, r6\n\t" - "adcs r4, r4, r7\n\t" + "adcs r4, r4, r8\n\t" "adc r5, r5, #0\n\t" /* A[3] * B[0] */ "ldr r6, [%[a], #12]\n\t" - "ldr r7, [%[b], #0]\n\t" - "umull r6, r7, r6, r7\n\t" + "ldr r8, [%[b], #0]\n\t" + "umull r6, r8, r6, r8\n\t" "adds r3, r3, r6\n\t" - "adcs r4, r4, r7\n\t" + "adcs r4, r4, r8\n\t" "adc r5, r5, #0\n\t" "str r3, [%[tmp], #12]\n\t" "mov r3, #0\n\t" /* A[0] * B[4] */ "ldr r6, [%[a], #0]\n\t" - "ldr r7, [%[b], #16]\n\t" - "umull r6, r7, r6, r7\n\t" + "ldr r8, [%[b], #16]\n\t" + "umull r6, r8, r6, r8\n\t" "adds r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "adc r3, r3, #0\n\t" /* A[1] * B[3] */ "ldr r6, [%[a], #4]\n\t" - "ldr r7, [%[b], #12]\n\t" - "umull r6, r7, r6, r7\n\t" + "ldr r8, [%[b], #12]\n\t" + "umull r6, r8, r6, r8\n\t" "adds r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "adc r3, r3, #0\n\t" /* A[2] * B[2] */ "ldr r6, [%[a], #8]\n\t" - "ldr r7, [%[b], #8]\n\t" - "umull r6, r7, r6, r7\n\t" + "ldr r8, [%[b], #8]\n\t" + "umull r6, r8, r6, r8\n\t" "adds r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "adc r3, r3, #0\n\t" /* A[3] * B[1] */ "ldr r6, [%[a], #12]\n\t" - "ldr r7, [%[b], #4]\n\t" - "umull r6, r7, r6, r7\n\t" + "ldr r8, [%[b], #4]\n\t" + "umull r6, r8, r6, r8\n\t" "adds r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "adc r3, r3, #0\n\t" /* A[4] * B[0] */ "ldr r6, [%[a], #16]\n\t" - "ldr r7, [%[b], #0]\n\t" - "umull r6, r7, r6, r7\n\t" + "ldr r8, [%[b], #0]\n\t" + "umull r6, r8, r6, r8\n\t" "adds r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "adc r3, r3, #0\n\t" "str r4, [%[tmp], #16]\n\t" "mov r4, #0\n\t" /* A[0] * B[5] */ "ldr r6, [%[a], #0]\n\t" - "ldr r7, [%[b], #20]\n\t" - "umull r6, r7, r6, r7\n\t" + "ldr r8, [%[b], #20]\n\t" + "umull r6, r8, r6, r8\n\t" "adds r5, r5, r6\n\t" - "adcs r3, r3, r7\n\t" + "adcs r3, r3, r8\n\t" "adc r4, r4, #0\n\t" /* A[1] * B[4] */ "ldr r6, [%[a], #4]\n\t" - "ldr r7, [%[b], #16]\n\t" - "umull r6, r7, r6, r7\n\t" + "ldr r8, [%[b], #16]\n\t" + "umull r6, r8, r6, r8\n\t" "adds r5, r5, r6\n\t" - "adcs r3, r3, r7\n\t" + "adcs r3, r3, r8\n\t" "adc r4, r4, #0\n\t" /* A[2] * B[3] */ "ldr r6, [%[a], #8]\n\t" - "ldr r7, [%[b], #12]\n\t" - "umull r6, r7, r6, r7\n\t" + "ldr r8, [%[b], #12]\n\t" + "umull r6, r8, r6, r8\n\t" "adds r5, r5, r6\n\t" - "adcs r3, r3, r7\n\t" + "adcs r3, r3, r8\n\t" "adc r4, r4, #0\n\t" /* A[3] * B[2] */ "ldr r6, [%[a], #12]\n\t" - "ldr r7, [%[b], #8]\n\t" - "umull r6, r7, r6, r7\n\t" + "ldr r8, [%[b], #8]\n\t" + "umull r6, r8, r6, r8\n\t" "adds r5, r5, r6\n\t" - "adcs r3, r3, r7\n\t" + "adcs r3, r3, r8\n\t" "adc r4, r4, #0\n\t" /* A[4] * B[1] */ "ldr r6, [%[a], #16]\n\t" - "ldr r7, [%[b], #4]\n\t" - "umull r6, r7, r6, r7\n\t" + "ldr r8, [%[b], #4]\n\t" + "umull r6, r8, r6, r8\n\t" "adds r5, r5, r6\n\t" - "adcs r3, r3, r7\n\t" + "adcs r3, r3, r8\n\t" "adc r4, r4, #0\n\t" /* A[5] * B[0] */ "ldr r6, [%[a], #20]\n\t" - "ldr r7, [%[b], #0]\n\t" - "umull r6, r7, r6, r7\n\t" + "ldr r8, [%[b], #0]\n\t" + "umull r6, r8, r6, r8\n\t" "adds r5, r5, r6\n\t" - "adcs r3, r3, r7\n\t" + "adcs r3, r3, r8\n\t" "adc r4, r4, #0\n\t" "str r5, [%[tmp], #20]\n\t" "mov r5, #0\n\t" /* A[0] * B[6] */ "ldr r6, [%[a], #0]\n\t" - "ldr r7, [%[b], #24]\n\t" - "umull r6, r7, r6, r7\n\t" + "ldr r8, [%[b], #24]\n\t" + "umull r6, r8, r6, r8\n\t" "adds r3, r3, r6\n\t" - "adcs r4, r4, r7\n\t" + "adcs r4, r4, r8\n\t" "adc r5, r5, #0\n\t" /* A[1] * B[5] */ "ldr r6, [%[a], #4]\n\t" - "ldr r7, [%[b], #20]\n\t" - "umull r6, r7, r6, r7\n\t" + "ldr r8, [%[b], #20]\n\t" + "umull r6, r8, r6, r8\n\t" "adds r3, r3, r6\n\t" - "adcs r4, r4, r7\n\t" + "adcs r4, r4, r8\n\t" "adc r5, r5, #0\n\t" /* A[2] * B[4] */ "ldr r6, [%[a], #8]\n\t" - "ldr r7, [%[b], #16]\n\t" - "umull r6, r7, r6, r7\n\t" + "ldr r8, [%[b], #16]\n\t" + "umull r6, r8, r6, r8\n\t" "adds r3, r3, r6\n\t" - "adcs r4, r4, r7\n\t" + "adcs r4, r4, r8\n\t" "adc r5, r5, #0\n\t" /* A[3] * B[3] */ "ldr r6, [%[a], #12]\n\t" - "ldr r7, [%[b], #12]\n\t" - "umull r6, r7, r6, r7\n\t" + "ldr r8, [%[b], #12]\n\t" + "umull r6, r8, r6, r8\n\t" "adds r3, r3, r6\n\t" - "adcs r4, r4, r7\n\t" + "adcs r4, r4, r8\n\t" "adc r5, r5, #0\n\t" /* A[4] * B[2] */ "ldr r6, [%[a], #16]\n\t" - "ldr r7, [%[b], #8]\n\t" - "umull r6, r7, r6, r7\n\t" + "ldr r8, [%[b], #8]\n\t" + "umull r6, r8, r6, r8\n\t" "adds r3, r3, r6\n\t" - "adcs r4, r4, r7\n\t" + "adcs r4, r4, r8\n\t" "adc r5, r5, #0\n\t" /* A[5] * B[1] */ "ldr r6, [%[a], #20]\n\t" - "ldr r7, [%[b], #4]\n\t" - "umull r6, r7, r6, r7\n\t" + "ldr r8, [%[b], #4]\n\t" + "umull r6, r8, r6, r8\n\t" "adds r3, r3, r6\n\t" - "adcs r4, r4, r7\n\t" + "adcs r4, r4, r8\n\t" "adc r5, r5, #0\n\t" /* A[6] * B[0] */ "ldr r6, [%[a], #24]\n\t" - "ldr r7, [%[b], #0]\n\t" - "umull r6, r7, r6, r7\n\t" + "ldr r8, [%[b], #0]\n\t" + "umull r6, r8, r6, r8\n\t" "adds r3, r3, r6\n\t" - "adcs r4, r4, r7\n\t" + "adcs r4, r4, r8\n\t" "adc r5, r5, #0\n\t" "str r3, [%[tmp], #24]\n\t" "mov r3, #0\n\t" /* A[0] * B[7] */ "ldr r6, [%[a], #0]\n\t" - "ldr r7, [%[b], #28]\n\t" - "umull r6, r7, r6, r7\n\t" + "ldr r8, [%[b], #28]\n\t" + "umull r6, r8, r6, r8\n\t" "adds r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "adc r3, r3, #0\n\t" /* A[1] * B[6] */ "ldr r6, [%[a], #4]\n\t" - "ldr r7, [%[b], #24]\n\t" - "umull r6, r7, r6, r7\n\t" + "ldr r8, [%[b], #24]\n\t" + "umull r6, r8, r6, r8\n\t" "adds r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "adc r3, r3, #0\n\t" /* A[2] * B[5] */ "ldr r6, [%[a], #8]\n\t" - "ldr r7, [%[b], #20]\n\t" - "umull r6, r7, r6, r7\n\t" + "ldr r8, [%[b], #20]\n\t" + "umull r6, r8, r6, r8\n\t" "adds r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "adc r3, r3, #0\n\t" /* A[3] * B[4] */ "ldr r6, [%[a], #12]\n\t" - "ldr r7, [%[b], #16]\n\t" - "umull r6, r7, r6, r7\n\t" + "ldr r8, [%[b], #16]\n\t" + "umull r6, r8, r6, r8\n\t" "adds r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "adc r3, r3, #0\n\t" /* A[4] * B[3] */ "ldr r6, [%[a], #16]\n\t" - "ldr r7, [%[b], #12]\n\t" - "umull r6, r7, r6, r7\n\t" + "ldr r8, [%[b], #12]\n\t" + "umull r6, r8, r6, r8\n\t" "adds r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "adc r3, r3, #0\n\t" /* A[5] * B[2] */ "ldr r6, [%[a], #20]\n\t" - "ldr r7, [%[b], #8]\n\t" - "umull r6, r7, r6, r7\n\t" + "ldr r8, [%[b], #8]\n\t" + "umull r6, r8, r6, r8\n\t" "adds r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "adc r3, r3, #0\n\t" /* A[6] * B[1] */ "ldr r6, [%[a], #24]\n\t" - "ldr r7, [%[b], #4]\n\t" - "umull r6, r7, r6, r7\n\t" + "ldr r8, [%[b], #4]\n\t" + "umull r6, r8, r6, r8\n\t" "adds r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "adc r3, r3, #0\n\t" /* A[7] * B[0] */ "ldr r6, [%[a], #28]\n\t" - "ldr r7, [%[b], #0]\n\t" - "umull r6, r7, r6, r7\n\t" + "ldr r8, [%[b], #0]\n\t" + "umull r6, r8, r6, r8\n\t" "adds r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "adc r3, r3, #0\n\t" "str r4, [%[tmp], #28]\n\t" "mov r4, #0\n\t" /* A[1] * B[7] */ "ldr r6, [%[a], #4]\n\t" - "ldr r7, [%[b], #28]\n\t" - "umull r6, r7, r6, r7\n\t" + "ldr r8, [%[b], #28]\n\t" + "umull r6, r8, r6, r8\n\t" "adds r5, r5, r6\n\t" - "adcs r3, r3, r7\n\t" + "adcs r3, r3, r8\n\t" "adc r4, r4, #0\n\t" /* A[2] * B[6] */ "ldr r6, [%[a], #8]\n\t" - "ldr r7, [%[b], #24]\n\t" - "umull r6, r7, r6, r7\n\t" + "ldr r8, [%[b], #24]\n\t" + "umull r6, r8, r6, r8\n\t" "adds r5, r5, r6\n\t" - "adcs r3, r3, r7\n\t" + "adcs r3, r3, r8\n\t" "adc r4, r4, #0\n\t" /* A[3] * B[5] */ "ldr r6, [%[a], #12]\n\t" - "ldr r7, [%[b], #20]\n\t" - "umull r6, r7, r6, r7\n\t" + "ldr r8, [%[b], #20]\n\t" + "umull r6, r8, r6, r8\n\t" "adds r5, r5, r6\n\t" - "adcs r3, r3, r7\n\t" + "adcs r3, r3, r8\n\t" "adc r4, r4, #0\n\t" /* A[4] * B[4] */ "ldr r6, [%[a], #16]\n\t" - "ldr r7, [%[b], #16]\n\t" - "umull r6, r7, r6, r7\n\t" + "ldr r8, [%[b], #16]\n\t" + "umull r6, r8, r6, r8\n\t" "adds r5, r5, r6\n\t" - "adcs r3, r3, r7\n\t" + "adcs r3, r3, r8\n\t" "adc r4, r4, #0\n\t" /* A[5] * B[3] */ "ldr r6, [%[a], #20]\n\t" - "ldr r7, [%[b], #12]\n\t" - "umull r6, r7, r6, r7\n\t" + "ldr r8, [%[b], #12]\n\t" + "umull r6, r8, r6, r8\n\t" "adds r5, r5, r6\n\t" - "adcs r3, r3, r7\n\t" + "adcs r3, r3, r8\n\t" "adc r4, r4, #0\n\t" /* A[6] * B[2] */ "ldr r6, [%[a], #24]\n\t" - "ldr r7, [%[b], #8]\n\t" - "umull r6, r7, r6, r7\n\t" + "ldr r8, [%[b], #8]\n\t" + "umull r6, r8, r6, r8\n\t" "adds r5, r5, r6\n\t" - "adcs r3, r3, r7\n\t" + "adcs r3, r3, r8\n\t" "adc r4, r4, #0\n\t" /* A[7] * B[1] */ "ldr r6, [%[a], #28]\n\t" - "ldr r7, [%[b], #4]\n\t" - "umull r6, r7, r6, r7\n\t" + "ldr r8, [%[b], #4]\n\t" + "umull r6, r8, r6, r8\n\t" "adds r5, r5, r6\n\t" - "adcs r3, r3, r7\n\t" + "adcs r3, r3, r8\n\t" "adc r4, r4, #0\n\t" "str r5, [%[r], #32]\n\t" "mov r5, #0\n\t" /* A[2] * B[7] */ "ldr r6, [%[a], #8]\n\t" - "ldr r7, [%[b], #28]\n\t" - "umull r6, r7, r6, r7\n\t" + "ldr r8, [%[b], #28]\n\t" + "umull r6, r8, r6, r8\n\t" "adds r3, r3, r6\n\t" - "adcs r4, r4, r7\n\t" + "adcs r4, r4, r8\n\t" "adc r5, r5, #0\n\t" /* A[3] * B[6] */ "ldr r6, [%[a], #12]\n\t" - "ldr r7, [%[b], #24]\n\t" - "umull r6, r7, r6, r7\n\t" + "ldr r8, [%[b], #24]\n\t" + "umull r6, r8, r6, r8\n\t" "adds r3, r3, r6\n\t" - "adcs r4, r4, r7\n\t" + "adcs r4, r4, r8\n\t" "adc r5, r5, #0\n\t" /* A[4] * B[5] */ "ldr r6, [%[a], #16]\n\t" - "ldr r7, [%[b], #20]\n\t" - "umull r6, r7, r6, r7\n\t" + "ldr r8, [%[b], #20]\n\t" + "umull r6, r8, r6, r8\n\t" "adds r3, r3, r6\n\t" - "adcs r4, r4, r7\n\t" + "adcs r4, r4, r8\n\t" "adc r5, r5, #0\n\t" /* A[5] * B[4] */ "ldr r6, [%[a], #20]\n\t" - "ldr r7, [%[b], #16]\n\t" - "umull r6, r7, r6, r7\n\t" + "ldr r8, [%[b], #16]\n\t" + "umull r6, r8, r6, r8\n\t" "adds r3, r3, r6\n\t" - "adcs r4, r4, r7\n\t" + "adcs r4, r4, r8\n\t" "adc r5, r5, #0\n\t" /* A[6] * B[3] */ "ldr r6, [%[a], #24]\n\t" - "ldr r7, [%[b], #12]\n\t" - "umull r6, r7, r6, r7\n\t" + "ldr r8, [%[b], #12]\n\t" + "umull r6, r8, r6, r8\n\t" "adds r3, r3, r6\n\t" - "adcs r4, r4, r7\n\t" + "adcs r4, r4, r8\n\t" "adc r5, r5, #0\n\t" /* A[7] * B[2] */ "ldr r6, [%[a], #28]\n\t" - "ldr r7, [%[b], #8]\n\t" - "umull r6, r7, r6, r7\n\t" + "ldr r8, [%[b], #8]\n\t" + "umull r6, r8, r6, r8\n\t" "adds r3, r3, r6\n\t" - "adcs r4, r4, r7\n\t" + "adcs r4, r4, r8\n\t" "adc r5, r5, #0\n\t" "str r3, [%[r], #36]\n\t" "mov r3, #0\n\t" /* A[3] * B[7] */ "ldr r6, [%[a], #12]\n\t" - "ldr r7, [%[b], #28]\n\t" - "umull r6, r7, r6, r7\n\t" + "ldr r8, [%[b], #28]\n\t" + "umull r6, r8, r6, r8\n\t" "adds r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "adc r3, r3, #0\n\t" /* A[4] * B[6] */ "ldr r6, [%[a], #16]\n\t" - "ldr r7, [%[b], #24]\n\t" - "umull r6, r7, r6, r7\n\t" + "ldr r8, [%[b], #24]\n\t" + "umull r6, r8, r6, r8\n\t" "adds r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "adc r3, r3, #0\n\t" /* A[5] * B[5] */ "ldr r6, [%[a], #20]\n\t" - "ldr r7, [%[b], #20]\n\t" - "umull r6, r7, r6, r7\n\t" + "ldr r8, [%[b], #20]\n\t" + "umull r6, r8, r6, r8\n\t" "adds r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "adc r3, r3, #0\n\t" /* A[6] * B[4] */ "ldr r6, [%[a], #24]\n\t" - "ldr r7, [%[b], #16]\n\t" - "umull r6, r7, r6, r7\n\t" + "ldr r8, [%[b], #16]\n\t" + "umull r6, r8, r6, r8\n\t" "adds r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "adc r3, r3, #0\n\t" /* A[7] * B[3] */ "ldr r6, [%[a], #28]\n\t" - "ldr r7, [%[b], #12]\n\t" - "umull r6, r7, r6, r7\n\t" + "ldr r8, [%[b], #12]\n\t" + "umull r6, r8, r6, r8\n\t" "adds r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "adc r3, r3, #0\n\t" "str r4, [%[r], #40]\n\t" "mov r4, #0\n\t" /* A[4] * B[7] */ "ldr r6, [%[a], #16]\n\t" - "ldr r7, [%[b], #28]\n\t" - "umull r6, r7, r6, r7\n\t" + "ldr r8, [%[b], #28]\n\t" + "umull r6, r8, r6, r8\n\t" "adds r5, r5, r6\n\t" - "adcs r3, r3, r7\n\t" + "adcs r3, r3, r8\n\t" "adc r4, r4, #0\n\t" /* A[5] * B[6] */ "ldr r6, [%[a], #20]\n\t" - "ldr r7, [%[b], #24]\n\t" - "umull r6, r7, r6, r7\n\t" + "ldr r8, [%[b], #24]\n\t" + "umull r6, r8, r6, r8\n\t" "adds r5, r5, r6\n\t" - "adcs r3, r3, r7\n\t" + "adcs r3, r3, r8\n\t" "adc r4, r4, #0\n\t" /* A[6] * B[5] */ "ldr r6, [%[a], #24]\n\t" - "ldr r7, [%[b], #20]\n\t" - "umull r6, r7, r6, r7\n\t" + "ldr r8, [%[b], #20]\n\t" + "umull r6, r8, r6, r8\n\t" "adds r5, r5, r6\n\t" - "adcs r3, r3, r7\n\t" + "adcs r3, r3, r8\n\t" "adc r4, r4, #0\n\t" /* A[7] * B[4] */ "ldr r6, [%[a], #28]\n\t" - "ldr r7, [%[b], #16]\n\t" - "umull r6, r7, r6, r7\n\t" + "ldr r8, [%[b], #16]\n\t" + "umull r6, r8, r6, r8\n\t" "adds r5, r5, r6\n\t" - "adcs r3, r3, r7\n\t" + "adcs r3, r3, r8\n\t" "adc r4, r4, #0\n\t" "str r5, [%[r], #44]\n\t" "mov r5, #0\n\t" /* A[5] * B[7] */ "ldr r6, [%[a], #20]\n\t" - "ldr r7, [%[b], #28]\n\t" - "umull r6, r7, r6, r7\n\t" + "ldr r8, [%[b], #28]\n\t" + "umull r6, r8, r6, r8\n\t" "adds r3, r3, r6\n\t" - "adcs r4, r4, r7\n\t" + "adcs r4, r4, r8\n\t" "adc r5, r5, #0\n\t" /* A[6] * B[6] */ "ldr r6, [%[a], #24]\n\t" - "ldr r7, [%[b], #24]\n\t" - "umull r6, r7, r6, r7\n\t" + "ldr r8, [%[b], #24]\n\t" + "umull r6, r8, r6, r8\n\t" "adds r3, r3, r6\n\t" - "adcs r4, r4, r7\n\t" + "adcs r4, r4, r8\n\t" "adc r5, r5, #0\n\t" /* A[7] * B[5] */ "ldr r6, [%[a], #28]\n\t" - "ldr r7, [%[b], #20]\n\t" - "umull r6, r7, r6, r7\n\t" + "ldr r8, [%[b], #20]\n\t" + "umull r6, r8, r6, r8\n\t" "adds r3, r3, r6\n\t" - "adcs r4, r4, r7\n\t" + "adcs r4, r4, r8\n\t" "adc r5, r5, #0\n\t" "str r3, [%[r], #48]\n\t" "mov r3, #0\n\t" /* A[6] * B[7] */ "ldr r6, [%[a], #24]\n\t" - "ldr r7, [%[b], #28]\n\t" - "umull r6, r7, r6, r7\n\t" + "ldr r8, [%[b], #28]\n\t" + "umull r6, r8, r6, r8\n\t" "adds r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "adc r3, r3, #0\n\t" /* A[7] * B[6] */ "ldr r6, [%[a], #28]\n\t" - "ldr r7, [%[b], #24]\n\t" - "umull r6, r7, r6, r7\n\t" + "ldr r8, [%[b], #24]\n\t" + "umull r6, r8, r6, r8\n\t" "adds r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "adc r3, r3, #0\n\t" "str r4, [%[r], #52]\n\t" "mov r4, #0\n\t" /* A[7] * B[7] */ "ldr r6, [%[a], #28]\n\t" - "ldr r7, [%[b], #28]\n\t" - "umull r6, r7, r6, r7\n\t" + "ldr r8, [%[b], #28]\n\t" + "umull r6, r8, r6, r8\n\t" "adds r5, r5, r6\n\t" - "adc r3, r3, r7\n\t" + "adc r3, r3, r8\n\t" "str r5, [%[r], #56]\n\t" "str r3, [%[r], #60]\n\t" /* Transfer tmp to r */ @@ -14562,7 +14556,7 @@ SP_NOINLINE static void sp_256_mul_8(sp_digit* r, const sp_digit* a, "str r6, [%[r], #28]\n\t" : : [r] "r" (r), [a] "r" (a), [b] "r" (b), [tmp] "r" (tmp) - : "memory", "r3", "r4", "r5", "r6", "r7" + : "memory", "r3", "r4", "r5", "r6", "r8" ); } @@ -14598,315 +14592,315 @@ SP_NOINLINE static void sp_256_sqr_8(sp_digit* r, const sp_digit* a) "str r3, [%[tmp], #0]\n\t" "mov r3, #0\n\t" /* A[0] * A[1] */ - "ldr r7, [%[a], #4]\n\t" - "umull r6, r7, r6, r7\n\t" + "ldr r8, [%[a], #4]\n\t" + "umull r6, r8, r6, r8\n\t" "adds r4, r4, r6\n\t" - "adc r5, r5, r7\n\t" + "adc r5, r5, r8\n\t" "adds r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "adc r3, r3, #0\n\t" "str r4, [%[tmp], #4]\n\t" "mov r4, #0\n\t" /* A[0] * A[2] */ "ldr r6, [%[a], #0]\n\t" - "ldr r7, [%[a], #8]\n\t" - "umull r6, r7, r6, r7\n\t" + "ldr r8, [%[a], #8]\n\t" + "umull r6, r8, r6, r8\n\t" "adds r5, r5, r6\n\t" - "adc r3, r3, r7\n\t" + "adc r3, r3, r8\n\t" "adds r5, r5, r6\n\t" - "adcs r3, r3, r7\n\t" + "adcs r3, r3, r8\n\t" "adc r4, r4, #0\n\t" /* A[1] * A[1] */ "ldr r6, [%[a], #4]\n\t" - "umull r6, r7, r6, r6\n\t" + "umull r6, r8, r6, r6\n\t" "adds r5, r5, r6\n\t" - "adcs r3, r3, r7\n\t" + "adcs r3, r3, r8\n\t" "adc r4, r4, #0\n\t" "str r5, [%[tmp], #8]\n\t" "mov r5, #0\n\t" /* A[0] * A[3] */ "ldr r6, [%[a], #0]\n\t" - "ldr r7, [%[a], #12]\n\t" - "umull r8, r9, r6, r7\n\t" - "mov r10, #0\n\t" + "ldr r8, [%[a], #12]\n\t" + "umull r9, r10, r6, r8\n\t" + "mov r11, #0\n\t" /* A[1] * A[2] */ "ldr r6, [%[a], #4]\n\t" - "ldr r7, [%[a], #8]\n\t" - "umull r6, r7, r6, r7\n\t" - "adds r8, r8, r6\n\t" - "adcs r9, r9, r7\n\t" - "adc r10, r10, #0\n\t" - "adds r8, r8, r8\n\t" - "adcs r9, r9, r9\n\t" - "adc r10, r10, r10\n\t" - "adds r3, r3, r8\n\t" - "adcs r4, r4, r9\n\t" - "adc r5, r5, r10\n\t" + "ldr r8, [%[a], #8]\n\t" + "umull r6, r8, r6, r8\n\t" + "adds r9, r9, r6\n\t" + "adcs r10, r10, r8\n\t" + "adc r11, r11, #0\n\t" + "adds r9, r9, r9\n\t" + "adcs r10, r10, r10\n\t" + "adc r11, r11, r11\n\t" + "adds r3, r3, r9\n\t" + "adcs r4, r4, r10\n\t" + "adc r5, r5, r11\n\t" "str r3, [%[tmp], #12]\n\t" "mov r3, #0\n\t" /* A[0] * A[4] */ "ldr r6, [%[a], #0]\n\t" - "ldr r7, [%[a], #16]\n\t" - "umull r8, r9, r6, r7\n\t" - "mov r10, #0\n\t" + "ldr r8, [%[a], #16]\n\t" + "umull r9, r10, r6, r8\n\t" + "mov r11, #0\n\t" /* A[1] * A[3] */ "ldr r6, [%[a], #4]\n\t" - "ldr r7, [%[a], #12]\n\t" - "umull r6, r7, r6, r7\n\t" - "adds r8, r8, r6\n\t" - "adcs r9, r9, r7\n\t" - "adc r10, r10, #0\n\t" + "ldr r8, [%[a], #12]\n\t" + "umull r6, r8, r6, r8\n\t" + "adds r9, r9, r6\n\t" + "adcs r10, r10, r8\n\t" + "adc r11, r11, #0\n\t" /* A[2] * A[2] */ "ldr r6, [%[a], #8]\n\t" - "umull r6, r7, r6, r6\n\t" + "umull r6, r8, r6, r6\n\t" "adds r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "adc r3, r3, #0\n\t" - "adds r8, r8, r8\n\t" - "adcs r9, r9, r9\n\t" - "adc r10, r10, r10\n\t" - "adds r4, r4, r8\n\t" - "adcs r5, r5, r9\n\t" - "adc r3, r3, r10\n\t" + "adds r9, r9, r9\n\t" + "adcs r10, r10, r10\n\t" + "adc r11, r11, r11\n\t" + "adds r4, r4, r9\n\t" + "adcs r5, r5, r10\n\t" + "adc r3, r3, r11\n\t" "str r4, [%[tmp], #16]\n\t" "mov r4, #0\n\t" /* A[0] * A[5] */ "ldr r6, [%[a], #0]\n\t" - "ldr r7, [%[a], #20]\n\t" - "umull r8, r9, r6, r7\n\t" - "mov r10, #0\n\t" + "ldr r8, [%[a], #20]\n\t" + "umull r9, r10, r6, r8\n\t" + "mov r11, #0\n\t" /* A[1] * A[4] */ "ldr r6, [%[a], #4]\n\t" - "ldr r7, [%[a], #16]\n\t" - "umull r6, r7, r6, r7\n\t" - "adds r8, r8, r6\n\t" - "adcs r9, r9, r7\n\t" - "adc r10, r10, #0\n\t" + "ldr r8, [%[a], #16]\n\t" + "umull r6, r8, r6, r8\n\t" + "adds r9, r9, r6\n\t" + "adcs r10, r10, r8\n\t" + "adc r11, r11, #0\n\t" /* A[2] * A[3] */ "ldr r6, [%[a], #8]\n\t" - "ldr r7, [%[a], #12]\n\t" - "umull r6, r7, r6, r7\n\t" - "adds r8, r8, r6\n\t" - "adcs r9, r9, r7\n\t" - "adc r10, r10, #0\n\t" - "adds r8, r8, r8\n\t" - "adcs r9, r9, r9\n\t" - "adc r10, r10, r10\n\t" - "adds r5, r5, r8\n\t" - "adcs r3, r3, r9\n\t" - "adc r4, r4, r10\n\t" + "ldr r8, [%[a], #12]\n\t" + "umull r6, r8, r6, r8\n\t" + "adds r9, r9, r6\n\t" + "adcs r10, r10, r8\n\t" + "adc r11, r11, #0\n\t" + "adds r9, r9, r9\n\t" + "adcs r10, r10, r10\n\t" + "adc r11, r11, r11\n\t" + "adds r5, r5, r9\n\t" + "adcs r3, r3, r10\n\t" + "adc r4, r4, r11\n\t" "str r5, [%[tmp], #20]\n\t" "mov r5, #0\n\t" /* A[0] * A[6] */ "ldr r6, [%[a], #0]\n\t" - "ldr r7, [%[a], #24]\n\t" - "umull r8, r9, r6, r7\n\t" - "mov r10, #0\n\t" + "ldr r8, [%[a], #24]\n\t" + "umull r9, r10, r6, r8\n\t" + "mov r11, #0\n\t" /* A[1] * A[5] */ "ldr r6, [%[a], #4]\n\t" - "ldr r7, [%[a], #20]\n\t" - "umull r6, r7, r6, r7\n\t" - "adds r8, r8, r6\n\t" - "adcs r9, r9, r7\n\t" - "adc r10, r10, #0\n\t" + "ldr r8, [%[a], #20]\n\t" + "umull r6, r8, r6, r8\n\t" + "adds r9, r9, r6\n\t" + "adcs r10, r10, r8\n\t" + "adc r11, r11, #0\n\t" /* A[2] * A[4] */ "ldr r6, [%[a], #8]\n\t" - "ldr r7, [%[a], #16]\n\t" - "umull r6, r7, r6, r7\n\t" - "adds r8, r8, r6\n\t" - "adcs r9, r9, r7\n\t" - "adc r10, r10, #0\n\t" + "ldr r8, [%[a], #16]\n\t" + "umull r6, r8, r6, r8\n\t" + "adds r9, r9, r6\n\t" + "adcs r10, r10, r8\n\t" + "adc r11, r11, #0\n\t" /* A[3] * A[3] */ "ldr r6, [%[a], #12]\n\t" - "umull r6, r7, r6, r6\n\t" + "umull r6, r8, r6, r6\n\t" "adds r3, r3, r6\n\t" - "adcs r4, r4, r7\n\t" + "adcs r4, r4, r8\n\t" "adc r5, r5, #0\n\t" - "adds r8, r8, r8\n\t" - "adcs r9, r9, r9\n\t" - "adc r10, r10, r10\n\t" - "adds r3, r3, r8\n\t" - "adcs r4, r4, r9\n\t" - "adc r5, r5, r10\n\t" + "adds r9, r9, r9\n\t" + "adcs r10, r10, r10\n\t" + "adc r11, r11, r11\n\t" + "adds r3, r3, r9\n\t" + "adcs r4, r4, r10\n\t" + "adc r5, r5, r11\n\t" "str r3, [%[tmp], #24]\n\t" "mov r3, #0\n\t" /* A[0] * A[7] */ "ldr r6, [%[a], #0]\n\t" - "ldr r7, [%[a], #28]\n\t" - "umull r8, r9, r6, r7\n\t" - "mov r10, #0\n\t" + "ldr r8, [%[a], #28]\n\t" + "umull r9, r10, r6, r8\n\t" + "mov r11, #0\n\t" /* A[1] * A[6] */ "ldr r6, [%[a], #4]\n\t" - "ldr r7, [%[a], #24]\n\t" - "umull r6, r7, r6, r7\n\t" - "adds r8, r8, r6\n\t" - "adcs r9, r9, r7\n\t" - "adc r10, r10, #0\n\t" + "ldr r8, [%[a], #24]\n\t" + "umull r6, r8, r6, r8\n\t" + "adds r9, r9, r6\n\t" + "adcs r10, r10, r8\n\t" + "adc r11, r11, #0\n\t" /* A[2] * A[5] */ "ldr r6, [%[a], #8]\n\t" - "ldr r7, [%[a], #20]\n\t" - "umull r6, r7, r6, r7\n\t" - "adds r8, r8, r6\n\t" - "adcs r9, r9, r7\n\t" - "adc r10, r10, #0\n\t" + "ldr r8, [%[a], #20]\n\t" + "umull r6, r8, r6, r8\n\t" + "adds r9, r9, r6\n\t" + "adcs r10, r10, r8\n\t" + "adc r11, r11, #0\n\t" /* A[3] * A[4] */ "ldr r6, [%[a], #12]\n\t" - "ldr r7, [%[a], #16]\n\t" - "umull r6, r7, r6, r7\n\t" - "adds r8, r8, r6\n\t" - "adcs r9, r9, r7\n\t" - "adc r10, r10, #0\n\t" - "adds r8, r8, r8\n\t" - "adcs r9, r9, r9\n\t" - "adc r10, r10, r10\n\t" - "adds r4, r4, r8\n\t" - "adcs r5, r5, r9\n\t" - "adc r3, r3, r10\n\t" + "ldr r8, [%[a], #16]\n\t" + "umull r6, r8, r6, r8\n\t" + "adds r9, r9, r6\n\t" + "adcs r10, r10, r8\n\t" + "adc r11, r11, #0\n\t" + "adds r9, r9, r9\n\t" + "adcs r10, r10, r10\n\t" + "adc r11, r11, r11\n\t" + "adds r4, r4, r9\n\t" + "adcs r5, r5, r10\n\t" + "adc r3, r3, r11\n\t" "str r4, [%[tmp], #28]\n\t" "mov r4, #0\n\t" /* A[1] * A[7] */ "ldr r6, [%[a], #4]\n\t" - "ldr r7, [%[a], #28]\n\t" - "umull r8, r9, r6, r7\n\t" - "mov r10, #0\n\t" + "ldr r8, [%[a], #28]\n\t" + "umull r9, r10, r6, r8\n\t" + "mov r11, #0\n\t" /* A[2] * A[6] */ "ldr r6, [%[a], #8]\n\t" - "ldr r7, [%[a], #24]\n\t" - "umull r6, r7, r6, r7\n\t" - "adds r8, r8, r6\n\t" - "adcs r9, r9, r7\n\t" - "adc r10, r10, #0\n\t" + "ldr r8, [%[a], #24]\n\t" + "umull r6, r8, r6, r8\n\t" + "adds r9, r9, r6\n\t" + "adcs r10, r10, r8\n\t" + "adc r11, r11, #0\n\t" /* A[3] * A[5] */ "ldr r6, [%[a], #12]\n\t" - "ldr r7, [%[a], #20]\n\t" - "umull r6, r7, r6, r7\n\t" - "adds r8, r8, r6\n\t" - "adcs r9, r9, r7\n\t" - "adc r10, r10, #0\n\t" + "ldr r8, [%[a], #20]\n\t" + "umull r6, r8, r6, r8\n\t" + "adds r9, r9, r6\n\t" + "adcs r10, r10, r8\n\t" + "adc r11, r11, #0\n\t" /* A[4] * A[4] */ "ldr r6, [%[a], #16]\n\t" - "umull r6, r7, r6, r6\n\t" + "umull r6, r8, r6, r6\n\t" "adds r5, r5, r6\n\t" - "adcs r3, r3, r7\n\t" + "adcs r3, r3, r8\n\t" "adc r4, r4, #0\n\t" - "adds r8, r8, r8\n\t" - "adcs r9, r9, r9\n\t" - "adc r10, r10, r10\n\t" - "adds r5, r5, r8\n\t" - "adcs r3, r3, r9\n\t" - "adc r4, r4, r10\n\t" + "adds r9, r9, r9\n\t" + "adcs r10, r10, r10\n\t" + "adc r11, r11, r11\n\t" + "adds r5, r5, r9\n\t" + "adcs r3, r3, r10\n\t" + "adc r4, r4, r11\n\t" "str r5, [%[r], #32]\n\t" "mov r5, #0\n\t" /* A[2] * A[7] */ "ldr r6, [%[a], #8]\n\t" - "ldr r7, [%[a], #28]\n\t" - "umull r8, r9, r6, r7\n\t" - "mov r10, #0\n\t" + "ldr r8, [%[a], #28]\n\t" + "umull r9, r10, r6, r8\n\t" + "mov r11, #0\n\t" /* A[3] * A[6] */ "ldr r6, [%[a], #12]\n\t" - "ldr r7, [%[a], #24]\n\t" - "umull r6, r7, r6, r7\n\t" - "adds r8, r8, r6\n\t" - "adcs r9, r9, r7\n\t" - "adc r10, r10, #0\n\t" + "ldr r8, [%[a], #24]\n\t" + "umull r6, r8, r6, r8\n\t" + "adds r9, r9, r6\n\t" + "adcs r10, r10, r8\n\t" + "adc r11, r11, #0\n\t" /* A[4] * A[5] */ "ldr r6, [%[a], #16]\n\t" - "ldr r7, [%[a], #20]\n\t" - "umull r6, r7, r6, r7\n\t" - "adds r8, r8, r6\n\t" - "adcs r9, r9, r7\n\t" - "adc r10, r10, #0\n\t" - "adds r8, r8, r8\n\t" - "adcs r9, r9, r9\n\t" - "adc r10, r10, r10\n\t" - "adds r3, r3, r8\n\t" - "adcs r4, r4, r9\n\t" - "adc r5, r5, r10\n\t" + "ldr r8, [%[a], #20]\n\t" + "umull r6, r8, r6, r8\n\t" + "adds r9, r9, r6\n\t" + "adcs r10, r10, r8\n\t" + "adc r11, r11, #0\n\t" + "adds r9, r9, r9\n\t" + "adcs r10, r10, r10\n\t" + "adc r11, r11, r11\n\t" + "adds r3, r3, r9\n\t" + "adcs r4, r4, r10\n\t" + "adc r5, r5, r11\n\t" "str r3, [%[r], #36]\n\t" "mov r3, #0\n\t" /* A[3] * A[7] */ "ldr r6, [%[a], #12]\n\t" - "ldr r7, [%[a], #28]\n\t" - "umull r8, r9, r6, r7\n\t" - "mov r10, #0\n\t" + "ldr r8, [%[a], #28]\n\t" + "umull r9, r10, r6, r8\n\t" + "mov r11, #0\n\t" /* A[4] * A[6] */ "ldr r6, [%[a], #16]\n\t" - "ldr r7, [%[a], #24]\n\t" - "umull r6, r7, r6, r7\n\t" - "adds r8, r8, r6\n\t" - "adcs r9, r9, r7\n\t" - "adc r10, r10, #0\n\t" + "ldr r8, [%[a], #24]\n\t" + "umull r6, r8, r6, r8\n\t" + "adds r9, r9, r6\n\t" + "adcs r10, r10, r8\n\t" + "adc r11, r11, #0\n\t" /* A[5] * A[5] */ "ldr r6, [%[a], #20]\n\t" - "umull r6, r7, r6, r6\n\t" + "umull r6, r8, r6, r6\n\t" "adds r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "adc r3, r3, #0\n\t" - "adds r8, r8, r8\n\t" - "adcs r9, r9, r9\n\t" - "adc r10, r10, r10\n\t" - "adds r4, r4, r8\n\t" - "adcs r5, r5, r9\n\t" - "adc r3, r3, r10\n\t" + "adds r9, r9, r9\n\t" + "adcs r10, r10, r10\n\t" + "adc r11, r11, r11\n\t" + "adds r4, r4, r9\n\t" + "adcs r5, r5, r10\n\t" + "adc r3, r3, r11\n\t" "str r4, [%[r], #40]\n\t" "mov r4, #0\n\t" /* A[4] * A[7] */ "ldr r6, [%[a], #16]\n\t" - "ldr r7, [%[a], #28]\n\t" - "umull r6, r7, r6, r7\n\t" + "ldr r8, [%[a], #28]\n\t" + "umull r6, r8, r6, r8\n\t" "adds r5, r5, r6\n\t" - "adcs r3, r3, r7\n\t" + "adcs r3, r3, r8\n\t" "adc r4, r4, #0\n\t" "adds r5, r5, r6\n\t" - "adcs r3, r3, r7\n\t" + "adcs r3, r3, r8\n\t" "adc r4, r4, #0\n\t" /* A[5] * A[6] */ "ldr r6, [%[a], #20]\n\t" - "ldr r7, [%[a], #24]\n\t" - "umull r6, r7, r6, r7\n\t" + "ldr r8, [%[a], #24]\n\t" + "umull r6, r8, r6, r8\n\t" "adds r5, r5, r6\n\t" - "adcs r3, r3, r7\n\t" + "adcs r3, r3, r8\n\t" "adc r4, r4, #0\n\t" "adds r5, r5, r6\n\t" - "adcs r3, r3, r7\n\t" + "adcs r3, r3, r8\n\t" "adc r4, r4, #0\n\t" "str r5, [%[r], #44]\n\t" "mov r5, #0\n\t" /* A[5] * A[7] */ "ldr r6, [%[a], #20]\n\t" - "ldr r7, [%[a], #28]\n\t" - "umull r6, r7, r6, r7\n\t" + "ldr r8, [%[a], #28]\n\t" + "umull r6, r8, r6, r8\n\t" "adds r3, r3, r6\n\t" - "adcs r4, r4, r7\n\t" + "adcs r4, r4, r8\n\t" "adc r5, r5, #0\n\t" "adds r3, r3, r6\n\t" - "adcs r4, r4, r7\n\t" + "adcs r4, r4, r8\n\t" "adc r5, r5, #0\n\t" /* A[6] * A[6] */ "ldr r6, [%[a], #24]\n\t" - "umull r6, r7, r6, r6\n\t" + "umull r6, r8, r6, r6\n\t" "adds r3, r3, r6\n\t" - "adcs r4, r4, r7\n\t" + "adcs r4, r4, r8\n\t" "adc r5, r5, #0\n\t" "str r3, [%[r], #48]\n\t" "mov r3, #0\n\t" /* A[6] * A[7] */ "ldr r6, [%[a], #24]\n\t" - "ldr r7, [%[a], #28]\n\t" - "umull r6, r7, r6, r7\n\t" + "ldr r8, [%[a], #28]\n\t" + "umull r6, r8, r6, r8\n\t" "adds r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "adc r3, r3, #0\n\t" "adds r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "adc r3, r3, #0\n\t" "str r4, [%[r], #52]\n\t" "mov r4, #0\n\t" /* A[7] * A[7] */ "ldr r6, [%[a], #28]\n\t" - "umull r6, r7, r6, r6\n\t" + "umull r6, r8, r6, r6\n\t" "adds r5, r5, r6\n\t" - "adc r3, r3, r7\n\t" + "adc r3, r3, r8\n\t" "str r5, [%[r], #56]\n\t" "str r3, [%[r], #60]\n\t" /* Transfer tmp to r */ @@ -14928,7 +14922,7 @@ SP_NOINLINE static void sp_256_sqr_8(sp_digit* r, const sp_digit* a) "str r6, [%[r], #28]\n\t" : : [r] "r" (r), [a] "r" (a), [tmp] "r" (tmp) - : "memory", "r3", "r4", "r5", "r6", "r7", "r8", "r9", "r10" + : "memory", "r3", "r4", "r5", "r6", "r8", "r9", "r10", "r11" ); } @@ -15103,11 +15097,11 @@ SP_NOINLINE static sp_digit sp_256_add_8(sp_digit* r, const sp_digit* a, __asm__ __volatile__ ( "mov r6, %[a]\n\t" - "mov r7, #0\n\t" + "mov r8, #0\n\t" "add r6, r6, #32\n\t" - "sub r7, r7, #1\n\t" + "sub r8, r8, #1\n\t" "\n1:\n\t" - "adds %[c], %[c], r7\n\t" + "adds %[c], %[c], r8\n\t" "ldr r4, [%[a]]\n\t" "ldr r5, [%[b]]\n\t" "adcs r4, r4, r5\n\t" @@ -15121,7 +15115,7 @@ SP_NOINLINE static sp_digit sp_256_add_8(sp_digit* r, const sp_digit* a, "bne 1b\n\t" : [c] "+r" (c), [r] "+r" (r), [a] "+r" (a), [b] "+r" (b) : - : "memory", "r4", "r5", "r6", "r7" + : "memory", "r4", "r5", "r6", "r8" ); return c; @@ -15141,30 +15135,30 @@ SP_NOINLINE static sp_digit sp_256_add_8(sp_digit* r, const sp_digit* a, __asm__ __volatile__ ( "ldm %[a]!, {r4, r5}\n\t" - "ldm %[b]!, {r6, r7}\n\t" + "ldm %[b]!, {r6, r8}\n\t" "adds r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "stm %[r]!, {r4, r5}\n\t" "ldm %[a]!, {r4, r5}\n\t" - "ldm %[b]!, {r6, r7}\n\t" + "ldm %[b]!, {r6, r8}\n\t" "adcs r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "stm %[r]!, {r4, r5}\n\t" "ldm %[a]!, {r4, r5}\n\t" - "ldm %[b]!, {r6, r7}\n\t" + "ldm %[b]!, {r6, r8}\n\t" "adcs r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "stm %[r]!, {r4, r5}\n\t" "ldm %[a]!, {r4, r5}\n\t" - "ldm %[b]!, {r6, r7}\n\t" + "ldm %[b]!, {r6, r8}\n\t" "adcs r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "stm %[r]!, {r4, r5}\n\t" "mov %[c], #0\n\t" "adc %[c], %[c], %[c]\n\t" : [c] "+r" (c), [r] "+r" (r), [a] "+r" (a), [b] "+r" (b) : - : "memory", "r4", "r5", "r6", "r7" + : "memory", "r4", "r5", "r6", "r8" ); return c; @@ -15188,40 +15182,40 @@ SP_NOINLINE static void sp_256_mont_add_8(sp_digit* r, const sp_digit* a, const "ldr r4, [%[a],#0]\n\t" "ldr r5, [%[a],#4]\n\t" "ldr r6, [%[b],#0]\n\t" - "ldr r7, [%[b],#4]\n\t" + "ldr r8, [%[b],#4]\n\t" "adds r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "str r4, [%[r],#0]\n\t" "str r5, [%[r],#4]\n\t" "ldr r4, [%[a],#8]\n\t" "ldr r5, [%[a],#12]\n\t" "ldr r6, [%[b],#8]\n\t" - "ldr r7, [%[b],#12]\n\t" + "ldr r8, [%[b],#12]\n\t" "adcs r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" + "adcs r5, r5, r8\n\t" "str r4, [%[r],#8]\n\t" "str r5, [%[r],#12]\n\t" "ldr r4, [%[a],#16]\n\t" "ldr r5, [%[a],#20]\n\t" "ldr r6, [%[b],#16]\n\t" - "ldr r7, [%[b],#20]\n\t" + "ldr r8, [%[b],#20]\n\t" "adcs r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" - "mov r8, r4\n\t" - "mov r9, r5\n\t" + "adcs r5, r5, r8\n\t" + "mov r9, r4\n\t" + "mov r10, r5\n\t" "ldr r4, [%[a],#24]\n\t" "ldr r5, [%[a],#28]\n\t" "ldr r6, [%[b],#24]\n\t" - "ldr r7, [%[b],#28]\n\t" + "ldr r8, [%[b],#28]\n\t" "adcs r4, r4, r6\n\t" - "adcs r5, r5, r7\n\t" - "mov r10, r4\n\t" - "mov r11, r5\n\t" + "adcs r5, r5, r8\n\t" + "mov r11, r4\n\t" + "mov r12, r5\n\t" "adc r3, r3, r3\n\t" "mov r6, r3\n\t" "sub r3, r3, #1\n\t" "mvn r3, r3\n\t" - "mov r7, #0\n\t" + "mov r8, #0\n\t" "ldr r4, [%[r],#0]\n\t" "ldr r5, [%[r],#4]\n\t" "subs r4, r4, r3\n\t" @@ -15231,24 +15225,24 @@ SP_NOINLINE static void sp_256_mont_add_8(sp_digit* r, const sp_digit* a, const "ldr r4, [%[r],#8]\n\t" "ldr r5, [%[r],#12]\n\t" "sbcs r4, r4, r3\n\t" - "sbcs r5, r5, r7\n\t" + "sbcs r5, r5, r8\n\t" "str r4, [%[r],#8]\n\t" "str r5, [%[r],#12]\n\t" - "mov r4, r8\n\t" - "mov r5, r9\n\t" - "sbcs r4, r4, r7\n\t" - "sbcs r5, r5, r7\n\t" + "mov r4, r9\n\t" + "mov r5, r10\n\t" + "sbcs r4, r4, r8\n\t" + "sbcs r5, r5, r8\n\t" "str r4, [%[r],#16]\n\t" "str r5, [%[r],#20]\n\t" - "mov r4, r10\n\t" - "mov r5, r11\n\t" + "mov r4, r11\n\t" + "mov r5, r12\n\t" "sbcs r4, r4, r6\n\t" "sbc r5, r5, r3\n\t" "str r4, [%[r],#24]\n\t" "str r5, [%[r],#28]\n\t" : : [r] "r" (r), [a] "r" (a), [b] "r" (b) - : "memory", "r3", "r4", "r5", "r6", "r7", "r8", "r9", "r10", "r11" + : "memory", "r3", "r4", "r5", "r6", "r8", "r9", "r10", "r11", "r12" ); } @@ -15266,29 +15260,29 @@ SP_NOINLINE static void sp_256_mont_dbl_8(sp_digit* r, const sp_digit* a, const "ldr r4, [%[a],#0]\n\t" "ldr r5, [%[a],#4]\n\t" "ldr r6, [%[a],#8]\n\t" - "ldr r7, [%[a],#12]\n\t" + "ldr r8, [%[a],#12]\n\t" "adds r4, r4, r4\n\t" "adcs r5, r5, r5\n\t" "adcs r6, r6, r6\n\t" - "adcs r7, r7, r7\n\t" + "adcs r8, r8, r8\n\t" "str r4, [%[r],#0]\n\t" "str r5, [%[r],#4]\n\t" "str r6, [%[r],#8]\n\t" - "str r7, [%[r],#12]\n\t" + "str r8, [%[r],#12]\n\t" "ldr r4, [%[a],#16]\n\t" "ldr r5, [%[a],#20]\n\t" "ldr r6, [%[a],#24]\n\t" - "ldr r7, [%[a],#28]\n\t" + "ldr r8, [%[a],#28]\n\t" "adcs r4, r4, r4\n\t" "adcs r5, r5, r5\n\t" "adcs r6, r6, r6\n\t" - "adcs r7, r7, r7\n\t" - "mov r8, r4\n\t" - "mov r9, r5\n\t" - "mov r10, r6\n\t" - "mov r11, r7\n\t" + "adcs r8, r8, r8\n\t" + "mov r9, r4\n\t" + "mov r10, r5\n\t" + "mov r11, r6\n\t" + "mov r12, r8\n\t" "mov r3, #0\n\t" - "mov r7, #0\n\t" + "mov r8, #0\n\t" "adc r3, r3, r3\n\t" "mov r2, r3\n\t" "sub r3, r3, #1\n\t" @@ -15303,23 +15297,23 @@ SP_NOINLINE static void sp_256_mont_dbl_8(sp_digit* r, const sp_digit* a, const "str r5, [%[r],#4]\n\t" "str r6, [%[r],#8]\n\t" "ldr r4, [%[r],#12]\n\t" - "mov r5, r8\n\t" - "mov r6, r9\n\t" - "sbcs r4, r4, r7\n\t" - "sbcs r5, r5, r7\n\t" - "sbcs r6, r6, r7\n\t" + "mov r5, r9\n\t" + "mov r6, r10\n\t" + "sbcs r4, r4, r8\n\t" + "sbcs r5, r5, r8\n\t" + "sbcs r6, r6, r8\n\t" "str r4, [%[r],#12]\n\t" "str r5, [%[r],#16]\n\t" "str r6, [%[r],#20]\n\t" - "mov r4, r10\n\t" - "mov r5, r11\n\t" + "mov r4, r11\n\t" + "mov r5, r12\n\t" "sbcs r4, r4, r2\n\t" "sbc r5, r5, r3\n\t" "str r4, [%[r],#24]\n\t" "str r5, [%[r],#28]\n\t" : : [r] "r" (r), [a] "r" (a) - : "memory", "r3", "r2", "r4", "r5", "r6", "r7", "r8", "r9", "r10", "r11" + : "memory", "r3", "r2", "r4", "r5", "r6", "r8", "r9", "r10", "r11", "r12" ); } @@ -15334,113 +15328,77 @@ SP_NOINLINE static void sp_256_mont_tpl_8(sp_digit* r, const sp_digit* a, const (void)m; __asm__ __volatile__ ( - "ldr r6, [%[a],#0]\n\t" - "ldr r7, [%[a],#4]\n\t" + "ldr r2, [%[a],#0]\n\t" + "ldr r3, [%[a],#4]\n\t" "ldr r4, [%[a],#8]\n\t" "ldr r5, [%[a],#12]\n\t" - "adds r6, r6, r6\n\t" - "adcs r7, r7, r7\n\t" - "adcs r4, r4, r4\n\t" - "adcs r5, r5, r5\n\t" - "mov r8, r4\n\t" - "mov r9, r5\n\t" - "ldr r2, [%[a],#16]\n\t" - "ldr r3, [%[a],#20]\n\t" - "ldr r4, [%[a],#24]\n\t" - "ldr r5, [%[a],#28]\n\t" - "adcs r2, r2, r2\n\t" + "ldr r6, [%[a],#16]\n\t" + "ldr r8, [%[a],#20]\n\t" + "ldr r9, [%[a],#24]\n\t" + "ldr r10, [%[a],#28]\n\t" + "adds r2, r2, r2\n\t" "adcs r3, r3, r3\n\t" "adcs r4, r4, r4\n\t" "adcs r5, r5, r5\n\t" - "mov r10, r2\n\t" - "mov r11, r3\n\t" - "mov r12, r4\n\t" - "mov r14, r5\n\t" - "mov r3, #0\n\t" - "mov r5, #0\n\t" - "adc r3, r3, r3\n\t" - "mov r4, r3\n\t" - "sub r3, r3, #1\n\t" - "mvn r3, r3\n\t" - "subs r6, r6, r3\n\t" - "sbcs r7, r7, r3\n\t" - "mov r2, r8\n\t" - "sbcs r2, r2, r3\n\t" - "mov r8, r2\n\t" - "mov r2, r9\n\t" - "sbcs r2, r2, r5\n\t" - "mov r9, r2\n\t" - "mov r2, r10\n\t" - "sbcs r2, r2, r5\n\t" - "mov r10, r2\n\t" - "mov r2, r11\n\t" - "sbcs r2, r2, r5\n\t" - "mov r11, r2\n\t" - "mov r2, r12\n\t" - "sbcs r2, r2, r4\n\t" - "mov r12, r2\n\t" - "mov r2, r14\n\t" - "sbc r2, r2, r3\n\t" - "mov r14, r2\n\t" - "ldr r2, [%[a],#0]\n\t" - "ldr r3, [%[a],#4]\n\t" - "adds r6, r6, r2\n\t" - "adcs r7, r7, r3\n\t" - "ldr r2, [%[a],#8]\n\t" - "ldr r3, [%[a],#12]\n\t" - "mov r4, r8\n\t" - "mov r5, r9\n\t" - "adcs r2, r2, r4\n\t" - "adcs r3, r3, r5\n\t" - "mov r8, r2\n\t" - "mov r9, r3\n\t" - "ldr r2, [%[a],#16]\n\t" - "ldr r3, [%[a],#20]\n\t" - "mov r4, r10\n\t" - "mov r5, r11\n\t" - "adcs r2, r2, r4\n\t" - "adcs r3, r3, r5\n\t" - "mov r10, r2\n\t" - "mov r11, r3\n\t" - "ldr r2, [%[a],#24]\n\t" - "ldr r3, [%[a],#28]\n\t" - "mov r4, r12\n\t" - "mov r5, r14\n\t" - "adcs r2, r2, r4\n\t" - "adcs r3, r3, r5\n\t" - "mov r12, r2\n\t" - "mov r14, r3\n\t" - "mov r3, #0\n\t" - "mov r5, #0\n\t" - "adc r3, r3, r3\n\t" - "mov r4, r3\n\t" - "sub r3, r3, #1\n\t" - "mvn r3, r3\n\t" - "subs r6, r6, r3\n\t" - "str r6, [%[r],#0]\n\t" - "sbcs r7, r7, r3\n\t" - "str r7, [%[r],#4]\n\t" - "mov r2, r8\n\t" - "sbcs r2, r2, r3\n\t" - "str r2, [%[r],#8]\n\t" - "mov r2, r9\n\t" - "sbcs r2, r2, r5\n\t" - "str r2, [%[r],#12]\n\t" - "mov r2, r10\n\t" - "sbcs r2, r2, r5\n\t" - "str r2, [%[r],#16]\n\t" - "mov r2, r11\n\t" - "sbcs r2, r2, r5\n\t" - "str r2, [%[r],#20]\n\t" - "mov r2, r12\n\t" - "sbcs r2, r2, r4\n\t" - "str r2, [%[r],#24]\n\t" - "mov r2, r14\n\t" - "sbc r2, r2, r3\n\t" - "str r2, [%[r],#28]\n\t" + "adcs r6, r6, r6\n\t" + "adcs r8, r8, r8\n\t" + "adcs r9, r9, r9\n\t" + "adcs r10, r10, r10\n\t" + "mov r11, #0\n\t" + "mov r14, #0\n\t" + "adc r11, r11, r11\n\t" + "mov r12, r11\n\t" + "sub r11, r11, #1\n\t" + "mvn r11, r11\n\t" + "subs r2, r2, r11\n\t" + "sbcs r3, r3, r11\n\t" + "sbcs r4, r4, r11\n\t" + "sbcs r5, r5, r14\n\t" + "sbcs r6, r6, r14\n\t" + "sbcs r8, r8, r14\n\t" + "sbcs r9, r9, r12\n\t" + "sbc r10, r10, r11\n\t" + "ldr r12, [%[a],#0]\n\t" + "ldr r14, [%[a],#4]\n\t" + "adds r2, r2, r12\n\t" + "adcs r3, r3, r14\n\t" + "ldr r12, [%[a],#8]\n\t" + "ldr r14, [%[a],#12]\n\t" + "adcs r4, r4, r12\n\t" + "adcs r5, r5, r14\n\t" + "ldr r12, [%[a],#16]\n\t" + "ldr r14, [%[a],#20]\n\t" + "adcs r6, r6, r12\n\t" + "adcs r8, r8, r14\n\t" + "ldr r12, [%[a],#24]\n\t" + "ldr r14, [%[a],#28]\n\t" + "adcs r9, r9, r12\n\t" + "adcs r10, r10, r14\n\t" + "mov r11, #0\n\t" + "mov r14, #0\n\t" + "adc r11, r11, r11\n\t" + "mov r12, r11\n\t" + "sub r11, r11, #1\n\t" + "mvn r11, r11\n\t" + "subs r2, r2, r11\n\t" + "str r2, [%[r],#0]\n\t" + "sbcs r3, r3, r11\n\t" + "str r3, [%[r],#4]\n\t" + "sbcs r4, r4, r11\n\t" + "str r4, [%[r],#8]\n\t" + "sbcs r5, r5, r14\n\t" + "str r5, [%[r],#12]\n\t" + "sbcs r6, r6, r14\n\t" + "str r6, [%[r],#16]\n\t" + "sbcs r8, r8, r14\n\t" + "str r8, [%[r],#20]\n\t" + "sbcs r9, r9, r12\n\t" + "str r9, [%[r],#24]\n\t" + "sbc r10, r10, r11\n\t" + "str r10, [%[r],#28]\n\t" : : [r] "r" (r), [a] "r" (a) - : "memory", "r2", "r3", "r4", "r5", "r6", "r7", "r8", "r9", "r10", "r11", "r12", "r14" + : "memory", "r11", "r12", "r14", "r2", "r3", "r4", "r5", "r6", "r8", "r9", "r10" ); } @@ -15460,37 +15418,37 @@ SP_NOINLINE static void sp_256_mont_sub_8(sp_digit* r, const sp_digit* a, const "ldr r4, [%[a],#0]\n\t" "ldr r5, [%[a],#4]\n\t" "ldr r6, [%[b],#0]\n\t" - "ldr r7, [%[b],#4]\n\t" + "ldr r8, [%[b],#4]\n\t" "subs r4, r4, r6\n\t" - "sbcs r5, r5, r7\n\t" + "sbcs r5, r5, r8\n\t" "str r4, [%[r],#0]\n\t" "str r5, [%[r],#4]\n\t" "ldr r4, [%[a],#8]\n\t" "ldr r5, [%[a],#12]\n\t" "ldr r6, [%[b],#8]\n\t" - "ldr r7, [%[b],#12]\n\t" + "ldr r8, [%[b],#12]\n\t" "sbcs r4, r4, r6\n\t" - "sbcs r5, r5, r7\n\t" + "sbcs r5, r5, r8\n\t" "str r4, [%[r],#8]\n\t" "str r5, [%[r],#12]\n\t" "ldr r4, [%[a],#16]\n\t" "ldr r5, [%[a],#20]\n\t" "ldr r6, [%[b],#16]\n\t" - "ldr r7, [%[b],#20]\n\t" + "ldr r8, [%[b],#20]\n\t" "sbcs r4, r4, r6\n\t" - "sbcs r5, r5, r7\n\t" - "mov r8, r4\n\t" - "mov r9, r5\n\t" + "sbcs r5, r5, r8\n\t" + "mov r9, r4\n\t" + "mov r10, r5\n\t" "ldr r4, [%[a],#24]\n\t" "ldr r5, [%[a],#28]\n\t" "ldr r6, [%[b],#24]\n\t" - "ldr r7, [%[b],#28]\n\t" + "ldr r8, [%[b],#28]\n\t" "sbcs r4, r4, r6\n\t" - "sbcs r5, r5, r7\n\t" - "mov r10, r4\n\t" - "mov r11, r5\n\t" + "sbcs r5, r5, r8\n\t" + "mov r11, r4\n\t" + "mov r12, r5\n\t" "sbc r3, r3, r3\n\t" - "lsr r7, r3, #31\n\t" + "lsr r8, r3, #31\n\t" "mov r6, #0\n\t" "ldr r4, [%[r],#0]\n\t" "ldr r5, [%[r],#4]\n\t" @@ -15504,21 +15462,21 @@ SP_NOINLINE static void sp_256_mont_sub_8(sp_digit* r, const sp_digit* a, const "adcs r5, r5, r6\n\t" "str r4, [%[r],#8]\n\t" "str r5, [%[r],#12]\n\t" - "mov r4, r8\n\t" - "mov r5, r9\n\t" + "mov r4, r9\n\t" + "mov r5, r10\n\t" "adcs r4, r4, r6\n\t" "adcs r5, r5, r6\n\t" "str r4, [%[r],#16]\n\t" "str r5, [%[r],#20]\n\t" - "mov r4, r10\n\t" - "mov r5, r11\n\t" - "adcs r4, r4, r7\n\t" + "mov r4, r11\n\t" + "mov r5, r12\n\t" + "adcs r4, r4, r8\n\t" "adc r5, r5, r3\n\t" "str r4, [%[r],#24]\n\t" "str r5, [%[r],#28]\n\t" : : [r] "r" (r), [a] "r" (a), [b] "r" (b) - : "memory", "r3", "r4", "r5", "r6", "r7", "r8", "r9", "r10", "r11" + : "memory", "r3", "r4", "r5", "r6", "r8", "r9", "r10", "r11", "r12" ); } @@ -15531,12 +15489,12 @@ SP_NOINLINE static void sp_256_mont_sub_8(sp_digit* r, const sp_digit* a, const SP_NOINLINE static void sp_256_div2_8(sp_digit* r, const sp_digit* a, const sp_digit* m) { __asm__ __volatile__ ( - "ldr r7, [%[a], #0]\n\t" - "lsl r7, r7, #31\n\t" - "lsr r7, r7, #31\n\t" + "ldr r8, [%[a], #0]\n\t" + "lsl r8, r8, #31\n\t" + "lsr r8, r8, #31\n\t" "mov r5, #0\n\t" - "sub r5, r5, r7\n\t" - "mov r7, #0\n\t" + "sub r5, r5, r8\n\t" + "mov r8, #0\n\t" "lsl r6, r5, #31\n\t" "lsr r6, r6, #31\n\t" "ldr r3, [%[a], #0]\n\t" @@ -15548,28 +15506,28 @@ SP_NOINLINE static void sp_256_div2_8(sp_digit* r, const sp_digit* a, const sp_d "ldr r3, [%[a], #8]\n\t" "ldr r4, [%[a], #12]\n\t" "adcs r3, r3, r5\n\t" - "adcs r4, r4, r7\n\t" + "adcs r4, r4, r8\n\t" "str r3, [%[r], #8]\n\t" "str r4, [%[r], #12]\n\t" "ldr r3, [%[a], #16]\n\t" "ldr r4, [%[a], #20]\n\t" - "adcs r3, r3, r7\n\t" - "adcs r4, r4, r7\n\t" + "adcs r3, r3, r8\n\t" + "adcs r4, r4, r8\n\t" "str r3, [%[r], #16]\n\t" "str r4, [%[r], #20]\n\t" "ldr r3, [%[a], #24]\n\t" "ldr r4, [%[a], #28]\n\t" "adcs r3, r3, r6\n\t" "adcs r4, r4, r5\n\t" - "adc r7, r7, r7\n\t" - "lsl r7, r7, #31\n\t" + "adc r8, r8, r8\n\t" + "lsl r8, r8, #31\n\t" "lsr r5, r3, #1\n\t" "lsl r3, r3, #31\n\t" "lsr r6, r4, #1\n\t" "lsl r4, r4, #31\n\t" "orr r5, r5, r4\n\t" - "orr r6, r6, r7\n\t" - "mov r7, r3\n\t" + "orr r6, r6, r8\n\t" + "mov r8, r3\n\t" "str r5, [%[r], #24]\n\t" "str r6, [%[r], #28]\n\t" "ldr r3, [%[a], #16]\n\t" @@ -15579,8 +15537,8 @@ SP_NOINLINE static void sp_256_div2_8(sp_digit* r, const sp_digit* a, const sp_d "lsr r6, r4, #1\n\t" "lsl r4, r4, #31\n\t" "orr r5, r5, r4\n\t" - "orr r6, r6, r7\n\t" - "mov r7, r3\n\t" + "orr r6, r6, r8\n\t" + "mov r8, r3\n\t" "str r5, [%[r], #16]\n\t" "str r6, [%[r], #20]\n\t" "ldr r3, [%[a], #8]\n\t" @@ -15590,8 +15548,8 @@ SP_NOINLINE static void sp_256_div2_8(sp_digit* r, const sp_digit* a, const sp_d "lsr r6, r4, #1\n\t" "lsl r4, r4, #31\n\t" "orr r5, r5, r4\n\t" - "orr r6, r6, r7\n\t" - "mov r7, r3\n\t" + "orr r6, r6, r8\n\t" + "mov r8, r3\n\t" "str r5, [%[r], #8]\n\t" "str r6, [%[r], #12]\n\t" "ldr r3, [%[r], #0]\n\t" @@ -15600,12 +15558,12 @@ SP_NOINLINE static void sp_256_div2_8(sp_digit* r, const sp_digit* a, const sp_d "lsr r6, r4, #1\n\t" "lsl r4, r4, #31\n\t" "orr r5, r5, r4\n\t" - "orr r6, r6, r7\n\t" + "orr r6, r6, r8\n\t" "str r5, [%[r], #0]\n\t" "str r6, [%[r], #4]\n\t" : : [r] "r" (r), [a] "r" (a), [m] "r" (m) - : "memory", "r3", "r4", "r5", "r6", "r7" + : "memory", "r3", "r4", "r5", "r6", "r8" ); } @@ -15739,39 +15697,39 @@ SP_NOINLINE static sp_digit sp_256_sub_8(sp_digit* r, const sp_digit* a, "ldr r4, [%[a], #0]\n\t" "ldr r5, [%[a], #4]\n\t" "ldr r6, [%[b], #0]\n\t" - "ldr r7, [%[b], #4]\n\t" + "ldr r8, [%[b], #4]\n\t" "subs r4, r4, r6\n\t" - "sbcs r5, r5, r7\n\t" + "sbcs r5, r5, r8\n\t" "str r4, [%[r], #0]\n\t" "str r5, [%[r], #4]\n\t" "ldr r4, [%[a], #8]\n\t" "ldr r5, [%[a], #12]\n\t" "ldr r6, [%[b], #8]\n\t" - "ldr r7, [%[b], #12]\n\t" + "ldr r8, [%[b], #12]\n\t" "sbcs r4, r4, r6\n\t" - "sbcs r5, r5, r7\n\t" + "sbcs r5, r5, r8\n\t" "str r4, [%[r], #8]\n\t" "str r5, [%[r], #12]\n\t" "ldr r4, [%[a], #16]\n\t" "ldr r5, [%[a], #20]\n\t" "ldr r6, [%[b], #16]\n\t" - "ldr r7, [%[b], #20]\n\t" + "ldr r8, [%[b], #20]\n\t" "sbcs r4, r4, r6\n\t" - "sbcs r5, r5, r7\n\t" + "sbcs r5, r5, r8\n\t" "str r4, [%[r], #16]\n\t" "str r5, [%[r], #20]\n\t" "ldr r4, [%[a], #24]\n\t" "ldr r5, [%[a], #28]\n\t" "ldr r6, [%[b], #24]\n\t" - "ldr r7, [%[b], #28]\n\t" + "ldr r8, [%[b], #28]\n\t" "sbcs r4, r4, r6\n\t" - "sbcs r5, r5, r7\n\t" + "sbcs r5, r5, r8\n\t" "str r4, [%[r], #24]\n\t" "str r5, [%[r], #28]\n\t" "sbc %[c], %[c], %[c]\n\t" : [c] "+r" (c), [r] "+r" (r), [a] "+r" (a), [b] "+r" (b) : - : "memory", "r4", "r5", "r6", "r7" + : "memory", "r4", "r5", "r6", "r8" ); return c; @@ -18607,8 +18565,8 @@ SP_NOINLINE static sp_digit sp_256_sub_in_place_8(sp_digit* a, { sp_digit c = 0; __asm__ __volatile__ ( - "mov r7, %[a]\n\t" - "add r7, r7, #32\n\t" + "mov r8, %[a]\n\t" + "add r8, r8, #32\n\t" "\n1:\n\t" "mov r5, #0\n\t" "subs r5, r5, %[c]\n\t" @@ -18623,11 +18581,11 @@ SP_NOINLINE static sp_digit sp_256_sub_in_place_8(sp_digit* a, "sbc %[c], %[c], %[c]\n\t" "add %[a], %[a], #8\n\t" "add %[b], %[b], #8\n\t" - "cmp %[a], r7\n\t" + "cmp %[a], r8\n\t" "bne 1b\n\t" : [c] "+r" (c), [a] "+r" (a), [b] "+r" (b) : - : "memory", "r3", "r4", "r5", "r6", "r7" + : "memory", "r3", "r4", "r5", "r6", "r8" ); return c; @@ -18686,7 +18644,7 @@ SP_NOINLINE static void sp_256_mul_d_8(sp_digit* r, const sp_digit* a, sp_digit b) { __asm__ __volatile__ ( - "add r8, %[a], #32\n\t" + "add r9, %[a], #32\n\t" /* A[0] * B */ "ldr r6, [%[a]], #4\n\t" "umull r5, r3, r6, %[b]\n\t" @@ -18697,20 +18655,20 @@ SP_NOINLINE static void sp_256_mul_d_8(sp_digit* r, const sp_digit* a, "mov r5, #0\n\t" /* A[] * B */ "ldr r6, [%[a]], #4\n\t" - "umull r6, r7, r6, %[b]\n\t" + "umull r6, r8, r6, %[b]\n\t" "adds r3, r3, r6\n\t" - "adcs r4, r4, r7\n\t" + "adcs r4, r4, r8\n\t" "adc r5, r5, #0\n\t" /* A[] * B - Done */ "str r3, [%[r]], #4\n\t" "mov r3, r4\n\t" "mov r4, r5\n\t" - "cmp %[a], r8\n\t" + "cmp %[a], r9\n\t" "blt 1b\n\t" "str r3, [%[r]]\n\t" : [r] "+r" (r), [a] "+r" (a) : [b] "r" (b) - : "memory", "r3", "r4", "r5", "r6", "r7", "r8" + : "memory", "r3", "r4", "r5", "r6", "r8", "r9" ); } @@ -18732,36 +18690,36 @@ SP_NOINLINE static sp_digit div_256_word_8(sp_digit d1, sp_digit d0, "lsr r6, %[div], #16\n\t" "add r6, r6, #1\n\t" "udiv r4, %[d1], r6\n\t" - "lsl r7, r4, #16\n\t" - "umull r4, r5, %[div], r7\n\t" + "lsl r8, r4, #16\n\t" + "umull r4, r5, %[div], r8\n\t" "subs %[d0], %[d0], r4\n\t" "sbc %[d1], %[d1], r5\n\t" "udiv r5, %[d1], r6\n\t" "lsl r4, r5, #16\n\t" - "add r7, r7, r4\n\t" + "add r8, r8, r4\n\t" "umull r4, r5, %[div], r4\n\t" "subs %[d0], %[d0], r4\n\t" "sbc %[d1], %[d1], r5\n\t" "lsl r4, %[d1], #16\n\t" "orr r4, r4, %[d0], lsr #16\n\t" "udiv r4, r4, r6\n\t" - "add r7, r7, r4\n\t" + "add r8, r8, r4\n\t" "umull r4, r5, %[div], r4\n\t" "subs %[d0], %[d0], r4\n\t" "sbc %[d1], %[d1], r5\n\t" "lsl r4, %[d1], #16\n\t" "orr r4, r4, %[d0], lsr #16\n\t" "udiv r4, r4, r6\n\t" - "add r7, r7, r4\n\t" + "add r8, r8, r4\n\t" "umull r4, r5, %[div], r4\n\t" "subs %[d0], %[d0], r4\n\t" "sbc %[d1], %[d1], r5\n\t" "udiv r4, %[d0], %[div]\n\t" - "add r7, r7, r4\n\t" - "mov %[r], r7\n\t" + "add r8, r8, r4\n\t" + "mov %[r], r8\n\t" : [r] "+r" (r) : [d1] "r" (d1), [d0] "r" (d0), [div] "r" (div) - : "r4", "r5", "r6", "r7" + : "r4", "r5", "r6", "r8" ); return r; } diff --git a/wolfcrypt/src/sp_dsp32.c b/wolfcrypt/src/sp_dsp32.c index c7567efe1..231aa1c2a 100644 --- a/wolfcrypt/src/sp_dsp32.c +++ b/wolfcrypt/src/sp_dsp32.c @@ -1,6 +1,6 @@ /* sp_cdsp_signed.c * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/wolfcrypt/src/sp_int.c b/wolfcrypt/src/sp_int.c index 758f4c066..f9a957cbe 100644 --- a/wolfcrypt/src/sp_int.c +++ b/wolfcrypt/src/sp_int.c @@ -1,6 +1,6 @@ /* sp_int.c * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * @@ -450,7 +450,6 @@ int sp_set(sp_int* a, sp_int_digit d) return MP_OKAY; } -#if !defined(WOLFSSL_RSA_VERIFY_ONLY) || (!defined(NO_DH) || defined(HAVE_ECC)) /* Recalculate the number of digits used. * * a SP integer. @@ -464,6 +463,7 @@ void sp_clamp(sp_int* a) a->used = i + 1; } +#if !defined(WOLFSSL_RSA_VERIFY_ONLY) || (!defined(NO_DH) || defined(HAVE_ECC)) /* Grow big number to be able to hold l digits. * This function does nothing as the number of digits is fixed. * @@ -987,14 +987,19 @@ int sp_tohex(sp_int* a, char* str) * i Index of bit to set. * returns MP_OKAY always. */ -static int sp_set_bit(sp_int* a, int i) +int sp_set_bit(sp_int* a, int i) { - if (i / SP_WORD_SIZE < SP_INT_DIGITS) { + int ret = MP_OKAY; + + if ((a == NULL) || (i / SP_WORD_SIZE >= SP_INT_DIGITS)) { + ret = BAD_FUNC_ARG; + } + else { a->dp[i/SP_WORD_SIZE] |= (sp_int_digit)1 << (i % SP_WORD_SIZE); if (a->used <= i / SP_WORD_SIZE) a->used = (i / SP_WORD_SIZE) + 1; } - return MP_OKAY; + return ret; } /* Exponentiate 2 to the power of e: a = 2^e @@ -2097,6 +2102,21 @@ int sp_exch(sp_int* a, sp_int* b) #endif #endif +#if defined(WOLFSSL_KEY_GEN) && !defined(NO_RSA) +/* Multiply a by digit n and put result into r. r = a * n + * + * a SP integer to be multiplied. + * n Number to multiply by. + * r SP integer result. + * returns MP_OKAY always. + */ +int sp_mul_d(sp_int* a, sp_int_digit n, sp_int* r) +{ + _sp_mul_d(a, n, r, 0); + return MP_OKAY; +} +#endif + /* Returns the run time settings. * * returns the settings value. diff --git a/wolfcrypt/src/sp_x86_64.c b/wolfcrypt/src/sp_x86_64.c index 44828d185..9a73e225f 100644 --- a/wolfcrypt/src/sp_x86_64.c +++ b/wolfcrypt/src/sp_x86_64.c @@ -1,6 +1,6 @@ /* sp.c * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/wolfcrypt/src/sp_x86_64_asm.S b/wolfcrypt/src/sp_x86_64_asm.S index 57248a53f..f62442ecb 100644 --- a/wolfcrypt/src/sp_x86_64_asm.S +++ b/wolfcrypt/src/sp_x86_64_asm.S @@ -1,6 +1,6 @@ /* sp_x86_64_asm * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/wolfcrypt/src/srp.c b/wolfcrypt/src/srp.c index 017f67cc5..cf5eff19a 100644 --- a/wolfcrypt/src/srp.c +++ b/wolfcrypt/src/srp.c @@ -1,6 +1,6 @@ /* srp.c * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/wolfcrypt/src/tfm.c b/wolfcrypt/src/tfm.c index 42e001bd3..8da0c7a57 100644 --- a/wolfcrypt/src/tfm.c +++ b/wolfcrypt/src/tfm.c @@ -1,6 +1,6 @@ /* tfm.c * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * @@ -86,13 +86,13 @@ WOLFSSL_LOCAL int sp_ModExp_4096(mp_int* base, mp_int* exp, mp_int* mod, #endif - +#ifndef WOLFSSL_SP_MATH /* math settings check */ word32 CheckRunTimeSettings(void) { return CTC_SETTINGS; } - +#endif /* math settings size check */ word32 CheckRunTimeFastMath(void) diff --git a/wolfcrypt/src/wc_dsp.c b/wolfcrypt/src/wc_dsp.c index abca67cdd..594ad0489 100644 --- a/wolfcrypt/src/wc_dsp.c +++ b/wolfcrypt/src/wc_dsp.c @@ -1,6 +1,6 @@ /* wc_dsp.c * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/wolfcrypt/src/wc_encrypt.c b/wolfcrypt/src/wc_encrypt.c index 20c62c55c..e4a199956 100644 --- a/wolfcrypt/src/wc_encrypt.c +++ b/wolfcrypt/src/wc_encrypt.c @@ -1,6 +1,6 @@ /* wc_encrypt.c * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/wolfcrypt/src/wc_pkcs11.c b/wolfcrypt/src/wc_pkcs11.c index bc8509c17..90d24e2ba 100644 --- a/wolfcrypt/src/wc_pkcs11.c +++ b/wolfcrypt/src/wc_pkcs11.c @@ -1,6 +1,6 @@ /* wc_pkcs11.c * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/wolfcrypt/src/wc_port.c b/wolfcrypt/src/wc_port.c index d98927dd8..3fa146a76 100644 --- a/wolfcrypt/src/wc_port.c +++ b/wolfcrypt/src/wc_port.c @@ -1,6 +1,6 @@ /* port.c * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/wolfcrypt/src/wolfevent.c b/wolfcrypt/src/wolfevent.c index 4efc6a842..20848cddc 100644 --- a/wolfcrypt/src/wolfevent.c +++ b/wolfcrypt/src/wolfevent.c @@ -1,6 +1,6 @@ /* wolfevent.c * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/wolfcrypt/src/wolfmath.c b/wolfcrypt/src/wolfmath.c index 9dbb53562..4d5a26d19 100644 --- a/wolfcrypt/src/wolfmath.c +++ b/wolfcrypt/src/wolfmath.c @@ -1,6 +1,6 @@ /* wolfmath.c * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * @@ -99,46 +99,56 @@ int get_rand_digit(WC_RNG* rng, mp_digit* d) int mp_rand(mp_int* a, int digits, WC_RNG* rng) { int ret = 0; - mp_digit d; + int cnt = digits * sizeof(mp_digit); +#if !defined(USE_FAST_MATH) && !defined(WOLFSSL_SP_MATH) + int i; +#endif if (rng == NULL) { - ret = MISSING_RNG_E; goto exit; + ret = MISSING_RNG_E; + } + else if (a == NULL) { + ret = BAD_FUNC_ARG; } - if (a == NULL) { - ret = BAD_FUNC_ARG; goto exit; +#if !defined(USE_FAST_MATH) && !defined(WOLFSSL_SP_MATH) + /* allocate space for digits */ + if (ret == MP_OKAY) { + ret = mp_set_bit(a, digits * DIGIT_BIT - 1); } - - mp_zero(a); - if (digits <= 0) { - ret = MP_OKAY; goto exit; +#else +#if defined(WOLFSSL_SP_MATH) + if ((ret == MP_OKAY) && (digits > SP_INT_DIGITS)) +#else + if ((ret == MP_OKAY) && (digits > FP_SIZE)) +#endif + { + ret = BAD_FUNC_ARG; } - - /* first place a random non-zero digit */ - do { - ret = get_rand_digit(rng, &d); - if (ret != 0) { - goto exit; + if (ret == MP_OKAY) { + a->used = digits; + } +#endif + /* fill the data with random bytes */ + if (ret == MP_OKAY) { + ret = wc_RNG_GenerateBlock(rng, (byte*)a->dp, cnt); + } + if (ret == MP_OKAY) { +#if !defined(USE_FAST_MATH) && !defined(WOLFSSL_SP_MATH) + /* Mask down each digit to only bits used */ + for (i = 0; i < a->used; i++) { + a->dp[i] &= MP_MASK; } - } while (d == 0); - - if ((ret = mp_add_d(a, d, a)) != MP_OKAY) { - goto exit; - } - - while (--digits > 0) { - if ((ret = mp_lshd(a, 1)) != MP_OKAY) { - goto exit; - } - if ((ret = get_rand_digit(rng, &d)) != 0) { - goto exit; - } - if ((ret = mp_add_d(a, d, a)) != MP_OKAY) { - goto exit; +#endif + /* ensure top digit is not zero */ + while ((ret == MP_OKAY) && (a->dp[a->used - 1] == 0)) { + ret = get_rand_digit(rng, &a->dp[a->used - 1]); +#if !defined(USE_FAST_MATH) && !defined(WOLFSSL_SP_MATH) + a->dp[a->used - 1] &= MP_MASK; +#endif } } -exit: return ret; } #endif /* WC_RSA_BLINDING */ diff --git a/wolfcrypt/test/test.c b/wolfcrypt/test/test.c index 7a3cba7cd..ab4e34841 100644 --- a/wolfcrypt/test/test.c +++ b/wolfcrypt/test/test.c @@ -1,6 +1,6 @@ /* test.c * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * @@ -620,6 +620,13 @@ initDefaultName(); test_pass("asn test passed!\n"); #endif +#ifndef WC_NO_RNG + if ( (ret = random_test()) != 0) + return err_sys("RANDOM test failed!\n", ret); + else + test_pass("RANDOM test passed!\n"); +#endif /* WC_NO_RNG */ + #ifndef NO_MD5 if ( (ret = md5_test()) != 0) return err_sys("MD5 test failed!\n", ret); @@ -901,13 +908,6 @@ initDefaultName(); test_pass("IDEA test passed!\n"); #endif -#ifndef WC_NO_RNG - if ( (ret = random_test()) != 0) - return err_sys("RANDOM test failed!\n", ret); - else - test_pass("RANDOM test passed!\n"); -#endif /* WC_NO_RNG */ - #ifndef NO_RSA #ifdef WC_RSA_NO_PADDING if ( (ret = rsa_no_pad_test()) != 0) @@ -5030,11 +5030,17 @@ int chacha20_poly1305_aead_test(void) 0x39, 0x23, 0x36, 0xfe, 0xa1, 0x85, 0x1f, 0x38 }; - byte generatedCiphertext[272]; - byte generatedPlaintext[272]; + byte generatedCiphertext[265]; /* max plaintext2/cipher2 */ + byte generatedPlaintext[265]; /* max plaintext2/cipher2 */ byte generatedAuthTag[CHACHA20_POLY1305_AEAD_AUTHTAG_SIZE]; int err; + ChaChaPoly_Aead aead; + #define TEST_SMALL_CHACHA_CHUNKS 64 + #ifdef TEST_SMALL_CHACHA_CHUNKS + word32 testLen; + #endif + XMEMSET(generatedCiphertext, 0, sizeof(generatedCiphertext)); XMEMSET(generatedAuthTag, 0, sizeof(generatedAuthTag)); XMEMSET(generatedPlaintext, 0, sizeof(generatedPlaintext)); @@ -5092,8 +5098,8 @@ int chacha20_poly1305_aead_test(void) if (err != BAD_FUNC_ARG) return -4511; - /* Test #1 */ + /* Test #1 */ err = wc_ChaCha20Poly1305_Encrypt(key1, iv1, aad1, sizeof(aad1), plaintext1, sizeof(plaintext1), @@ -5103,17 +5109,14 @@ int chacha20_poly1305_aead_test(void) } /* -- Check the ciphertext and authtag */ - if (XMEMCMP(generatedCiphertext, cipher1, sizeof(cipher1))) { return -4512; } - if (XMEMCMP(generatedAuthTag, authTag1, sizeof(authTag1))) { return -4513; } /* -- Verify decryption works */ - err = wc_ChaCha20Poly1305_Decrypt(key1, iv1, aad1, sizeof(aad1), cipher1, sizeof(cipher1), @@ -5121,17 +5124,16 @@ int chacha20_poly1305_aead_test(void) if (err) { return err; } - - if (XMEMCMP(generatedPlaintext, plaintext1, sizeof( plaintext1))) { + if (XMEMCMP(generatedPlaintext, plaintext1, sizeof(plaintext1))) { return -4514; } + XMEMSET(generatedCiphertext, 0, sizeof(generatedCiphertext)); XMEMSET(generatedAuthTag, 0, sizeof(generatedAuthTag)); XMEMSET(generatedPlaintext, 0, sizeof(generatedPlaintext)); /* Test #2 */ - err = wc_ChaCha20Poly1305_Encrypt(key2, iv2, aad2, sizeof(aad2), plaintext2, sizeof(plaintext2), @@ -5141,17 +5143,14 @@ int chacha20_poly1305_aead_test(void) } /* -- Check the ciphertext and authtag */ - if (XMEMCMP(generatedCiphertext, cipher2, sizeof(cipher2))) { return -4515; } - if (XMEMCMP(generatedAuthTag, authTag2, sizeof(authTag2))) { return -4516; } /* -- Verify decryption works */ - err = wc_ChaCha20Poly1305_Decrypt(key2, iv2, aad2, sizeof(aad2), cipher2, sizeof(cipher2), @@ -5164,6 +5163,214 @@ int chacha20_poly1305_aead_test(void) return -4517; } + + /* AEAD init/update/final */ + err = wc_ChaCha20Poly1305_Init(NULL, key1, iv1, + CHACHA20_POLY1305_AEAD_DECRYPT); + if (err != BAD_FUNC_ARG) + return -4520; + err = wc_ChaCha20Poly1305_Init(&aead, NULL, iv1, + CHACHA20_POLY1305_AEAD_DECRYPT); + if (err != BAD_FUNC_ARG) + return -4521; + err = wc_ChaCha20Poly1305_Init(&aead, key1, NULL, + CHACHA20_POLY1305_AEAD_DECRYPT); + if (err != BAD_FUNC_ARG) + return -4522; + err = wc_ChaCha20Poly1305_UpdateAad(NULL, aad1, sizeof(aad1)); + if (err != BAD_FUNC_ARG) + return -4523; + err = wc_ChaCha20Poly1305_UpdateAad(&aead, NULL, sizeof(aad1)); + if (err != BAD_FUNC_ARG) + return -4524; + err = wc_ChaCha20Poly1305_UpdateData(NULL, generatedPlaintext, + generatedPlaintext, sizeof(plaintext1)); + if (err != BAD_FUNC_ARG) + return -4525; + err = wc_ChaCha20Poly1305_UpdateData(&aead, generatedPlaintext, NULL, + sizeof(plaintext1)); + if (err != BAD_FUNC_ARG) + return -4526; + err = wc_ChaCha20Poly1305_UpdateData(&aead, NULL, generatedPlaintext, + sizeof(plaintext1)); + if (err != BAD_FUNC_ARG) + return -4526; + err = wc_ChaCha20Poly1305_Final(NULL, generatedAuthTag); + if (err != BAD_FUNC_ARG) + return -4527; + err = wc_ChaCha20Poly1305_Final(&aead, NULL); + if (err != BAD_FUNC_ARG) + return -4528; + + /* AEAD init/update/final - state tests */ + aead.state = CHACHA20_POLY1305_STATE_INIT; + err = wc_ChaCha20Poly1305_UpdateAad(&aead, aad1, sizeof(aad1)); + if (err != BAD_STATE_E) + return -4529; + aead.state = CHACHA20_POLY1305_STATE_DATA; + err = wc_ChaCha20Poly1305_UpdateAad(&aead, aad1, sizeof(aad1)); + if (err != BAD_STATE_E) + return -4530; + aead.state = CHACHA20_POLY1305_STATE_INIT; + err = wc_ChaCha20Poly1305_UpdateData(&aead, generatedPlaintext, + generatedPlaintext, sizeof(plaintext1)); + if (err != BAD_STATE_E) + return -4531; + aead.state = CHACHA20_POLY1305_STATE_INIT; + err = wc_ChaCha20Poly1305_Final(&aead, generatedAuthTag); + if (err != BAD_STATE_E) + return -4532; + aead.state = CHACHA20_POLY1305_STATE_READY; + err = wc_ChaCha20Poly1305_Final(&aead, generatedAuthTag); + if (err != BAD_STATE_E) + return -4533; + + XMEMSET(generatedCiphertext, 0, sizeof(generatedCiphertext)); + XMEMSET(generatedAuthTag, 0, sizeof(generatedAuthTag)); + XMEMSET(generatedPlaintext, 0, sizeof(generatedPlaintext)); + + /* Test 1 - Encrypt */ + err = wc_ChaCha20Poly1305_Init(&aead, key1, iv1, + CHACHA20_POLY1305_AEAD_ENCRYPT); + if (err != 0) + return -4537; + err = wc_ChaCha20Poly1305_UpdateAad(&aead, aad1, sizeof(aad1)); + if (err != 0) + return -4538; +#ifdef TEST_SMALL_CHACHA_CHUNKS + /* test doing data in smaller chunks */ + for (testLen=0; testLen TEST_SMALL_CHACHA_CHUNKS) + dataLen = TEST_SMALL_CHACHA_CHUNKS; + err = wc_ChaCha20Poly1305_UpdateData(&aead, &plaintext1[testLen], + &generatedCiphertext[testLen], dataLen); + if (err != 0) + return -4539; + testLen += dataLen; + } +#else + err = wc_ChaCha20Poly1305_UpdateData(&aead, plaintext1, + generatedCiphertext, sizeof(plaintext1)); +#endif + err = wc_ChaCha20Poly1305_Final(&aead, generatedAuthTag); + if (err != 0) + return -4540; + err = wc_ChaCha20Poly1305_CheckTag(generatedAuthTag, authTag1); + if (err != 0) + return -4541; + if (XMEMCMP(generatedCiphertext, cipher1, sizeof(cipher1))) { + return -4542; + } + + /* Test 1 - Decrypt */ + err = wc_ChaCha20Poly1305_Init(&aead, key1, iv1, + CHACHA20_POLY1305_AEAD_DECRYPT); + if (err != 0) + return -4543; + err = wc_ChaCha20Poly1305_UpdateAad(&aead, aad1, sizeof(aad1)); + if (err != 0) + return -4544; +#ifdef TEST_SMALL_CHACHA_CHUNKS + /* test doing data in smaller chunks */ + for (testLen=0; testLen TEST_SMALL_CHACHA_CHUNKS) + dataLen = TEST_SMALL_CHACHA_CHUNKS; + err = wc_ChaCha20Poly1305_UpdateData(&aead, + &generatedCiphertext[testLen], &generatedPlaintext[testLen], + dataLen); + if (err != 0) + return -4545; + testLen += dataLen; + } +#else + err = wc_ChaCha20Poly1305_UpdateData(&aead, generatedCiphertext, + generatedPlaintext, sizeof(cipher1)); +#endif + err = wc_ChaCha20Poly1305_Final(&aead, generatedAuthTag); + if (err != 0) + return -4546; + err = wc_ChaCha20Poly1305_CheckTag(generatedAuthTag, authTag1); + if (err != 0) + return -4547; + if (XMEMCMP(generatedPlaintext, plaintext1, sizeof(plaintext1))) { + return -4548; + } + + XMEMSET(generatedCiphertext, 0, sizeof(generatedCiphertext)); + XMEMSET(generatedAuthTag, 0, sizeof(generatedAuthTag)); + XMEMSET(generatedPlaintext, 0, sizeof(generatedPlaintext)); + + /* Test 2 - Encrypt */ + err = wc_ChaCha20Poly1305_Init(&aead, key2, iv2, + CHACHA20_POLY1305_AEAD_ENCRYPT); + if (err != 0) + return -4550; + err = wc_ChaCha20Poly1305_UpdateAad(&aead, aad2, sizeof(aad2)); + if (err != 0) + return -4551; +#ifdef TEST_SMALL_CHACHA_CHUNKS + /* test doing data in smaller chunks */ + for (testLen=0; testLen TEST_SMALL_CHACHA_CHUNKS) + dataLen = TEST_SMALL_CHACHA_CHUNKS; + err = wc_ChaCha20Poly1305_UpdateData(&aead, &plaintext2[testLen], + &generatedCiphertext[testLen], dataLen); + if (err != 0) + return -4552; + testLen += dataLen; + } +#else + err = wc_ChaCha20Poly1305_UpdateData(&aead, plaintext2, generatedCiphertext, + sizeof(plaintext2)); +#endif + err = wc_ChaCha20Poly1305_Final(&aead, generatedAuthTag); + if (err != 0) + return -4553; + err = wc_ChaCha20Poly1305_CheckTag(generatedAuthTag, authTag2); + if (err != 0) + return -4554; + if (XMEMCMP(generatedCiphertext, cipher2, sizeof(cipher2))) { + return -4555; + } + + /* Test 2 - Decrypt */ + err = wc_ChaCha20Poly1305_Init(&aead, key2, iv2, + CHACHA20_POLY1305_AEAD_DECRYPT); + if (err != 0) + return -4556; + err = wc_ChaCha20Poly1305_UpdateAad(&aead, aad2, sizeof(aad2)); + if (err != 0) + return -4557; +#ifdef TEST_SMALL_CHACHA_CHUNKS + /* test doing data in smaller chunks */ + for (testLen=0; testLen TEST_SMALL_CHACHA_CHUNKS) + dataLen = TEST_SMALL_CHACHA_CHUNKS; + err = wc_ChaCha20Poly1305_UpdateData(&aead, + &generatedCiphertext[testLen], &generatedPlaintext[testLen], + dataLen); + if (err != 0) + return -4558; + testLen += dataLen; + } +#else + err = wc_ChaCha20Poly1305_UpdateData(&aead, generatedCiphertext, + generatedPlaintext, sizeof(cipher2)); +#endif + err = wc_ChaCha20Poly1305_Final(&aead, generatedAuthTag); + if (err != 0) + return -4559; + err = wc_ChaCha20Poly1305_CheckTag(generatedAuthTag, authTag2); + if (err != 0) + return -4560; + if (XMEMCMP(generatedPlaintext, plaintext2, sizeof(plaintext2))) { + return -4561; + } + return err; } #endif /* HAVE_CHACHA && HAVE_POLY1305 */ @@ -11587,7 +11794,8 @@ int rsa_test(void) #if defined(HAVE_NTRU) RsaKey caKey; #endif -#ifndef NO_ASN +#if !defined(NO_ASN) || !defined(WOLFSSL_RSA_PUBLIC_ONLY) \ + || defined(WOLFSSL_PUBLIC_MP) word32 idx = 0; #endif #if !defined(WOLFSSL_RSA_VERIFY_ONLY) || defined(WOLFSSL_PUBLIC_MP) diff --git a/wolfcrypt/test/test.h b/wolfcrypt/test/test.h index 0cf6a6d7f..7a6fc7c84 100644 --- a/wolfcrypt/test/test.h +++ b/wolfcrypt/test/test.h @@ -1,6 +1,6 @@ /* wolfcrypt/test/test.h * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/wolfcrypt/user-crypto/README.txt b/wolfcrypt/user-crypto/README.txt index 58890157d..00b772f7b 100644 --- a/wolfcrypt/user-crypto/README.txt +++ b/wolfcrypt/user-crypto/README.txt @@ -1,5 +1,5 @@ /* - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/wolfcrypt/user-crypto/include/user_rsa.h b/wolfcrypt/user-crypto/include/user_rsa.h index b097a1226..59fc85d14 100644 --- a/wolfcrypt/user-crypto/include/user_rsa.h +++ b/wolfcrypt/user-crypto/include/user_rsa.h @@ -1,6 +1,6 @@ /* user_rsa.h * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/wolfcrypt/user-crypto/src/rsa.c b/wolfcrypt/user-crypto/src/rsa.c index c72d9f763..ed47441c5 100644 --- a/wolfcrypt/user-crypto/src/rsa.c +++ b/wolfcrypt/user-crypto/src/rsa.c @@ -1,6 +1,6 @@ /* rsa.c * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/wolfssl/callbacks.h b/wolfssl/callbacks.h index 09fac6961..c8801ca06 100644 --- a/wolfssl/callbacks.h +++ b/wolfssl/callbacks.h @@ -1,6 +1,6 @@ /* callbacks.h * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/wolfssl/crl.h b/wolfssl/crl.h index 48b488fbe..363d77cb9 100644 --- a/wolfssl/crl.h +++ b/wolfssl/crl.h @@ -1,6 +1,6 @@ /* crl.h * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/wolfssl/error-ssl.h b/wolfssl/error-ssl.h index 97f0e641f..2327eab3d 100644 --- a/wolfssl/error-ssl.h +++ b/wolfssl/error-ssl.h @@ -1,6 +1,6 @@ /* error-ssl.h * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/wolfssl/internal.h b/wolfssl/internal.h index 23a435cb8..ab76e8ac8 100644 --- a/wolfssl/internal.h +++ b/wolfssl/internal.h @@ -1,6 +1,6 @@ /* internal.h * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/wolfssl/ocsp.h b/wolfssl/ocsp.h index 1174a21bf..5159d4c43 100644 --- a/wolfssl/ocsp.h +++ b/wolfssl/ocsp.h @@ -1,6 +1,6 @@ /* ocsp.h * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/wolfssl/openssl/aes.h b/wolfssl/openssl/aes.h index 37d9d9b1c..de9f5b897 100644 --- a/wolfssl/openssl/aes.h +++ b/wolfssl/openssl/aes.h @@ -1,6 +1,6 @@ /* aes.h * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/wolfssl/openssl/asn1.h b/wolfssl/openssl/asn1.h index fb83ae4f7..841860121 100644 --- a/wolfssl/openssl/asn1.h +++ b/wolfssl/openssl/asn1.h @@ -1,6 +1,6 @@ /* asn1.h * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/wolfssl/openssl/bio.h b/wolfssl/openssl/bio.h index e5fe8de39..9333972c8 100644 --- a/wolfssl/openssl/bio.h +++ b/wolfssl/openssl/bio.h @@ -1,6 +1,6 @@ /* bio.h * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/wolfssl/openssl/bn.h b/wolfssl/openssl/bn.h index 9ca0b1e2e..b786f1ecb 100644 --- a/wolfssl/openssl/bn.h +++ b/wolfssl/openssl/bn.h @@ -1,6 +1,6 @@ /* bn.h * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/wolfssl/openssl/buffer.h b/wolfssl/openssl/buffer.h index 4efd31558..8e0a73000 100644 --- a/wolfssl/openssl/buffer.h +++ b/wolfssl/openssl/buffer.h @@ -1,6 +1,6 @@ /* buffer.h * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/wolfssl/openssl/conf.h b/wolfssl/openssl/conf.h index 12a20c8cf..373239ff6 100644 --- a/wolfssl/openssl/conf.h +++ b/wolfssl/openssl/conf.h @@ -1,6 +1,6 @@ /* conf.h * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/wolfssl/openssl/crypto.h b/wolfssl/openssl/crypto.h index 3eb90e416..03bf41f76 100644 --- a/wolfssl/openssl/crypto.h +++ b/wolfssl/openssl/crypto.h @@ -1,6 +1,6 @@ /* crypto.h * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/wolfssl/openssl/des.h b/wolfssl/openssl/des.h index 8a356e5e8..14d12ec3c 100644 --- a/wolfssl/openssl/des.h +++ b/wolfssl/openssl/des.h @@ -1,6 +1,6 @@ /* des.h * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/wolfssl/openssl/dh.h b/wolfssl/openssl/dh.h index f31c76aaf..f5fe6e838 100644 --- a/wolfssl/openssl/dh.h +++ b/wolfssl/openssl/dh.h @@ -1,6 +1,6 @@ /* dh.h * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/wolfssl/openssl/dsa.h b/wolfssl/openssl/dsa.h index 107bb050c..1c70860f3 100644 --- a/wolfssl/openssl/dsa.h +++ b/wolfssl/openssl/dsa.h @@ -1,6 +1,6 @@ /* dsa.h * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/wolfssl/openssl/ec.h b/wolfssl/openssl/ec.h index 18e3b4e3d..f07210be8 100644 --- a/wolfssl/openssl/ec.h +++ b/wolfssl/openssl/ec.h @@ -1,6 +1,6 @@ /* ec.h * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/wolfssl/openssl/ec25519.h b/wolfssl/openssl/ec25519.h index 17231a57a..180eb8e83 100644 --- a/wolfssl/openssl/ec25519.h +++ b/wolfssl/openssl/ec25519.h @@ -1,6 +1,6 @@ /* ec25519.h * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/wolfssl/openssl/ecdh.h b/wolfssl/openssl/ecdh.h index dfa80547f..7d7aa09ec 100644 --- a/wolfssl/openssl/ecdh.h +++ b/wolfssl/openssl/ecdh.h @@ -1,6 +1,6 @@ /* ecdh.h * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/wolfssl/openssl/ecdsa.h b/wolfssl/openssl/ecdsa.h index 1bcf8f363..db3faf8b3 100644 --- a/wolfssl/openssl/ecdsa.h +++ b/wolfssl/openssl/ecdsa.h @@ -1,6 +1,6 @@ /* ecdsa.h * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/wolfssl/openssl/ed25519.h b/wolfssl/openssl/ed25519.h index ba435bd8f..579c653f6 100644 --- a/wolfssl/openssl/ed25519.h +++ b/wolfssl/openssl/ed25519.h @@ -1,6 +1,6 @@ /* ed25519.h * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/wolfssl/openssl/err.h b/wolfssl/openssl/err.h index dcfdd1553..5c856db99 100644 --- a/wolfssl/openssl/err.h +++ b/wolfssl/openssl/err.h @@ -1,6 +1,6 @@ /* err.h * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/wolfssl/openssl/evp.h b/wolfssl/openssl/evp.h index 291820664..d8c19a31b 100644 --- a/wolfssl/openssl/evp.h +++ b/wolfssl/openssl/evp.h @@ -1,6 +1,6 @@ /* evp.h * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/wolfssl/openssl/hmac.h b/wolfssl/openssl/hmac.h index 7a906170a..6ebd6dca6 100644 --- a/wolfssl/openssl/hmac.h +++ b/wolfssl/openssl/hmac.h @@ -1,6 +1,6 @@ /* hmac.h * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/wolfssl/openssl/md4.h b/wolfssl/openssl/md4.h index 7310a0035..aafe9cc17 100644 --- a/wolfssl/openssl/md4.h +++ b/wolfssl/openssl/md4.h @@ -1,6 +1,6 @@ /* md4.h * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/wolfssl/openssl/md5.h b/wolfssl/openssl/md5.h index cf77bc9fb..49ac1e32f 100644 --- a/wolfssl/openssl/md5.h +++ b/wolfssl/openssl/md5.h @@ -1,6 +1,6 @@ /* md5.h * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/wolfssl/openssl/objects.h b/wolfssl/openssl/objects.h index 01b106746..2c5e85321 100644 --- a/wolfssl/openssl/objects.h +++ b/wolfssl/openssl/objects.h @@ -1,6 +1,6 @@ /* objects.h * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/wolfssl/openssl/ocsp.h b/wolfssl/openssl/ocsp.h index 0a0f27d85..d880f23ca 100644 --- a/wolfssl/openssl/ocsp.h +++ b/wolfssl/openssl/ocsp.h @@ -1,6 +1,6 @@ /* ocsp.h * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/wolfssl/openssl/opensslv.h b/wolfssl/openssl/opensslv.h index 4bc495eea..59f7787c5 100644 --- a/wolfssl/openssl/opensslv.h +++ b/wolfssl/openssl/opensslv.h @@ -1,6 +1,6 @@ /* opensslv.h * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/wolfssl/openssl/ossl_typ.h b/wolfssl/openssl/ossl_typ.h index 9966b8932..5e90ffe0c 100644 --- a/wolfssl/openssl/ossl_typ.h +++ b/wolfssl/openssl/ossl_typ.h @@ -1,6 +1,6 @@ /* ossl_typ.h * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/wolfssl/openssl/pem.h b/wolfssl/openssl/pem.h index c8f57b47a..3e9317eac 100644 --- a/wolfssl/openssl/pem.h +++ b/wolfssl/openssl/pem.h @@ -1,6 +1,6 @@ /* pem.h * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/wolfssl/openssl/pkcs12.h b/wolfssl/openssl/pkcs12.h index 7a751e7df..bcd994c57 100644 --- a/wolfssl/openssl/pkcs12.h +++ b/wolfssl/openssl/pkcs12.h @@ -1,6 +1,6 @@ /* pkcs12.h * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/wolfssl/openssl/pkcs7.h b/wolfssl/openssl/pkcs7.h index 401ce4e2d..94ddf2494 100644 --- a/wolfssl/openssl/pkcs7.h +++ b/wolfssl/openssl/pkcs7.h @@ -1,6 +1,6 @@ /* pkcs7.h * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/wolfssl/openssl/rand.h b/wolfssl/openssl/rand.h index 382750497..4b826f8f2 100644 --- a/wolfssl/openssl/rand.h +++ b/wolfssl/openssl/rand.h @@ -1,6 +1,6 @@ /* rand.h * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/wolfssl/openssl/rc4.h b/wolfssl/openssl/rc4.h index 7c6c7d6be..fc11e5a12 100644 --- a/wolfssl/openssl/rc4.h +++ b/wolfssl/openssl/rc4.h @@ -1,6 +1,6 @@ /* rc4.h * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/wolfssl/openssl/ripemd.h b/wolfssl/openssl/ripemd.h index db83e75f6..3f1d26848 100644 --- a/wolfssl/openssl/ripemd.h +++ b/wolfssl/openssl/ripemd.h @@ -1,6 +1,6 @@ /* ripemd.h * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/wolfssl/openssl/rsa.h b/wolfssl/openssl/rsa.h index 6d956f402..995c16f65 100644 --- a/wolfssl/openssl/rsa.h +++ b/wolfssl/openssl/rsa.h @@ -1,6 +1,6 @@ /* rsa.h * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/wolfssl/openssl/sha.h b/wolfssl/openssl/sha.h index 6eab1d3bd..e3a814717 100644 --- a/wolfssl/openssl/sha.h +++ b/wolfssl/openssl/sha.h @@ -1,6 +1,6 @@ /* sha.h * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/wolfssl/openssl/ssl.h b/wolfssl/openssl/ssl.h index b2aafb9ad..564e6660e 100644 --- a/wolfssl/openssl/ssl.h +++ b/wolfssl/openssl/ssl.h @@ -1,6 +1,6 @@ /* ssl.h * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/wolfssl/openssl/stack.h b/wolfssl/openssl/stack.h index 84bcbae88..13e2c5d45 100644 --- a/wolfssl/openssl/stack.h +++ b/wolfssl/openssl/stack.h @@ -1,6 +1,6 @@ /* stack.h * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/wolfssl/openssl/tls1.h b/wolfssl/openssl/tls1.h index 074c85416..b73a8b0a2 100644 --- a/wolfssl/openssl/tls1.h +++ b/wolfssl/openssl/tls1.h @@ -1,6 +1,6 @@ /* tls1.h * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/wolfssl/openssl/x509v3.h b/wolfssl/openssl/x509v3.h index e28783465..782578bdd 100644 --- a/wolfssl/openssl/x509v3.h +++ b/wolfssl/openssl/x509v3.h @@ -1,6 +1,6 @@ /* x509v3.h * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/wolfssl/options.h.in b/wolfssl/options.h.in index 29fa97e73..0a5f45c23 100644 --- a/wolfssl/options.h.in +++ b/wolfssl/options.h.in @@ -1,6 +1,6 @@ /* options.h.in * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/wolfssl/sniffer.h b/wolfssl/sniffer.h index 6d6e155f8..99ec96084 100644 --- a/wolfssl/sniffer.h +++ b/wolfssl/sniffer.h @@ -1,6 +1,6 @@ /* sniffer.h * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/wolfssl/sniffer_error.h b/wolfssl/sniffer_error.h index a63e1d015..d4e836927 100644 --- a/wolfssl/sniffer_error.h +++ b/wolfssl/sniffer_error.h @@ -1,6 +1,6 @@ /* sniffer_error.h * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/wolfssl/ssl.h b/wolfssl/ssl.h index ed75b78e4..f703fa1db 100644 --- a/wolfssl/ssl.h +++ b/wolfssl/ssl.h @@ -1,6 +1,6 @@ /* ssl.h * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/wolfssl/version.h b/wolfssl/version.h index 0bc39965e..4fd4c4f34 100644 --- a/wolfssl/version.h +++ b/wolfssl/version.h @@ -1,6 +1,6 @@ /* wolfssl_version.h.in * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/wolfssl/version.h.in b/wolfssl/version.h.in index 099afb2fa..0a25a3bf6 100644 --- a/wolfssl/version.h.in +++ b/wolfssl/version.h.in @@ -1,6 +1,6 @@ /* wolfssl_version.h.in * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/wolfssl/wolfcrypt/aes.h b/wolfssl/wolfcrypt/aes.h index a9547cff9..b0f8f92a1 100644 --- a/wolfssl/wolfcrypt/aes.h +++ b/wolfssl/wolfcrypt/aes.h @@ -1,6 +1,6 @@ /* aes.h * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/wolfssl/wolfcrypt/arc4.h b/wolfssl/wolfcrypt/arc4.h index 3a7609936..bcdc9076c 100644 --- a/wolfssl/wolfcrypt/arc4.h +++ b/wolfssl/wolfcrypt/arc4.h @@ -1,6 +1,6 @@ /* arc4.h * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/wolfssl/wolfcrypt/asn.h b/wolfssl/wolfcrypt/asn.h index d043cc639..04c48e81c 100644 --- a/wolfssl/wolfcrypt/asn.h +++ b/wolfssl/wolfcrypt/asn.h @@ -1,6 +1,6 @@ /* asn.h * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/wolfssl/wolfcrypt/asn_public.h b/wolfssl/wolfcrypt/asn_public.h index 152214431..77dc38012 100644 --- a/wolfssl/wolfcrypt/asn_public.h +++ b/wolfssl/wolfcrypt/asn_public.h @@ -1,6 +1,6 @@ /* asn_public.h * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/wolfssl/wolfcrypt/blake2-impl.h b/wolfssl/wolfcrypt/blake2-impl.h index 6c43d8135..cb4df286c 100644 --- a/wolfssl/wolfcrypt/blake2-impl.h +++ b/wolfssl/wolfcrypt/blake2-impl.h @@ -12,7 +12,7 @@ */ /* blake2-impl.h * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/wolfssl/wolfcrypt/blake2-int.h b/wolfssl/wolfcrypt/blake2-int.h index a63784cdc..6f5610dc7 100644 --- a/wolfssl/wolfcrypt/blake2-int.h +++ b/wolfssl/wolfcrypt/blake2-int.h @@ -12,7 +12,7 @@ */ /* blake2-int.h * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/wolfssl/wolfcrypt/blake2.h b/wolfssl/wolfcrypt/blake2.h index bf34f31aa..bc80d7166 100644 --- a/wolfssl/wolfcrypt/blake2.h +++ b/wolfssl/wolfcrypt/blake2.h @@ -1,6 +1,6 @@ /* blake2.h * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/wolfssl/wolfcrypt/camellia.h b/wolfssl/wolfcrypt/camellia.h index 612a46440..4b86e6c13 100644 --- a/wolfssl/wolfcrypt/camellia.h +++ b/wolfssl/wolfcrypt/camellia.h @@ -27,7 +27,7 @@ /* camellia.h * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/wolfssl/wolfcrypt/chacha.h b/wolfssl/wolfcrypt/chacha.h index 274a2d928..3cfd73106 100644 --- a/wolfssl/wolfcrypt/chacha.h +++ b/wolfssl/wolfcrypt/chacha.h @@ -1,6 +1,6 @@ /* chacha.h * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/wolfssl/wolfcrypt/chacha20_poly1305.h b/wolfssl/wolfcrypt/chacha20_poly1305.h index aef72540e..7d2b1aa2a 100644 --- a/wolfssl/wolfcrypt/chacha20_poly1305.h +++ b/wolfssl/wolfcrypt/chacha20_poly1305.h @@ -1,6 +1,6 @@ /* chacha20_poly1305.h * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * @@ -33,6 +33,8 @@ #define WOLF_CRYPT_CHACHA20_POLY1305_H #include +#include +#include #if defined(HAVE_CHACHA) && defined(HAVE_POLY1305) @@ -45,18 +47,40 @@ #define CHACHA20_POLY1305_AEAD_AUTHTAG_SIZE 16 enum { - CHACHA20_POLY_1305_ENC_TYPE = 8 /* cipher unique type */ + CHACHA20_POLY_1305_ENC_TYPE = 8, /* cipher unique type */ + + /* AEAD Cipher Direction */ + CHACHA20_POLY1305_AEAD_DECRYPT = 0, + CHACHA20_POLY1305_AEAD_ENCRYPT = 1, + + /* AEAD State */ + CHACHA20_POLY1305_STATE_INIT = 0, + CHACHA20_POLY1305_STATE_READY = 1, + CHACHA20_POLY1305_STATE_AAD = 2, + CHACHA20_POLY1305_STATE_DATA = 3, }; - /* - * The IV for this implementation is 96 bits to give the most flexibility. - * - * Some protocols may have unique per-invocation inputs that are not - * 96-bit in length. For example, IPsec may specify a 64-bit nonce. In - * such a case, it is up to the protocol document to define how to - * transform the protocol nonce into a 96-bit nonce, for example by - * concatenating a constant value. - */ +typedef struct ChaChaPoly_Aead { + ChaCha chacha; + Poly1305 poly; + + word32 aadLen; + word32 dataLen; + + byte state; + byte isEncrypt:1; +} ChaChaPoly_Aead; + + +/* + * The IV for this implementation is 96 bits to give the most flexibility. + * + * Some protocols may have unique per-invocation inputs that are not + * 96-bit in length. For example, IPsec may specify a 64-bit nonce. In + * such a case, it is up to the protocol document to define how to + * transform the protocol nonce into a 96-bit nonce, for example by + * concatenating a constant value. + */ WOLFSSL_API int wc_ChaCha20Poly1305_Encrypt( @@ -76,6 +100,27 @@ int wc_ChaCha20Poly1305_Decrypt( const byte inAuthTag[CHACHA20_POLY1305_AEAD_AUTHTAG_SIZE], byte* outPlaintext); +WOLFSSL_API +int wc_ChaCha20Poly1305_CheckTag( + const byte authTag[CHACHA20_POLY1305_AEAD_AUTHTAG_SIZE], + const byte authTagChk[CHACHA20_POLY1305_AEAD_AUTHTAG_SIZE]); + + + +/* Implementation of AEAD, which includes support for adding + data, then final calculation of authentication tag */ +WOLFSSL_API int wc_ChaCha20Poly1305_Init(ChaChaPoly_Aead* aead, + const byte inKey[CHACHA20_POLY1305_AEAD_KEYSIZE], + const byte inIV[CHACHA20_POLY1305_AEAD_IV_SIZE], + int isEncrypt); +WOLFSSL_API int wc_ChaCha20Poly1305_UpdateAad(ChaChaPoly_Aead* aead, + const byte* inAAD, word32 inAADLen); +WOLFSSL_API int wc_ChaCha20Poly1305_UpdateData(ChaChaPoly_Aead* aead, + const byte* inData, byte* outData, word32 dataLen); +WOLFSSL_API int wc_ChaCha20Poly1305_Final(ChaChaPoly_Aead* aead, + byte outAuthTag[CHACHA20_POLY1305_AEAD_AUTHTAG_SIZE]); + + #ifdef __cplusplus } /* extern "C" */ #endif diff --git a/wolfssl/wolfcrypt/cmac.h b/wolfssl/wolfcrypt/cmac.h index e361651e4..80f13ce97 100644 --- a/wolfssl/wolfcrypt/cmac.h +++ b/wolfssl/wolfcrypt/cmac.h @@ -1,6 +1,6 @@ /* cmac.h * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/wolfssl/wolfcrypt/coding.h b/wolfssl/wolfcrypt/coding.h index 07d193b46..88b1caf94 100644 --- a/wolfssl/wolfcrypt/coding.h +++ b/wolfssl/wolfcrypt/coding.h @@ -1,6 +1,6 @@ /* coding.h * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/wolfssl/wolfcrypt/compress.h b/wolfssl/wolfcrypt/compress.h index 620f775c7..f324a8350 100644 --- a/wolfssl/wolfcrypt/compress.h +++ b/wolfssl/wolfcrypt/compress.h @@ -1,6 +1,6 @@ /* compress.h * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/wolfssl/wolfcrypt/cpuid.h b/wolfssl/wolfcrypt/cpuid.h index 4452abc45..3c3d1c294 100644 --- a/wolfssl/wolfcrypt/cpuid.h +++ b/wolfssl/wolfcrypt/cpuid.h @@ -1,6 +1,6 @@ /* cpuid.h * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/wolfssl/wolfcrypt/cryptocb.h b/wolfssl/wolfcrypt/cryptocb.h index 389c2d0b7..eb42d2675 100644 --- a/wolfssl/wolfcrypt/cryptocb.h +++ b/wolfssl/wolfcrypt/cryptocb.h @@ -1,6 +1,6 @@ /* cryptocb.h * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/wolfssl/wolfcrypt/curve25519.h b/wolfssl/wolfcrypt/curve25519.h index f4ebf2156..388f98010 100644 --- a/wolfssl/wolfcrypt/curve25519.h +++ b/wolfssl/wolfcrypt/curve25519.h @@ -1,6 +1,6 @@ /* curve25519.h * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/wolfssl/wolfcrypt/des3.h b/wolfssl/wolfcrypt/des3.h index b6ac1ecff..705b59e63 100644 --- a/wolfssl/wolfcrypt/des3.h +++ b/wolfssl/wolfcrypt/des3.h @@ -1,6 +1,6 @@ /* des3.h * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/wolfssl/wolfcrypt/dh.h b/wolfssl/wolfcrypt/dh.h index 0d1b1e3ab..d4d6c1398 100644 --- a/wolfssl/wolfcrypt/dh.h +++ b/wolfssl/wolfcrypt/dh.h @@ -1,6 +1,6 @@ /* dh.h * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/wolfssl/wolfcrypt/dsa.h b/wolfssl/wolfcrypt/dsa.h index 657dc0ba6..d56e4852e 100644 --- a/wolfssl/wolfcrypt/dsa.h +++ b/wolfssl/wolfcrypt/dsa.h @@ -1,6 +1,6 @@ /* dsa.h * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/wolfssl/wolfcrypt/ecc.h b/wolfssl/wolfcrypt/ecc.h index 48031fdb5..ba263deae 100644 --- a/wolfssl/wolfcrypt/ecc.h +++ b/wolfssl/wolfcrypt/ecc.h @@ -1,6 +1,6 @@ /* ecc.h * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/wolfssl/wolfcrypt/ed25519.h b/wolfssl/wolfcrypt/ed25519.h index de7c08723..f5487ade5 100644 --- a/wolfssl/wolfcrypt/ed25519.h +++ b/wolfssl/wolfcrypt/ed25519.h @@ -1,6 +1,6 @@ /* ed25519.h * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/wolfssl/wolfcrypt/error-crypt.h b/wolfssl/wolfcrypt/error-crypt.h index a8b8e5786..f668ae050 100644 --- a/wolfssl/wolfcrypt/error-crypt.h +++ b/wolfssl/wolfcrypt/error-crypt.h @@ -1,6 +1,6 @@ /* error-crypt.h * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/wolfssl/wolfcrypt/fe_operations.h b/wolfssl/wolfcrypt/fe_operations.h index 61d17bb3f..336da81c6 100644 --- a/wolfssl/wolfcrypt/fe_operations.h +++ b/wolfssl/wolfcrypt/fe_operations.h @@ -1,6 +1,6 @@ /* fe_operations.h * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/wolfssl/wolfcrypt/fips_test.h b/wolfssl/wolfcrypt/fips_test.h index 135840057..a78b074c4 100644 --- a/wolfssl/wolfcrypt/fips_test.h +++ b/wolfssl/wolfcrypt/fips_test.h @@ -1,6 +1,6 @@ /* fips_test.h * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/wolfssl/wolfcrypt/ge_operations.h b/wolfssl/wolfcrypt/ge_operations.h index 69de2fc8c..9d89c0ac7 100644 --- a/wolfssl/wolfcrypt/ge_operations.h +++ b/wolfssl/wolfcrypt/ge_operations.h @@ -1,6 +1,6 @@ /* ge_operations.h * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/wolfssl/wolfcrypt/hash.h b/wolfssl/wolfcrypt/hash.h index 4115d60d9..29c5c0bde 100644 --- a/wolfssl/wolfcrypt/hash.h +++ b/wolfssl/wolfcrypt/hash.h @@ -1,6 +1,6 @@ /* hash.h * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/wolfssl/wolfcrypt/hc128.h b/wolfssl/wolfcrypt/hc128.h index 7b81f2e38..19906be72 100644 --- a/wolfssl/wolfcrypt/hc128.h +++ b/wolfssl/wolfcrypt/hc128.h @@ -1,6 +1,6 @@ /* hc128.h * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/wolfssl/wolfcrypt/hmac.h b/wolfssl/wolfcrypt/hmac.h index 02a758668..f6744db64 100644 --- a/wolfssl/wolfcrypt/hmac.h +++ b/wolfssl/wolfcrypt/hmac.h @@ -1,6 +1,6 @@ /* hmac.h * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/wolfssl/wolfcrypt/idea.h b/wolfssl/wolfcrypt/idea.h index 706ac3cea..8dbffb237 100644 --- a/wolfssl/wolfcrypt/idea.h +++ b/wolfssl/wolfcrypt/idea.h @@ -1,6 +1,6 @@ /* idea.h * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/wolfssl/wolfcrypt/integer.h b/wolfssl/wolfcrypt/integer.h index 406b34eb7..63a3cb5e1 100644 --- a/wolfssl/wolfcrypt/integer.h +++ b/wolfssl/wolfcrypt/integer.h @@ -1,6 +1,6 @@ /* integer.h * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/wolfssl/wolfcrypt/logging.h b/wolfssl/wolfcrypt/logging.h index 25ae99825..ea1d88087 100644 --- a/wolfssl/wolfcrypt/logging.h +++ b/wolfssl/wolfcrypt/logging.h @@ -1,6 +1,6 @@ /* logging.h * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/wolfssl/wolfcrypt/md2.h b/wolfssl/wolfcrypt/md2.h index 51b261a13..565385e73 100644 --- a/wolfssl/wolfcrypt/md2.h +++ b/wolfssl/wolfcrypt/md2.h @@ -1,6 +1,6 @@ /* md2.h * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/wolfssl/wolfcrypt/md4.h b/wolfssl/wolfcrypt/md4.h index 8b79efe76..1344f8b88 100644 --- a/wolfssl/wolfcrypt/md4.h +++ b/wolfssl/wolfcrypt/md4.h @@ -1,6 +1,6 @@ /* md4.h * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/wolfssl/wolfcrypt/md5.h b/wolfssl/wolfcrypt/md5.h index dcb22c55d..e2ee13c32 100644 --- a/wolfssl/wolfcrypt/md5.h +++ b/wolfssl/wolfcrypt/md5.h @@ -1,6 +1,6 @@ /* md5.h * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/wolfssl/wolfcrypt/mem_track.h b/wolfssl/wolfcrypt/mem_track.h index 975479733..d33e90e60 100644 --- a/wolfssl/wolfcrypt/mem_track.h +++ b/wolfssl/wolfcrypt/mem_track.h @@ -1,6 +1,6 @@ /* mem_track.h * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/wolfssl/wolfcrypt/memory.h b/wolfssl/wolfcrypt/memory.h index 540c98350..0cf73aa48 100644 --- a/wolfssl/wolfcrypt/memory.h +++ b/wolfssl/wolfcrypt/memory.h @@ -1,6 +1,6 @@ /* memory.h * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/wolfssl/wolfcrypt/misc.h b/wolfssl/wolfcrypt/misc.h index d4dc7a18f..45fa699af 100644 --- a/wolfssl/wolfcrypt/misc.h +++ b/wolfssl/wolfcrypt/misc.h @@ -1,6 +1,6 @@ /* misc.h * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/wolfssl/wolfcrypt/mpi_class.h b/wolfssl/wolfcrypt/mpi_class.h index 30f0a9fce..ae2fa830c 100644 --- a/wolfssl/wolfcrypt/mpi_class.h +++ b/wolfssl/wolfcrypt/mpi_class.h @@ -1,6 +1,6 @@ /* mpi_class.h * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/wolfssl/wolfcrypt/mpi_superclass.h b/wolfssl/wolfcrypt/mpi_superclass.h index 73472684d..186ac7505 100644 --- a/wolfssl/wolfcrypt/mpi_superclass.h +++ b/wolfssl/wolfcrypt/mpi_superclass.h @@ -1,6 +1,6 @@ /* mpi_superclass.h * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/wolfssl/wolfcrypt/pkcs11.h b/wolfssl/wolfcrypt/pkcs11.h index 0e5e7b213..93e1af187 100644 --- a/wolfssl/wolfcrypt/pkcs11.h +++ b/wolfssl/wolfcrypt/pkcs11.h @@ -1,6 +1,6 @@ /* pkcs11.h * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/wolfssl/wolfcrypt/pkcs12.h b/wolfssl/wolfcrypt/pkcs12.h index da9d4f02e..7082b6279 100644 --- a/wolfssl/wolfcrypt/pkcs12.h +++ b/wolfssl/wolfcrypt/pkcs12.h @@ -1,6 +1,6 @@ /* pkcs12.h * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/wolfssl/wolfcrypt/pkcs7.h b/wolfssl/wolfcrypt/pkcs7.h index 6d327d447..840d94281 100644 --- a/wolfssl/wolfcrypt/pkcs7.h +++ b/wolfssl/wolfcrypt/pkcs7.h @@ -1,6 +1,6 @@ /* pkcs7.h * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/wolfssl/wolfcrypt/poly1305.h b/wolfssl/wolfcrypt/poly1305.h index 0f81ca0e7..981ce49a1 100644 --- a/wolfssl/wolfcrypt/poly1305.h +++ b/wolfssl/wolfcrypt/poly1305.h @@ -1,6 +1,6 @@ /* poly1305.h * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * @@ -112,6 +112,10 @@ WOLFSSL_API int wc_Poly1305SetKey(Poly1305* poly1305, const byte* key, word32 kySz); WOLFSSL_API int wc_Poly1305Update(Poly1305* poly1305, const byte*, word32); WOLFSSL_API int wc_Poly1305Final(Poly1305* poly1305, byte* tag); + +/* AEAD Functions */ +WOLFSSL_API int wc_Poly1305_Pad(Poly1305* ctx, word32 lenToPad); +WOLFSSL_API int wc_Poly1305_EncodeSizes(Poly1305* ctx, word32 aadSz, word32 dataSz); WOLFSSL_API int wc_Poly1305_MAC(Poly1305* ctx, byte* additional, word32 addSz, byte* input, word32 sz, byte* tag, word32 tagSz); @@ -124,4 +128,3 @@ void poly1305_blocks(Poly1305* ctx, const unsigned char *m, #endif /* HAVE_POLY1305 */ #endif /* WOLF_CRYPT_POLY1305_H */ - diff --git a/wolfssl/wolfcrypt/port/Espressif/esp32-crypt.h b/wolfssl/wolfcrypt/port/Espressif/esp32-crypt.h index 433066af1..0e342db3a 100644 --- a/wolfssl/wolfcrypt/port/Espressif/esp32-crypt.h +++ b/wolfssl/wolfcrypt/port/Espressif/esp32-crypt.h @@ -1,6 +1,6 @@ /* esp32-crypt.h * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/wolfssl/wolfcrypt/port/Renesas/renesas-tsip-crypt.h b/wolfssl/wolfcrypt/port/Renesas/renesas-tsip-crypt.h index 7b6068172..aed404d48 100644 --- a/wolfssl/wolfcrypt/port/Renesas/renesas-tsip-crypt.h +++ b/wolfssl/wolfcrypt/port/Renesas/renesas-tsip-crypt.h @@ -1,6 +1,6 @@ /* renesas-tsip-crypt.h * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/wolfssl/wolfcrypt/port/af_alg/afalg_hash.h b/wolfssl/wolfcrypt/port/af_alg/afalg_hash.h index 7919451ca..bd02913e2 100644 --- a/wolfssl/wolfcrypt/port/af_alg/afalg_hash.h +++ b/wolfssl/wolfcrypt/port/af_alg/afalg_hash.h @@ -1,6 +1,6 @@ /* afalg_hash.h * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/wolfssl/wolfcrypt/port/af_alg/wc_afalg.h b/wolfssl/wolfcrypt/port/af_alg/wc_afalg.h index 2e455562f..d9f5b7155 100644 --- a/wolfssl/wolfcrypt/port/af_alg/wc_afalg.h +++ b/wolfssl/wolfcrypt/port/af_alg/wc_afalg.h @@ -1,6 +1,6 @@ /* wc_afalg.h * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/wolfssl/wolfcrypt/port/arm/cryptoCell.h b/wolfssl/wolfcrypt/port/arm/cryptoCell.h index ac92606ce..5ca2d8c19 100644 --- a/wolfssl/wolfcrypt/port/arm/cryptoCell.h +++ b/wolfssl/wolfcrypt/port/arm/cryptoCell.h @@ -1,6 +1,6 @@ /* cryptoCell.h * - * Copyright (C) 2019 wolfSSL Inc. + * Copyright (C) 2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/wolfssl/wolfcrypt/port/atmel/atmel.h b/wolfssl/wolfcrypt/port/atmel/atmel.h index 6413647e8..70035130c 100644 --- a/wolfssl/wolfcrypt/port/atmel/atmel.h +++ b/wolfssl/wolfcrypt/port/atmel/atmel.h @@ -1,6 +1,6 @@ /* atmel.h * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/wolfssl/wolfcrypt/port/caam/caam_driver.h b/wolfssl/wolfcrypt/port/caam/caam_driver.h index f15bf50e7..cac1742c0 100644 --- a/wolfssl/wolfcrypt/port/caam/caam_driver.h +++ b/wolfssl/wolfcrypt/port/caam/caam_driver.h @@ -1,6 +1,6 @@ /* caam_driver.h * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/wolfssl/wolfcrypt/port/caam/wolfcaam.h b/wolfssl/wolfcrypt/port/caam/wolfcaam.h index 3329b68f4..8c39605d7 100644 --- a/wolfssl/wolfcrypt/port/caam/wolfcaam.h +++ b/wolfssl/wolfcrypt/port/caam/wolfcaam.h @@ -1,6 +1,6 @@ /* wolfcaam.h * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/wolfssl/wolfcrypt/port/caam/wolfcaam_sha.h b/wolfssl/wolfcrypt/port/caam/wolfcaam_sha.h index ddc451b60..9f5eaf8b5 100644 --- a/wolfssl/wolfcrypt/port/caam/wolfcaam_sha.h +++ b/wolfssl/wolfcrypt/port/caam/wolfcaam_sha.h @@ -1,6 +1,6 @@ /* wolfcaam_sha.h * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/wolfssl/wolfcrypt/port/cavium/cavium_octeon_sync.h b/wolfssl/wolfcrypt/port/cavium/cavium_octeon_sync.h index 8e28477d0..f7914b8e7 100644 --- a/wolfssl/wolfcrypt/port/cavium/cavium_octeon_sync.h +++ b/wolfssl/wolfcrypt/port/cavium/cavium_octeon_sync.h @@ -1,6 +1,6 @@ /* cavium_octeon_sync.h * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. (formerly known as CyaSSL) * diff --git a/wolfssl/wolfcrypt/port/devcrypto/wc_devcrypto.h b/wolfssl/wolfcrypt/port/devcrypto/wc_devcrypto.h index 6639af088..c8ddbe7b9 100644 --- a/wolfssl/wolfcrypt/port/devcrypto/wc_devcrypto.h +++ b/wolfssl/wolfcrypt/port/devcrypto/wc_devcrypto.h @@ -1,6 +1,6 @@ /* wc_devcrypto.h * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/wolfssl/wolfcrypt/port/intel/quickassist_sync.h b/wolfssl/wolfcrypt/port/intel/quickassist_sync.h index ff87b2ac3..8eb9421f9 100644 --- a/wolfssl/wolfcrypt/port/intel/quickassist_sync.h +++ b/wolfssl/wolfcrypt/port/intel/quickassist_sync.h @@ -1,6 +1,6 @@ /* quickassist_sync.h * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. (formerly known as CyaSSL) * diff --git a/wolfssl/wolfcrypt/port/nrf51.h b/wolfssl/wolfcrypt/port/nrf51.h index d8fe3bd00..b18b0400a 100644 --- a/wolfssl/wolfcrypt/port/nrf51.h +++ b/wolfssl/wolfcrypt/port/nrf51.h @@ -1,6 +1,6 @@ /* nrf51.h * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/wolfssl/wolfcrypt/port/nxp/ksdk_port.h b/wolfssl/wolfcrypt/port/nxp/ksdk_port.h index 001ec6791..749a3eeb5 100644 --- a/wolfssl/wolfcrypt/port/nxp/ksdk_port.h +++ b/wolfssl/wolfcrypt/port/nxp/ksdk_port.h @@ -1,6 +1,6 @@ /* ksdk_port.h * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/wolfssl/wolfcrypt/port/pic32/pic32mz-crypt.h b/wolfssl/wolfcrypt/port/pic32/pic32mz-crypt.h index fd481e23f..bb288c777 100644 --- a/wolfssl/wolfcrypt/port/pic32/pic32mz-crypt.h +++ b/wolfssl/wolfcrypt/port/pic32/pic32mz-crypt.h @@ -1,6 +1,6 @@ /* pic32mz-crypt.h * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/wolfssl/wolfcrypt/port/st/stm32.h b/wolfssl/wolfcrypt/port/st/stm32.h index 8fa16dbbb..4b461a113 100644 --- a/wolfssl/wolfcrypt/port/st/stm32.h +++ b/wolfssl/wolfcrypt/port/st/stm32.h @@ -1,6 +1,6 @@ /* stm32.h * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/wolfssl/wolfcrypt/port/st/stsafe.h b/wolfssl/wolfcrypt/port/st/stsafe.h index e7c451d90..ae7cde9ae 100644 --- a/wolfssl/wolfcrypt/port/st/stsafe.h +++ b/wolfssl/wolfcrypt/port/st/stsafe.h @@ -1,6 +1,6 @@ /* stsafe.h * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/wolfssl/wolfcrypt/port/ti/ti-ccm.h b/wolfssl/wolfcrypt/port/ti/ti-ccm.h index f81cbe45f..f5d71fca1 100644 --- a/wolfssl/wolfcrypt/port/ti/ti-ccm.h +++ b/wolfssl/wolfcrypt/port/ti/ti-ccm.h @@ -1,6 +1,6 @@ /* port/ti/ti_ccm.c * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/wolfssl/wolfcrypt/port/ti/ti-hash.h b/wolfssl/wolfcrypt/port/ti/ti-hash.h index 214541aed..1c212458c 100644 --- a/wolfssl/wolfcrypt/port/ti/ti-hash.h +++ b/wolfssl/wolfcrypt/port/ti/ti-hash.h @@ -1,6 +1,6 @@ /* port/ti/ti-hash.h * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/wolfssl/wolfcrypt/port/xilinx/xil-sha3.h b/wolfssl/wolfcrypt/port/xilinx/xil-sha3.h index 0de69bb38..47b462424 100644 --- a/wolfssl/wolfcrypt/port/xilinx/xil-sha3.h +++ b/wolfssl/wolfcrypt/port/xilinx/xil-sha3.h @@ -1,6 +1,6 @@ /* xil-sha3.h * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/wolfssl/wolfcrypt/pwdbased.h b/wolfssl/wolfcrypt/pwdbased.h index 7d79e3b60..13860fecb 100644 --- a/wolfssl/wolfcrypt/pwdbased.h +++ b/wolfssl/wolfcrypt/pwdbased.h @@ -1,6 +1,6 @@ /* pwdbased.h * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/wolfssl/wolfcrypt/rabbit.h b/wolfssl/wolfcrypt/rabbit.h index 0064c452d..20c269398 100644 --- a/wolfssl/wolfcrypt/rabbit.h +++ b/wolfssl/wolfcrypt/rabbit.h @@ -1,6 +1,6 @@ /* rabbit.h * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/wolfssl/wolfcrypt/random.h b/wolfssl/wolfcrypt/random.h index e6ecf19a3..13be76dd3 100644 --- a/wolfssl/wolfcrypt/random.h +++ b/wolfssl/wolfcrypt/random.h @@ -1,6 +1,6 @@ /* random.h * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/wolfssl/wolfcrypt/ripemd.h b/wolfssl/wolfcrypt/ripemd.h index cc9f130e9..9368648de 100644 --- a/wolfssl/wolfcrypt/ripemd.h +++ b/wolfssl/wolfcrypt/ripemd.h @@ -1,6 +1,6 @@ /* ripemd.h * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/wolfssl/wolfcrypt/rsa.h b/wolfssl/wolfcrypt/rsa.h index d1c60eab2..f51484f53 100644 --- a/wolfssl/wolfcrypt/rsa.h +++ b/wolfssl/wolfcrypt/rsa.h @@ -1,6 +1,6 @@ /* rsa.h * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/wolfssl/wolfcrypt/selftest.h b/wolfssl/wolfcrypt/selftest.h index 3449364f2..826b90d98 100644 --- a/wolfssl/wolfcrypt/selftest.h +++ b/wolfssl/wolfcrypt/selftest.h @@ -1,6 +1,6 @@ /* selftest.h * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/wolfssl/wolfcrypt/settings.h b/wolfssl/wolfcrypt/settings.h index e59129909..1ea96c7f5 100644 --- a/wolfssl/wolfcrypt/settings.h +++ b/wolfssl/wolfcrypt/settings.h @@ -1,6 +1,6 @@ /* settings.h * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/wolfssl/wolfcrypt/sha.h b/wolfssl/wolfcrypt/sha.h index e2226542b..0b7f65404 100644 --- a/wolfssl/wolfcrypt/sha.h +++ b/wolfssl/wolfcrypt/sha.h @@ -1,6 +1,6 @@ /* sha.h * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/wolfssl/wolfcrypt/sha256.h b/wolfssl/wolfcrypt/sha256.h index 1d84a8481..798f309d1 100644 --- a/wolfssl/wolfcrypt/sha256.h +++ b/wolfssl/wolfcrypt/sha256.h @@ -1,6 +1,6 @@ /* sha256.h * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/wolfssl/wolfcrypt/sha3.h b/wolfssl/wolfcrypt/sha3.h index e3dff986a..1663fbc6f 100644 --- a/wolfssl/wolfcrypt/sha3.h +++ b/wolfssl/wolfcrypt/sha3.h @@ -1,6 +1,6 @@ /* sha3.h * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/wolfssl/wolfcrypt/sha512.h b/wolfssl/wolfcrypt/sha512.h index e80b56712..3aac94852 100644 --- a/wolfssl/wolfcrypt/sha512.h +++ b/wolfssl/wolfcrypt/sha512.h @@ -1,6 +1,6 @@ /* sha512.h * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/wolfssl/wolfcrypt/signature.h b/wolfssl/wolfcrypt/signature.h index fe3b6a8e1..afaf2ec6c 100644 --- a/wolfssl/wolfcrypt/signature.h +++ b/wolfssl/wolfcrypt/signature.h @@ -1,6 +1,6 @@ /* signature.h * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/wolfssl/wolfcrypt/sp.h b/wolfssl/wolfcrypt/sp.h index 2e8fbe7f1..a71ef9a49 100644 --- a/wolfssl/wolfcrypt/sp.h +++ b/wolfssl/wolfcrypt/sp.h @@ -1,6 +1,6 @@ /* sp.h * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/wolfssl/wolfcrypt/sp_int.h b/wolfssl/wolfcrypt/sp_int.h index fec170f92..fef9dd4ab 100644 --- a/wolfssl/wolfcrypt/sp_int.h +++ b/wolfssl/wolfcrypt/sp_int.h @@ -1,6 +1,6 @@ /* sp_int.h * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * @@ -102,6 +102,8 @@ #endif #endif +#define SP_MASK (sp_digit)(-1) + #ifdef WOLFSSL_SP_MATH #include @@ -156,8 +158,8 @@ typedef struct sp_int { #endif } sp_int; -typedef sp_int mp_int; -typedef sp_digit mp_digit; +typedef sp_int mp_int; +typedef sp_int_digit mp_digit; #include @@ -189,6 +191,7 @@ MP_API int sp_lshd(sp_int* a, int s); MP_API int sp_add(sp_int* a, sp_int* b, sp_int* r); MP_API int sp_set_int(sp_int* a, unsigned long b); MP_API int sp_tohex(sp_int* a, char* str); +MP_API int sp_set_bit(sp_int* a, int i); MP_API int sp_2expt(sp_int* a, int e); MP_API int sp_rand_prime(sp_int* r, int len, WC_RNG* rng, void* heap); MP_API int sp_mul(sp_int* a, sp_int* b, sp_int* r); @@ -203,6 +206,7 @@ MP_API int sp_exch(sp_int* a, sp_int* b); MP_API int sp_get_digit_count(sp_int *a); MP_API int sp_init_copy (sp_int * a, sp_int * b); MP_API void sp_rshb(sp_int* a, int n, sp_int* r); +MP_API int sp_mul_d(sp_int* a, sp_int_digit n, sp_int* r); #define MP_OKAY 0 @@ -219,6 +223,7 @@ MP_API void sp_rshb(sp_int* a, int n, sp_int* r); #define MP_VAL -3 #define DIGIT_BIT SP_WORD_SIZE +#define MP_MASK SP_MASK #define CheckFastMathSettings() 1 @@ -256,6 +261,7 @@ MP_API void sp_rshb(sp_int* a, int n, sp_int* r); #define mp_add sp_add #define mp_set_int sp_set_int #define mp_tohex sp_tohex +#define mp_set_bit sp_set_bit #define mp_2expt sp_2expt #define mp_rand_prime sp_rand_prime #define mp_mul sp_mul @@ -270,6 +276,7 @@ MP_API void sp_rshb(sp_int* a, int n, sp_int* r); #define get_digit_count sp_get_digit_count #define mp_init_copy sp_init_copy #define mp_rshb(A,x) sp_rshb(A,x,A) +#define mp_mul_d sp_mul_d #endif diff --git a/wolfssl/wolfcrypt/srp.h b/wolfssl/wolfcrypt/srp.h index 85db1983b..94f198dfb 100644 --- a/wolfssl/wolfcrypt/srp.h +++ b/wolfssl/wolfcrypt/srp.h @@ -1,6 +1,6 @@ /* srp.h * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/wolfssl/wolfcrypt/tfm.h b/wolfssl/wolfcrypt/tfm.h index 170280cef..f916ba861 100644 --- a/wolfssl/wolfcrypt/tfm.h +++ b/wolfssl/wolfcrypt/tfm.h @@ -1,6 +1,6 @@ /* tfm.h * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/wolfssl/wolfcrypt/types.h b/wolfssl/wolfcrypt/types.h index e80351566..b25a57dc2 100644 --- a/wolfssl/wolfcrypt/types.h +++ b/wolfssl/wolfcrypt/types.h @@ -1,6 +1,6 @@ /* types.h * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/wolfssl/wolfcrypt/visibility.h b/wolfssl/wolfcrypt/visibility.h index 07ba2f1b4..8ed57fb95 100644 --- a/wolfssl/wolfcrypt/visibility.h +++ b/wolfssl/wolfcrypt/visibility.h @@ -1,6 +1,6 @@ /* visibility.h * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/wolfssl/wolfcrypt/wc_encrypt.h b/wolfssl/wolfcrypt/wc_encrypt.h index d1f1fb78b..8ea9901a1 100644 --- a/wolfssl/wolfcrypt/wc_encrypt.h +++ b/wolfssl/wolfcrypt/wc_encrypt.h @@ -1,6 +1,6 @@ /* wc_encrypt.h * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/wolfssl/wolfcrypt/wc_pkcs11.h b/wolfssl/wolfcrypt/wc_pkcs11.h index 614f65d8d..d8dfae5a8 100644 --- a/wolfssl/wolfcrypt/wc_pkcs11.h +++ b/wolfssl/wolfcrypt/wc_pkcs11.h @@ -1,6 +1,6 @@ /* wc_pkcs11.h * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/wolfssl/wolfcrypt/wc_port.h b/wolfssl/wolfcrypt/wc_port.h index b27b3c6f3..2d3f8900b 100644 --- a/wolfssl/wolfcrypt/wc_port.h +++ b/wolfssl/wolfcrypt/wc_port.h @@ -1,6 +1,6 @@ /* wc_port.h * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/wolfssl/wolfcrypt/wolfevent.h b/wolfssl/wolfcrypt/wolfevent.h index 0f8c08c2f..8370d5e45 100644 --- a/wolfssl/wolfcrypt/wolfevent.h +++ b/wolfssl/wolfcrypt/wolfevent.h @@ -1,6 +1,6 @@ /* wolfevent.h * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/wolfssl/wolfcrypt/wolfmath.h b/wolfssl/wolfcrypt/wolfmath.h index 1db3223c6..74594e15d 100644 --- a/wolfssl/wolfcrypt/wolfmath.h +++ b/wolfssl/wolfcrypt/wolfmath.h @@ -1,6 +1,6 @@ /* wolfmath.h * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/wolfssl/wolfio.h b/wolfssl/wolfio.h index 7db5d06e9..9ea0a0322 100644 --- a/wolfssl/wolfio.h +++ b/wolfssl/wolfio.h @@ -1,6 +1,6 @@ /* io.h * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/wrapper/CSharp/wolfSSL-DTLS-PSK-Server/wolfSSL-DTLS-PSK-Server.cs b/wrapper/CSharp/wolfSSL-DTLS-PSK-Server/wolfSSL-DTLS-PSK-Server.cs index 645d254ce..269603045 100644 --- a/wrapper/CSharp/wolfSSL-DTLS-PSK-Server/wolfSSL-DTLS-PSK-Server.cs +++ b/wrapper/CSharp/wolfSSL-DTLS-PSK-Server/wolfSSL-DTLS-PSK-Server.cs @@ -1,6 +1,6 @@ /* wolfSSL-DTLS-PSK-Server.cs * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/wrapper/CSharp/wolfSSL-DTLS-Server/wolfSSL-DTLS-Server.cs b/wrapper/CSharp/wolfSSL-DTLS-Server/wolfSSL-DTLS-Server.cs index da7c6672b..39f3aad15 100644 --- a/wrapper/CSharp/wolfSSL-DTLS-Server/wolfSSL-DTLS-Server.cs +++ b/wrapper/CSharp/wolfSSL-DTLS-Server/wolfSSL-DTLS-Server.cs @@ -1,6 +1,6 @@ /* wolfSSL-DTLS-Server.cs * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/wrapper/CSharp/wolfSSL-Example-IOCallbacks/wolfSSL-Example-IOCallbacks.cs b/wrapper/CSharp/wolfSSL-Example-IOCallbacks/wolfSSL-Example-IOCallbacks.cs index c617bea1a..9be5e118c 100644 --- a/wrapper/CSharp/wolfSSL-Example-IOCallbacks/wolfSSL-Example-IOCallbacks.cs +++ b/wrapper/CSharp/wolfSSL-Example-IOCallbacks/wolfSSL-Example-IOCallbacks.cs @@ -1,6 +1,6 @@ /* wolfSSL-Example-IOCallbacks.cs * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/wrapper/CSharp/wolfSSL-TLS-PSK-Server/wolfSSL-TLS-PSK-Server.cs b/wrapper/CSharp/wolfSSL-TLS-PSK-Server/wolfSSL-TLS-PSK-Server.cs index 502917e86..0fbe89f35 100644 --- a/wrapper/CSharp/wolfSSL-TLS-PSK-Server/wolfSSL-TLS-PSK-Server.cs +++ b/wrapper/CSharp/wolfSSL-TLS-PSK-Server/wolfSSL-TLS-PSK-Server.cs @@ -1,6 +1,6 @@ /* wolfSSL-TLS-PSK-Server.cs * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/wrapper/CSharp/wolfSSL-TLS-Server/wolfSSL-TLS-Server.cs b/wrapper/CSharp/wolfSSL-TLS-Server/wolfSSL-TLS-Server.cs index baae4e48c..4cc828465 100644 --- a/wrapper/CSharp/wolfSSL-TLS-Server/wolfSSL-TLS-Server.cs +++ b/wrapper/CSharp/wolfSSL-TLS-Server/wolfSSL-TLS-Server.cs @@ -1,6 +1,6 @@ /* wolfSSL-TLS-Server.cs * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/wrapper/CSharp/wolfSSL_CSharp/wolfSSL.cs b/wrapper/CSharp/wolfSSL_CSharp/wolfSSL.cs index 256bca445..f0c555b2d 100644 --- a/wrapper/CSharp/wolfSSL_CSharp/wolfSSL.cs +++ b/wrapper/CSharp/wolfSSL_CSharp/wolfSSL.cs @@ -1,6 +1,6 @@ /* wolfSSL.cs * - * Copyright (C) 2006-2019 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/wrapper/python/wolfcrypt/setup.py b/wrapper/python/wolfcrypt/setup.py index 19d99702e..c22149a58 100755 --- a/wrapper/python/wolfcrypt/setup.py +++ b/wrapper/python/wolfcrypt/setup.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- # -# Copyright (C) 2006-2019 wolfSSL Inc. +# Copyright (C) 2006-2020 wolfSSL Inc. # # This file is part of wolfSSL. # diff --git a/wrapper/python/wolfcrypt/test/test_ciphers.py b/wrapper/python/wolfcrypt/test/test_ciphers.py index d28eb3ea8..24ccb897b 100644 --- a/wrapper/python/wolfcrypt/test/test_ciphers.py +++ b/wrapper/python/wolfcrypt/test/test_ciphers.py @@ -1,6 +1,6 @@ # test_ciphers.py # -# Copyright (C) 2006-2019 wolfSSL Inc. +# Copyright (C) 2006-2020 wolfSSL Inc. # # This file is part of wolfSSL. # diff --git a/wrapper/python/wolfcrypt/test/test_hashes.py b/wrapper/python/wolfcrypt/test/test_hashes.py index 25a6b9d37..b9f2ccc20 100644 --- a/wrapper/python/wolfcrypt/test/test_hashes.py +++ b/wrapper/python/wolfcrypt/test/test_hashes.py @@ -1,6 +1,6 @@ # test_hashes.py # -# Copyright (C) 2006-2019 wolfSSL Inc. +# Copyright (C) 2006-2020 wolfSSL Inc. # # This file is part of wolfSSL. # diff --git a/wrapper/python/wolfcrypt/test/test_random.py b/wrapper/python/wolfcrypt/test/test_random.py index 1d50d300a..1425f370c 100644 --- a/wrapper/python/wolfcrypt/test/test_random.py +++ b/wrapper/python/wolfcrypt/test/test_random.py @@ -1,6 +1,6 @@ # test_random.py # -# Copyright (C) 2006-2019 wolfSSL Inc. +# Copyright (C) 2006-2020 wolfSSL Inc. # # This file is part of wolfSSL. # diff --git a/wrapper/python/wolfcrypt/wolfcrypt/__about__.py b/wrapper/python/wolfcrypt/wolfcrypt/__about__.py index 51a621f63..d3c58086d 100644 --- a/wrapper/python/wolfcrypt/wolfcrypt/__about__.py +++ b/wrapper/python/wolfcrypt/wolfcrypt/__about__.py @@ -1,6 +1,6 @@ # __about__.py # -# Copyright (C) 2006-2019 wolfSSL Inc. +# Copyright (C) 2006-2020 wolfSSL Inc. # # This file is part of wolfSSL. # diff --git a/wrapper/python/wolfcrypt/wolfcrypt/__init__.py b/wrapper/python/wolfcrypt/wolfcrypt/__init__.py index 5c11cbc75..31d0235ef 100644 --- a/wrapper/python/wolfcrypt/wolfcrypt/__init__.py +++ b/wrapper/python/wolfcrypt/wolfcrypt/__init__.py @@ -1,6 +1,6 @@ # __init__.py # -# Copyright (C) 2006-2019 wolfSSL Inc. +# Copyright (C) 2006-2020 wolfSSL Inc. # # This file is part of wolfSSL. # diff --git a/wrapper/python/wolfcrypt/wolfcrypt/build_ffi.py b/wrapper/python/wolfcrypt/wolfcrypt/build_ffi.py index 608aedb28..ac03955cc 100644 --- a/wrapper/python/wolfcrypt/wolfcrypt/build_ffi.py +++ b/wrapper/python/wolfcrypt/wolfcrypt/build_ffi.py @@ -1,6 +1,6 @@ # build_ffi.py # -# Copyright (C) 2006-2019 wolfSSL Inc. +# Copyright (C) 2006-2020 wolfSSL Inc. # # This file is part of wolfSSL. # diff --git a/wrapper/python/wolfcrypt/wolfcrypt/ciphers.py b/wrapper/python/wolfcrypt/wolfcrypt/ciphers.py index c4087619a..c02cdbe33 100644 --- a/wrapper/python/wolfcrypt/wolfcrypt/ciphers.py +++ b/wrapper/python/wolfcrypt/wolfcrypt/ciphers.py @@ -1,6 +1,6 @@ # ciphers.py # -# Copyright (C) 2006-2019 wolfSSL Inc. +# Copyright (C) 2006-2020 wolfSSL Inc. # # This file is part of wolfSSL. # diff --git a/wrapper/python/wolfcrypt/wolfcrypt/exceptions.py b/wrapper/python/wolfcrypt/wolfcrypt/exceptions.py index 7c84ad766..26322b364 100644 --- a/wrapper/python/wolfcrypt/wolfcrypt/exceptions.py +++ b/wrapper/python/wolfcrypt/wolfcrypt/exceptions.py @@ -1,6 +1,6 @@ # exceptions.py # -# Copyright (C) 2006-2019 wolfSSL Inc. +# Copyright (C) 2006-2020 wolfSSL Inc. # # This file is part of wolfSSL. # diff --git a/wrapper/python/wolfcrypt/wolfcrypt/hashes.py b/wrapper/python/wolfcrypt/wolfcrypt/hashes.py index 3a5bedd53..346cb7bc0 100644 --- a/wrapper/python/wolfcrypt/wolfcrypt/hashes.py +++ b/wrapper/python/wolfcrypt/wolfcrypt/hashes.py @@ -1,6 +1,6 @@ # hashes.py # -# Copyright (C) 2006-2019 wolfSSL Inc. +# Copyright (C) 2006-2020 wolfSSL Inc. # # This file is part of wolfSSL. # diff --git a/wrapper/python/wolfcrypt/wolfcrypt/random.py b/wrapper/python/wolfcrypt/wolfcrypt/random.py index 2af32f062..f32b9b77c 100644 --- a/wrapper/python/wolfcrypt/wolfcrypt/random.py +++ b/wrapper/python/wolfcrypt/wolfcrypt/random.py @@ -1,6 +1,6 @@ # random.py # -# Copyright (C) 2006-2019 wolfSSL Inc. +# Copyright (C) 2006-2020 wolfSSL Inc. # # This file is part of wolfSSL. # diff --git a/wrapper/python/wolfcrypt/wolfcrypt/utils.py b/wrapper/python/wolfcrypt/wolfcrypt/utils.py index 9895012d4..537800f4c 100644 --- a/wrapper/python/wolfcrypt/wolfcrypt/utils.py +++ b/wrapper/python/wolfcrypt/wolfcrypt/utils.py @@ -1,6 +1,6 @@ # utils.py # -# Copyright (C) 2006-2019 wolfSSL Inc. +# Copyright (C) 2006-2020 wolfSSL Inc. # # This file is part of wolfSSL. # diff --git a/wrapper/python/wolfssl/Makefile b/wrapper/python/wolfssl/Makefile index d92c5cb4f..5b3f9f869 100644 --- a/wrapper/python/wolfssl/Makefile +++ b/wrapper/python/wolfssl/Makefile @@ -1,6 +1,6 @@ # Makefile # -# Copyright (C) 2006-2019 wolfSSL Inc. +# Copyright (C) 2006-2020 wolfSSL Inc. # # This file is part of wolfSSL. # diff --git a/wrapper/python/wolfssl/docs/Makefile b/wrapper/python/wolfssl/docs/Makefile index 7dad9f262..7d24fb014 100644 --- a/wrapper/python/wolfssl/docs/Makefile +++ b/wrapper/python/wolfssl/docs/Makefile @@ -1,6 +1,6 @@ # Makefile # -# Copyright (C) 2006-2019 wolfSSL Inc. +# Copyright (C) 2006-2020 wolfSSL Inc. # # This file is part of wolfSSL. # diff --git a/wrapper/python/wolfssl/examples/client.py b/wrapper/python/wolfssl/examples/client.py index 8fd500d3b..0ae7d57ce 100755 --- a/wrapper/python/wolfssl/examples/client.py +++ b/wrapper/python/wolfssl/examples/client.py @@ -4,7 +4,7 @@ # # client.py # -# Copyright (C) 2006-2019 wolfSSL Inc. +# Copyright (C) 2006-2020 wolfSSL Inc. # # This file is part of wolfSSL. # diff --git a/wrapper/python/wolfssl/examples/server.py b/wrapper/python/wolfssl/examples/server.py index 04ab90cfd..a44b7e116 100755 --- a/wrapper/python/wolfssl/examples/server.py +++ b/wrapper/python/wolfssl/examples/server.py @@ -4,7 +4,7 @@ # # server.py # -# Copyright (C) 2006-2019 wolfSSL Inc. +# Copyright (C) 2006-2020 wolfSSL Inc. # # This file is part of wolfSSL. # diff --git a/wrapper/python/wolfssl/setup.py b/wrapper/python/wolfssl/setup.py index d4c222002..217b59700 100755 --- a/wrapper/python/wolfssl/setup.py +++ b/wrapper/python/wolfssl/setup.py @@ -3,7 +3,7 @@ # # setup.py # -# Copyright (C) 2006-2019 wolfSSL Inc. +# Copyright (C) 2006-2020 wolfSSL Inc. # # This file is part of wolfSSL. # diff --git a/wrapper/python/wolfssl/src/wolfssl/__about__.py b/wrapper/python/wolfssl/src/wolfssl/__about__.py index dfa978193..35b983ab7 100644 --- a/wrapper/python/wolfssl/src/wolfssl/__about__.py +++ b/wrapper/python/wolfssl/src/wolfssl/__about__.py @@ -2,7 +2,7 @@ # # __about__.py # -# Copyright (C) 2006-2019 wolfSSL Inc. +# Copyright (C) 2006-2020 wolfSSL Inc. # # This file is part of wolfSSL. # diff --git a/wrapper/python/wolfssl/src/wolfssl/__init__.py b/wrapper/python/wolfssl/src/wolfssl/__init__.py index b0f50f4f3..decef9595 100644 --- a/wrapper/python/wolfssl/src/wolfssl/__init__.py +++ b/wrapper/python/wolfssl/src/wolfssl/__init__.py @@ -2,7 +2,7 @@ # # __init__.py # -# Copyright (C) 2006-2019 wolfSSL Inc. +# Copyright (C) 2006-2020 wolfSSL Inc. # # This file is part of wolfSSL. # diff --git a/wrapper/python/wolfssl/src/wolfssl/_memory.py b/wrapper/python/wolfssl/src/wolfssl/_memory.py index 5201f4473..0b6bb9f82 100644 --- a/wrapper/python/wolfssl/src/wolfssl/_memory.py +++ b/wrapper/python/wolfssl/src/wolfssl/_memory.py @@ -2,7 +2,7 @@ # # _memory.py # -# Copyright (C) 2006-2019 wolfSSL Inc. +# Copyright (C) 2006-2020 wolfSSL Inc. # # This file is part of wolfSSL. # diff --git a/wrapper/python/wolfssl/src/wolfssl/_methods.py b/wrapper/python/wolfssl/src/wolfssl/_methods.py index 284d0cdb5..bde5eb1bf 100644 --- a/wrapper/python/wolfssl/src/wolfssl/_methods.py +++ b/wrapper/python/wolfssl/src/wolfssl/_methods.py @@ -2,7 +2,7 @@ # # _methods.py # -# Copyright (C) 2006-2019 wolfSSL Inc. +# Copyright (C) 2006-2020 wolfSSL Inc. # # This file is part of wolfSSL. # diff --git a/wrapper/python/wolfssl/src/wolfssl/build_ffi.py b/wrapper/python/wolfssl/src/wolfssl/build_ffi.py index 134318803..acfe013da 100644 --- a/wrapper/python/wolfssl/src/wolfssl/build_ffi.py +++ b/wrapper/python/wolfssl/src/wolfssl/build_ffi.py @@ -2,7 +2,7 @@ # # build_ffi.py # -# Copyright (C) 2006-2019 wolfSSL Inc. +# Copyright (C) 2006-2020 wolfSSL Inc. # # This file is part of wolfSSL. # diff --git a/wrapper/python/wolfssl/src/wolfssl/exceptions.py b/wrapper/python/wolfssl/src/wolfssl/exceptions.py index 92d333688..748732254 100644 --- a/wrapper/python/wolfssl/src/wolfssl/exceptions.py +++ b/wrapper/python/wolfssl/src/wolfssl/exceptions.py @@ -2,7 +2,7 @@ # # exceptions.py # -# Copyright (C) 2006-2019 wolfSSL Inc. +# Copyright (C) 2006-2020 wolfSSL Inc. # # This file is part of wolfSSL. # diff --git a/wrapper/python/wolfssl/src/wolfssl/utils.py b/wrapper/python/wolfssl/src/wolfssl/utils.py index a34012e4a..721f2b96f 100644 --- a/wrapper/python/wolfssl/src/wolfssl/utils.py +++ b/wrapper/python/wolfssl/src/wolfssl/utils.py @@ -2,7 +2,7 @@ # # utils.py # -# Copyright (C) 2006-2019 wolfSSL Inc. +# Copyright (C) 2006-2020 wolfSSL Inc. # # This file is part of wolfSSL. # diff --git a/wrapper/python/wolfssl/test/conftest.py b/wrapper/python/wolfssl/test/conftest.py index 012176ec8..d87164325 100644 --- a/wrapper/python/wolfssl/test/conftest.py +++ b/wrapper/python/wolfssl/test/conftest.py @@ -2,7 +2,7 @@ # # conftest.py # -# Copyright (C) 2006-2019 wolfSSL Inc. +# Copyright (C) 2006-2020 wolfSSL Inc. # # This file is part of wolfSSL. # diff --git a/wrapper/python/wolfssl/test/test_client.py b/wrapper/python/wolfssl/test/test_client.py index 34d5976c6..7ebf91fee 100644 --- a/wrapper/python/wolfssl/test/test_client.py +++ b/wrapper/python/wolfssl/test/test_client.py @@ -2,7 +2,7 @@ # # test_client.py # -# Copyright (C) 2006-2019 wolfSSL Inc. +# Copyright (C) 2006-2020 wolfSSL Inc. # # This file is part of wolfSSL. # diff --git a/wrapper/python/wolfssl/test/test_context.py b/wrapper/python/wolfssl/test/test_context.py index 5fbbef682..6575ed6da 100644 --- a/wrapper/python/wolfssl/test/test_context.py +++ b/wrapper/python/wolfssl/test/test_context.py @@ -2,7 +2,7 @@ # # test_context.py # -# Copyright (C) 2006-2019 wolfSSL Inc. +# Copyright (C) 2006-2020 wolfSSL Inc. # # This file is part of wolfSSL. # diff --git a/wrapper/python/wolfssl/test/test_methods.py b/wrapper/python/wolfssl/test/test_methods.py index e2fb96cb9..f94038341 100644 --- a/wrapper/python/wolfssl/test/test_methods.py +++ b/wrapper/python/wolfssl/test/test_methods.py @@ -2,7 +2,7 @@ # # test_methods.py # -# Copyright (C) 2006-2019 wolfSSL Inc. +# Copyright (C) 2006-2020 wolfSSL Inc. # # This file is part of wolfSSL. #