mirror of
https://github.com/jedisct1/libsodium.git
synced 2026-08-25 08:37:13 +09:00
Add a high-level crypto_kem API mapping to xwing
This commit is contained in:
+3
-2
@@ -129,10 +129,11 @@ test/default/ipcrypt
|
||||
test/default/kdf
|
||||
test/default/kdf_hkdf
|
||||
test/default/keygen
|
||||
test/default/kx
|
||||
test/default/metamorphic
|
||||
test/default/kem
|
||||
test/default/kem_mlkem768
|
||||
test/default/kem_xwing
|
||||
test/default/kx
|
||||
test/default/metamorphic
|
||||
test/default/misuse
|
||||
test/default/onetimeauth
|
||||
test/default/onetimeauth2
|
||||
|
||||
@@ -190,6 +190,7 @@
|
||||
<ClCompile Include="..\..\..\..\src\libsodium\crypto_aead\aes256gcm\aesni\aead_aes256gcm_aesni.c" />
|
||||
<ClCompile Include="..\..\..\..\src\libsodium\crypto_aead\aes256gcm\armcrypto\aead_aes256gcm_armcrypto.c" />
|
||||
<ClCompile Include="..\..\..\..\src\libsodium\crypto_aead\chacha20poly1305\aead_chacha20poly1305.c" />
|
||||
<ClCompile Include="..\..\..\..\src\libsodium\crypto_kem\crypto_kem.c" />
|
||||
<ClCompile Include="..\..\..\..\src\libsodium\crypto_kem\xwing\kem_xwing.c" />
|
||||
<ClCompile Include="..\..\..\..\src\libsodium\crypto_kem\mlkem768\kem_mlkem768.c" />
|
||||
<ClCompile Include="..\..\..\..\src\libsodium\crypto_kem\mlkem768\ref\kem_mlkem768_ref.c" />
|
||||
@@ -258,6 +259,7 @@
|
||||
<ClInclude Include="..\..\..\..\src\libsodium\include\sodium\crypto_aead_aes256gcm.h" />
|
||||
<ClInclude Include="..\..\..\..\src\libsodium\include\sodium\crypto_core_salsa2012.h" />
|
||||
<ClInclude Include="..\..\..\..\src\libsodium\include\sodium\crypto_secretbox_xchacha20poly1305.h" />
|
||||
<ClInclude Include="..\..\..\..\src\libsodium\include\sodium\crypto_kem.h" />
|
||||
<ClInclude Include="..\..\..\..\src\libsodium\include\sodium\crypto_core_keccak1600.h" />
|
||||
<ClInclude Include="..\..\..\..\src\libsodium\include\sodium\crypto_scalarmult.h" />
|
||||
<ClInclude Include="..\..\..\..\src\libsodium\include\sodium\crypto_pwhash.h" />
|
||||
|
||||
@@ -390,6 +390,9 @@
|
||||
<ClCompile Include="..\..\..\..\src\libsodium\crypto_aead\chacha20poly1305\aead_chacha20poly1305.c">
|
||||
<Filter>crypto_aead\chacha20poly1305</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\src\libsodium\crypto_kem\crypto_kem.c">
|
||||
<Filter>crypto_kem</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\src\libsodium\crypto_kem\xwing\kem_xwing.c">
|
||||
<Filter>crypto_kem\xwing</Filter>
|
||||
</ClCompile>
|
||||
@@ -590,6 +593,9 @@
|
||||
<ClInclude Include="..\..\..\..\src\libsodium\include\sodium\crypto_secretbox_xchacha20poly1305.h">
|
||||
<Filter>include\sodium</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\..\src\libsodium\include\sodium\crypto_kem.h">
|
||||
<Filter>include\sodium</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\..\src\libsodium\include\sodium\crypto_core_keccak1600.h">
|
||||
<Filter>include\sodium</Filter>
|
||||
</ClInclude>
|
||||
|
||||
@@ -190,6 +190,7 @@
|
||||
<ClCompile Include="..\..\..\..\src\libsodium\crypto_aead\aes256gcm\aesni\aead_aes256gcm_aesni.c" />
|
||||
<ClCompile Include="..\..\..\..\src\libsodium\crypto_aead\aes256gcm\armcrypto\aead_aes256gcm_armcrypto.c" />
|
||||
<ClCompile Include="..\..\..\..\src\libsodium\crypto_aead\chacha20poly1305\aead_chacha20poly1305.c" />
|
||||
<ClCompile Include="..\..\..\..\src\libsodium\crypto_kem\crypto_kem.c" />
|
||||
<ClCompile Include="..\..\..\..\src\libsodium\crypto_kem\xwing\kem_xwing.c" />
|
||||
<ClCompile Include="..\..\..\..\src\libsodium\crypto_kem\mlkem768\kem_mlkem768.c" />
|
||||
<ClCompile Include="..\..\..\..\src\libsodium\crypto_kem\mlkem768\ref\kem_mlkem768_ref.c" />
|
||||
@@ -258,6 +259,7 @@
|
||||
<ClInclude Include="..\..\..\..\src\libsodium\include\sodium\crypto_aead_aes256gcm.h" />
|
||||
<ClInclude Include="..\..\..\..\src\libsodium\include\sodium\crypto_core_salsa2012.h" />
|
||||
<ClInclude Include="..\..\..\..\src\libsodium\include\sodium\crypto_secretbox_xchacha20poly1305.h" />
|
||||
<ClInclude Include="..\..\..\..\src\libsodium\include\sodium\crypto_kem.h" />
|
||||
<ClInclude Include="..\..\..\..\src\libsodium\include\sodium\crypto_core_keccak1600.h" />
|
||||
<ClInclude Include="..\..\..\..\src\libsodium\include\sodium\crypto_scalarmult.h" />
|
||||
<ClInclude Include="..\..\..\..\src\libsodium\include\sodium\crypto_pwhash.h" />
|
||||
|
||||
@@ -390,6 +390,9 @@
|
||||
<ClCompile Include="..\..\..\..\src\libsodium\crypto_aead\chacha20poly1305\aead_chacha20poly1305.c">
|
||||
<Filter>crypto_aead\chacha20poly1305</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\src\libsodium\crypto_kem\crypto_kem.c">
|
||||
<Filter>crypto_kem</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\src\libsodium\crypto_kem\xwing\kem_xwing.c">
|
||||
<Filter>crypto_kem\xwing</Filter>
|
||||
</ClCompile>
|
||||
@@ -590,6 +593,9 @@
|
||||
<ClInclude Include="..\..\..\..\src\libsodium\include\sodium\crypto_secretbox_xchacha20poly1305.h">
|
||||
<Filter>include\sodium</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\..\src\libsodium\include\sodium\crypto_kem.h">
|
||||
<Filter>include\sodium</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\..\src\libsodium\include\sodium\crypto_core_keccak1600.h">
|
||||
<Filter>include\sodium</Filter>
|
||||
</ClInclude>
|
||||
|
||||
@@ -190,6 +190,7 @@
|
||||
<ClCompile Include="..\..\..\..\src\libsodium\crypto_aead\aes256gcm\aesni\aead_aes256gcm_aesni.c" />
|
||||
<ClCompile Include="..\..\..\..\src\libsodium\crypto_aead\aes256gcm\armcrypto\aead_aes256gcm_armcrypto.c" />
|
||||
<ClCompile Include="..\..\..\..\src\libsodium\crypto_aead\chacha20poly1305\aead_chacha20poly1305.c" />
|
||||
<ClCompile Include="..\..\..\..\src\libsodium\crypto_kem\crypto_kem.c" />
|
||||
<ClCompile Include="..\..\..\..\src\libsodium\crypto_kem\xwing\kem_xwing.c" />
|
||||
<ClCompile Include="..\..\..\..\src\libsodium\crypto_kem\mlkem768\kem_mlkem768.c" />
|
||||
<ClCompile Include="..\..\..\..\src\libsodium\crypto_kem\mlkem768\ref\kem_mlkem768_ref.c" />
|
||||
@@ -258,6 +259,7 @@
|
||||
<ClInclude Include="..\..\..\..\src\libsodium\include\sodium\crypto_aead_aes256gcm.h" />
|
||||
<ClInclude Include="..\..\..\..\src\libsodium\include\sodium\crypto_core_salsa2012.h" />
|
||||
<ClInclude Include="..\..\..\..\src\libsodium\include\sodium\crypto_secretbox_xchacha20poly1305.h" />
|
||||
<ClInclude Include="..\..\..\..\src\libsodium\include\sodium\crypto_kem.h" />
|
||||
<ClInclude Include="..\..\..\..\src\libsodium\include\sodium\crypto_core_keccak1600.h" />
|
||||
<ClInclude Include="..\..\..\..\src\libsodium\include\sodium\crypto_scalarmult.h" />
|
||||
<ClInclude Include="..\..\..\..\src\libsodium\include\sodium\crypto_pwhash.h" />
|
||||
|
||||
@@ -390,6 +390,9 @@
|
||||
<ClCompile Include="..\..\..\..\src\libsodium\crypto_aead\chacha20poly1305\aead_chacha20poly1305.c">
|
||||
<Filter>crypto_aead\chacha20poly1305</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\src\libsodium\crypto_kem\crypto_kem.c">
|
||||
<Filter>crypto_kem</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\src\libsodium\crypto_kem\xwing\kem_xwing.c">
|
||||
<Filter>crypto_kem\xwing</Filter>
|
||||
</ClCompile>
|
||||
@@ -590,6 +593,9 @@
|
||||
<ClInclude Include="..\..\..\..\src\libsodium\include\sodium\crypto_secretbox_xchacha20poly1305.h">
|
||||
<Filter>include\sodium</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\..\src\libsodium\include\sodium\crypto_kem.h">
|
||||
<Filter>include\sodium</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\..\src\libsodium\include\sodium\crypto_core_keccak1600.h">
|
||||
<Filter>include\sodium</Filter>
|
||||
</ClInclude>
|
||||
|
||||
@@ -190,6 +190,7 @@
|
||||
<ClCompile Include="..\..\..\..\src\libsodium\crypto_aead\aes256gcm\aesni\aead_aes256gcm_aesni.c" />
|
||||
<ClCompile Include="..\..\..\..\src\libsodium\crypto_aead\aes256gcm\armcrypto\aead_aes256gcm_armcrypto.c" />
|
||||
<ClCompile Include="..\..\..\..\src\libsodium\crypto_aead\chacha20poly1305\aead_chacha20poly1305.c" />
|
||||
<ClCompile Include="..\..\..\..\src\libsodium\crypto_kem\crypto_kem.c" />
|
||||
<ClCompile Include="..\..\..\..\src\libsodium\crypto_kem\xwing\kem_xwing.c" />
|
||||
<ClCompile Include="..\..\..\..\src\libsodium\crypto_kem\mlkem768\kem_mlkem768.c" />
|
||||
<ClCompile Include="..\..\..\..\src\libsodium\crypto_kem\mlkem768\ref\kem_mlkem768_ref.c" />
|
||||
@@ -258,6 +259,7 @@
|
||||
<ClInclude Include="..\..\..\..\src\libsodium\include\sodium\crypto_aead_aes256gcm.h" />
|
||||
<ClInclude Include="..\..\..\..\src\libsodium\include\sodium\crypto_core_salsa2012.h" />
|
||||
<ClInclude Include="..\..\..\..\src\libsodium\include\sodium\crypto_secretbox_xchacha20poly1305.h" />
|
||||
<ClInclude Include="..\..\..\..\src\libsodium\include\sodium\crypto_kem.h" />
|
||||
<ClInclude Include="..\..\..\..\src\libsodium\include\sodium\crypto_core_keccak1600.h" />
|
||||
<ClInclude Include="..\..\..\..\src\libsodium\include\sodium\crypto_scalarmult.h" />
|
||||
<ClInclude Include="..\..\..\..\src\libsodium\include\sodium\crypto_pwhash.h" />
|
||||
|
||||
@@ -390,6 +390,9 @@
|
||||
<ClCompile Include="..\..\..\..\src\libsodium\crypto_aead\chacha20poly1305\aead_chacha20poly1305.c">
|
||||
<Filter>crypto_aead\chacha20poly1305</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\src\libsodium\crypto_kem\crypto_kem.c">
|
||||
<Filter>crypto_kem</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\src\libsodium\crypto_kem\xwing\kem_xwing.c">
|
||||
<Filter>crypto_kem\xwing</Filter>
|
||||
</ClCompile>
|
||||
@@ -590,6 +593,9 @@
|
||||
<ClInclude Include="..\..\..\..\src\libsodium\include\sodium\crypto_secretbox_xchacha20poly1305.h">
|
||||
<Filter>include\sodium</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\..\src\libsodium\include\sodium\crypto_kem.h">
|
||||
<Filter>include\sodium</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\..\src\libsodium\include\sodium\crypto_core_keccak1600.h">
|
||||
<Filter>include\sodium</Filter>
|
||||
</ClInclude>
|
||||
|
||||
@@ -190,6 +190,7 @@
|
||||
<ClCompile Include="..\..\..\..\src\libsodium\crypto_aead\aes256gcm\aesni\aead_aes256gcm_aesni.c" />
|
||||
<ClCompile Include="..\..\..\..\src\libsodium\crypto_aead\aes256gcm\armcrypto\aead_aes256gcm_armcrypto.c" />
|
||||
<ClCompile Include="..\..\..\..\src\libsodium\crypto_aead\chacha20poly1305\aead_chacha20poly1305.c" />
|
||||
<ClCompile Include="..\..\..\..\src\libsodium\crypto_kem\crypto_kem.c" />
|
||||
<ClCompile Include="..\..\..\..\src\libsodium\crypto_kem\xwing\kem_xwing.c" />
|
||||
<ClCompile Include="..\..\..\..\src\libsodium\crypto_kem\mlkem768\kem_mlkem768.c" />
|
||||
<ClCompile Include="..\..\..\..\src\libsodium\crypto_kem\mlkem768\ref\kem_mlkem768_ref.c" />
|
||||
@@ -258,6 +259,7 @@
|
||||
<ClInclude Include="..\..\..\..\src\libsodium\include\sodium\crypto_aead_aes256gcm.h" />
|
||||
<ClInclude Include="..\..\..\..\src\libsodium\include\sodium\crypto_core_salsa2012.h" />
|
||||
<ClInclude Include="..\..\..\..\src\libsodium\include\sodium\crypto_secretbox_xchacha20poly1305.h" />
|
||||
<ClInclude Include="..\..\..\..\src\libsodium\include\sodium\crypto_kem.h" />
|
||||
<ClInclude Include="..\..\..\..\src\libsodium\include\sodium\crypto_core_keccak1600.h" />
|
||||
<ClInclude Include="..\..\..\..\src\libsodium\include\sodium\crypto_scalarmult.h" />
|
||||
<ClInclude Include="..\..\..\..\src\libsodium\include\sodium\crypto_pwhash.h" />
|
||||
|
||||
@@ -390,6 +390,9 @@
|
||||
<ClCompile Include="..\..\..\..\src\libsodium\crypto_aead\chacha20poly1305\aead_chacha20poly1305.c">
|
||||
<Filter>crypto_aead\chacha20poly1305</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\src\libsodium\crypto_kem\crypto_kem.c">
|
||||
<Filter>crypto_kem</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\src\libsodium\crypto_kem\xwing\kem_xwing.c">
|
||||
<Filter>crypto_kem\xwing</Filter>
|
||||
</ClCompile>
|
||||
@@ -590,6 +593,9 @@
|
||||
<ClInclude Include="..\..\..\..\src\libsodium\include\sodium\crypto_secretbox_xchacha20poly1305.h">
|
||||
<Filter>include\sodium</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\..\src\libsodium\include\sodium\crypto_kem.h">
|
||||
<Filter>include\sodium</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\..\src\libsodium\include\sodium\crypto_core_keccak1600.h">
|
||||
<Filter>include\sodium</Filter>
|
||||
</ClInclude>
|
||||
|
||||
@@ -214,6 +214,7 @@
|
||||
<ClCompile Include="..\..\..\..\src\libsodium\crypto_aead\aes256gcm\aesni\aead_aes256gcm_aesni.c" />
|
||||
<ClCompile Include="..\..\..\..\src\libsodium\crypto_aead\aes256gcm\armcrypto\aead_aes256gcm_armcrypto.c" />
|
||||
<ClCompile Include="..\..\..\..\src\libsodium\crypto_aead\chacha20poly1305\aead_chacha20poly1305.c" />
|
||||
<ClCompile Include="..\..\..\..\src\libsodium\crypto_kem\crypto_kem.c" />
|
||||
<ClCompile Include="..\..\..\..\src\libsodium\crypto_kem\xwing\kem_xwing.c" />
|
||||
<ClCompile Include="..\..\..\..\src\libsodium\crypto_kem\mlkem768\kem_mlkem768.c" />
|
||||
<ClCompile Include="..\..\..\..\src\libsodium\crypto_kem\mlkem768\ref\kem_mlkem768_ref.c" />
|
||||
@@ -282,6 +283,7 @@
|
||||
<ClInclude Include="..\..\..\..\src\libsodium\include\sodium\crypto_aead_aes256gcm.h" />
|
||||
<ClInclude Include="..\..\..\..\src\libsodium\include\sodium\crypto_core_salsa2012.h" />
|
||||
<ClInclude Include="..\..\..\..\src\libsodium\include\sodium\crypto_secretbox_xchacha20poly1305.h" />
|
||||
<ClInclude Include="..\..\..\..\src\libsodium\include\sodium\crypto_kem.h" />
|
||||
<ClInclude Include="..\..\..\..\src\libsodium\include\sodium\crypto_core_keccak1600.h" />
|
||||
<ClInclude Include="..\..\..\..\src\libsodium\include\sodium\crypto_scalarmult.h" />
|
||||
<ClInclude Include="..\..\..\..\src\libsodium\include\sodium\crypto_pwhash.h" />
|
||||
|
||||
@@ -390,6 +390,9 @@
|
||||
<ClCompile Include="..\..\..\..\src\libsodium\crypto_aead\chacha20poly1305\aead_chacha20poly1305.c">
|
||||
<Filter>crypto_aead\chacha20poly1305</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\src\libsodium\crypto_kem\crypto_kem.c">
|
||||
<Filter>crypto_kem</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\src\libsodium\crypto_kem\xwing\kem_xwing.c">
|
||||
<Filter>crypto_kem\xwing</Filter>
|
||||
</ClCompile>
|
||||
@@ -590,6 +593,9 @@
|
||||
<ClInclude Include="..\..\..\..\src\libsodium\include\sodium\crypto_secretbox_xchacha20poly1305.h">
|
||||
<Filter>include\sodium</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\..\src\libsodium\include\sodium\crypto_kem.h">
|
||||
<Filter>include\sodium</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\..\src\libsodium\include\sodium\crypto_core_keccak1600.h">
|
||||
<Filter>include\sodium</Filter>
|
||||
</ClInclude>
|
||||
|
||||
@@ -214,6 +214,7 @@
|
||||
<ClCompile Include="..\..\..\..\src\libsodium\crypto_aead\aes256gcm\aesni\aead_aes256gcm_aesni.c" />
|
||||
<ClCompile Include="..\..\..\..\src\libsodium\crypto_aead\aes256gcm\armcrypto\aead_aes256gcm_armcrypto.c" />
|
||||
<ClCompile Include="..\..\..\..\src\libsodium\crypto_aead\chacha20poly1305\aead_chacha20poly1305.c" />
|
||||
<ClCompile Include="..\..\..\..\src\libsodium\crypto_kem\crypto_kem.c" />
|
||||
<ClCompile Include="..\..\..\..\src\libsodium\crypto_kem\xwing\kem_xwing.c" />
|
||||
<ClCompile Include="..\..\..\..\src\libsodium\crypto_kem\mlkem768\kem_mlkem768.c" />
|
||||
<ClCompile Include="..\..\..\..\src\libsodium\crypto_kem\mlkem768\ref\kem_mlkem768_ref.c" />
|
||||
@@ -282,6 +283,7 @@
|
||||
<ClInclude Include="..\..\..\..\src\libsodium\include\sodium\crypto_aead_aes256gcm.h" />
|
||||
<ClInclude Include="..\..\..\..\src\libsodium\include\sodium\crypto_core_salsa2012.h" />
|
||||
<ClInclude Include="..\..\..\..\src\libsodium\include\sodium\crypto_secretbox_xchacha20poly1305.h" />
|
||||
<ClInclude Include="..\..\..\..\src\libsodium\include\sodium\crypto_kem.h" />
|
||||
<ClInclude Include="..\..\..\..\src\libsodium\include\sodium\crypto_core_keccak1600.h" />
|
||||
<ClInclude Include="..\..\..\..\src\libsodium\include\sodium\crypto_scalarmult.h" />
|
||||
<ClInclude Include="..\..\..\..\src\libsodium\include\sodium\crypto_pwhash.h" />
|
||||
|
||||
@@ -390,6 +390,9 @@
|
||||
<ClCompile Include="..\..\..\..\src\libsodium\crypto_aead\chacha20poly1305\aead_chacha20poly1305.c">
|
||||
<Filter>crypto_aead\chacha20poly1305</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\src\libsodium\crypto_kem\crypto_kem.c">
|
||||
<Filter>crypto_kem</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\src\libsodium\crypto_kem\xwing\kem_xwing.c">
|
||||
<Filter>crypto_kem\xwing</Filter>
|
||||
</ClCompile>
|
||||
@@ -590,6 +593,9 @@
|
||||
<ClInclude Include="..\..\..\..\src\libsodium\include\sodium\crypto_secretbox_xchacha20poly1305.h">
|
||||
<Filter>include\sodium</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\..\src\libsodium\include\sodium\crypto_kem.h">
|
||||
<Filter>include\sodium</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\..\src\libsodium\include\sodium\crypto_core_keccak1600.h">
|
||||
<Filter>include\sodium</Filter>
|
||||
</ClInclude>
|
||||
|
||||
@@ -214,6 +214,7 @@
|
||||
<ClCompile Include="..\..\..\..\src\libsodium\crypto_aead\aes256gcm\aesni\aead_aes256gcm_aesni.c" />
|
||||
<ClCompile Include="..\..\..\..\src\libsodium\crypto_aead\aes256gcm\armcrypto\aead_aes256gcm_armcrypto.c" />
|
||||
<ClCompile Include="..\..\..\..\src\libsodium\crypto_aead\chacha20poly1305\aead_chacha20poly1305.c" />
|
||||
<ClCompile Include="..\..\..\..\src\libsodium\crypto_kem\crypto_kem.c" />
|
||||
<ClCompile Include="..\..\..\..\src\libsodium\crypto_kem\xwing\kem_xwing.c" />
|
||||
<ClCompile Include="..\..\..\..\src\libsodium\crypto_kem\mlkem768\kem_mlkem768.c" />
|
||||
<ClCompile Include="..\..\..\..\src\libsodium\crypto_kem\mlkem768\ref\kem_mlkem768_ref.c" />
|
||||
@@ -282,6 +283,7 @@
|
||||
<ClInclude Include="..\..\..\..\src\libsodium\include\sodium\crypto_aead_aes256gcm.h" />
|
||||
<ClInclude Include="..\..\..\..\src\libsodium\include\sodium\crypto_core_salsa2012.h" />
|
||||
<ClInclude Include="..\..\..\..\src\libsodium\include\sodium\crypto_secretbox_xchacha20poly1305.h" />
|
||||
<ClInclude Include="..\..\..\..\src\libsodium\include\sodium\crypto_kem.h" />
|
||||
<ClInclude Include="..\..\..\..\src\libsodium\include\sodium\crypto_core_keccak1600.h" />
|
||||
<ClInclude Include="..\..\..\..\src\libsodium\include\sodium\crypto_scalarmult.h" />
|
||||
<ClInclude Include="..\..\..\..\src\libsodium\include\sodium\crypto_pwhash.h" />
|
||||
|
||||
@@ -390,6 +390,9 @@
|
||||
<ClCompile Include="..\..\..\..\src\libsodium\crypto_aead\chacha20poly1305\aead_chacha20poly1305.c">
|
||||
<Filter>crypto_aead\chacha20poly1305</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\src\libsodium\crypto_kem\crypto_kem.c">
|
||||
<Filter>crypto_kem</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\src\libsodium\crypto_kem\xwing\kem_xwing.c">
|
||||
<Filter>crypto_kem\xwing</Filter>
|
||||
</ClCompile>
|
||||
@@ -590,6 +593,9 @@
|
||||
<ClInclude Include="..\..\..\..\src\libsodium\include\sodium\crypto_secretbox_xchacha20poly1305.h">
|
||||
<Filter>include\sodium</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\..\src\libsodium\include\sodium\crypto_kem.h">
|
||||
<Filter>include\sodium</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\..\src\libsodium\include\sodium\crypto_core_keccak1600.h">
|
||||
<Filter>include\sodium</Filter>
|
||||
</ClInclude>
|
||||
|
||||
@@ -438,6 +438,7 @@
|
||||
<ClCompile Include="..\..\src\libsodium\crypto_aead\aes256gcm\aesni\aead_aes256gcm_aesni.c" />
|
||||
<ClCompile Include="..\..\src\libsodium\crypto_aead\aes256gcm\armcrypto\aead_aes256gcm_armcrypto.c" />
|
||||
<ClCompile Include="..\..\src\libsodium\crypto_aead\chacha20poly1305\aead_chacha20poly1305.c" />
|
||||
<ClCompile Include="..\..\src\libsodium\crypto_kem\crypto_kem.c" />
|
||||
<ClCompile Include="..\..\src\libsodium\crypto_kem\xwing\kem_xwing.c" />
|
||||
<ClCompile Include="..\..\src\libsodium\crypto_kem\mlkem768\kem_mlkem768.c" />
|
||||
<ClCompile Include="..\..\src\libsodium\crypto_kem\mlkem768\ref\kem_mlkem768_ref.c" />
|
||||
@@ -506,6 +507,7 @@
|
||||
<ClInclude Include="..\..\src\libsodium\include\sodium\crypto_aead_aes256gcm.h" />
|
||||
<ClInclude Include="..\..\src\libsodium\include\sodium\crypto_core_salsa2012.h" />
|
||||
<ClInclude Include="..\..\src\libsodium\include\sodium\crypto_secretbox_xchacha20poly1305.h" />
|
||||
<ClInclude Include="..\..\src\libsodium\include\sodium\crypto_kem.h" />
|
||||
<ClInclude Include="..\..\src\libsodium\include\sodium\crypto_core_keccak1600.h" />
|
||||
<ClInclude Include="..\..\src\libsodium\include\sodium\crypto_scalarmult.h" />
|
||||
<ClInclude Include="..\..\src\libsodium\include\sodium\crypto_pwhash.h" />
|
||||
|
||||
@@ -381,6 +381,9 @@
|
||||
<ClCompile Include="..\..\src\libsodium\crypto_aead\chacha20poly1305\aead_chacha20poly1305.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\libsodium\crypto_kem\crypto_kem.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\libsodium\crypto_kem\xwing\kem_xwing.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
@@ -581,6 +584,9 @@
|
||||
<ClInclude Include="..\..\src\libsodium\include\sodium\crypto_secretbox_xchacha20poly1305.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\libsodium\include\sodium\crypto_kem.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\libsodium\include\sodium\crypto_core_keccak1600.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
|
||||
@@ -59,6 +59,7 @@ libsodium_la_SOURCES = \
|
||||
crypto_kdf/crypto_kdf.c \
|
||||
crypto_kdf/hkdf/kdf_hkdf_sha256.c \
|
||||
crypto_kdf/hkdf/kdf_hkdf_sha512.c \
|
||||
crypto_kem/crypto_kem.c \
|
||||
crypto_kem/mlkem768/kem_mlkem768.c \
|
||||
crypto_kem/mlkem768/ref/kem_mlkem768_ref.c \
|
||||
crypto_kem/mlkem768/ref/kem_mlkem768_ref.h \
|
||||
|
||||
@@ -0,0 +1,62 @@
|
||||
#include "crypto_kem.h"
|
||||
|
||||
size_t
|
||||
crypto_kem_publickeybytes(void)
|
||||
{
|
||||
return crypto_kem_PUBLICKEYBYTES;
|
||||
}
|
||||
|
||||
size_t
|
||||
crypto_kem_secretkeybytes(void)
|
||||
{
|
||||
return crypto_kem_SECRETKEYBYTES;
|
||||
}
|
||||
|
||||
size_t
|
||||
crypto_kem_ciphertextbytes(void)
|
||||
{
|
||||
return crypto_kem_CIPHERTEXTBYTES;
|
||||
}
|
||||
|
||||
size_t
|
||||
crypto_kem_sharedsecretbytes(void)
|
||||
{
|
||||
return crypto_kem_SHAREDSECRETBYTES;
|
||||
}
|
||||
|
||||
size_t
|
||||
crypto_kem_seedbytes(void)
|
||||
{
|
||||
return crypto_kem_SEEDBYTES;
|
||||
}
|
||||
|
||||
const char *
|
||||
crypto_kem_primitive(void)
|
||||
{
|
||||
return crypto_kem_PRIMITIVE;
|
||||
}
|
||||
|
||||
int
|
||||
crypto_kem_seed_keypair(unsigned char *pk, unsigned char *sk,
|
||||
const unsigned char *seed)
|
||||
{
|
||||
return crypto_kem_xwing_seed_keypair(pk, sk, seed);
|
||||
}
|
||||
|
||||
int
|
||||
crypto_kem_keypair(unsigned char *pk, unsigned char *sk)
|
||||
{
|
||||
return crypto_kem_xwing_keypair(pk, sk);
|
||||
}
|
||||
|
||||
int
|
||||
crypto_kem_enc(unsigned char *ct, unsigned char *ss, const unsigned char *pk)
|
||||
{
|
||||
return crypto_kem_xwing_enc(ct, ss, pk);
|
||||
}
|
||||
|
||||
int
|
||||
crypto_kem_dec(unsigned char *ss, const unsigned char *ct, const unsigned char *sk)
|
||||
{
|
||||
return crypto_kem_xwing_dec(ss, ct, sk);
|
||||
}
|
||||
@@ -33,6 +33,7 @@ SODIUM_EXPORT = \
|
||||
sodium/crypto_kdf_blake2b.h \
|
||||
sodium/crypto_kdf_hkdf_sha256.h \
|
||||
sodium/crypto_kdf_hkdf_sha512.h \
|
||||
sodium/crypto_kem.h \
|
||||
sodium/crypto_kem_mlkem768.h \
|
||||
sodium/crypto_kem_xwing.h \
|
||||
sodium/crypto_kx.h \
|
||||
|
||||
@@ -33,6 +33,7 @@
|
||||
#include "sodium/crypto_kdf_hkdf_sha256.h"
|
||||
#include "sodium/crypto_kdf_hkdf_sha512.h"
|
||||
#include "sodium/crypto_kdf_blake2b.h"
|
||||
#include "sodium/crypto_kem.h"
|
||||
#include "sodium/crypto_kem_mlkem768.h"
|
||||
#include "sodium/crypto_kem_xwing.h"
|
||||
#include "sodium/crypto_kx.h"
|
||||
|
||||
@@ -0,0 +1,70 @@
|
||||
#ifndef crypto_kem_H
|
||||
#define crypto_kem_H
|
||||
|
||||
/*
|
||||
* THREAD SAFETY: crypto_kem_keypair() is thread-safe,
|
||||
* provided that sodium_init() was called before.
|
||||
*
|
||||
* Other functions are always thread-safe.
|
||||
*/
|
||||
|
||||
#include <stddef.h>
|
||||
|
||||
#include "crypto_kem_xwing.h"
|
||||
#include "export.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
# ifdef __GNUC__
|
||||
# pragma GCC diagnostic ignored "-Wlong-long"
|
||||
# endif
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define crypto_kem_PUBLICKEYBYTES crypto_kem_xwing_PUBLICKEYBYTES
|
||||
SODIUM_EXPORT
|
||||
size_t crypto_kem_publickeybytes(void);
|
||||
|
||||
#define crypto_kem_SECRETKEYBYTES crypto_kem_xwing_SECRETKEYBYTES
|
||||
SODIUM_EXPORT
|
||||
size_t crypto_kem_secretkeybytes(void);
|
||||
|
||||
#define crypto_kem_CIPHERTEXTBYTES crypto_kem_xwing_CIPHERTEXTBYTES
|
||||
SODIUM_EXPORT
|
||||
size_t crypto_kem_ciphertextbytes(void);
|
||||
|
||||
#define crypto_kem_SHAREDSECRETBYTES crypto_kem_xwing_SHAREDSECRETBYTES
|
||||
SODIUM_EXPORT
|
||||
size_t crypto_kem_sharedsecretbytes(void);
|
||||
|
||||
#define crypto_kem_SEEDBYTES crypto_kem_xwing_SEEDBYTES
|
||||
SODIUM_EXPORT
|
||||
size_t crypto_kem_seedbytes(void);
|
||||
|
||||
#define crypto_kem_PRIMITIVE "xwing"
|
||||
SODIUM_EXPORT
|
||||
const char *crypto_kem_primitive(void);
|
||||
|
||||
SODIUM_EXPORT
|
||||
int crypto_kem_seed_keypair(unsigned char *pk, unsigned char *sk,
|
||||
const unsigned char *seed)
|
||||
__attribute__ ((nonnull));
|
||||
|
||||
SODIUM_EXPORT
|
||||
int crypto_kem_keypair(unsigned char *pk, unsigned char *sk)
|
||||
__attribute__ ((nonnull));
|
||||
|
||||
SODIUM_EXPORT
|
||||
int crypto_kem_enc(unsigned char *ct, unsigned char *ss,
|
||||
const unsigned char *pk)
|
||||
__attribute__ ((warn_unused_result)) __attribute__ ((nonnull));
|
||||
|
||||
SODIUM_EXPORT
|
||||
int crypto_kem_dec(unsigned char *ss, const unsigned char *ct,
|
||||
const unsigned char *sk)
|
||||
__attribute__ ((warn_unused_result)) __attribute__ ((nonnull));
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -49,6 +49,7 @@ EXTRA_DIST = \
|
||||
ipcrypt.exp \
|
||||
kdf.exp \
|
||||
kdf_hkdf.exp \
|
||||
kem.exp \
|
||||
kem_mlkem768.exp \
|
||||
kem_xwing.exp \
|
||||
keygen.exp \
|
||||
@@ -144,6 +145,7 @@ DISTCLEANFILES = \
|
||||
ipcrypt.res \
|
||||
kdf.res \
|
||||
kdf_hkdf.res \
|
||||
kem.res \
|
||||
kem_mlkem768.res \
|
||||
kem_xwing.res \
|
||||
keygen.res \
|
||||
@@ -244,6 +246,7 @@ TESTS_TARGETS = \
|
||||
hash_sha3512 \
|
||||
ipcrypt \
|
||||
kdf \
|
||||
kem \
|
||||
kem_mlkem768 \
|
||||
kem_xwing \
|
||||
keygen \
|
||||
@@ -430,6 +433,9 @@ kdf_LDADD = $(TESTS_LDADD)
|
||||
kdf_hkdf_SOURCE = cmptest.h kdf_hkdf.c
|
||||
kdf_hkdf_LDADD = $(TESTS_LDADD)
|
||||
|
||||
kem_SOURCE = cmptest.h kem.c
|
||||
kem_LDADD = $(TESTS_LDADD)
|
||||
|
||||
kem_mlkem768_SOURCE = cmptest.h kem_mlkem768.c
|
||||
kem_mlkem768_LDADD = $(TESTS_LDADD)
|
||||
|
||||
|
||||
@@ -0,0 +1,70 @@
|
||||
#define TEST_NAME "kem"
|
||||
#include "cmptest.h"
|
||||
|
||||
static void
|
||||
tv_kem(void)
|
||||
{
|
||||
unsigned char *pk;
|
||||
unsigned char *sk;
|
||||
unsigned char *seed;
|
||||
unsigned char *ct;
|
||||
unsigned char *ss_enc;
|
||||
unsigned char *ss_dec;
|
||||
int i;
|
||||
|
||||
pk = (unsigned char *) sodium_malloc(crypto_kem_PUBLICKEYBYTES);
|
||||
sk = (unsigned char *) sodium_malloc(crypto_kem_SECRETKEYBYTES);
|
||||
seed = (unsigned char *) sodium_malloc(crypto_kem_SEEDBYTES);
|
||||
ct = (unsigned char *) sodium_malloc(crypto_kem_CIPHERTEXTBYTES);
|
||||
ss_enc = (unsigned char *) sodium_malloc(crypto_kem_SHAREDSECRETBYTES);
|
||||
ss_dec = (unsigned char *) sodium_malloc(crypto_kem_SHAREDSECRETBYTES);
|
||||
|
||||
printf("primitive: %s\n", crypto_kem_primitive());
|
||||
|
||||
assert(crypto_kem_publickeybytes() == crypto_kem_PUBLICKEYBYTES);
|
||||
assert(crypto_kem_secretkeybytes() == crypto_kem_SECRETKEYBYTES);
|
||||
assert(crypto_kem_ciphertextbytes() == crypto_kem_CIPHERTEXTBYTES);
|
||||
assert(crypto_kem_sharedsecretbytes() == crypto_kem_SHAREDSECRETBYTES);
|
||||
assert(crypto_kem_seedbytes() == crypto_kem_SEEDBYTES);
|
||||
|
||||
printf("constants: ok\n");
|
||||
|
||||
for (i = 0; i < (int) crypto_kem_SEEDBYTES; i++) {
|
||||
seed[i] = (unsigned char) i;
|
||||
}
|
||||
crypto_kem_seed_keypair(pk, sk, seed);
|
||||
|
||||
assert(crypto_kem_enc(ct, ss_enc, pk) == 0);
|
||||
assert(crypto_kem_dec(ss_dec, ct, sk) == 0);
|
||||
|
||||
if (memcmp(ss_enc, ss_dec, crypto_kem_SHAREDSECRETBYTES) != 0) {
|
||||
printf("ERROR: shared secrets don't match!\n");
|
||||
} else {
|
||||
printf("shared secrets match: ok\n");
|
||||
}
|
||||
|
||||
crypto_kem_keypair(pk, sk);
|
||||
assert(crypto_kem_enc(ct, ss_enc, pk) == 0);
|
||||
assert(crypto_kem_dec(ss_dec, ct, sk) == 0);
|
||||
|
||||
if (memcmp(ss_enc, ss_dec, crypto_kem_SHAREDSECRETBYTES) != 0) {
|
||||
printf("ERROR: shared secrets don't match (random keys)!\n");
|
||||
} else {
|
||||
printf("random keypair test: ok\n");
|
||||
}
|
||||
|
||||
sodium_free(ss_dec);
|
||||
sodium_free(ss_enc);
|
||||
sodium_free(ct);
|
||||
sodium_free(seed);
|
||||
sodium_free(sk);
|
||||
sodium_free(pk);
|
||||
}
|
||||
|
||||
int
|
||||
main(void)
|
||||
{
|
||||
tv_kem();
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
primitive: xwing
|
||||
constants: ok
|
||||
shared secrets match: ok
|
||||
random keypair test: ok
|
||||
Reference in New Issue
Block a user