Skip to content

Commit 4ebc896

Browse files
authored
Merge pull request wolfSSL#6095 from SparkiDev/aes_gcm_win_asm
Aes gcm win asm
2 parents a8723f7 + 397537e commit 4ebc896

13 files changed

+15830
-1483
lines changed

IDE/ECLIPSE/MICRIUM/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ The folder hierarchy is the same as the wolfSSL folders with an exception of the
4040

4141
4. Right click on each folders, add or link all the source code in the corresponding folder in wolfSSL.
4242

43-
5. Remove non-C platform dependent files from your build. At the moment, only aes_asm.asm and aes_asm.s must be removed from your wolfssl/wolfcrypt/src folder.
43+
5. Remove non-C platform dependent files from your build. At the moment, only aes_asm.asm, aes_gcm_asm.asm and aes_asm.s must be removed from your wolfssl/wolfcrypt/src folder.
4444

4545
6. In your C/C++ compiler preprocessor settings, add the wolfSSL directories to your include paths.
4646
Here's an example of the paths that must be added.

IDE/WIN/user_settings.h

+8-1
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@
4646
#define HAVE_SECURE_RENEGOTIATION
4747

4848
#define HAVE_AESGCM
49+
#define WOLFSSL_AESGCM_STREAM
4950
#define WOLFSSL_SHA384
5051
#define WOLFSSL_SHA512
5152

@@ -56,12 +57,19 @@
5657
#define ECC_SHAMIR
5758
#define ECC_TIMING_RESISTANT
5859

60+
#define WOLFSSL_SP_X86_64
61+
#define SP_INT_BITS 4096
62+
5963
/* Optional Performance Speedups */
6064
#if 0
6165
/* AESNI on x64 */
6266
#ifdef _WIN64
6367
#define HAVE_INTEL_RDSEED
6468
#define WOLFSSL_AESNI
69+
#define HAVE_INTEL_AVX1
70+
#if 0
71+
#define HAVE_INTEL_AVX2
72+
#endif
6573
#endif
6674

6775
/* Single Precision Support for RSA/DH 1024/2048/3072 and
@@ -82,7 +90,6 @@
8290
#define WOLFSSL_SP_X86_64_ASM
8391
#endif
8492
#endif
85-
8693
#else
8794
/* The servers and clients */
8895
#define OPENSSL_EXTRA

IDE/WIN/user_settings_dtls.h

+8
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@
5151
#define HAVE_SECURE_RENEGOTIATION
5252

5353
#define HAVE_AESGCM
54+
#define WOLFSSL_AESGCM_STREAM
5455
#define WOLFSSL_SHA384
5556
#define WOLFSSL_SHA512
5657

@@ -61,12 +62,19 @@
6162
#define ECC_SHAMIR
6263
#define ECC_TIMING_RESISTANT
6364

65+
#define WOLFSSL_SP_X86_64
66+
#define SP_INT_BITS 4096
67+
6468
/* Optional Performance Speedups */
6569
#if 0
6670
/* AESNI on x64 */
6771
#ifdef _WIN64
6872
#define HAVE_INTEL_RDSEED
6973
#define WOLFSSL_AESNI
74+
#define HAVE_INTEL_AVX1
75+
#if 0
76+
#define HAVE_INTEL_AVX2
77+
#endif
7078
#endif
7179

