Skip to content

Commit f6c1880

Browse files
committed
Add WASM SIMD implementations of Argon2
1 parent 0b6ae91 commit f6c1880

24 files changed

+447
-36
lines changed

builds/msvc/vs2010/libsodium/libsodium.vcxproj

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@
8989
<ClCompile Include="..\..\..\..\src\libsodium\crypto_secretbox\xchacha20poly1305\secretbox_xchacha20poly1305.c" />
9090
<ClCompile Include="..\..\..\..\src\libsodium\crypto_pwhash\crypto_pwhash.c" />
9191
<ClCompile Include="..\..\..\..\src\libsodium\crypto_pwhash\argon2\blake2b-long.c" />
92+
<ClCompile Include="..\..\..\..\src\libsodium\crypto_pwhash\argon2\argon2-fill-block-wasm32.c" />
9293
<ClCompile Include="..\..\..\..\src\libsodium\crypto_pwhash\argon2\argon2-core.c" />
9394
<ClCompile Include="..\..\..\..\src\libsodium\crypto_pwhash\argon2\argon2-fill-block-avx512f.c" />
9495
<ClCompile Include="..\..\..\..\src\libsodium\crypto_pwhash\argon2\argon2-fill-block-ref.c" />
@@ -220,7 +221,6 @@
220221
<ClInclude Include="..\..\..\..\src\libsodium\include\sodium\crypto_aead_aegis256.h" />
221222
<ClInclude Include="..\..\..\..\src\libsodium\include\sodium\crypto_hash_sha512.h" />
222223
<ClInclude Include="..\..\..\..\src\libsodium\include\sodium\core.h" />
223-
<ClInclude Include="..\..\..\..\src\libsodium\include\sodium\version.h" />
224224
<ClInclude Include="..\..\..\..\src\libsodium\include\sodium\export.h" />
225225
<ClInclude Include="..\..\..\..\src\libsodium\include\sodium\crypto_core_salsa20.h" />
226226
<ClInclude Include="..\..\..\..\src\libsodium\include\sodium\crypto_shorthash_siphash24.h" />
@@ -298,6 +298,7 @@
298298
<ClInclude Include="..\..\..\..\src\libsodium\include\sodium\private\implementations.h" />
299299
<ClInclude Include="..\..\..\..\src\libsodium\crypto_pwhash\argon2\blamka-round-ref.h" />
300300
<ClInclude Include="..\..\..\..\src\libsodium\crypto_pwhash\argon2\blamka-round-avx2.h" />
301+
<ClInclude Include="..\..\..\..\src\libsodium\crypto_pwhash\argon2\blamka-round-wasm32.h" />
301302
<ClInclude Include="..\..\..\..\src\libsodium\crypto_pwhash\argon2\argon2.h" />
302303
<ClInclude Include="..\..\..\..\src\libsodium\crypto_pwhash\argon2\blamka-round-ssse3.h" />
303304
<ClInclude Include="..\..\..\..\src\libsodium\crypto_pwhash\argon2\argon2-encoding.h" />

builds/msvc/vs2010/libsodium/libsodium.vcxproj.filters

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,9 @@
8787
<ClCompile Include="..\..\..\..\src\libsodium\crypto_pwhash\argon2\blake2b-long.c">
8888
<Filter>crypto_pwhash\argon2</Filter>
8989
</ClCompile>
90+
<ClCompile Include="..\..\..\..\src\libsodium\crypto_pwhash\argon2\argon2-fill-block-wasm32.c">
91+
<Filter>crypto_pwhash\argon2</Filter>
92+
</ClCompile>
9093
<ClCompile Include="..\..\..\..\src\libsodium\crypto_pwhash\argon2\argon2-core.c">
9194
<Filter>crypto_pwhash\argon2</Filter>
9295
</ClCompile>
@@ -476,9 +479,6 @@
476479
<ClInclude Include="..\..\..\..\src\libsodium\include\sodium\core.h">
477480
<Filter>include\sodium</Filter>
478481
</ClInclude>
479-
<ClInclude Include="..\..\..\..\src\libsodium\include\sodium\version.h">
480-
<Filter>include\sodium</Filter>
481-
</ClInclude>
482482
<ClInclude Include="..\..\..\..\src\libsodium\include\sodium\export.h">
483483
<Filter>include\sodium</Filter>
484484
</ClInclude>
@@ -710,6 +710,9 @@
710710
<ClInclude Include="..\..\..\..\src\libsodium\crypto_pwhash\argon2\blamka-round-avx2.h">
711711
<Filter>crypto_pwhash\argon2</Filter>
712712
</ClInclude>
713+
<ClInclude Include="..\..\..\..\src\libsodium\crypto_pwhash\argon2\blamka-round-wasm32.h">
714+
<Filter>crypto_pwhash\argon2</Filter>
715+
</ClInclude>
713716
<ClInclude Include="..\..\..\..\src\libsodium\crypto_pwhash\argon2\argon2.h">
714717
<Filter>crypto_pwhash\argon2</Filter>
715718
</ClInclude>

