Skip to content

Commit eb1a9c7

Browse files
committed
update fastmath and sp-math-all documentation
1 parent 72d0fed commit eb1a9c7

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

wolfSSL/src/chapter02.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -945,7 +945,7 @@ If built without configuration nor modification to any macros, for example for a
945945
946946
Forked from public domain LibTomFastMath library. For more information about LibTomFastMath, please see <https://www.libtom.net/TomsFastMath>. Please note that our fork is considerably more active and secure than the original public domain code from LibTomFastMath. We have improved performance, security and code quality. Also we have taken the Fastmath code through FIPS 140-2 and 140-3 certifications.
947947
948-
The Fastmath option switches to a faster big integer library that uses assembly if possible. The Fastmath option will speed up asymmetric private/public key operations like RSA, DH, and DSA. By default, wolfSSL's configure scripts are setup to use the Fastmath library for x86_64 and aarch architectures. This option switches the big integer library to a faster one that uses assembly if possible. Assembly inclusion is dependent on compiler and processor combinations. Some combinations will need additional configure flags and some may not be possible. Help with optimizing Fastmath with new assembly routines is available on a consulting basis. Use of the assembly code is dependent on the compiler and processor used. See the Archetecture-Specific Optimizations.
948+
The Fastmath option switches to a faster big integer library that uses assembly if possible. The Fastmath option will speed up asymmetric private/public key operations like RSA, DH, and DSA. This option switches the big integer library to a faster one that uses assembly if possible. Assembly inclusion is dependent on compiler and processor combinations. Some combinations will need additional configure flags and some may not be possible. Help with optimizing Fastmath with new assembly routines is available on a consulting basis. Use of the assembly code is dependent on the compiler and processor used. See the Architecture-Specific Optimizations.
949949
950950
For Fastmath, all memory is allocated on the stack. Because the stack memory usage can be larger when using Fastmath, we recommend defining [`TFM_TIMING_RESISTANT`](#tfm_timing_resistant) as well when using this option. The Fastmath code is timing resistant if TFM_TIMING_RESISTANT is defined. This will reduce some of the large math windows for constant time, which use less memory. This uses less stack because there are no shortcuts and therefore less branching during private key operations. This also makes the implementation more secure as timing attacks are a real threat and can give malicious third parties enough information to reproduce the private key.
951951
@@ -963,7 +963,7 @@ Fastmath also changes the way dynamic and stack memory is used. The normal math
963963
964964
If you are enabling Fastmath without using the autoconf system, you’ll need to define `USE_FAST_MATH` and add `tfm.c` to the wolfSSL build while removing `integer.c`. Defining `ALT_ECC_SIZE` will allocate ECC points only from the heap instead of the stack.
965965
966-
##### Archetecture-Specific Optimizations
966+
##### Architecture-Specific Optimizations
967967
968968
The following macros can be defined for assembly optimizations with USE_FAST_MATH.
969969
@@ -2038,7 +2038,7 @@ Use of the WOLF_CRYPTO_CB_ONLY_* options requires disabling the examples. See [`
20382038
20392039
### `--enable-fastmath`
20402040
2041-
Enabled by default on x86\_64 and aarch64. On all other architectures, the default is the Big Integer Math library. Both Fastmath and Big Integer library are disabled if Single-Precision (SP) math is enabled.
2041+
Enable FastMath implementation. Both Fastmath and Big Integer library are disabled if Single-Precision (SP) math is enabled.
20422042
20432043
See USE_FAST_MATH and Big Integer Math Library sections.
20442044
@@ -2054,7 +2054,7 @@ Enable Single-Precision (SP) math implementation with restricted algorithm suite
20542054
20552055
### `--enable-sp-math-all`
20562056
2057-
Enable Single-Precision (SP) math implementation with full algorithm suite. Unsupported algorithms are enabled, but unoptimized. Overrides `--enable-sp`, `--enable-fastmath` and `--enable-fasthugemath`.
2057+
Enabled by default. Enable Single-Precision (SP) math implementation with full algorithm suite. Unsupported algorithms are enabled, but unoptimized. Overrides `--enable-sp`, `--enable-fastmath` and `--enable-fasthugemath`.
20582058
20592059
### `--enable-sp-asm`
20602060

0 commit comments

Comments
 (0)