7280
/* Single Precision Support for RSA/DH 1024/2048/3072 and

IDE/WIN/wolfssl-fips.vcxproj

+16
Original file line numberDiff line numberDiff line change
@@ -331,6 +331,22 @@
331331
<Outputs Condition="'$(Configuration)|$(Platform)'=='DLL Release|x64'">$(IntDir)%(Filename).obj</Outputs>
332332
</CustomBuild>
333333
</ItemGroup>
334+
<ItemGroup>
335+
<CustomBuild Include="..\..\wolfcrypt\src\aes_gcm_asm.asm">
336+
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</ExcludedFromBuild>
337+
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DLL Debug|x64'">false</ExcludedFromBuild>
338+
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">ml64.exe /c /Zi /Fo"$(IntDir)%(Filename).obj" %(Identity)</Command>
339+
<Command Condition="'$(Configuration)|$(Platform)'=='DLL Debug|x64'">ml64.exe /c /Zi /Fo"$(IntDir)%(Filename).obj" %(Identity)</Command>
340+
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(IntDir)%(Filename).obj</Outputs>
341+
<Outputs Condition="'$(Configuration)|$(Platform)'=='DLL Debug|x64'">$(IntDir)%(Filename).obj</Outputs>
342+
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</ExcludedFromBuild>
343+
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DLL Release|x64'">false</ExcludedFromBuild>
344+
<Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">ml64.exe /c /Zi /Fo"$(IntDir)%(Filename).obj" %(Identity)</Command>
345+
<Command Condition="'$(Configuration)|$(Platform)'=='DLL Release|x64'">ml64.exe /c /Zi /Fo"$(IntDir)%(Filename).obj" %(Identity)</Command>
346+
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(IntDir)%(Filename).obj</Outputs>
347+
<Outputs Condition="'$(Configuration)|$(Platform)'=='DLL Release|x64'">$(IntDir)%(Filename).obj</Outputs>
348+
</CustomBuild>
349+
</ItemGroup>
334350
<ItemGroup>
335351
<ClInclude Include="user_settings.h" />
336352
</ItemGroup>

IDE/WIN10/wolfssl-fips.vcxproj

+16
Original file line numberDiff line numberDiff line change
@@ -307,6 +307,22 @@
307307
<Outputs Condition="'$(Configuration)|$(Platform)'=='DLL Release|x64'">$(IntDir)%(Filename).obj</Outputs>
308308
</CustomBuild>
309309
</ItemGroup>
310+
<ItemGroup>
311+
<CustomBuild Include="..\..\wolfcrypt\src\aes_gcm_asm.asm">
312+
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</ExcludedFromBuild>
313+
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DLL Debug|x64'">false</ExcludedFromBuild>
314+
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">ml64.exe /DHAVE_FIPS /DHAVE_FIPS_VERSION=5 /DHAVE_FIPS_VERSION_MINOR=1 /c /Zi /Fo"$(IntDir)%(Filename).obj" %(Identity)</Command>
315+
<Command Condition="'$(Configuration)|$(Platform)'=='DLL Debug|x64'">ml64.exe /DHAVE_FIPS /DHAVE_FIPS_VERSION=5 /DHAVE_FIPS_VERSION_MINOR=1 /c /Zi /Fo"$(IntDir)%(Filename).obj" %(Identity)</Command>
316+
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(IntDir)%(Filename).obj</Outputs>
317+
<Outputs Condition="'$(Configuration)|$(Platform)'=='DLL Debug|x64'">$(IntDir)%(Filename).obj</Outputs>
318+
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</ExcludedFromBuild>
319+
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DLL Release|x64'">false</ExcludedFromBuild>
320+
<Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">ml64.exe /DHAVE_FIPS /DHAVE_FIPS_VERSION=5 /DHAVE_FIPS_VERSION_MINOR=1 /c /Zi /Fo"$(IntDir)%(Filename).obj" %(Identity)</Command>
321+
<Command Condition="'$(Configuration)|$(Platform)'=='DLL Release|x64'">ml64.exe /DHAVE_FIPS /DHAVE_FIPS_VERSION=5 /DHAVE_FIPS_VERSION_MINOR=1 /c /Zi /Fo"$(IntDir)%(Filename).obj" %(Identity)</Command>
322+
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(IntDir)%(Filename).obj</Outputs>
323+
<Outputs Condition="'$(Configuration)|$(Platform)'=='DLL Release|x64'">$(IntDir)%(Filename).obj</Outputs>
324+
</CustomBuild>
325+
</ItemGroup>
310326
<ItemGroup>
311327
<ClInclude Include="resource.h" />
312328
<ClInclude Include="user_settings.h" />

IDE/WORKBENCH/README.md

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ src and wolfcrypt directories. Uncheck the following:
99

1010
```
1111
wolfcrypt/src/aes_asm.asm
12+
wolfcrypt/src/aes_gcm_asm.asm
1213
wolfcrypt/src/aes_asm.s
1314
examples/echoclient/
1415
examples/echoserver/

0 commit comments

Comments
 (0)