builds/msvc/vs2012/libsodium/libsodium.vcxproj

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@
8989
<ClCompile Include="..\..\..\..\src\libsodium\crypto_secretbox\xchacha20poly1305\secretbox_xchacha20poly1305.c" />
9090
<ClCompile Include="..\..\..\..\src\libsodium\crypto_pwhash\crypto_pwhash.c" />
9191
<ClCompile Include="..\..\..\..\src\libsodium\crypto_pwhash\argon2\blake2b-long.c" />
92+
<ClCompile Include="..\..\..\..\src\libsodium\crypto_pwhash\argon2\argon2-fill-block-wasm32.c" />
9293
<ClCompile Include="..\..\..\..\src\libsodium\crypto_pwhash\argon2\argon2-core.c" />
9394
<ClCompile Include="..\..\..\..\src\libsodium\crypto_pwhash\argon2\argon2-fill-block-avx512f.c" />
9495
<ClCompile Include="..\..\..\..\src\libsodium\crypto_pwhash\argon2\argon2-fill-block-ref.c" />
@@ -220,7 +221,6 @@
220221
<ClInclude Include="..\..\..\..\src\libsodium\include\sodium\crypto_aead_aegis256.h" />
221222
<ClInclude Include="..\..\..\..\src\libsodium\include\sodium\crypto_hash_sha512.h" />
222223
<ClInclude Include="..\..\..\..\src\libsodium\include\sodium\core.h" />
223-
<ClInclude Include="..\..\..\..\src\libsodium\include\sodium\version.h" />
224224
<ClInclude Include="..\..\..\..\src\libsodium\include\sodium\export.h" />
225225
<ClInclude Include="..\..\..\..\src\libsodium\include\sodium\crypto_core_salsa20.h" />
226226
<ClInclude Include="..\..\..\..\src\libsodium\include\sodium\crypto_shorthash_siphash24.h" />
@@ -298,6 +298,7 @@
298298
<ClInclude Include="..\..\..\..\src\libsodium\include\sodium\private\implementations.h" />
299299
<ClInclude Include="..\..\..\..\src\libsodium\crypto_pwhash\argon2\blamka-round-ref.h" />
300300
<ClInclude Include="..\..\..\..\src\libsodium\crypto_pwhash\argon2\blamka-round-avx2.h" />
301+
<ClInclude Include="..\..\..\..\src\libsodium\crypto_pwhash\argon2\blamka-round-wasm32.h" />
301302
<ClInclude Include="..\..\..\..\src\libsodium\crypto_pwhash\argon2\argon2.h" />
302303
<ClInclude Include="..\..\..\..\src\libsodium\crypto_pwhash\argon2\blamka-round-ssse3.h" />
303304
<ClInclude Include="..\..\..\..\src\libsodium\crypto_pwhash\argon2\argon2-encoding.h" />

builds/msvc/vs2012/libsodium/libsodium.vcxproj.filters

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,9 @@
8787
<ClCompile Include="..\..\..\..\src\libsodium\crypto_pwhash\argon2\blake2b-long.c">
8888
<Filter>crypto_pwhash\argon2</Filter>
8989
</ClCompile>
90+
<ClCompile Include="..\..\..\..\src\libsodium\crypto_pwhash\argon2\argon2-fill-block-wasm32.c">
91+
<Filter>crypto_pwhash\argon2</Filter>
92+
</ClCompile>
9093
<ClCompile Include="..\..\..\..\src\libsodium\crypto_pwhash\argon2\argon2-core.c">
9194
<Filter>crypto_pwhash\argon2</Filter>
9295
</ClCompile>
@@ -476,9 +479,6 @@
476479
<ClInclude Include="..\..\..\..\src\libsodium\include\sodium\core.h">
477480
<Filter>include\sodium</Filter>
478481
</ClInclude>
479-
<ClInclude Include="..\..\..\..\src\libsodium\include\sodium\version.h">
480-
<Filter>include\sodium</Filter>
481-
</ClInclude>
482482
<ClInclude Include="..\..\..\..\src\libsodium\include\sodium\export.h">
483483
<Filter>include\sodium</Filter>
484484
</ClInclude>
@@ -710,6 +710,9 @@
710710
<ClInclude Include="..\..\..\..\src\libsodium\crypto_pwhash\argon2\blamka-round-avx2.h">
711711
<Filter>crypto_pwhash\argon2</Filter>
712712
</ClInclude>
713+
<ClInclude Include="..\..\..\..\src\libsodium\crypto_pwhash\argon2\blamka-round-wasm32.h">
714+
<Filter>crypto_pwhash\argon2</Filter>
715+
</ClInclude>
713716
<ClInclude Include="..\..\..\..\src\libsodium\crypto_pwhash\argon2\argon2.h">
714717
<Filter>crypto_pwhash\argon2</Filter>
715718
</ClInclude>

builds/msvc/vs2013/libsodium/libsodium.vcxproj

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@
8989
<ClCompile Include="..\..\..\..\src\libsodium\crypto_secretbox\xchacha20poly1305\secretbox_xchacha20poly1305.c" />
9090
<ClCompile Include="..\..\..\..\src\libsodium\crypto_pwhash\crypto_pwhash.c" />
9191
<ClCompile Include="..\..\..\..\src\libsodium\crypto_pwhash\argon2\blake2b-long.c" />
92+
<ClCompile Include="..\..\..\..\src\libsodium\crypto_pwhash\argon2\argon2-fill-block-wasm32.c" />
9293
<ClCompile Include="..\..\..\..\src\libsodium\crypto_pwhash\argon2\argon2-core.c" />
9394
<ClCompile Include="..\..\..\..\src\libsodium\crypto_pwhash\argon2\argon2-fill-block-avx512f.c" />
9495
<ClCompile Include="..\..\..\..\src\libsodium\crypto_pwhash\argon2\argon2-fill-block-ref.c" />
@@ -220,7 +221,6 @@
220221
<ClInclude Include="..\..\..\..\src\libsodium\include\sodium\crypto_aead_aegis256.h" />
221222
<ClInclude Include="..\..\..\..\src\libsodium\include\sodium\crypto_hash_sha512.h" />
222223
<ClInclude Include="..\..\..\..\src\libsodium\include\sodium\core.h" />
223-
<ClInclude Include="..\..\..\..\src\libsodium\include\sodium\version.h" />
224224
<ClInclude Include="..\..\..\..\src\libsodium\include\sodium\export.h" />
225225
<ClInclude Include="..\..\..\..\src\libsodium\include\sodium\crypto_core_salsa20.h" />
226226
<ClInclude Include="..\..\..\..\src\libsodium\include\sodium\crypto_shorthash_siphash24.h" />
@@ -298,6 +298,7 @@
298298
<ClInclude Include="..\..\..\..\src\libsodium\include\sodium\private\implementations.h" />
299299
<ClInclude Include="..\..\..\..\src\libsodium\crypto_pwhash\argon2\blamka-round-ref.h" />
300300
<ClInclude Include="..\..\..\..\src\libsodium\crypto_pwhash\argon2\blamka-round-avx2.h" />
301+
<ClInclude Include="..\..\..\..\src\libsodium\crypto_pwhash\argon2\blamka-round-wasm32.h" />
301302
<ClInclude Include="..\..\..\..\src\libsodium\crypto_pwhash\argon2\argon2.h" />
302303
<ClInclude Include="..\..\..\..\src\libsodium\crypto_pwhash\argon2\blamka-round-ssse3.h" />
303304
<ClInclude Include="..\..\..\..\src\libsodium\crypto_pwhash\argon2\argon2-encoding.h" />

builds/msvc/vs2013/libsodium/libsodium.vcxproj.filters

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,9 @@
8787
<ClCompile Include="..\..\..\..\src\libsodium\crypto_pwhash\argon2\blake2b-long.c">
8888
<Filter>crypto_pwhash\argon2</Filter>
8989
</ClCompile>
90+
<ClCompile Include="..\..\..\..\src\libsodium\crypto_pwhash\argon2\argon2-fill-block-wasm32.c">
91+
<Filter>crypto_pwhash\argon2</Filter>
92+
</ClCompile>
9093
<ClCompile Include="..\..\..\..\src\libsodium\crypto_pwhash\argon2\argon2-core.c">
9194
<Filter>crypto_pwhash\argon2</Filter>
9295
</ClCompile>
@@ -476,9 +479,6 @@
476479
<ClInclude Include="..\..\..\..\src\libsodium\include\sodium\core.h">
477480
<Filter>include\sodium</Filter>
478481
</ClInclude>
479-
<ClInclude Include="..\..\..\..\src\libsodium\include\sodium\version.h">
480-
<Filter>include\sodium</Filter>
481-
</ClInclude>
482482
<ClInclude Include="..\..\..\..\src\libsodium\include\sodium\export.h">
483483
<Filter>include\sodium</Filter>
484484
</ClInclude>
@@ -710,6 +710,9 @@
710710
<ClInclude Include="..\..\..\..\src\libsodium\crypto_pwhash\argon2\blamka-round-avx2.h">
711711
<Filter>crypto_pwhash\argon2</Filter>
712712
</ClInclude>
713+
<ClInclude Include="..\..\..\..\src\libsodium\crypto_pwhash\argon2\blamka-round-wasm32.h">
714+
<Filter>crypto_pwhash\argon2</Filter>
715+
</ClInclude>
713716
<ClInclude Include="..\..\..\..\src\libsodium\crypto_pwhash\argon2\argon2.h">
714717
<Filter>crypto_pwhash\argon2</Filter>
715718
</ClInclude>

builds/msvc/vs2015/libsodium/libsodium.vcxproj

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@
8989
<ClCompile Include="..\..\..\..\src\libsodium\crypto_secretbox\xchacha20poly1305\secretbox_xchacha20poly1305.c" />
9090
<ClCompile Include="..\..\..\..\src\libsodium\crypto_pwhash\crypto_pwhash.c" />
9191
<ClCompile Include="..\..\..\..\src\libsodium\crypto_pwhash\argon2\blake2b-long.c" />
92+
<ClCompile Include="..\..\..\..\src\libsodium\crypto_pwhash\argon2\argon2-fill-block-wasm32.c" />
9293
<ClCompile Include="..\..\..\..\src\libsodium\crypto_pwhash\argon2\argon2-core.c" />
9394
<ClCompile Include="..\..\..\..\src\libsodium\crypto_pwhash\argon2\argon2-fill-block-avx512f.c" />
9495
<ClCompile Include="..\..\..\..\src\libsodium\crypto_pwhash\argon2\argon2-fill-block-ref.c" />
@@ -220,7 +221,6 @@
220221
<ClInclude Include="..\..\..\..\src\libsodium\include\sodium\crypto_aead_aegis256.h" />
221222
<ClInclude Include="..\..\..\..\src\libsodium\include\sodium\crypto_hash_sha512.h" />
222223
<ClInclude Include="..\..\..\..\src\libsodium\include\sodium\core.h" />
223-
<ClInclude Include="..\..\..\..\src\libsodium\include\sodium\version.h" />
224224
<ClInclude Include="..\..\..\..\src\libsodium\include\sodium\export.h" />
225225
<ClInclude Include="..\..\..\..\src\libsodium\include\sodium\crypto_core_salsa20.h" />
226226
<ClInclude Include="..\..\..\..\src\libsodium\include\sodium\crypto_shorthash_siphash24.h" />
@@ -298,6 +298,7 @@
298298
<ClInclude Include="..\..\..\..\src\libsodium\include\sodium\private\implementations.h" />
299299
<ClInclude Include="..\..\..\..\src\libsodium\crypto_pwhash\argon2\blamka-round-ref.h" />
300300
<ClInclude Include="..\..\..\..\src\libsodium\crypto_pwhash\argon2\blamka-round-avx2.h" />
301+
<ClInclude Include="..\..\..\..\src\libsodium\crypto_pwhash\argon2\blamka-round-wasm32.h" />
301302
<ClInclude Include="..\..\..\..\src\libsodium\crypto_pwhash\argon2\argon2.h" />
302303
<ClInclude Include="..\..\..\..\src\libsodium\crypto_pwhash\argon2\blamka-round-ssse3.h" />
303304
<ClInclude Include="..\..\..\..\src\libsodium\crypto_pwhash\argon2\argon2-encoding.h" />

builds/msvc/vs2015/libsodium/libsodium.vcxproj.filters

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,9 @@
8787
<ClCompile Include="..\..\..\..\src\libsodium\crypto_pwhash\argon2\blake2b-long.c">
8888
<Filter>crypto_pwhash\argon2</Filter>
8989
</ClCompile>
90+
<ClCompile Include="..\..\..\..\src\libsodium\crypto_pwhash\argon2\argon2-fill-block-wasm32.c">
91+
<Filter>crypto_pwhash\argon2</Filter>
92+
</ClCompile>
9093
<ClCompile Include="..\..\..\..\src\libsodium\crypto_pwhash\argon2\argon2-core.c">
9194
<Filter>crypto_pwhash\argon2</Filter>
9295
</ClCompile>
@@ -476,9 +479,6 @@
476479
<ClInclude Include="..\..\..\..\src\libsodium\include\sodium\core.h">
477480
<Filter>include\sodium</Filter>
478481
</ClInclude>
479-
<ClInclude Include="..\..\..\..\src\libsodium\include\sodium\version.h">
480-
<Filter>include\sodium</Filter>
481-
</ClInclude>
482482
<ClInclude Include="..\..\..\..\src\libsodium\include\sodium\export.h">
483483
<Filter>include\sodium</Filter>
484484
</ClInclude>
@@ -710,6 +710,9 @@
710710
<ClInclude Include="..\..\..\..\src\libsodium\crypto_pwhash\argon2\blamka-round-avx2.h">
711711
<Filter>crypto_pwhash\argon2</Filter>
712712
</ClInclude>
713+
<ClInclude Include="..\..\..\..\src\libsodium\crypto_pwhash\argon2\blamka-round-wasm32.h">
714+
<Filter>crypto_pwhash\argon2</Filter>
715+
</ClInclude>
713716
<ClInclude Include="..\..\..\..\src\libsodium\crypto_pwhash\argon2\argon2.h">
714717
<Filter>crypto_pwhash\argon2</Filter>
715718
</ClInclude>

builds/msvc/vs2017/libsodium/libsodium.vcxproj

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@
8989
<ClCompile Include="..\..\..\..\src\libsodium\crypto_secretbox\xchacha20poly1305\secretbox_xchacha20poly1305.c" />
9090
<ClCompile Include="..\..\..\..\src\libsodium\crypto_pwhash\crypto_pwhash.c" />
9191
<ClCompile Include="..\..\..\..\src\libsodium\crypto_pwhash\argon2\blake2b-long.c" />
92+
<ClCompile Include="..\..\..\..\src\libsodium\crypto_pwhash\argon2\argon2-fill-block-wasm32.c" />
9293
<ClCompile Include="..\..\..\..\src\libsodium\crypto_pwhash\argon2\argon2-core.c" />
9394
<ClCompile Include="..\..\..\..\src\libsodium\crypto_pwhash\argon2\argon2-fill-block-avx512f.c" />
9495
<ClCompile Include="..\..\..\..\src\libsodium\crypto_pwhash\argon2\argon2-fill-block-ref.c" />
@@ -220,7 +221,6 @@
220221
<ClInclude Include="..\..\..\..\src\libsodium\include\sodium\crypto_aead_aegis256.h" />
221222
<ClInclude Include="..\..\..\..\src\libsodium\include\sodium\crypto_hash_sha512.h" />
222223
<ClInclude Include="..\..\..\..\src\libsodium\include\sodium\core.h" />
223-
<ClInclude Include="..\..\..\..\src\libsodium\include\sodium\version.h" />
224224
<ClInclude Include="..\..\..\..\src\libsodium\include\sodium\export.h" />
225225
<ClInclude Include="..\..\..\..\src\libsodium\include\sodium\crypto_core_salsa20.h" />
226226
<ClInclude Include="..\..\..\..\src\libsodium\include\sodium\crypto_shorthash_siphash24.h" />
@@ -298,6 +298,7 @@
298298
<ClInclude Include="..\..\..\..\src\libsodium\include\sodium\private\implementations.h" />
299299
<ClInclude Include="..\..\..\..\src\libsodium\crypto_pwhash\argon2\blamka-round-ref.h" />
300300
<ClInclude Include="..\..\..\..\src\libsodium\crypto_pwhash\argon2\blamka-round-avx2.h" />
301+
<ClInclude Include="..\..\..\..\src\libsodium\crypto_pwhash\argon2\blamka-round-wasm32.h" />
301302
<ClInclude Include="..\..\..\..\src\libsodium\crypto_pwhash\argon2\argon2.h" />
302303
<ClInclude Include="..\..\..\..\src\libsodium\crypto_pwhash\argon2\blamka-round-ssse3.h" />
303304
<ClInclude Include="..\..\..\..\src\libsodium\crypto_pwhash\argon2\argon2-encoding.h" />

builds/msvc/vs2017/libsodium/libsodium.vcxproj.filters

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,9 @@
8787
<ClCompile Include="..\..\..\..\src\libsodium\crypto_pwhash\argon2\blake2b-long.c">
8888
<Filter>crypto_pwhash\argon2</Filter>
8989
</ClCompile>
90+
<ClCompile Include="..\..\..\..\src\libsodium\crypto_pwhash\argon2\argon2-fill-block-wasm32.c">
91+
<Filter>crypto_pwhash\argon2</Filter>
92+
</ClCompile>
9093
<ClCompile Include="..\..\..\..\src\libsodium\crypto_pwhash\argon2\argon2-core.c">
9194
<Filter>crypto_pwhash\argon2</Filter>
9295
</ClCompile>
@@ -476,9 +479,6 @@
476479
<ClInclude Include="..\..\..\..\src\libsodium\include\sodium\core.h">
477480
<Filter>include\sodium</Filter>
478481
</ClInclude>
479-
<ClInclude Include="..\..\..\..\src\libsodium\include\sodium\version.h">
480-
<Filter>include\sodium</Filter>
481-
</ClInclude>
482482
<ClInclude Include="..\..\..\..\src\libsodium\include\sodium\export.h">
483483
<Filter>include\sodium</Filter>
484484
</ClInclude>
@@ -710,6 +710,9 @@
710710
<ClInclude Include="..\..\..\..\src\libsodium\crypto_pwhash\argon2\blamka-round-avx2.h">
711711
<Filter>crypto_pwhash\argon2</Filter>
712712
</ClInclude>
713+
<ClInclude Include="..\..\..\..\src\libsodium\crypto_pwhash\argon2\blamka-round-wasm32.h">
714+
<Filter>crypto_pwhash\argon2</Filter>
715+
</ClInclude>
713716
<ClInclude Include="..\..\..\..\src\libsodium\crypto_pwhash\argon2\argon2.h">
714717
<Filter>crypto_pwhash\argon2</Filter>
715718
</ClInclude>

0 commit comments

Comments
 (0)