Purge IDEA cipher

This commit is contained in:
Anthony Hu 2022-01-20 16:07:31 -05:00
parent ecb3f215b5
commit 9ea40f3a9c
65 changed files with 70 additions and 1664 deletions

View File

@ -940,8 +940,6 @@ if(WOLFSSL_OPENSSH OR
override_cache(WOLFSSL_DES3 "yes")
endif()
# TODO: - IDEA
# ARC4
set(WOLFSSL_ARC4_HELP_STRING "Enable ARC4 (default: disabled)")
add_option("WOLFSSL_ARC4" ${WOLFSSL_ARC4_HELP_STRING} "no" "yes;no")

View File

@ -74,7 +74,6 @@ cc_library_shared {
"./wolfcrypt/src/hash.c",
"./wolfcrypt/src/kdf.c",
"./wolfcrypt/src/hmac.c",
"./wolfcrypt/src/idea.c",
"./wolfcrypt/src/integer.c",
"./wolfcrypt/src/kdf.c",
"./wolfcrypt/src/logging.c",

View File

@ -429,11 +429,6 @@
<type>1</type>
<locationURI>WOLFSSL_ROOT/wolfcrypt/src/hmac.c</locationURI>
</link>
<link>
<name>wolfcrypt/src/idea.c</name>
<type>1</type>
<locationURI>WOLFSSL_ROOT/wolfcrypt/src/idea.c</locationURI>
</link>
<link>
<name>wolfcrypt/src/integer.c</name>
<type>1</type>

View File

@ -182,7 +182,6 @@ SRC_C += ../../wolfcrypt/src/arc4.c
SRC_C += ../../wolfcrypt/src/blake2b.c
SRC_C += ../../wolfcrypt/src/camellia.c
SRC_C += ../../wolfcrypt/src/dsa.c
SRC_C += ../../wolfcrypt/src/idea.c
SRC_C += ../../wolfcrypt/src/md2.c
SRC_C += ../../wolfcrypt/src/md4.c
SRC_C += ../../wolfcrypt/src/ripemd.c

View File

@ -120,7 +120,6 @@ libwolfssl_C_SRCS += \
../../wolfcrypt/src/wc_port \
../../wolfcrypt/src/hmac \
../../wolfcrypt/src/wolfcrypt_first \
../../wolfcrypt/src/idea \
../../wolfcrypt/src/wolfcrypt_last \
../../wolfcrypt/src/wolfevent \
../../wolfcrypt/src/logging \

View File

@ -1981,9 +1981,6 @@
<file>
<name>$PROJ_DIR$\..\..\..\..\wolfcrypt\src\hmac.c</name>
</file>
<file>
<name>$PROJ_DIR$\..\..\..\..\wolfcrypt\src\idea.c</name>
</file>
<file>
<name>$PROJ_DIR$\..\..\..\..\wolfcrypt\src\integer.c</name>
</file>

View File

@ -48,7 +48,6 @@
<ClCompile Include="..\..\wolfcrypt\src\hash.c" />
<ClCompile Include="..\..\wolfcrypt\src\kdf.c" />
<ClCompile Include="..\..\wolfcrypt\src\hmac.c" />
<ClCompile Include="..\..\wolfcrypt\src\idea.c" />
<ClCompile Include="..\..\wolfcrypt\src\integer.c" />
<ClCompile Include="..\..\wolfcrypt\src\logging.c" />
<ClCompile Include="..\..\wolfcrypt\src\md2.c" />
@ -113,7 +112,6 @@
<ClInclude Include="..\..\wolfssl\wolfcrypt\ge_operations.h" />
<ClInclude Include="..\..\wolfssl\wolfcrypt\hash.h" />
<ClInclude Include="..\..\wolfssl\wolfcrypt\hmac.h" />
<ClInclude Include="..\..\wolfssl\wolfcrypt\idea.h" />
<ClInclude Include="..\..\wolfssl\wolfcrypt\integer.h" />
<ClInclude Include="..\..\wolfssl\wolfcrypt\logging.h" />
<ClInclude Include="..\..\wolfssl\wolfcrypt\md2.h" />

View File

@ -175,11 +175,6 @@
<type>1</type>
<locationURI>PARENT-2-PROJECT_LOC/wolfcrypt/src/hmac.c</locationURI>
</link>
<link>
<name>src/wolfcrypt-src/idea.c</name>
<type>1</type>
<locationURI>PARENT-2-PROJECT_LOC/wolfcrypt/src/idea.c</locationURI>
</link>
<link>
<name>src/wolfcrypt-src/integer.c</name>
<type>1</type>

View File

@ -99,7 +99,6 @@ $(WOLF_ROOT)/wolfcrypt/src/ge_low_mem.o\
$(WOLF_ROOT)/wolfcrypt/src/ge_operations.o\
$(WOLF_ROOT)/wolfcrypt/src/hash.o\
$(WOLF_ROOT)/wolfcrypt/src/hmac.o\
$(WOLF_ROOT)/wolfcrypt/src/idea.o\
$(WOLF_ROOT)/wolfcrypt/src/integer.o\
$(WOLF_ROOT)/wolfcrypt/src/logging.o\
$(WOLF_ROOT)/wolfcrypt/src/md2.o\

View File

@ -73,7 +73,6 @@
<file file_name="../../wolfcrypt/src/hash.c" />
<file file_name="../../wolfcrypt/src/kdf.c" />
<file file_name="../../wolfcrypt/src/hmac.c" />
<file file_name="../../wolfcrypt/src/idea.c" />
<file file_name="../../wolfcrypt/src/include.am" />
<file file_name="../../wolfcrypt/src/integer.c" />
<file file_name="../../wolfcrypt/src/logging.c" />

View File

@ -75,7 +75,6 @@
<file file_name="../../wolfcrypt/src/hash.c" />
<file file_name="../../wolfcrypt/src/kdf.c" />
<file file_name="../../wolfcrypt/src/hmac.c" />
<file file_name="../../wolfcrypt/src/idea.c" />
<file file_name="../../wolfcrypt/src/include.am" />
<file file_name="../../wolfcrypt/src/integer.c" />
<file file_name="../../wolfcrypt/src/logging.c" />

View File

@ -280,13 +280,6 @@
<TreeImageGuid>941832c1-fc3b-4e1b-94e8-01ea17128b42</TreeImageGuid>
<ParentItem>2170607d-803e-45b0-80af-6507d495a8de</ParentItem>
</Instance>
<Instance Guid="74663551-9e8b-4269-9c36-d538d56a3414">
<Name>idea.c</Name>
<Type>File</Type>
<RelativePath>..\..\..\..\..\wolfcrypt\src\idea.c</RelativePath>
<TreeImageGuid>941832c1-fc3b-4e1b-94e8-01ea17128b42</TreeImageGuid>
<ParentItem>2170607d-803e-45b0-80af-6507d495a8de</ParentItem>
</Instance>
<Instance Guid="d2806186-287c-47e3-bf79-8daa033201cb">
<Name>integer.c</Name>
<Type>File</Type>
@ -630,69 +623,67 @@
<SourceItemType33>CSource</SourceItemType33>
<SourceItemGuid35>85c26e25-fbfe-4ece-afca-4d142c6ea135</SourceItemGuid35>
<SourceItemType35>CSource</SourceItemType35>
<SourceItemGuid36>74663551-9e8b-4269-9c36-d538d56a3414</SourceItemGuid36>
<SourceItemType36>CSource</SourceItemType36>
<SourceItemGuid37>d2806186-287c-47e3-bf79-8daa033201cb</SourceItemGuid37>
<SourceItemType37>CSource</SourceItemType37>
<SourceItemGuid38>83d865e6-46a2-49da-8549-b021d2114a0e</SourceItemGuid38>
<SourceItemType38>CSource</SourceItemType38>
<SourceItemGuid39>d2f5a477-e313-47c6-acd6-094c38f1ab1a</SourceItemGuid39>
<SourceItemType39>CSource</SourceItemType39>
<SourceItemGuid40>f45859b1-b772-490f-a33a-b5b4a5a3c588</SourceItemGuid40>
<SourceItemType40>CSource</SourceItemType40>
<SourceItemGuid41>b471977c-7300-4655-bd30-3796dc3d258e</SourceItemGuid41>
<SourceItemType41>CSource</SourceItemType41>
<SourceItemGuid42>3fdef9c1-79c2-4de3-b252-9e999235ac35</SourceItemGuid42>
<SourceItemType42>CSource</SourceItemType42>
<SourceItemGuid43>209f29fe-f9fe-4822-ab88-9feaad450052</SourceItemGuid43>
<SourceItemType43>CSource</SourceItemType43>
<SourceItemGuid44>9d5b45a5-4bed-444b-915c-b002bc2a2fa6</SourceItemGuid44>
<SourceItemType44>CSource</SourceItemType44>
<SourceItemGuid45>3ede6353-7678-4ee8-9a02-eab7215dc75a</SourceItemGuid45>
<SourceItemType45>CSource</SourceItemType45>
<SourceItemGuid46>9bf244df-506e-4b4c-ad2f-e5dc9ee7dd98</SourceItemGuid46>
<SourceItemType46>CSource</SourceItemType46>
<SourceItemGuid47>91aab859-8af5-44f1-a8c9-e80cce8db8ac</SourceItemGuid47>
<SourceItemType47>CSource</SourceItemType47>
<SourceItemGuid48>344691e8-47e1-4656-8d67-554b79beeb09</SourceItemGuid48>
<SourceItemType48>CSource</SourceItemType48>
<SourceItemGuid49>c70b46e7-e59d-4f63-b374-25c07445cbd9</SourceItemGuid49>
<SourceItemType49>CSource</SourceItemType49>
<SourceItemGuid50>84abe674-65a0-4a83-9950-b3b2de5541e8</SourceItemGuid50>
<SourceItemType50>CSource</SourceItemType50>
<SourceItemGuid51>97a9f706-2d1d-423b-ae9d-67f1953b4646</SourceItemGuid51>
<SourceItemType51>CSource</SourceItemType51>
<SourceItemGuid52>43097e29-0472-439a-94e3-12705379cb30</SourceItemGuid52>
<SourceItemType52>CSource</SourceItemType52>
<SourceItemGuid53>953be9ae-7876-4d95-bccf-4d9872e5893e</SourceItemGuid53>
<SourceItemType53>CSource</SourceItemType53>
<SourceItemGuid54>811d4212-787b-4006-a87f-eb5c82ff497b</SourceItemGuid54>
<SourceItemType54>CSource</SourceItemType54>
<SourceItemGuid55>eb209abd-c2f3-40fc-b36d-3489af8c2789</SourceItemGuid55>
<SourceItemType55>CSource</SourceItemType55>
<SourceItemGuid56>27b7c24f-ed90-4cdf-9e0f-8b8c97d1ef3d</SourceItemGuid56>
<SourceItemType56>CSource</SourceItemType56>
<SourceItemGuid57>9a47b4ee-7f6b-4b54-914a-d52b6c697869</SourceItemGuid57>
<SourceItemType57>CSource</SourceItemType57>
<SourceItemGuid58>b1390d66-373b-4f43-9ec5-024078ccd77e</SourceItemGuid58>
<SourceItemType58>CSource</SourceItemType58>
<SourceItemGuid59>815a4f81-17bf-43d9-8891-bbe2d22555a9</SourceItemGuid59>
<SourceItemType59>CSource</SourceItemType59>
<SourceItemGuid60>51299014-db14-4e23-a579-ae04ec1ff314</SourceItemGuid60>
<SourceItemType60>CSource</SourceItemType60>
<SourceItemGuid61>17e90222-3ae5-41b9-a3be-70013eae67f2</SourceItemGuid61>
<SourceItemType61>CSource</SourceItemType61>
<SourceItemGuid62>75311d1a-e849-465b-bb0b-77546709e1ec</SourceItemGuid62>
<SourceItemType62>CSource</SourceItemType62>
<SourceItemGuid63>52c93bf0-a1fe-4691-afab-4b9811aade10</SourceItemGuid63>
<SourceItemType63>CSource</SourceItemType63>
<SourceItemGuid64>317a55ec-33e2-45da-be24-8bc5730885fe</SourceItemGuid64>
<SourceItemType64>CSource</SourceItemType64>
<SourceItemGuid65>221078b7-a232-4160-8909-cbc48b3f6a2a</SourceItemGuid65>
<SourceItemType65>CSource</SourceItemType65>
<SourceItemGuid66>d1a109cd-a5af-4f79-8bef-7acd6d46c8db</SourceItemGuid66>
<SourceItemType66>CSource</SourceItemType66>
<SourceItemCount>67</SourceItemCount>
<SourceItemGuid37>d2806186-287c-47e3-bf79-8daa033201cb</SourceItemGuid36>
<SourceItemType37>CSource</SourceItemType36>
<SourceItemGuid38>83d865e6-46a2-49da-8549-b021d2114a0e</SourceItemGuid37>
<SourceItemType38>CSource</SourceItemType37>
<SourceItemGuid39>d2f5a477-e313-47c6-acd6-094c38f1ab1a</SourceItemGuid38>
<SourceItemType39>CSource</SourceItemType38>
<SourceItemGuid40>f45859b1-b772-490f-a33a-b5b4a5a3c588</SourceItemGuid39>
<SourceItemType40>CSource</SourceItemType39>
<SourceItemGuid41>b471977c-7300-4655-bd30-3796dc3d258e</SourceItemGuid40>
<SourceItemType41>CSource</SourceItemType40>
<SourceItemGuid42>3fdef9c1-79c2-4de3-b252-9e999235ac35</SourceItemGuid41>
<SourceItemType42>CSource</SourceItemType41>
<SourceItemGuid43>209f29fe-f9fe-4822-ab88-9feaad450052</SourceItemGuid42>
<SourceItemType43>CSource</SourceItemType42>
<SourceItemGuid44>9d5b45a5-4bed-444b-915c-b002bc2a2fa6</SourceItemGuid43>
<SourceItemType44>CSource</SourceItemType43>
<SourceItemGuid45>3ede6353-7678-4ee8-9a02-eab7215dc75a</SourceItemGuid44>
<SourceItemType45>CSource</SourceItemType44>
<SourceItemGuid46>9bf244df-506e-4b4c-ad2f-e5dc9ee7dd98</SourceItemGuid45>
<SourceItemType46>CSource</SourceItemType45>
<SourceItemGuid47>91aab859-8af5-44f1-a8c9-e80cce8db8ac</SourceItemGuid46>
<SourceItemType47>CSource</SourceItemType46>
<SourceItemGuid48>344691e8-47e1-4656-8d67-554b79beeb09</SourceItemGuid47>
<SourceItemType48>CSource</SourceItemType47>
<SourceItemGuid49>c70b46e7-e59d-4f63-b374-25c07445cbd9</SourceItemGuid48>
<SourceItemType49>CSource</SourceItemType48>
<SourceItemGuid50>84abe674-65a0-4a83-9950-b3b2de5541e8</SourceItemGuid49>
<SourceItemType50>CSource</SourceItemType49>
<SourceItemGuid51>97a9f706-2d1d-423b-ae9d-67f1953b4646</SourceItemGuid50>
<SourceItemType51>CSource</SourceItemType50>
<SourceItemGuid52>43097e29-0472-439a-94e3-12705379cb30</SourceItemGuid51>
<SourceItemType52>CSource</SourceItemType51>
<SourceItemGuid53>953be9ae-7876-4d95-bccf-4d9872e5893e</SourceItemGuid52>
<SourceItemType53>CSource</SourceItemType52>
<SourceItemGuid54>811d4212-787b-4006-a87f-eb5c82ff497b</SourceItemGuid53>
<SourceItemType54>CSource</SourceItemType53>
<SourceItemGuid55>eb209abd-c2f3-40fc-b36d-3489af8c2789</SourceItemGuid54>
<SourceItemType55>CSource</SourceItemType54>
<SourceItemGuid56>27b7c24f-ed90-4cdf-9e0f-8b8c97d1ef3d</SourceItemGuid55>
<SourceItemType56>CSource</SourceItemType55>
<SourceItemGuid57>9a47b4ee-7f6b-4b54-914a-d52b6c697869</SourceItemGuid56>
<SourceItemType57>CSource</SourceItemType56>
<SourceItemGuid58>b1390d66-373b-4f43-9ec5-024078ccd77e</SourceItemGuid57>
<SourceItemType58>CSource</SourceItemType57>
<SourceItemGuid59>815a4f81-17bf-43d9-8891-bbe2d22555a9</SourceItemGuid58>
<SourceItemType59>CSource</SourceItemType58>
<SourceItemGuid60>51299014-db14-4e23-a579-ae04ec1ff314</SourceItemGuid59>
<SourceItemType60>CSource</SourceItemType59>
<SourceItemGuid61>17e90222-3ae5-41b9-a3be-70013eae67f2</SourceItemGuid60>
<SourceItemType61>CSource</SourceItemType60>
<SourceItemGuid62>75311d1a-e849-465b-bb0b-77546709e1ec</SourceItemGuid61>
<SourceItemType62>CSource</SourceItemType61>
<SourceItemGuid63>52c93bf0-a1fe-4691-afab-4b9811aade10</SourceItemGuid62>
<SourceItemType63>CSource</SourceItemType62>
<SourceItemGuid64>317a55ec-33e2-45da-be24-8bc5730885fe</SourceItemGuid63>
<SourceItemType64>CSource</SourceItemType63>
<SourceItemGuid65>221078b7-a232-4160-8909-cbc48b3f6a2a</SourceItemGuid64>
<SourceItemType65>CSource</SourceItemType64>
<SourceItemGuid66>d1a109cd-a5af-4f79-8bef-7acd6d46c8db</SourceItemGuid65>
<SourceItemType66>CSource</SourceItemType65>
<SourceItemCount>66</SourceItemCount>
<LastDeviceChangedCounter>1</LastDeviceChangedCounter>
</Instance>
<Instance Guid="9e208646-ccba-4100-a676-29b1efe6545f">
@ -1717,10 +1708,6 @@
<ItemAddTime>636575488940589048</ItemAddTime>
<ItemAddTimeCount>29</ItemAddTimeCount>
</Instance>
<Instance Guid="74663551-9e8b-4269-9c36-d538d56a3414">
<ItemAddTime>636575488940589048</ItemAddTime>
<ItemAddTimeCount>30</ItemAddTimeCount>
</Instance>
<Instance Guid="d2806186-287c-47e3-bf79-8daa033201cb">
<ItemAddTime>636575488940589048</ItemAddTime>
<ItemAddTimeCount>31</ItemAddTimeCount>

View File

@ -224,11 +224,6 @@
<type>1</type>
<locationURI>PARENT-5-PROJECT_LOC/wolfcrypt/src/hmac.c</locationURI>
</link>
<link>
<name>wolfcrypt/src/idea.c</name>
<type>1</type>
<locationURI>PARENT-5-PROJECT_LOC/wolfcrypt/src/idea.c</locationURI>
</link>
<link>
<name>wolfcrypt/src/include.am</name>
<type>1</type>

View File

@ -220,11 +220,6 @@
<type>1</type>
<locationURI>PARENT-5-PROJECT_LOC/wolfcrypt/src/hmac.c</locationURI>
</link>
<link>
<name>wolfcrypt/idea.c</name>
<type>1</type>
<locationURI>PARENT-5-PROJECT_LOC/wolfcrypt/src/idea.c</locationURI>
</link>
<link>
<name>wolfcrypt/include.am</name>
<type>1</type>

View File

@ -171,11 +171,6 @@
<type>1</type>
<locationURI>PARENT-5-PROJECT_LOC/wolfcrypt/src/hmac.c</locationURI>
</link>
<link>
<name>wolfCrypt/idea.c</name>
<type>1</type>
<locationURI>PARENT-5-PROJECT_LOC/wolfcrypt/src/idea.c</locationURI>
</link>
<link>
<name>wolfCrypt/integer.c</name>
<type>1</type>

View File

@ -224,11 +224,6 @@
<type>1</type>
<locationURI>PARENT-6-PROJECT_LOC/wolfcrypt/src/hmac.c</locationURI>
</link>
<link>
<name>wolfcrypt/src/idea.c</name>
<type>1</type>
<locationURI>PARENT-6-PROJECT_LOC/wolfcrypt/src/idea.c</locationURI>
</link>
<link>
<name>wolfcrypt/src/include.am</name>
<type>1</type>

View File

@ -53,7 +53,6 @@
<Path>..\..\..\..\..\..\wolfcrypt\src\ge_operations.c</Path>
<Path>..\..\..\..\..\..\wolfcrypt\src\hash.c</Path>
<Path>..\..\..\..\..\..\wolfcrypt\src\hmac.c</Path>
<Path>..\..\..\..\..\..\wolfcrypt\src\idea.c</Path>
<Path>..\..\..\..\..\..\wolfcrypt\src\integer.c</Path>
<Path>..\..\..\..\..\..\wolfcrypt\src\kdf.c</Path>
<Path>..\..\..\..\..\..\wolfcrypt\src\logging.c</Path>
@ -168,7 +167,6 @@
<Path>Debug\ge_operations.obj</Path>
<Path>Debug\hash.obj</Path>
<Path>Debug\hmac.obj</Path>
<Path>Debug\idea.obj</Path>
<Path>Debug\integer.obj</Path>
<Path>Debug\kdf.obj</Path>
<Path>Debug\logging.obj</Path>

View File

@ -224,11 +224,6 @@
<type>1</type>
<locationURI>PARENT-6-PROJECT_LOC/wolfcrypt/src/hmac.c</locationURI>
</link>
<link>
<name>wolfcrypt/src/idea.c</name>
<type>1</type>
<locationURI>PARENT-6-PROJECT_LOC/wolfcrypt/src/idea.c</locationURI>
</link>
<link>
<name>wolfcrypt/src/include.am</name>
<type>1</type>

View File

@ -53,7 +53,6 @@
<Path>..\..\..\..\..\..\wolfcrypt\src\ge_operations.c</Path>
<Path>..\..\..\..\..\..\wolfcrypt\src\hash.c</Path>
<Path>..\..\..\..\..\..\wolfcrypt\src\hmac.c</Path>
<Path>..\..\..\..\..\..\wolfcrypt\src\idea.c</Path>
<Path>..\..\..\..\..\..\wolfcrypt\src\integer.c</Path>
<Path>..\..\..\..\..\..\wolfcrypt\src\kdf.c</Path>
<Path>..\..\..\..\..\..\wolfcrypt\src\logging.c</Path>
@ -173,7 +172,6 @@
<Path>Debug\ge_operations.obj</Path>
<Path>Debug\hash.obj</Path>
<Path>Debug\hmac.obj</Path>
<Path>Debug\idea.obj</Path>
<Path>Debug\integer.obj</Path>
<Path>Debug\kdf.obj</Path>
<Path>Debug\logging.obj</Path>

View File

@ -107,7 +107,6 @@
<listOptionValue builtIn="false" value="&quot;.\wolfcrypt/src\ge_operations.obj&quot;"/>
<listOptionValue builtIn="false" value="&quot;.\wolfcrypt/src\hash.obj&quot;"/>
<listOptionValue builtIn="false" value="&quot;.\wolfcrypt/src\hmac.obj&quot;"/>
<listOptionValue builtIn="false" value="&quot;.\wolfcrypt/src\idea.obj&quot;"/>
<listOptionValue builtIn="false" value="&quot;.\wolfcrypt/src\integer.obj&quot;"/>
<listOptionValue builtIn="false" value="&quot;.\wolfcrypt/src\kdf.obj&quot;"/>
<listOptionValue builtIn="false" value="&quot;.\wolfcrypt/src\logging.obj&quot;"/>

View File

@ -224,11 +224,6 @@
<type>1</type>
<locationURI>PARENT-6-PROJECT_LOC/wolfcrypt/src/hmac.c</locationURI>
</link>
<link>
<name>wolfcrypt/src/idea.c</name>
<type>1</type>
<locationURI>PARENT-6-PROJECT_LOC/wolfcrypt/src/idea.c</locationURI>
</link>
<link>
<name>wolfcrypt/src/include.am</name>
<type>1</type>

View File

@ -53,7 +53,6 @@
<Path>..\..\..\..\..\..\wolfcrypt\src\ge_operations.c</Path>
<Path>..\..\..\..\..\..\wolfcrypt\src\hash.c</Path>
<Path>..\..\..\..\..\..\wolfcrypt\src\hmac.c</Path>
<Path>..\..\..\..\..\..\wolfcrypt\src\idea.c</Path>
<Path>..\..\..\..\..\..\wolfcrypt\src\integer.c</Path>
<Path>..\..\..\..\..\..\wolfcrypt\src\kdf.c</Path>
<Path>..\..\..\..\..\..\wolfcrypt\src\logging.c</Path>
@ -168,7 +167,6 @@
<Path>Debug\ge_operations.obj</Path>
<Path>Debug\hash.obj</Path>
<Path>Debug\hmac.obj</Path>
<Path>Debug\idea.obj</Path>
<Path>Debug\integer.obj</Path>
<Path>Debug\kdf.obj</Path>
<Path>Debug\logging.obj</Path>

View File

@ -65,7 +65,6 @@
<ClCompile Include="..\..\wolfcrypt\src\hash.c" />
<ClCompile Include="..\..\wolfcrypt\src\kdf.c" />
<ClCompile Include="..\..\wolfcrypt\src\hmac.c" />
<ClCompile Include="..\..\wolfcrypt\src\idea.c" />
<ClCompile Include="..\..\wolfcrypt\src\integer.c" />
<ClCompile Include="..\..\wolfcrypt\src\logging.c" />
<ClCompile Include="..\..\wolfcrypt\src\md2.c" />

View File

@ -45,7 +45,6 @@
<ClCompile Include="..\..\wolfcrypt\src\hash.c" />
<ClCompile Include="..\..\wolfcrypt\src\hmac.c" />
<ClCompile Include="..\..\wolfcrypt\src\kdf.c" />
<ClCompile Include="..\..\wolfcrypt\src\idea.c" />
<ClCompile Include="..\..\wolfcrypt\src\integer.c" />
<ClCompile Include="..\..\wolfcrypt\src\logging.c" />
<ClCompile Include="..\..\wolfcrypt\src\md2.c" />

View File

@ -73,7 +73,6 @@
A4ADF9051FCE0C5600A06E90 /* cmac.c in Sources */ = {isa = PBXBuildFile; fileRef = A4ADF8A91FCE0C5000A06E90 /* cmac.c */; };
A4ADF9061FCE0C5600A06E90 /* wc_encrypt.c in Sources */ = {isa = PBXBuildFile; fileRef = A4ADF8AA1FCE0C5000A06E90 /* wc_encrypt.c */; };
A4ADF9071FCE0C5600A06E90 /* dh.c in Sources */ = {isa = PBXBuildFile; fileRef = A4ADF8AB1FCE0C5000A06E90 /* dh.c */; };
A4ADF9091FCE0C5600A06E90 /* idea.c in Sources */ = {isa = PBXBuildFile; fileRef = A4ADF8AD1FCE0C5100A06E90 /* idea.c */; };
A4ADF90A1FCE0C5600A06E90 /* sha512.c in Sources */ = {isa = PBXBuildFile; fileRef = A4ADF8AE1FCE0C5100A06E90 /* sha512.c */; };
A4ADF90B1FCE0C5600A06E90 /* logging.c in Sources */ = {isa = PBXBuildFile; fileRef = A4ADF8AF1FCE0C5100A06E90 /* logging.c */; };
A4ADF90C1FCE0C5600A06E90 /* ripemd.c in Sources */ = {isa = PBXBuildFile; fileRef = A4ADF8B01FCE0C5100A06E90 /* ripemd.c */; };
@ -174,7 +173,6 @@
A4ADF8A91FCE0C5000A06E90 /* cmac.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = cmac.c; path = ../../../wolfcrypt/src/cmac.c; sourceTree = "<group>"; };
A4ADF8AA1FCE0C5000A06E90 /* wc_encrypt.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = wc_encrypt.c; path = ../../../wolfcrypt/src/wc_encrypt.c; sourceTree = "<group>"; };
A4ADF8AB1FCE0C5000A06E90 /* dh.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = dh.c; path = ../../../wolfcrypt/src/dh.c; sourceTree = "<group>"; };
A4ADF8AD1FCE0C5100A06E90 /* idea.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = idea.c; path = ../../../wolfcrypt/src/idea.c; sourceTree = "<group>"; };
A4ADF8AE1FCE0C5100A06E90 /* sha512.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = sha512.c; path = ../../../wolfcrypt/src/sha512.c; sourceTree = "<group>"; };
A4ADF8AF1FCE0C5100A06E90 /* logging.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = logging.c; path = ../../../wolfcrypt/src/logging.c; sourceTree = "<group>"; };
A4ADF8B01FCE0C5100A06E90 /* ripemd.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = ripemd.c; path = ../../../wolfcrypt/src/ripemd.c; sourceTree = "<group>"; };
@ -310,7 +308,6 @@
A4ADF88E1FCE0C4E00A06E90 /* ge_operations.c */,
A4ADF89A1FCE0C4F00A06E90 /* hash.c */,
A4ADF8751FCE0C4C00A06E90 /* hmac.c */,
A4ADF8AD1FCE0C5100A06E90 /* idea.c */,
A4ADF8A21FCE0C5000A06E90 /* integer.c */,
A4ADF8AF1FCE0C5100A06E90 /* logging.c */,
A4ADF8A51FCE0C5000A06E90 /* md2.c */,
@ -448,7 +445,6 @@
A46FE18D2493E8F800A25BE7 /* fe_448.c in Sources */,
A4ADF8721FCE0C1C00A06E90 /* crl.c in Sources */,
A4ADF91B1FCE0C5600A06E90 /* srp.c in Sources */,
A4ADF9091FCE0C5600A06E90 /* idea.c in Sources */,
A46FE16F2493E8F800A25BE7 /* armv8-chacha.c in Sources */,
A4ADF8FE1FCE0C5600A06E90 /* integer.c in Sources */,
A4ADF9231FCE0C5600A06E90 /* camellia.c in Sources */,

View File

@ -398,9 +398,6 @@
A4DAE3472493F21900CEF51F /* blake2s.c in Sources */ = {isa = PBXBuildFile; fileRef = A4DAE3182493F21900CEF51F /* blake2s.c */; };
A4DAE3482493F21900CEF51F /* blake2s.c in Sources */ = {isa = PBXBuildFile; fileRef = A4DAE3182493F21900CEF51F /* blake2s.c */; };
A4DAE3492493F21900CEF51F /* blake2s.c in Sources */ = {isa = PBXBuildFile; fileRef = A4DAE3182493F21900CEF51F /* blake2s.c */; };
A4DAE34A2493F21900CEF51F /* idea.c in Sources */ = {isa = PBXBuildFile; fileRef = A4DAE3192493F21900CEF51F /* idea.c */; };
A4DAE34B2493F21900CEF51F /* idea.c in Sources */ = {isa = PBXBuildFile; fileRef = A4DAE3192493F21900CEF51F /* idea.c */; };
A4DAE34C2493F21900CEF51F /* idea.c in Sources */ = {isa = PBXBuildFile; fileRef = A4DAE3192493F21900CEF51F /* idea.c */; };
A4DAE34D2493F28B00CEF51F /* sp_arm32.c in Sources */ = {isa = PBXBuildFile; fileRef = A4E7E5912493E20500725359 /* sp_arm32.c */; };
A4DAE34E2493F28C00CEF51F /* sp_arm32.c in Sources */ = {isa = PBXBuildFile; fileRef = A4E7E5912493E20500725359 /* sp_arm32.c */; };
A4DAE3502493F29100CEF51F /* sp_arm64.c in Sources */ = {isa = PBXBuildFile; fileRef = A4E7E5902493E20500725359 /* sp_arm64.c */; };
@ -1174,7 +1171,6 @@
A4DAE3162493F21900CEF51F /* wc_dsp.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = wc_dsp.c; path = ../../wolfcrypt/src/wc_dsp.c; sourceTree = "<group>"; };
A4DAE3172493F21900CEF51F /* wc_pkcs11.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = wc_pkcs11.c; path = ../../wolfcrypt/src/wc_pkcs11.c; sourceTree = "<group>"; };
A4DAE3182493F21900CEF51F /* blake2s.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = blake2s.c; path = ../../wolfcrypt/src/blake2s.c; sourceTree = "<group>"; };
A4DAE3192493F21900CEF51F /* idea.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = idea.c; path = ../../wolfcrypt/src/idea.c; sourceTree = "<group>"; };
A4E7E5902493E20500725359 /* sp_arm64.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = sp_arm64.c; path = ../../wolfcrypt/src/sp_arm64.c; sourceTree = "<group>"; };
A4E7E5912493E20500725359 /* sp_arm32.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = sp_arm32.c; path = ../../wolfcrypt/src/sp_arm32.c; sourceTree = "<group>"; };
A4E7E5922493E20500725359 /* sp_dsp32.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = sp_dsp32.c; path = ../../wolfcrypt/src/sp_dsp32.c; sourceTree = "<group>"; };
@ -1400,7 +1396,6 @@
525BE5331B3869110054BBCD /* hash.c */,
5216461E1A8992CC0062516A /* hmac.c */,
6AC85128272CAF2E00F2B32A /* kdf.c */,
A4DAE3192493F21900CEF51F /* idea.c */,
5216461F1A8992CC0062516A /* integer.c */,
521646201A8992CC0062516A /* logging.c */,
521646211A8992CC0062516A /* md2.c */,
@ -1619,7 +1614,6 @@
30B060671C6DDB2B00D46008 /* error.c in Sources */,
520775AA2239ABBE00087711 /* sp_int.c in Sources */,
30B060681C6DDB2B00D46008 /* hash.c in Sources */,
A4DAE34C2493F21900CEF51F /* idea.c in Sources */,
6AC8512B272CAF2E00F2B32A /* kdf.c in Sources */,
30B0606A1C6DDB2B00D46008 /* hmac.c in Sources */,
A4DAE3572493F29E00CEF51F /* sp_dsp32.c in Sources */,
@ -1715,7 +1709,6 @@
520775B32239AC3200087711 /* ed25519.c in Sources */,
520775B12239AC2500087711 /* wolfmath.c in Sources */,
521646451A8992CC0062516A /* memory.c in Sources */,
A4DAE34A2493F21900CEF51F /* idea.c in Sources */,
A4DAE3382493F21900CEF51F /* pkcs12.c in Sources */,
5216463C1A8992CC0062516A /* ecc.c in Sources */,
A4DAE3292493F21900CEF51F /* compress.c in Sources */,
@ -1788,7 +1781,6 @@
A4F3187A1BC58B1700FDF2BB /* keys.c in Sources */,
A4F318511BC58B1700FDF2BB /* logging.c in Sources */,
A4F318701BC58B1700FDF2BB /* md2.c in Sources */,
A4DAE34B2493F21900CEF51F /* idea.c in Sources */,
A4F318651BC58B1700FDF2BB /* md4.c in Sources */,
6AC8512A272CAF2E00F2B32A /* kdf.c in Sources */,
A4F3185E1BC58B1700FDF2BB /* md5.c in Sources */,

View File

@ -515,11 +515,6 @@
<type>1</type>
<locationURI>PARENT-4-PROJECT_LOC/wolfcrypt/src/hmac.c</locationURI>
</link>
<link>
<name>src/wolfcrypt/src/idea.c</name>
<type>1</type>
<locationURI>PARENT-4-PROJECT_LOC/wolfcrypt/src/idea.c</locationURI>
</link>
<link>
<name>src/wolfcrypt/src/include.am</name>
<type>1</type>

View File

@ -136,9 +136,6 @@ function(generate_build_flags)
if(WOLFSSL_CODING OR WOLFSSL_USER_SETTINGS)
set(BUILD_CODING "yes" PARENT_SCOPE)
endif()
if(WOLFSSL_IDEA OR WOLFSSL_USER_SETTINGS)
set(BUILD_IDEA "yes" PARENT_SCOPE)
endif()
if(WOLFSSL_ARC4 OR WOLFSSL_USER_SETTINGS)
set(BUILD_RC4 "yes" PARENT_SCOPE)
endif()
@ -792,10 +789,6 @@ function(generate_lib_src_list LIB_SOURCES)
list(APPEND LIB_SOURCES wolfcrypt/src/srp.c)
endif()
if(BUILD_IDEA)
list(APPEND LIB_SOURCES wolfcrypt/src/idea.c)
endif()
if(BUILD_AFALG)
list(APPEND LIB_SOURCES wolfcrypt/src/port/af_alg/wc_afalg.c)
endif()

View File

@ -541,7 +541,6 @@ then
test "$enable_fpecc" = "" && enable_fpecc=yes
test "$enable_eccencrypt" = "" && enable_eccencrypt=yes
test "$enable_psk" = "" && enable_psk=yes
test "$enable_idea" = "" && enable_idea=yes
test "$enable_cmac" = "" && enable_cmac=yes
test "$enable_xts" = "" && enable_xts=yes
test "$enable_ocsp" = "" && enable_ocsp=yes
@ -710,7 +709,6 @@ then
test "$enable_fpecc" = "" && enable_fpecc=yes
test "$enable_eccencrypt" = "" && enable_eccencrypt=yes
test "$enable_psk" = "" && enable_psk=yes
test "$enable_idea" = "" && enable_idea=yes
test "$enable_cmac" = "" && enable_cmac=yes
test "$enable_siphash" = "" && enable_siphash=yes
test "$enable_xts" = "" && enable_xts=yes
@ -3367,18 +3365,6 @@ then
ENABLED_DES3="yes"
fi
# IDEA
AC_ARG_ENABLE([idea],
[AS_HELP_STRING([--enable-idea],[Enable IDEA Cipher (default: disabled)])],
[ ENABLED_IDEA=$enableval ],
[ ENABLED_IDEA=no ]
)
if test "x$ENABLED_IDEA" = "xyes"
then
AM_CFLAGS="$AM_CFLAGS -DHAVE_IDEA"
fi
# ARC4
if test "$ENABLED_OPENSSH" = "yes" || test "$ENABLED_WPAS" = "yes" || test "$ENABLED_KRB" = "yes"
then
@ -7437,7 +7423,6 @@ AM_CONDITIONAL([BUILD_DH],[test "x$ENABLED_DH" = "xyes" || test "x$ENABLED_USERS
AM_CONDITIONAL([BUILD_ASN],[test "x$ENABLED_ASN" != "xno" || test "x$ENABLED_USERSETTINGS" = "xyes"])
AM_CONDITIONAL([BUILD_AES],[test "x$ENABLED_AES" = "xyes" || test "x$ENABLED_USERSETTINGS" = "xyes"])
AM_CONDITIONAL([BUILD_CODING],[test "x$ENABLED_CODING" = "xyes" || test "x$ENABLED_USERSETTINGS" = "xyes"])
AM_CONDITIONAL([BUILD_IDEA],[test "x$ENABLED_IDEA" = "xyes" || test "x$ENABLED_USERSETTINGS" = "xyes"])
AM_CONDITIONAL([BUILD_RC4],[test "x$ENABLED_ARC4" = "xyes" || test "x$ENABLED_USERSETTINGS" = "xyes"])
AM_CONDITIONAL([BUILD_MD5],[test "x$ENABLED_MD5" = "xyes" || test "x$ENABLED_USERSETTINGS" = "xyes"])
AM_CONDITIONAL([BUILD_SHA],[test "x$ENABLED_SHA" = "xyes" || test "x$ENABLED_USERSETTINGS" = "xyes"])
@ -7761,7 +7746,6 @@ echo " * AES-CFB: $ENABLED_AESCFB"
echo " * AES-OFB: $ENABLED_AESOFB"
echo " * AES-SIV: $ENABLED_AESSIV"
echo " * DES3: $ENABLED_DES3"
echo " * IDEA: $ENABLED_IDEA"
echo " * Camellia: $ENABLED_CAMELLIA"
echo " * NULL Cipher: $ENABLED_NULL_CIPHER"
echo " * MD2: $ENABLED_MD2"

View File

@ -117,7 +117,6 @@ are as follows but new group can be made:
\ingroup ECC
\ingroup ED25519
\ingroup HMAC
\ingroup IDEA
\ingroup MD2
\ingroup MD4
\ingroup MD5

View File

@ -194,7 +194,6 @@
Derive the SSV, (wc_DeriveSakkeSSV()) on the recipient from the encapsulated SSV.
\defgroup HMAC Algorithms - HMAC
\defgroup IDEA Algorithms - IDEA
\defgroup MD2 Algorithms - MD2
\defgroup MD4 Algorithms - MD4
\defgroup MD5 Algorithms - MD5

View File

@ -44,7 +44,6 @@
<li>\ref ECCSI</li>
<li>\ref SAKKE</li>
<li>\ref HMAC</li>
<li>\ref IDEA</li>
<li>\ref MD2</li>
<li>\ref MD4</li>
<li>\ref MD5</li>

View File

@ -1,163 +0,0 @@
/*!
\ingroup IDEA
\brief Generate the 52, 16-bit key sub-blocks from the 128 key.
\return 0 Success
\return BAD_FUNC_ARG Returns if idea or key is null, keySz is not equal to
IDEA_KEY_SIZE, or dir is not IDEA_ENCRYPTION or IDEA_DECRYPTION.
\param idea Pointer to Idea structure.
\param key Pointer to key in memory.
\param keySz Size of key.
\param iv Value for IV in Idea structure. Can be null.
\param dir Direction, either IDEA_ENCRYPTION or IDEA_DECRYPTION
_Example_
\code
byte v_key[IDEA_KEY_SIZE] = { }; // Some Key
Idea idea;
int ret = wc_IdeaSetKey(&idea v_key, IDEA_KEY_SIZE, NULL, IDEA_ENCRYPTION);
if (ret != 0)
{
// There was an error
}
\endcode
\sa wc_IdeaSetIV
*/
WOLFSSL_API int wc_IdeaSetKey(Idea *idea, const byte* key, word16 keySz,
const byte *iv, int dir);
/*!
\ingroup IDEA
\brief Sets the IV in an Idea key structure.
\return 0 Success
\return BAD_FUNC_ARG Returns if idea is null.
\param idea Pointer to idea key structure.
\param iv The IV value to set, can be null.
_Example_
\code
Idea idea;
// Initialize idea
byte iv[] = { }; // Some IV
int ret = wc_IdeaSetIV(&idea, iv);
if(ret != 0)
{
// Some error occurred
}
\endcode
\sa wc_IdeaSetKey
*/
WOLFSSL_API int wc_IdeaSetIV(Idea *idea, const byte* iv);
/*!
\ingroup IDEA
\brief Encryption or decryption for a block (64 bits).
\return 0 upon success.
\return <0 an error occurred
\param idea Pointer to idea key structure.
\param out Pointer to destination.
\param in Pointer to input data to encrypt or decrypt.
_Example_
\code
byte v_key[IDEA_KEY_SIZE] = { }; // Some Key
byte data[IDEA_BLOCK_SIZE] = { }; // Some encrypted data
Idea idea;
wc_IdeaSetKey(&idea, v_key, IDEA_KEY_SIZE, NULL, IDEA_DECRYPTION);
int ret = wc_IdeaCipher(&idea, data, data);
if (ret != 0)
{
// There was an error
}
\endcode
\sa wc_IdeaSetKey
\sa wc_IdeaSetIV
\sa wc_IdeaCbcEncrypt
\sa wc_IdeaCbcDecrypt
*/
WOLFSSL_API int wc_IdeaCipher(Idea *idea, byte* out, const byte* in);
/*!
\ingroup IDEA
\brief Encrypt data using IDEA CBC mode.
\return 0 Success
\return BAD_FUNC_ARG Returns if any arguments are null.
\param idea Pointer to Idea key structure.
\param out Pointer to destination for encryption.
\param in Pointer to input for encryption.
\param len length of input.
_Example_
\code
Idea idea;
// Initialize idea structure for encryption
const char *message = "International Data Encryption Algorithm";
byte msg_enc[40], msg_dec[40];
memset(msg_enc, 0, sizeof(msg_enc));
ret = wc_IdeaCbcEncrypt(&idea, msg_enc, (byte *)message,
(word32)strlen(message)+1);
if(ret != 0)
{
// Some error occurred
}
\endcode
\sa wc_IdeaCbcDecrypt
\sa wc_IdeaCipher
\sa wc_IdeaSetKey
*/
WOLFSSL_API int wc_IdeaCbcEncrypt(Idea *idea, byte* out,
const byte* in, word32 len);
/*!
\ingroup IDEA
\brief Decrypt data using IDEA CBC mode.
\return 0 Success
\return BAD_FUNC_ARG Returns if any arguments are null.
\param idea Pointer to Idea key structure.
\param out Pointer to destination for encryption.
\param in Pointer to input for encryption.
\param len length of input.
_Example_
\code
Idea idea;
// Initialize idea structure for decryption
const char *message = "International Data Encryption Algorithm";
byte msg_enc[40], msg_dec[40];
memset(msg_dec, 0, sizeof(msg_dec));
ret = wc_IdeaCbcDecrypt(&idea, msg_dec, msg_enc,
(word32)strlen(message)+1);
if(ret != 0)
{
// Some error occurred
}
\endcode
\sa wc_IdeaCbcEncrypt
\sa wc_IdeaCipher
\sa wc_IdeaSetKey
*/
WOLFSSL_API int wc_IdeaCbcDecrypt(Idea *idea, byte* out,
const byte* in, word32 len);

View File

@ -170,7 +170,6 @@ extern "C" {
#define WOLFSSL_DES_ECB
/* Non-Standard Algorithms (DG disabled) */
//#define HAVE_IDEA
//#define HAVE_CAMELLIA
//#define WOLFSSL_RIPEMD
//#define HAVE_SCRYPT

View File

@ -80,7 +80,6 @@
#include <wolfssl/wolfcrypt/dh.h>
#include <wolfssl/wolfcrypt/dsa.h>
#include <wolfssl/wolfcrypt/srp.h>
#include <wolfssl/wolfcrypt/idea.h>
#include <wolfssl/wolfcrypt/chacha.h>
#include <wolfssl/wolfcrypt/chacha20_poly1305.h>
#include <wolfssl/wolfcrypt/pwdbased.h>

View File

@ -270,7 +270,6 @@ mkdir -p $RPM_BUILD_ROOT/
%{_includedir}/wolfssl/wolfcrypt/ge_operations.h
%{_includedir}/wolfssl/wolfcrypt/hash.h
%{_includedir}/wolfssl/wolfcrypt/hmac.h
%{_includedir}/wolfssl/wolfcrypt/idea.h
%{_includedir}/wolfssl/wolfcrypt/integer.h
%{_includedir}/wolfssl/wolfcrypt/kdf.h
%{_includedir}/wolfssl/wolfcrypt/logging.h

View File

@ -716,10 +716,6 @@ if BUILD_SRP
src_libwolfssl_la_SOURCES += wolfcrypt/src/srp.c
endif
if BUILD_IDEA
src_libwolfssl_la_SOURCES += wolfcrypt/src/idea.c
endif
if BUILD_AFALG
src_libwolfssl_la_SOURCES += wolfcrypt/src/port/af_alg/wc_afalg.c
endif

View File

@ -2555,10 +2555,6 @@ void InitCiphers(WOLFSSL* ssl)
#ifdef HAVE_ONE_TIME_AUTH
ssl->auth.setup = 0;
#endif
#ifdef HAVE_IDEA
ssl->encrypt.idea = NULL;
ssl->decrypt.idea = NULL;
#endif
}
@ -2606,10 +2602,6 @@ void FreeCiphers(WOLFSSL* ssl)
#if defined(HAVE_POLY1305) && defined(HAVE_ONE_TIME_AUTH)
XFREE(ssl->auth.poly1305, ssl->heap, DYNAMIC_TYPE_CIPHER);
#endif
#ifdef HAVE_IDEA
XFREE(ssl->encrypt.idea, ssl->heap, DYNAMIC_TYPE_CIPHER);
XFREE(ssl->decrypt.idea, ssl->heap, DYNAMIC_TYPE_CIPHER);
#endif
#if defined(WOLFSSL_TLS13) && defined(HAVE_NULL_CIPHER)
wc_HmacFree(ssl->encrypt.hmac);
wc_HmacFree(ssl->decrypt.hmac);
@ -3757,13 +3749,6 @@ void InitSuites(Suites* suites, ProtocolVersion pv, int keySz, word16 haveRSA,
}
#endif
#ifdef BUILD_SSL_RSA_WITH_IDEA_CBC_SHA
if (haveRSA) {
suites->suites[idx++] = CIPHER_BYTE;
suites->suites[idx++] = SSL_RSA_WITH_IDEA_CBC_SHA;
}
#endif
#endif /* !WOLFSSL_NO_TLS12 */
suites->suiteSz = idx;
@ -10144,12 +10129,6 @@ static int BuildFinished(WOLFSSL* ssl, Hashes* hashes, const byte* sender)
return 1;
break;
#ifdef HAVE_IDEA
case SSL_RSA_WITH_IDEA_CBC_SHA :
if (requirement == REQUIRES_RSA)
return 1;
break;
#endif /* HAVE_IDEA */
#endif /* !NO_RSA */
#ifndef NO_PSK
@ -15610,12 +15589,6 @@ static WC_INLINE int EncryptDo(WOLFSSL* ssl, byte* out, const byte* input,
break;
#endif
#ifdef HAVE_IDEA
case wolfssl_idea:
ret = wc_IdeaCbcEncrypt(ssl->encrypt.idea, out, input, sz);
break;
#endif
default:
WOLFSSL_MSG("wolfSSL Encrypt programming error");
ret = ENCRYPT_ERROR;
@ -15864,12 +15837,6 @@ static WC_INLINE int DecryptDo(WOLFSSL* ssl, byte* plain, const byte* input,
break;
#endif
#ifdef HAVE_IDEA
case wolfssl_idea:
ret = wc_IdeaCbcDecrypt(ssl->decrypt.idea, plain, input, sz);
break;
#endif
default:
WOLFSSL_MSG("wolfSSL Decrypt programming error");
ret = DECRYPT_ERROR;
@ -21146,10 +21113,6 @@ static const CipherSuiteInfo cipher_names[] =
SUITE_INFO("RENEGOTIATION-INFO","TLS_EMPTY_RENEGOTIATION_INFO_SCSV",CIPHER_BYTE,TLS_EMPTY_RENEGOTIATION_INFO_SCSV,SSLv3_MINOR,SSLv3_MAJOR),
#endif
#ifdef BUILD_SSL_RSA_WITH_IDEA_CBC_SHA
SUITE_INFO("IDEA-CBC-SHA","SSL_RSA_WITH_IDEA_CBC_SHA",CIPHER_BYTE,SSL_RSA_WITH_IDEA_CBC_SHA,SSLv3_MINOR,SSLv3_MAJOR),
#endif
#ifdef BUILD_TLS_ECDHE_ECDSA_WITH_NULL_SHA
SUITE_INFO("ECDHE-ECDSA-NULL-SHA","TLS_ECDHE_ECDSA_WITH_NULL_SHA",ECC_BYTE,TLS_ECDHE_ECDSA_WITH_NULL_SHA, TLSv1_MINOR, SSLv3_MAJOR),
#endif
@ -21398,8 +21361,6 @@ const char* GetCipherEncStr(char n[][MAX_SEGMENT_SZ]) {
(XSTRNCMP(n2,"NULL",4) == 0) ||
((XSTRNCMP(n0,"TLS13",5) == 0) && (XSTRNCMP(n3,"",0) == 0)))
encStr = "None";
else if ((XSTRNCMP(n0,"IDEA",4) == 0))
encStr = "IDEA";
else
encStr = "unknown";
@ -21482,7 +21443,6 @@ int SetCipherBits(const char* enc) {
((XSTRNCMP(enc,"AESGCM(128)",11) == 0) ||
(XSTRNCMP(enc,"AES(128)",8) == 0) ||
(XSTRNCMP(enc,"CAMELLIA(128)",13) == 0) ||
(XSTRNCMP(enc,"IDEA",4) == 0) ||
(XSTRNCMP(enc,"RC4",3) == 0))
ret = 128;
else if

View File

@ -2009,23 +2009,6 @@ int SetCipherSpecs(WOLFSSL* ssl)
break;
#endif
#ifdef BUILD_SSL_RSA_WITH_IDEA_CBC_SHA
case SSL_RSA_WITH_IDEA_CBC_SHA :
ssl->specs.bulk_cipher_algorithm = wolfssl_idea;
ssl->specs.cipher_type = block;
ssl->specs.mac_algorithm = sha_mac;
ssl->specs.kea = rsa_kea;
ssl->specs.sig_algo = rsa_sa_algo;
ssl->specs.hash_size = WC_SHA_DIGEST_SIZE;
ssl->specs.pad_size = PAD_SHA;
ssl->specs.static_ecdh = 0;
ssl->specs.key_size = IDEA_KEY_SIZE;
ssl->specs.block_size = IDEA_BLOCK_SIZE;
ssl->specs.iv_size = IDEA_IV_SIZE;
break;
#endif
#ifdef BUILD_WDM_WITH_NULL_SHA256
case WDM_WITH_NULL_SHA256 :
ssl->specs.bulk_cipher_algorithm = wolfssl_cipher_null;
@ -2670,60 +2653,6 @@ static int SetKeys(Ciphers* enc, Ciphers* dec, Keys* keys, CipherSpecs* specs,
}
#endif /* HAVE_CAMELLIA */
#ifdef HAVE_IDEA
/* check that buffer sizes are sufficient */
#if (MAX_WRITE_IV_SZ < 8) /* IDEA_IV_SIZE */
#error MAX_WRITE_IV_SZ too small for IDEA
#endif
if (specs->bulk_cipher_algorithm == wolfssl_idea) {
int ideaRet;
if (enc && enc->idea == NULL)
enc->idea = (Idea*)XMALLOC(sizeof(Idea), heap, DYNAMIC_TYPE_CIPHER);
if (enc && enc->idea == NULL)
return MEMORY_E;
if (dec && dec->idea == NULL)
dec->idea = (Idea*)XMALLOC(sizeof(Idea), heap, DYNAMIC_TYPE_CIPHER);
if (dec && dec->idea == NULL)
return MEMORY_E;
if (side == WOLFSSL_CLIENT_END) {
if (enc) {
ideaRet = wc_IdeaSetKey(enc->idea, keys->client_write_key,
specs->key_size, keys->client_write_IV,
IDEA_ENCRYPTION);
if (ideaRet != 0) return ideaRet;
}
if (dec) {
ideaRet = wc_IdeaSetKey(dec->idea, keys->server_write_key,
specs->key_size, keys->server_write_IV,
IDEA_DECRYPTION);
if (ideaRet != 0) return ideaRet;
}
}
else {
if (enc) {
ideaRet = wc_IdeaSetKey(enc->idea, keys->server_write_key,
specs->key_size, keys->server_write_IV,
IDEA_ENCRYPTION);
if (ideaRet != 0) return ideaRet;
}
if (dec) {
ideaRet = wc_IdeaSetKey(dec->idea, keys->client_write_key,
specs->key_size, keys->client_write_IV,
IDEA_DECRYPTION);
if (ideaRet != 0) return ideaRet;
}
}
if (enc)
enc->setup = 1;
if (dec)
dec->setup = 1;
}
#endif /* HAVE_IDEA */
#ifdef HAVE_NULL_CIPHER
if (specs->bulk_cipher_algorithm == wolfssl_cipher_null) {
#ifdef WOLFSSL_TLS13

View File

@ -4297,12 +4297,6 @@ static int Decrypt(WOLFSSL* ssl, byte* output, const byte* input, word32 sz)
break;
#endif
#ifdef HAVE_IDEA
case wolfssl_idea:
wc_IdeaCbcDecrypt(ssl->decrypt.idea, output, input, sz);
break;
#endif
#if defined(HAVE_AESGCM) || defined(HAVE_AESCCM)
case wolfssl_aes_gcm:
case wolfssl_aes_ccm: /* GCM AEAD macros use same size as CCM */

View File

@ -113,7 +113,6 @@
#include <wolfssl/wolfcrypt/md4.h>
#include <wolfssl/wolfcrypt/md5.h>
#include <wolfssl/wolfcrypt/arc4.h>
#include <wolfssl/wolfcrypt/idea.h>
#include <wolfssl/wolfcrypt/curve25519.h>
#include <wolfssl/wolfcrypt/ed25519.h>
#include <wolfssl/wolfcrypt/curve448.h>
@ -25874,7 +25873,6 @@ int wolfSSL_CIPHER_get_cipher_nid(const WOLFSSL_CIPHER* cipher)
{"3DES", NID_des_ede3_cbc},
{"CHACHA20/POLY1305(256)", NID_chacha20_poly1305},
{"None", NID_undef},
{"IDEA", NID_idea_cbc},
{NULL, NID_undef}
};
@ -26230,11 +26228,6 @@ static WC_INLINE const char* wolfssl_cipher_to_string(int cipher, int key_size)
encStr = "3DES(168)";
break;
#endif
#ifdef HAVE_IDEA
case wolfssl_idea:
encStr = "IDEA(128)";
break;
#endif
#ifndef NO_AES
case wolfssl_aes:
if (key_size == 128)
@ -60715,13 +60708,6 @@ int wolfSSL_RAND_poll(void)
WOLFSSL_MSG("DES3 ECB");
break;
#endif
#ifdef HAVE_IDEA
case IDEA_CBC_TYPE :
WOLFSSL_MSG("IDEA CBC");
XMEMCPY(ctx->iv, &ctx->cipher.idea.reg, IDEA_BLOCK_SIZE);
break;
#endif
case ARC4_TYPE :
WOLFSSL_MSG("ARC4");
break;
@ -60806,12 +60792,6 @@ int wolfSSL_RAND_poll(void)
break;
#endif
#ifdef HAVE_IDEA
case IDEA_CBC_TYPE :
WOLFSSL_MSG("IDEA CBC");
XMEMCPY(&ctx->cipher.idea.reg, ctx->iv, IDEA_BLOCK_SIZE);
break;
#endif
case ARC4_TYPE :
WOLFSSL_MSG("ARC4");
break;

View File

@ -167,9 +167,6 @@
#ifdef WOLFSSL_RIPEMD
#include <wolfssl/wolfcrypt/ripemd.h>
#endif
#ifdef HAVE_IDEA
#include <wolfssl/wolfcrypt/idea.h>
#endif
#ifndef NO_DES3
#include <wolfssl/wolfcrypt/des3.h>
#include <wolfssl/wolfcrypt/wc_encrypt.h>
@ -696,7 +693,7 @@ static void test_for_double_Free(void)
"SA-AES256-SHA384:ECDH-RSA-AES256-SHA384:ECDH-ECDSA-AES256-SHA384:ECDHE-RSA-CHA"
"CHA20-POLY1305:ECDHE-ECDSA-CHACHA20-POLY1305:DHE-RSA-CHACHA20-POLY1305:ECDHE-R"
"SA-CHACHA20-POLY1305-OLD:ECDHE-ECDSA-CHACHA20-POLY1305-OLD:DHE-RSA-CHACHA20-PO"
"LY1305-OLD:IDEA-CBC-SHA:ECDHE-ECDSA-NULL-SHA:ECDHE-PSK-NULL-SHA256:ECDHE-PSK-A"
"LY1305-OLD:ECDHE-ECDSA-NULL-SHA:ECDHE-PSK-NULL-SHA256:ECDHE-PSK-A"
"ES128-CBC-SHA256:PSK-CHACHA20-POLY1305:ECDHE-PSK-CHACHA20-POLY1305:DHE-PSK-CHA"
"CHA20-POLY1305:EDH-RSA-DES-CBC3-SHA:TLS13-AES128-GCM-SHA256:TLS13-AES256-GCM-S"
"HA384:TLS13-CHACHA20-POLY1305-SHA256:TLS13-AES128-CCM-SHA256:TLS13-AES128-CCM-"
@ -4222,10 +4219,6 @@ static void test_wolfSSL_EVP_get_cipherbynid(void)
#endif
#endif /* !NO_DES3 */
#ifdef HAVE_IDEA
AssertNotNull(strcmp("EVP_IDEA_CBC", wolfSSL_EVP_get_cipherbynid(34)));
#endif
/* test for nid is out of range */
AssertNull(wolfSSL_EVP_get_cipherbynid(1));
@ -13510,232 +13503,6 @@ static int test_wc_Shake256Hash(void)
#endif
return ret;
} /* END test_wc_Shake256Hash */
/*
* unit test for wc_IdeaSetKey()
*/
static int test_wc_IdeaSetKey (void)
{
int ret = 0;
#ifdef HAVE_IDEA
Idea idea;
const byte key[] =
{
0x37, 0x37, 0x37, 0x37, 0x37, 0x37, 0x37, 0x37,
0x37, 0x37, 0x37, 0x37, 0x37, 0x37, 0x37, 0x37
};
int flag = 0;
printf(testingFmt, "wc_IdeaSetKey()");
/*IV can be NULL, default value is 0*/
ret = wc_IdeaSetKey(&idea, key, IDEA_KEY_SIZE, NULL, IDEA_ENCRYPTION);
if (ret == 0) {
ret = wc_IdeaSetKey(&idea, key, IDEA_KEY_SIZE, NULL, IDEA_DECRYPTION);
}
/* Bad args. */
if (ret == 0) {
ret = wc_IdeaSetKey(NULL, key, IDEA_KEY_SIZE, NULL, IDEA_ENCRYPTION);
if (ret != BAD_FUNC_ARG) {
flag = 1;
}
ret = wc_IdeaSetKey(&idea, NULL, IDEA_KEY_SIZE, NULL, IDEA_ENCRYPTION);
if (ret != BAD_FUNC_ARG) {
flag = 1;
}
ret = wc_IdeaSetKey(&idea, key, IDEA_KEY_SIZE - 1,
NULL, IDEA_ENCRYPTION);
if (ret != BAD_FUNC_ARG) {
flag = 1;
}
ret = wc_IdeaSetKey(&idea, key, IDEA_KEY_SIZE, NULL, -1);
if (ret != BAD_FUNC_ARG) {
flag = 1;
}
if (flag == 1) {
ret = WOLFSSL_FATAL_ERROR;
} else {
ret = 0;
}
} /* END Test Bad Args. */
printf(resultFmt, ret == 0 ? passed : failed);
#endif
return ret;
} /* END test_wc_IdeaSetKey */
/*
* Unit test for wc_IdeaSetIV()
*/
static int test_wc_IdeaSetIV (void)
{
int ret = 0;
#ifdef HAVE_IDEA
Idea idea;
printf(testingFmt, "wc_IdeaSetIV()");
ret = wc_IdeaSetIV(&idea, NULL);
/* Test bad args. */
if (ret == 0) {
ret = wc_IdeaSetIV(NULL, NULL);
if (ret == BAD_FUNC_ARG) {
ret = 0;
} else {
ret = WOLFSSL_FATAL_ERROR;
}
}
printf(resultFmt, ret == 0 ? passed : failed);
#endif
return ret;
} /* END test_wc_IdeaSetIV */
/*
* Unit test for wc_IdeaCipher()
*/
static int test_wc_IdeaCipher (void)
{
int ret = 0;
#ifdef HAVE_IDEA
Idea idea;
const byte key[] =
{
0x2B, 0xD6, 0x45, 0x9F, 0x82, 0xC5, 0xB3, 0x00,
0x95, 0x2C, 0x49, 0x10, 0x48, 0x81, 0xFF, 0x48
};
const byte plain[] =
{
0x37, 0x37, 0x37, 0x37, 0x37, 0x37, 0x37, 0x37
};
byte enc[sizeof(plain)];
byte dec[sizeof(enc)];
printf(testingFmt, "wc_IdeaCipher()");
ret = wc_IdeaSetKey(&idea, key, IDEA_KEY_SIZE, NULL, IDEA_ENCRYPTION);
if (ret == 0) {
ret = wc_IdeaCipher(&idea, enc, plain);
if (ret != 0) {
ret = WOLFSSL_FATAL_ERROR;
}
}
if (ret == 0) {
ret = wc_IdeaSetKey(&idea, key, IDEA_KEY_SIZE, NULL, IDEA_DECRYPTION);
if (ret == 0) {
ret = wc_IdeaCipher(&idea, dec, enc);
}
if (ret == 0) {
ret = XMEMCMP(plain, dec, IDEA_BLOCK_SIZE);
}
if (ret != 0) {
ret = WOLFSSL_FATAL_ERROR;
}
}
/* Pass Bad Args. */
if (ret == 0) {
ret = wc_IdeaCipher(NULL, enc, dec);
if (ret == BAD_FUNC_ARG) {
ret = wc_IdeaCipher(&idea, NULL, dec);
}
if (ret == BAD_FUNC_ARG) {
ret = wc_IdeaCipher(&idea, enc, NULL);
}
if (ret == BAD_FUNC_ARG) {
ret = 0;
} else {
ret = WOLFSSL_FATAL_ERROR;
}
}
printf(resultFmt, ret == 0 ? passed : failed);
#endif
return ret;
} /* END test_wc_IdeaCipher */
/*
* Unit test for functions wc_IdeaCbcEncrypt and wc_IdeaCbcDecrypt
*/
static int test_wc_IdeaCbcEncyptDecrypt (void)
{
int ret = 0;
#ifdef HAVE_IDEA
Idea idea;
const byte key[] =
{
0x37, 0x37, 0x37, 0x37, 0x37, 0x37, 0x37, 0x37,
0x37, 0x37, 0x37, 0x37, 0x37, 0x37, 0x37, 0x37
};
const char* message = "International Data Encryption Algorithm";
byte msg_enc[40];
byte msg_dec[40];
printf(testingFmt, "wc_IdeaCbcEncrypt()");
ret = wc_IdeaSetKey(&idea, key, sizeof(key), NULL, IDEA_ENCRYPTION);
if (ret == 0) {
ret = wc_IdeaCbcEncrypt(&idea, msg_enc, (byte *)message,
(word32)XSTRLEN(message) + 1);
}
if (ret == 0) {
ret = wc_IdeaSetKey(&idea, key, sizeof(key), NULL, IDEA_DECRYPTION);
}
if (ret == 0) {
ret = wc_IdeaCbcDecrypt(&idea, msg_dec, msg_enc,
(word32)XSTRLEN(message) + 1);
if (XMEMCMP(message, msg_dec, (word32)XSTRLEN(message))) {
ret = WOLFSSL_FATAL_ERROR;
}
}
/* Test bad args. Enc */
if (ret == 0) {
ret = wc_IdeaCbcEncrypt(NULL, msg_enc, (byte*)message,
(word32)XSTRLEN(message) + 1);
if (ret == BAD_FUNC_ARG) {
ret = wc_IdeaCbcEncrypt(&idea, NULL, (byte*)message,
(word32)XSTRLEN(message) + 1);
}
if (ret == BAD_FUNC_ARG) {
ret = wc_IdeaCbcEncrypt(&idea, msg_enc, NULL,
(word32)XSTRLEN(message) + 1);
}
if (ret != BAD_FUNC_ARG) {
ret = WOLFSSL_FATAL_ERROR;
} else {
ret = 0;
}
} /* END test bad args ENC */
/* Test bad args DEC */
if (ret == 0) {
ret = wc_IdeaCbcDecrypt(NULL, msg_dec, msg_enc,
(word32)XSTRLEN(message) + 1);
if (ret == BAD_FUNC_ARG) {
ret = wc_IdeaCbcDecrypt(&idea, NULL, msg_enc,
(word32)XSTRLEN(message) + 1);
}
if (ret == BAD_FUNC_ARG) {
ret = wc_IdeaCbcDecrypt(&idea, msg_dec, NULL,
(word32)XSTRLEN(message) + 1);
}
if (ret != BAD_FUNC_ARG) {
ret = WOLFSSL_FATAL_ERROR;
} else {
ret = 0;
}
}
printf(resultFmt, ret == 0 ? passed : failed);
#endif
return ret;
} /* END test_wc_IdeaCbcEncryptDecrypt */
/*
* Test function for wc_HmacSetKey
@ -43389,9 +43156,6 @@ static void test_wolfSSL_EVP_CIPHER_CTX_iv_length(void)
NID_des_cbc,
NID_des_ede3_cbc,
#endif
#ifdef HAVE_IDEA
NID_idea_cbc,
#endif
};
int iv_lengths[] = {
@ -43411,9 +43175,6 @@ static void test_wolfSSL_EVP_CIPHER_CTX_iv_length(void)
DES_BLOCK_SIZE,
DES_BLOCK_SIZE,
#endif
#ifdef HAVE_IDEA
IDEA_BLOCK_SIZE,
#endif
};
@ -43835,9 +43596,6 @@ static void test_wolfSSL_EVP_CIPHER_iv_length(void)
NID_des_cbc,
NID_des_ede3_cbc,
#endif
#ifdef HAVE_IDEA
NID_idea_cbc,
#endif
};
int iv_lengths[] = {
@ -43881,9 +43639,6 @@ static void test_wolfSSL_EVP_CIPHER_iv_length(void)
DES_BLOCK_SIZE,
DES_BLOCK_SIZE,
#endif
#ifdef HAVE_IDEA
IDEA_BLOCK_SIZE,
#endif
};
printf(testingFmt, "wolfSSL_EVP_CIPHER_iv_length");
@ -52591,10 +52346,6 @@ void ApiTest(void)
AssertIntEQ(test_wc_Des3_CbcEncryptDecrypt(), 0);
AssertIntEQ(test_wc_Des3_CbcEncryptDecryptWithKey(), 0);
AssertIntEQ(test_wc_Des3_EcbEncrypt(), 0);
AssertIntEQ(test_wc_IdeaSetKey(), 0);
AssertIntEQ(test_wc_IdeaSetIV(), 0);
AssertIntEQ(test_wc_IdeaCipher(), 0);
AssertIntEQ(test_wc_IdeaCbcEncyptDecrypt(), 0);
AssertIntEQ(test_wc_Chacha_SetKey(), 0);
AssertIntEQ(test_wc_Chacha_Process(), 0);
AssertIntEQ(test_wc_ChaCha20Poly1305_aead(), 0);

View File

@ -118,18 +118,6 @@
-l ECDHE-ECDSA-CHACHA20-POLY1305-OLD
-A ./certs/ca-ecc-cert.pem
# server DTLSv1 IDEA-CBC-SHA
-u
-f
-v 2
-l IDEA-CBC-SHA
# client DTLSv1 IDEA-CBC-SHA
-u
-f
-v 2
-l IDEA-CBC-SHA
# server DTLSv1 DES-CBC3-SHA
-u
-f

View File

@ -2224,18 +2224,6 @@
-v 2
-l ADH-AES128-SHA
# server DTLSv1 IDEA-CBC-SHA
-u 1024
-f
-v 2
-l IDEA-CBC-SHA
# client DTLSv1 IDEA-CBC-SHA
-u 1024
-f
-v 2
-l IDEA-CBC-SHA
# server DTLSv1 DES-CBC3-SHA
-u 1024
-f
@ -3438,18 +3426,6 @@
-v 2
-l ADH-AES128-SHA
# server DTLSv1 IDEA-CBC-SHA
-u 512
-f
-v 2
-l IDEA-CBC-SHA
# client DTLSv1 IDEA-CBC-SHA
-u 512
-f
-v 2
-l IDEA-CBC-SHA
# server DTLSv1 DES-CBC3-SHA
-u 512
-f

View File

@ -199,18 +199,6 @@
-l ECDHE-ECDSA-CHACHA20-POLY1305-OLD
-A ./certs/ca-ecc-cert.pem
# server DTLSv1 IDEA-CBC-SHA
-M
-u
-v 2
-l IDEA-CBC-SHA
# client DTLSv1 IDEA-CBC-SHA
-i
-u
-v 2
-l IDEA-CBC-SHA
# server DTLSv1 DES-CBC3-SHA
-M
-u

View File

@ -118,18 +118,6 @@
-l ECDHE-ECDSA-CHACHA20-POLY1305-OLD
-A ./certs/ca-ecc-cert.pem
# server DTLSv1 IDEA-CBC-SHA
-m
-u
-v 2
-l IDEA-CBC-SHA
# client DTLSv1 IDEA-CBC-SHA
-R
-u
-v 2
-l IDEA-CBC-SHA
# server DTLSv1 DES-CBC3-SHA
-m
-u

View File

@ -118,18 +118,6 @@
-l ECDHE-ECDSA-CHACHA20-POLY1305-OLD
-A ./certs/ca-ecc-cert.pem
# server DTLSv1 IDEA-CBC-SHA
-u
-r
-v 2
-l IDEA-CBC-SHA
# client DTLSv1 IDEA-CBC-SHA
-u
-r
-v 2
-l IDEA-CBC-SHA
# server DTLSv1 DES-CBC3-SHA
-u
-r

View File

@ -100,16 +100,6 @@
-l ECDHE-ECDSA-CHACHA20-POLY1305-OLD
-A ./certs/ca-ecc-cert.pem
# server DTLSv1 IDEA-CBC-SHA
-u
-v 2
-l IDEA-CBC-SHA
# client DTLSv1 IDEA-CBC-SHA
-u
-v 2
-l IDEA-CBC-SHA
# server DTLSv1 DES-CBC3-SHA
-u
-v 2

View File

@ -120,16 +120,6 @@
-v 3
-l RC4-SHA
# server DTLSv1 IDEA-CBC-SHA
-G
-v 2
-l IDEA-CBC-SHA
# client DTLSv1 IDEA-CBC-SHA
-G
-v 2
-l IDEA-CBC-SHA
# server DTLSv1 DES-CBC3-SHA
-G
-v 2

View File

@ -106,14 +106,6 @@
-v 0
-l DES-CBC3-SHA
# server SSLv3 IDEA-CBC-SHA
-v 0
-l IDEA-CBC-SHA
# client SSLv3 IDEA-CBC-SHA
-v 0
-l IDEA-CBC-SHA
# server TLSv1 RC4-SHA
-v 1
-l RC4-SHA
@ -138,14 +130,6 @@
-v 1
-l DES-CBC3-SHA
# server TLSv1 IDEA-CBC-SHA
-v 1
-l IDEA-CBC-SHA
# client TLSv1 IDEA-CBC-SHA
-v 1
-l IDEA-CBC-SHA
# server TLSv1 AES128-SHA
-v 1
-l AES128-SHA
@ -178,14 +162,6 @@
-v 2
-l RC4-MD5
# server TLSv1.1 IDEA-CBC-SHA
-v 2
-l IDEA-CBC-SHA
# client TLSv1.1 IDEA-CBC-SHA
-v 2
-l IDEA-CBC-SHA
# server TLSv1.1 DES-CBC3-SHA
-v 2
-l DES-CBC3-SHA

View File

@ -23,7 +23,7 @@ benchmark
Measure RSA <key size> performance.
-<alg> Algorithm to benchmark. Available algorithms include:
cipher aes-cbc aes-gcm aes-ecb aes-xts aes-cfb aes-ctr aes-ccm
camellia arc4 chacha20 chacha20-poly1305 des idea
camellia arc4 chacha20 chacha20-poly1305 des
digest md5 poly1305 sha sha2 sha224 sha256 sha384 sha512 sha3
sha3-224 sha3-256 sha3-384 sha3-512 ripemd
mac cmac hmac hmac-md5 hmac-sha hmac-sha224 hmac-sha256

View File

@ -178,9 +178,6 @@
#ifdef HAVE_ECC
#include <wolfssl/wolfcrypt/ecc.h>
#endif
#ifdef HAVE_IDEA
#include <wolfssl/wolfcrypt/idea.h>
#endif
#ifdef HAVE_CURVE25519
#include <wolfssl/wolfcrypt/curve25519.h>
#endif
@ -280,7 +277,6 @@
#define BENCH_CHACHA20 0x00001000
#define BENCH_CHACHA20_POLY1305 0x00002000
#define BENCH_DES 0x00004000
#define BENCH_IDEA 0x00008000
#define BENCH_AES_CFB 0x00010000
#define BENCH_AES_OFB 0x00020000
#define BENCH_AES_SIV 0x00040000
@ -454,9 +450,6 @@ static const bench_alg bench_cipher_opt[] = {
#endif
#ifndef NO_DES3
{ "-des", BENCH_DES },
#endif
#ifdef HAVE_IDEA
{ "-idea", BENCH_IDEA },
#endif
{ NULL, 0 }
};
@ -1781,11 +1774,6 @@ static void* benchmarks_do(void* args)
#endif
}
#endif
#ifdef HAVE_IDEA
if (bench_all || (bench_cipher_algs & BENCH_IDEA))
bench_idea();
#endif
#ifndef NO_MD5
if (bench_all || (bench_digest_algs & BENCH_MD5)) {
#ifndef NO_SW_BENCH
@ -3370,32 +3358,6 @@ exit:
#endif /* !NO_DES3 */
#ifdef HAVE_IDEA
void bench_idea(void)
{
Idea enc;
double start;
int ret = 0, i, count;
ret = wc_IdeaSetKey(&enc, bench_key, IDEA_KEY_SIZE, bench_iv,
IDEA_ENCRYPTION);
if (ret != 0) {
printf("Des3_SetKey failed, ret = %d\n", ret);
return;
}
bench_stats_start(&count, &start);
do {
for (i = 0; i < numBlocks; i++) {
wc_IdeaCbcEncrypt(&enc, bench_plain, bench_cipher, BENCH_SIZE);
}
count += i;
} while (bench_stats_sym_check(start));
bench_stats_sym_finish("IDEA", 0, count, bench_size, start, ret);
}
#endif /* HAVE_IDEA */
#ifndef NO_RC4
void bench_arc4(int doAsync)
{

View File

@ -41,7 +41,6 @@ int benchmark_free(void);
void benchmark_configure(int block_size);
void bench_des(int doAsync);
void bench_idea(void);
void bench_arc4(int doAsync);
void bench_chacha(void);
void bench_chacha20_poly1305_aead(void);

View File

@ -157,10 +157,6 @@
static const char EVP_DES_EDE3_ECB[] = "DES-EDE3-ECB";
#endif
#ifdef HAVE_IDEA
static const char EVP_IDEA_CBC[] = "IDEA-CBC";
#endif
#ifndef NO_RC4
static const char EVP_ARC4[] = "ARC4";
#endif
@ -3457,9 +3453,6 @@ static const struct cipher{
{ARC4_TYPE, EVP_ARC4, NID_undef},
#endif
#ifdef HAVE_IDEA
{IDEA_CBC_TYPE, EVP_IDEA_CBC, NID_idea_cbc},
#endif
{ 0, NULL, 0}
};
@ -3513,9 +3506,6 @@ const WOLFSSL_EVP_CIPHER *wolfSSL_EVP_get_cipherbyname(const char *name)
{EVP_DES_EDE3_ECB, "des-ede3"},
{EVP_DES_EDE3_ECB, "des-ede3-ecb"},
#endif
#ifdef HAVE_IDEA
{EVP_IDEA_CBC, "idea"},
#endif
#ifndef NO_AES
#ifdef HAVE_AES_CBC
#ifdef WOLFSSL_AES_128
@ -3673,11 +3663,6 @@ const WOLFSSL_EVP_CIPHER *wolfSSL_EVP_get_cipherbynid(int id)
#endif
#endif /*NO_DES3*/
#ifdef HAVE_IDEA
case NID_idea_cbc:
return wolfSSL_EVP_idea_cbc();
#endif
default:
WOLFSSL_MSG("Bad cipher id value");
}
@ -4571,13 +4556,6 @@ int wolfSSL_EVP_MD_type(const WOLFSSL_EVP_MD* type)
}
#endif
#ifdef HAVE_IDEA
const WOLFSSL_EVP_CIPHER* wolfSSL_EVP_idea_cbc(void)
{
WOLFSSL_ENTER("wolfSSL_EVP_idea_cbc");
return EVP_IDEA_CBC;
}
#endif
const WOLFSSL_EVP_CIPHER* wolfSSL_EVP_enc_null(void)
{
WOLFSSL_ENTER("wolfSSL_EVP_enc_null");
@ -5827,30 +5805,6 @@ int wolfSSL_EVP_MD_type(const WOLFSSL_EVP_MD* type)
wc_Arc4SetKey(&ctx->cipher.arc4, key, ctx->keyLen);
}
#endif /* NO_RC4 */
#ifdef HAVE_IDEA
if (ctx->cipherType == IDEA_CBC_TYPE ||
(type && EVP_CIPHER_TYPE_MATCHES(type, EVP_IDEA_CBC))) {
WOLFSSL_MSG("EVP_IDEA_CBC");
ctx->cipherType = IDEA_CBC_TYPE;
ctx->flags &= ~WOLFSSL_EVP_CIPH_MODE;
ctx->flags |= WOLFSSL_EVP_CIPH_CBC_MODE;
ctx->keyLen = IDEA_KEY_SIZE;
ctx->block_size = 8;
ctx->ivSz = IDEA_BLOCK_SIZE;
if (enc == 0 || enc == 1)
ctx->enc = enc ? 1 : 0;
if (key) {
ret = wc_IdeaSetKey(&ctx->cipher.idea, key, (word16)ctx->keyLen,
iv, ctx->enc ? IDEA_ENCRYPTION :
IDEA_DECRYPTION);
if (ret != 0)
return WOLFSSL_FAILURE;
}
if (iv && key == NULL)
wc_IdeaSetIV(&ctx->cipher.idea, iv);
}
#endif /* HAVE_IDEA */
if (ctx->cipherType == NULL_CIPHER_TYPE ||
(type && EVP_CIPHER_TYPE_MATCHES(type, EVP_NULL))) {
WOLFSSL_MSG("NULL cipher");
@ -5930,7 +5884,7 @@ int wolfSSL_EVP_MD_type(const WOLFSSL_EVP_MD* type)
}
#endif
#if !defined(NO_AES) || !defined(NO_DES3) || defined(HAVE_IDEA)
#if !defined(NO_AES) || !defined(NO_DES3)
/* returns WOLFSSL_SUCCESS on success, otherwise returns WOLFSSL_FAILURE */
int wolfSSL_EVP_CIPHER_CTX_get_iv(WOLFSSL_EVP_CIPHER_CTX* ctx, byte* iv,
int ivLen)
@ -5954,7 +5908,7 @@ int wolfSSL_EVP_MD_type(const WOLFSSL_EVP_MD* type)
return WOLFSSL_SUCCESS;
}
#endif /* !NO_AES || !NO_DES3 || HAVE_IDEA */
#endif /* !NO_AES || !NO_DES3 */
/* Return length on ok */
int wolfSSL_EVP_Cipher(WOLFSSL_EVP_CIPHER_CTX* ctx, byte* dst, byte* src,
@ -6205,17 +6159,6 @@ int wolfSSL_EVP_MD_type(const WOLFSSL_EVP_MD* type)
break;
#endif
#ifdef HAVE_IDEA
case IDEA_CBC_TYPE :
WOLFSSL_MSG("IDEA CBC");
if (ctx->enc)
wc_IdeaCbcEncrypt(&ctx->cipher.idea, dst, src, len);
else
wc_IdeaCbcDecrypt(&ctx->cipher.idea, dst, src, len);
if (ret == 0)
ret = (len / IDEA_BLOCK_SIZE) * IDEA_BLOCK_SIZE;
break;
#endif
case NULL_CIPHER_TYPE :
WOLFSSL_MSG("NULL CIPHER");
XMEMCPY(dst, src, len);
@ -7490,11 +7433,6 @@ int wolfSSL_EVP_CIPHER_CTX_iv_length(const WOLFSSL_EVP_CIPHER_CTX* ctx)
WOLFSSL_MSG("DES EDE3 CBC");
return DES_BLOCK_SIZE;
#endif
#ifdef HAVE_IDEA
case IDEA_CBC_TYPE :
WOLFSSL_MSG("IDEA CBC");
return IDEA_BLOCK_SIZE;
#endif
#ifndef NO_RC4
case ARC4_TYPE :
WOLFSSL_MSG("ARC4");
@ -7616,11 +7554,6 @@ int wolfSSL_EVP_CIPHER_iv_length(const WOLFSSL_EVP_CIPHER* cipher)
}
#endif
#ifdef HAVE_IDEA
if (XSTRNCMP(name, EVP_IDEA_CBC, XSTRLEN(EVP_IDEA_CBC)) == 0)
return IDEA_BLOCK_SIZE;
#endif
(void)name;
return 0;

View File

@ -1,303 +0,0 @@
/* idea.c
*
* Copyright (C) 2006-2021 wolfSSL Inc.
*
* This file is part of wolfSSL.
*
* wolfSSL is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* wolfSSL is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
*/
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include <wolfssl/wolfcrypt/settings.h>
#ifdef HAVE_IDEA
#include <wolfssl/wolfcrypt/idea.h>
#include <wolfssl/wolfcrypt/error-crypt.h>
#include <wolfssl/wolfcrypt/logging.h>
#ifdef NO_INLINE
#include <wolfssl/wolfcrypt/misc.h>
#else
#define WOLFSSL_MISC_INCLUDED
#include <wolfcrypt/src/misc.c>
#endif
/* multiplication of x and y modulo 2^16+1
* IDEA specify a special case when an entry value is 0 ( x or y)
* then it must be replaced by 2^16
*/
static WC_INLINE word16 idea_mult(word16 x, word16 y)
{
long mul, res;
mul = (long)x * (long)y;
if (mul) {
res = (mul & IDEA_MASK) - ((word32)mul >> 16);
if (res <= 0)
res += IDEA_MODULO;
return (word16) (res & IDEA_MASK);
}
if (!x)
return ((IDEA_MODULO - y) & IDEA_MASK);
/* !y */
return ((IDEA_MODULO - x) & IDEA_MASK);
}
/* compute 1/a modulo 2^16+1 using Extended euclidean algorithm
* adapted from fp_invmod */
static WC_INLINE word16 idea_invmod(word16 x)
{
int u, v, b, d;
if (x <= 1)
return x;
u = IDEA_MODULO;
v = x;
d = 1;
b = 0;
do {
while (!(u & 1)) {
u >>= 1;
if (b & 1)
b -= IDEA_MODULO;
b >>= 1;
}
while (!(v & 1)) {
v >>= 1;
if (d & 1) {
d -= IDEA_MODULO;
}
d >>= 1;
}
if (u >= v) {
u -= v;
b -= d;
} else {
v -= u;
d -= b;
}
} while (u != 0);
/* d is now the inverse, put positive value if required */
while (d < 0)
d += IDEA_MODULO;
/* d must be < IDEA_MODULO */
while (d >= (int)IDEA_MODULO)
d -= IDEA_MODULO;
return (word16)(d & IDEA_MASK);
}
/* generate the 52 16-bits key sub-blocks from the 128 key */
int wc_IdeaSetKey(Idea *idea, const byte* key, word16 keySz,
const byte *iv, int dir)
{
word16 idx = 0;
word32 t;
short i;
if (idea == NULL || key == NULL || keySz != IDEA_KEY_SIZE ||
(dir != IDEA_ENCRYPTION && dir != IDEA_DECRYPTION))
return BAD_FUNC_ARG;
/* initial key schedule for 0 -> 7 */
for (i = 0; i < IDEA_ROUNDS; i++) {
idea->skey[i] = (word16)key[idx++] << 8;
idea->skey[i] |= (word16)key[idx++];
}
/* shift phase key schedule for 8 -> 51 */
for (i = IDEA_ROUNDS; i < IDEA_SK_NUM; i++) {
t = (word32)idea->skey[((i+1) & 7) ? i-7 : i-15] << 9;
t |= (word32)idea->skey[((i+2) & 7) < 2 ? i-14 : i-6] >> 7;
idea->skey[i] = (word16)(t & IDEA_MASK);
}
/* compute decryption key from encryption key */
if (dir == IDEA_DECRYPTION) {
word16 enckey[IDEA_SK_NUM];
/* put encryption key in tmp buffer */
XMEMCPY(enckey, idea->skey, sizeof(idea->skey));
idx = 0;
idea->skey[6*IDEA_ROUNDS] = idea_invmod(enckey[idx++]);
idea->skey[6*IDEA_ROUNDS+1] = (IDEA_2EXP16 - enckey[idx++]) & IDEA_MASK;
idea->skey[6*IDEA_ROUNDS+2] = (IDEA_2EXP16 - enckey[idx++]) & IDEA_MASK;
idea->skey[6*IDEA_ROUNDS+3] = idea_invmod(enckey[idx++]);
for (i = 6*(IDEA_ROUNDS-1); i >= 0; i -= 6) {
idea->skey[i+4] = enckey[idx++];
idea->skey[i+5] = enckey[idx++];
idea->skey[i] = idea_invmod(enckey[idx++]);
if (i) {
idea->skey[i+2] = (IDEA_2EXP16 - enckey[idx++]) & IDEA_MASK;
idea->skey[i+1] = (IDEA_2EXP16 - enckey[idx++]) & IDEA_MASK;
}
else {
idea->skey[1] = (IDEA_2EXP16 - enckey[idx++]) & IDEA_MASK;
idea->skey[2] = (IDEA_2EXP16 - enckey[idx++]) & IDEA_MASK;
}
idea->skey[i+3] = idea_invmod(enckey[idx++]);
}
/* erase temporary buffer */
ForceZero(enckey, sizeof(enckey));
}
/* set the iv */
return wc_IdeaSetIV(idea, iv);
}
/* set the IV in the Idea key structure */
int wc_IdeaSetIV(Idea *idea, const byte* iv)
{
if (idea == NULL)
return BAD_FUNC_ARG;
if (iv != NULL)
XMEMCPY(idea->reg, iv, IDEA_BLOCK_SIZE);
else
XMEMSET(idea->reg, 0, IDEA_BLOCK_SIZE);
return 0;
}
/* encryption/decryption for a block (64 bits)
*/
int wc_IdeaCipher(Idea *idea, byte* out, const byte* in)
{
word32 t1, t2;
word16 i, skey_idx = 0, idx = 0;
word16 x[4];
if (idea == NULL || out == NULL || in == NULL) {
return BAD_FUNC_ARG;
}
/* put input byte block in word16 */
for (i = 0; i < IDEA_BLOCK_SIZE/2; i++) {
x[i] = (word16)in[idx++] << 8;
x[i] |= (word16)in[idx++];
}
for (i = 0; i < IDEA_ROUNDS; i++) {
x[0] = idea_mult(x[0], idea->skey[skey_idx++]);
x[1] = ((word32)x[1] + (word32)idea->skey[skey_idx++]) & IDEA_MASK;
x[2] = ((word32)x[2] + (word32)idea->skey[skey_idx++]) & IDEA_MASK;
x[3] = idea_mult(x[3], idea->skey[skey_idx++]);
t2 = x[0] ^ x[2];
t2 = idea_mult((word16)t2, idea->skey[skey_idx++]);
t1 = (t2 + (x[1] ^ x[3])) & IDEA_MASK;
t1 = idea_mult((word16)t1, idea->skey[skey_idx++]);
t2 = (t1 + t2) & IDEA_MASK;
x[0] ^= t1;
x[3] ^= t2;
t2 ^= x[1];
x[1] = x[2] ^ (word16)t1;
x[2] = (word16)t2;
}
x[0] = idea_mult(x[0], idea->skey[skey_idx++]);
out[0] = (x[0] >> 8) & 0xFF;
out[1] = x[0] & 0xFF;
x[2] = ((word32)x[2] + (word32)idea->skey[skey_idx++]) & IDEA_MASK;
out[2] = (x[2] >> 8) & 0xFF;
out[3] = x[2] & 0xFF;
x[1] = ((word32)x[1] + (word32)idea->skey[skey_idx++]) & IDEA_MASK;
out[4] = (x[1] >> 8) & 0xFF;
out[5] = x[1] & 0xFF;
x[3] = idea_mult(x[3], idea->skey[skey_idx++]);
out[6] = (x[3] >> 8) & 0xFF;
out[7] = x[3] & 0xFF;
return 0;
}
int wc_IdeaCbcEncrypt(Idea *idea, byte* out, const byte* in, word32 len)
{
int blocks;
int ret;
if (idea == NULL || out == NULL || in == NULL)
return BAD_FUNC_ARG;
blocks = len / IDEA_BLOCK_SIZE;
while (blocks--) {
xorbuf((byte*)idea->reg, in, IDEA_BLOCK_SIZE);
ret = wc_IdeaCipher(idea, (byte*)idea->reg, (byte*)idea->reg);
if (ret != 0) {
return ret;
}
XMEMCPY(out, idea->reg, IDEA_BLOCK_SIZE);
out += IDEA_BLOCK_SIZE;
in += IDEA_BLOCK_SIZE;
}
return 0;
}
int wc_IdeaCbcDecrypt(Idea *idea, byte* out, const byte* in, word32 len)
{
int blocks;
int ret;
if (idea == NULL || out == NULL || in == NULL)
return BAD_FUNC_ARG;
blocks = len / IDEA_BLOCK_SIZE;
while (blocks--) {
XMEMCPY((byte*)idea->tmp, in, IDEA_BLOCK_SIZE);
ret = wc_IdeaCipher(idea, out, (byte*)idea->tmp);
if (ret != 0) {
return ret;
}
xorbuf(out, (byte*)idea->reg, IDEA_BLOCK_SIZE);
XMEMCPY(idea->reg, idea->tmp, IDEA_BLOCK_SIZE);
out += IDEA_BLOCK_SIZE;
in += IDEA_BLOCK_SIZE;
}
return 0;
}
#endif /* HAVE_IDEA */

View File

@ -239,7 +239,6 @@
#include <wolfssl/wolfcrypt/dh.h>
#include <wolfssl/wolfcrypt/dsa.h>
#include <wolfssl/wolfcrypt/srp.h>
#include <wolfssl/wolfcrypt/idea.h>
#include <wolfssl/wolfcrypt/chacha.h>
#include <wolfssl/wolfcrypt/chacha20_poly1305.h>
#include <wolfssl/wolfcrypt/pwdbased.h>
@ -527,9 +526,6 @@ WOLFSSL_TEST_SUBROUTINE int certext_test(void);
defined(WOLFSSL_CERT_EXT) && defined(WOLFSSL_CERT_GEN)
WOLFSSL_TEST_SUBROUTINE int decodedCertCache_test(void);
#endif
#ifdef HAVE_IDEA
WOLFSSL_TEST_SUBROUTINE int idea_test(void);
#endif
WOLFSSL_TEST_SUBROUTINE int memory_test(void);
#ifdef HAVE_VALGRIND
WOLFSSL_TEST_SUBROUTINE int mp_test(void);
@ -1157,13 +1153,6 @@ options: [-s max_relative_stack_bytes] [-m max_relative_heap_memory_bytes]\n\
TEST_PASS("CAMELLIA test passed!\n");
#endif
#ifdef HAVE_IDEA
if ( (ret = idea_test()) != 0)
return err_sys("IDEA test failed!\n", ret);
else
TEST_PASS("IDEA test passed!\n");
#endif
#ifndef NO_RSA
#ifdef WC_RSA_NO_PADDING
if ( (ret = rsa_no_pad_test()) != 0)
@ -11019,280 +11008,6 @@ WOLFSSL_TEST_SUBROUTINE int camellia_test(void)
}
#endif /* HAVE_CAMELLIA */
#ifdef HAVE_IDEA
WOLFSSL_TEST_SUBROUTINE int idea_test(void)
{
int ret;
word16 i, j;
Idea idea;
byte data[IDEA_BLOCK_SIZE];
/* Project NESSIE test vectors */
#define IDEA_NB_TESTS 6
#define IDEA_NB_TESTS_EXTRA 4
WOLFSSL_SMALL_STACK_STATIC const byte v_key[IDEA_NB_TESTS][IDEA_KEY_SIZE] = {
{ 0x37, 0x37, 0x37, 0x37, 0x37, 0x37, 0x37, 0x37,
0x37, 0x37, 0x37, 0x37, 0x37, 0x37, 0x37, 0x37 },
{ 0x57, 0x57, 0x57, 0x57, 0x57, 0x57, 0x57, 0x57,
0x57, 0x57, 0x57, 0x57, 0x57, 0x57, 0x57, 0x57 },
{ 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F },
{ 0x2B, 0xD6, 0x45, 0x9F, 0x82, 0xC5, 0xB3, 0x00,
0x95, 0x2C, 0x49, 0x10, 0x48, 0x81, 0xFF, 0x48 },
{ 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F },
{ 0x2B, 0xD6, 0x45, 0x9F, 0x82, 0xC5, 0xB3, 0x00,
0x95, 0x2C, 0x49, 0x10, 0x48, 0x81, 0xFF, 0x48 },
};
WOLFSSL_SMALL_STACK_STATIC const byte v1_plain[IDEA_NB_TESTS][IDEA_BLOCK_SIZE] = {
{ 0x37, 0x37, 0x37, 0x37, 0x37, 0x37, 0x37, 0x37 },
{ 0x57, 0x57, 0x57, 0x57, 0x57, 0x57, 0x57, 0x57 },
{ 0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77 },
{ 0xEA, 0x02, 0x47, 0x14, 0xAD, 0x5C, 0x4D, 0x84 },
{ 0xDB, 0x2D, 0x4A, 0x92, 0xAA, 0x68, 0x27, 0x3F },
{ 0xF1, 0x29, 0xA6, 0x60, 0x1E, 0xF6, 0x2A, 0x47 },
};
WOLFSSL_SMALL_STACK_STATIC const byte v1_cipher[IDEA_NB_TESTS][IDEA_BLOCK_SIZE] = {
{ 0x54, 0xCF, 0x21, 0xE3, 0x89, 0xD8, 0x73, 0xEC },
{ 0x85, 0x52, 0x4D, 0x41, 0x0E, 0xB4, 0x28, 0xAE },
{ 0xF5, 0x26, 0xAB, 0x9A, 0x62, 0xC0, 0xD2, 0x58 },
{ 0xC8, 0xFB, 0x51, 0xD3, 0x51, 0x66, 0x27, 0xA8 },
{ 0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77 },
{ 0xEA, 0x02, 0x47, 0x14, 0xAD, 0x5C, 0x4D, 0x84 },
};
WOLFSSL_SMALL_STACK_STATIC const byte v1_cipher_100[IDEA_NB_TESTS_EXTRA][IDEA_BLOCK_SIZE] = {
{ 0x12, 0x46, 0x2F, 0xD0, 0xFB, 0x3A, 0x63, 0x39 },
{ 0x15, 0x61, 0xE8, 0xC9, 0x04, 0x54, 0x8B, 0xE9 },
{ 0x42, 0x12, 0x2A, 0x94, 0xB0, 0xF6, 0xD2, 0x43 },
{ 0x53, 0x4D, 0xCD, 0x48, 0xDD, 0xD5, 0xF5, 0x9C },
};
WOLFSSL_SMALL_STACK_STATIC const byte v1_cipher_1000[IDEA_NB_TESTS_EXTRA][IDEA_BLOCK_SIZE] = {
{ 0x44, 0x1B, 0x38, 0x5C, 0x77, 0x29, 0x75, 0x34 },
{ 0xF0, 0x4E, 0x58, 0x88, 0x44, 0x99, 0x22, 0x2D },
{ 0xB3, 0x5F, 0x93, 0x7F, 0x6A, 0xA0, 0xCD, 0x1F },
{ 0x9A, 0xEA, 0x46, 0x8F, 0x42, 0x9B, 0xBA, 0x15 },
};
/* CBC test */
const char *message = "International Data Encryption Algorithm";
byte msg_enc[40], msg_dec[40];
for (i = 0; i < IDEA_NB_TESTS; i++) {
/* Set encryption key */
XMEMSET(&idea, 0, sizeof(Idea));
ret = wc_IdeaSetKey(&idea, v_key[i], IDEA_KEY_SIZE,
NULL, IDEA_ENCRYPTION);
if (ret != 0) {
printf("wc_IdeaSetKey (enc) failed\n");
return -6800;
}
/* Data encryption */
ret = wc_IdeaCipher(&idea, data, v1_plain[i]);
if (ret != 0 || XMEMCMP(&v1_cipher[i], data, IDEA_BLOCK_SIZE)) {
printf("Bad encryption\n");
return -6801;
}
/* Set decryption key */
XMEMSET(&idea, 0, sizeof(Idea));
ret = wc_IdeaSetKey(&idea, v_key[i], IDEA_KEY_SIZE,
NULL, IDEA_DECRYPTION);
if (ret != 0) {
printf("wc_IdeaSetKey (dec) failed\n");
return -6802;
}
/* Data decryption */
ret = wc_IdeaCipher(&idea, data, data);
if (ret != 0 || XMEMCMP(v1_plain[i], data, IDEA_BLOCK_SIZE)) {
printf("Bad decryption\n");
return -6803;
}
/* Set encryption key */
XMEMSET(&idea, 0, sizeof(Idea));
ret = wc_IdeaSetKey(&idea, v_key[i], IDEA_KEY_SIZE,
v_key[i], IDEA_ENCRYPTION);
if (ret != 0) {
printf("wc_IdeaSetKey (enc) failed\n");
return -6804;
}
XMEMSET(msg_enc, 0, sizeof(msg_enc));
ret = wc_IdeaCbcEncrypt(&idea, msg_enc, (byte *)message,
(word32)XSTRLEN(message)+1);
if (ret != 0) {
printf("wc_IdeaCbcEncrypt failed\n");
return -6805;
}
/* Set decryption key */
XMEMSET(&idea, 0, sizeof(Idea));
ret = wc_IdeaSetKey(&idea, v_key[i], IDEA_KEY_SIZE,
v_key[i], IDEA_DECRYPTION);
if (ret != 0) {
printf("wc_IdeaSetKey (dec) failed\n");
return -6806;
}
XMEMSET(msg_dec, 0, sizeof(msg_dec));
ret = wc_IdeaCbcDecrypt(&idea, msg_dec, msg_enc,
(word32)XSTRLEN(message)+1);
if (ret != 0) {
printf("wc_IdeaCbcDecrypt failed\n");
return -6807;
}
if (XMEMCMP(message, msg_dec, (word32)XSTRLEN(message))) {
printf("Bad CBC decryption\n");
return -6808;
}
}
for (i = 0; i < IDEA_NB_TESTS_EXTRA; i++) {
/* Set encryption key */
XMEMSET(&idea, 0, sizeof(Idea));
ret = wc_IdeaSetKey(&idea, v_key[i], IDEA_KEY_SIZE,
NULL, IDEA_ENCRYPTION);
if (ret != 0) {
printf("wc_IdeaSetKey (enc) failed\n");
return -6809;
}
/* 100 times data encryption */
XMEMCPY(data, v1_plain[i], IDEA_BLOCK_SIZE);
for (j = 0; j < 100; j++) {
ret = wc_IdeaCipher(&idea, data, data);
if (ret != 0) {
return -6810;
}
}
if (XMEMCMP(v1_cipher_100[i], data, IDEA_BLOCK_SIZE)) {
printf("Bad encryption (100 times)\n");
return -6811;
}
/* 1000 times data encryption */
XMEMCPY(data, v1_plain[i], IDEA_BLOCK_SIZE);
for (j = 0; j < 1000; j++) {
ret = wc_IdeaCipher(&idea, data, data);
if (ret != 0) {
return -6812;
}
}
if (XMEMCMP(v1_cipher_1000[i], data, IDEA_BLOCK_SIZE)) {
printf("Bad encryption (100 times)\n");
return -6813;
}
}
#ifndef WC_NO_RNG
/* random test for CBC */
{
WC_RNG rng;
byte key[IDEA_KEY_SIZE], iv[IDEA_BLOCK_SIZE],
*rnd, *enc, *dec;
#define IDEA_SCRATCH_BUFFER_SIZE 1000
rnd = (byte *)XMALLOC(IDEA_SCRATCH_BUFFER_SIZE, HEAP_HINT, DYNAMIC_TYPE_TMP_BUFFER);
enc = (byte *)XMALLOC(IDEA_SCRATCH_BUFFER_SIZE, HEAP_HINT, DYNAMIC_TYPE_TMP_BUFFER);
dec = (byte *)XMALLOC(IDEA_SCRATCH_BUFFER_SIZE, HEAP_HINT, DYNAMIC_TYPE_TMP_BUFFER);
if ((rnd == NULL) || (enc == NULL) || (dec == NULL)) {
if (rnd)
XFREE(rnd, HEAP_HINT, DYNAMIC_TYPE_TMP_BUFFER);
if (enc)
XFREE(enc, HEAP_HINT, DYNAMIC_TYPE_TMP_BUFFER);
if (dec)
XFREE(dec, HEAP_HINT, DYNAMIC_TYPE_TMP_BUFFER);
return -6823;
}
/* random values */
#ifndef HAVE_FIPS
ret = wc_InitRng_ex(&rng, HEAP_HINT, devId);
#else
ret = wc_InitRng(&rng);
#endif
if (ret != 0)
return -6814;
for (i = 0; i < 1000; i++) {
/* random key */
ret = wc_RNG_GenerateBlock(&rng, key, sizeof(key));
if (ret != 0)
return -6815;
/* random iv */
ret = wc_RNG_GenerateBlock(&rng, iv, sizeof(iv));
if (ret != 0)
return -6816;
/* random data */
ret = wc_RNG_GenerateBlock(&rng, rnd, IDEA_SCRATCH_BUFFER_SIZE);
if (ret != 0)
return -6817;
/* Set encryption key */
XMEMSET(&idea, 0, sizeof(Idea));
ret = wc_IdeaSetKey(&idea, key, IDEA_KEY_SIZE, iv, IDEA_ENCRYPTION);
if (ret != 0) {
printf("wc_IdeaSetKey (enc) failed\n");
return -6818;
}
/* Data encryption */
XMEMSET(enc, 0, IDEA_SCRATCH_BUFFER_SIZE);
ret = wc_IdeaCbcEncrypt(&idea, enc, rnd, IDEA_SCRATCH_BUFFER_SIZE);
if (ret != 0) {
printf("wc_IdeaCbcEncrypt failed\n");
return -6819;
}
/* Set decryption key */
XMEMSET(&idea, 0, sizeof(Idea));
ret = wc_IdeaSetKey(&idea, key, IDEA_KEY_SIZE, iv, IDEA_DECRYPTION);
if (ret != 0) {
printf("wc_IdeaSetKey (enc) failed\n");
return -6820;
}
/* Data decryption */
XMEMSET(dec, 0, IDEA_SCRATCH_BUFFER_SIZE);
ret = wc_IdeaCbcDecrypt(&idea, dec, enc, IDEA_SCRATCH_BUFFER_SIZE);
if (ret != 0) {
printf("wc_IdeaCbcDecrypt failed\n");
return -6821;
}
if (XMEMCMP(rnd, dec, IDEA_SCRATCH_BUFFER_SIZE)) {
printf("Bad CBC decryption\n");
return -6822;
}
}
XFREE(rnd, HEAP_HINT, DYNAMIC_TYPE_TMP_BUFFER);
XFREE(enc, HEAP_HINT, DYNAMIC_TYPE_TMP_BUFFER);
XFREE(dec, HEAP_HINT, DYNAMIC_TYPE_TMP_BUFFER);
#undef IDEA_SCRATCH_BUFFER_SIZE
wc_FreeRng(&rng);
}
#endif /* WC_NO_RNG */
return 0;
}
#endif /* HAVE_IDEA */
#ifdef HAVE_XCHACHA
WOLFSSL_TEST_SUBROUTINE int XChaCha_test(void) {
int ret = -6830;

View File

@ -312,7 +312,6 @@
<ClCompile Include="wolfcrypt\src\ge_operations.c" />
<ClCompile Include="wolfcrypt\src\hash.c" />
<ClCompile Include="wolfcrypt\src\hmac.c" />
<ClCompile Include="wolfcrypt\src\idea.c" />
<ClCompile Include="wolfcrypt\src\integer.c" />
<ClCompile Include="wolfcrypt\src\kdf.c" />
<ClCompile Include="wolfcrypt\src\logging.c" />

View File

@ -86,9 +86,6 @@
#ifdef WOLFSSL_RIPEMD
#include <wolfssl/wolfcrypt/ripemd.h>
#endif
#ifdef HAVE_IDEA
#include <wolfssl/wolfcrypt/idea.h>
#endif
#ifndef NO_RSA
#include <wolfssl/wolfcrypt/rsa.h>
#endif
@ -316,12 +313,6 @@
#endif
#endif
#endif
#if !defined(NO_RSA) && defined(HAVE_IDEA)
#if !defined(NO_SHA) && defined(WOLFSSL_STATIC_RSA)
#define BUILD_SSL_RSA_WITH_IDEA_CBC_SHA
#endif
#endif
#endif /* !WOLFSSL_AEAD_ONLY */
#if !defined(NO_RSA) && !defined(NO_AES) && !defined(NO_TLS)
@ -932,10 +923,6 @@
#define HAVE_PFS
#endif
#if defined(BUILD_SSL_RSA_WITH_IDEA_CBC_SHA)
#define BUILD_IDEA
#endif
/* actual cipher values, 2nd byte */
enum {
TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA = 0x16,
@ -956,7 +943,6 @@ enum {
SSL_RSA_WITH_RC4_128_SHA = 0x05,
SSL_RSA_WITH_RC4_128_MD5 = 0x04,
SSL_RSA_WITH_3DES_EDE_CBC_SHA = 0x0A,
SSL_RSA_WITH_IDEA_CBC_SHA = 0x07,
/* ECC suites, first byte is 0xC0 (ECC_BYTE) */
TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA = 0x14,
@ -3229,9 +3215,6 @@ typedef struct Ciphers {
#ifdef HAVE_CHACHA
ChaCha* chacha;
#endif
#ifdef HAVE_IDEA
Idea* idea;
#endif
#if defined(WOLFSSL_TLS13) && defined(HAVE_NULL_CIPHER)
Hmac* hmac;
#endif

View File

@ -55,9 +55,6 @@
#include <wolfssl/wolfcrypt/des3.h>
#include <wolfssl/wolfcrypt/arc4.h>
#include <wolfssl/wolfcrypt/hmac.h>
#ifdef HAVE_IDEA
#include <wolfssl/wolfcrypt/idea.h>
#endif
#include <wolfssl/wolfcrypt/pwdbased.h>
#if defined(WOLFSSL_BASE64_ENCODE) || defined(WOLFSSL_BASE64_DECODE)
@ -136,7 +133,6 @@ WOLFSSL_API const WOLFSSL_EVP_CIPHER* wolfSSL_EVP_des_ede3_ecb(void);
WOLFSSL_API const WOLFSSL_EVP_CIPHER* wolfSSL_EVP_des_cbc(void);
WOLFSSL_API const WOLFSSL_EVP_CIPHER* wolfSSL_EVP_des_ede3_cbc(void);
WOLFSSL_API const WOLFSSL_EVP_CIPHER* wolfSSL_EVP_rc4(void);
WOLFSSL_API const WOLFSSL_EVP_CIPHER* wolfSSL_EVP_idea_cbc(void);
WOLFSSL_API const WOLFSSL_EVP_CIPHER* wolfSSL_EVP_enc_null(void);
WOLFSSL_API const WOLFSSL_EVP_CIPHER* wolfSSL_EVP_rc2_cbc(void);
@ -202,9 +198,6 @@ typedef union {
Des3 des3;
#endif
Arc4 arc4;
#ifdef HAVE_IDEA
Idea idea;
#endif
#ifdef WOLFSSL_QT
int (*ctrl) (WOLFSSL_EVP_CIPHER_CTX *, int type, int arg, void *ptr);
#endif
@ -230,9 +223,6 @@ enum {
EVP_PKEY_RSA = 16,
EVP_PKEY_DSA = 17,
EVP_PKEY_EC = 18,
#ifdef HAVE_IDEA
IDEA_CBC_TYPE = 19,
#endif
AES_128_GCM_TYPE = 21,
AES_192_GCM_TYPE = 22,
AES_256_GCM_TYPE = 23,
@ -320,7 +310,6 @@ enum {
NID_des_ecb = 29,
NID_des_ede3_cbc= 44,
NID_des_ede3_ecb= 33,
NID_idea_cbc = 34,
NID_aes_128_cfb1= 650,
NID_aes_192_cfb1= 651,
NID_aes_256_cfb1= 652,
@ -382,17 +371,14 @@ struct WOLFSSL_EVP_CIPHER_CTX {
#elif !defined(NO_DES3)
/* working iv pointer into cipher */
ALIGN16 unsigned char iv[DES_BLOCK_SIZE];
#elif defined(HAVE_IDEA)
/* working iv pointer into cipher */
ALIGN16 unsigned char iv[IDEA_BLOCK_SIZE];
#endif
WOLFSSL_Cipher cipher;
ALIGN16 byte buf[WOLFSSL_EVP_BUF_SIZE];
int bufUsed;
ALIGN16 byte lastBlock[WOLFSSL_EVP_BUF_SIZE];
int lastUsed;
#if !defined(NO_AES) || !defined(NO_DES3) || defined(HAVE_IDEA) || \
defined(HAVE_AESGCM) || defined (WOLFSSL_AES_XTS)
#if !defined(NO_AES) || !defined(NO_DES3) || defined(HAVE_AESGCM) || \
defined (WOLFSSL_AES_XTS)
#define HAVE_WOLFSSL_EVP_CIPHER_CTX_IV
int ivSz;
#ifdef HAVE_AESGCM
@ -832,7 +818,6 @@ WOLFSSL_API void wolfSSL_EVP_MD_do_all(void (*fn) (const WOLFSSL_EVP_MD *md,
#define EVP_des_ede3_cbc wolfSSL_EVP_des_ede3_cbc
#define EVP_des_ede3_ecb wolfSSL_EVP_des_ede3_ecb
#define EVP_rc4 wolfSSL_EVP_rc4
#define EVP_idea_cbc wolfSSL_EVP_idea_cbc
#define EVP_enc_null wolfSSL_EVP_enc_null
#define EVP_MD_size wolfSSL_EVP_MD_size

View File

@ -3035,10 +3035,7 @@ enum BulkCipherAlgorithm {
wolfssl_aes_gcm = 7,
wolfssl_aes_ccm = 8,
wolfssl_chacha = 9,
wolfssl_camellia = 10,
#ifdef HAVE_IDEA
wolfssl_idea = 13
#endif
wolfssl_camellia = 10
};

View File

@ -1,70 +0,0 @@
/* idea.h
*
* Copyright (C) 2006-2021 wolfSSL Inc.
*
* This file is part of wolfSSL.
*
* wolfSSL is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* wolfSSL is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
*/
/*!
\file wolfssl/wolfcrypt/idea.h
*/
#ifndef WOLF_CRYPT_IDEA_H
#define WOLF_CRYPT_IDEA_H
#include <wolfssl/wolfcrypt/types.h>
#ifdef HAVE_IDEA
#ifdef __cplusplus
extern "C" {
#endif
enum {
IDEA_MODULO = 0x10001, /* 2^16+1 */
IDEA_2EXP16 = 0x10000, /* 2^16 */
IDEA_MASK = 0xFFFF, /* 16 bits set to one */
IDEA_ROUNDS = 8, /* number of rounds for IDEA */
IDEA_SK_NUM = (6*IDEA_ROUNDS + 4), /* number of subkeys */
IDEA_KEY_SIZE = 16, /* size of key in bytes */
IDEA_BLOCK_SIZE = 8, /* size of IDEA blocks in bytes */
IDEA_IV_SIZE = 8, /* size of IDEA IV in bytes */
IDEA_ENCRYPTION = 0,
IDEA_DECRYPTION = 1
};
/* IDEA encryption and decryption */
typedef struct Idea {
word32 reg[IDEA_BLOCK_SIZE / sizeof(word32)]; /* for CBC mode */
word32 tmp[IDEA_BLOCK_SIZE / sizeof(word32)]; /* for CBC mode */
word16 skey[IDEA_SK_NUM]; /* 832 bits expanded key */
} Idea;
WOLFSSL_API int wc_IdeaSetKey(Idea *idea, const byte* key, word16 keySz,
const byte *iv, int dir);
WOLFSSL_API int wc_IdeaSetIV(Idea *idea, const byte* iv);
WOLFSSL_API int wc_IdeaCipher(Idea *idea, byte* out, const byte* in);
WOLFSSL_API int wc_IdeaCbcEncrypt(Idea *idea, byte* out,
const byte* in, word32 len);
WOLFSSL_API int wc_IdeaCbcDecrypt(Idea *idea, byte* out,
const byte* in, word32 len);
#ifdef __cplusplus
} /* extern "C" */
#endif
#endif /* HAVE_IDEA */
#endif /* WOLF_CRYPT_IDEA_H */

View File

@ -56,7 +56,6 @@ nobase_include_HEADERS+= \
wolfssl/wolfcrypt/blake2-impl.h \
wolfssl/wolfcrypt/tfm.h \
wolfssl/wolfcrypt/srp.h \
wolfssl/wolfcrypt/idea.h \
wolfssl/wolfcrypt/types.h \
wolfssl/wolfcrypt/visibility.h \
wolfssl/wolfcrypt/logging.h \

View File

@ -2020,8 +2020,7 @@ extern void uITRON4_free(void *p) ;
#if (defined(WOLFSSL_TLS13) && defined(WOLFSSL_NO_TLS12)) || \
(!defined(HAVE_AES_CBC) && defined(NO_DES3) && defined(NO_RC4) && \
!defined(HAVE_CAMELLIA) && !defined(HAVE_IDEA) && \
!defined(HAVE_NULL_CIPHER))
!defined(HAVE_CAMELLIA) & !defined(HAVE_NULL_CIPHER))
#define WOLFSSL_AEAD_ONLY
#endif
@ -2433,7 +2432,7 @@ extern void uITRON4_free(void *p) ;
#endif
#if defined(NO_AES) && defined(NO_DES3) && !defined(HAVE_CAMELLIA) && \
!defined(WOLFSSL_HAVE_PRF) && defined(NO_PWDBASED) && !defined(HAVE_IDEA)
!defined(WOLFSSL_HAVE_PRF) && defined(NO_PWDBASED)
#undef WOLFSSL_NO_XOR_OPS
#define WOLFSSL_NO_XOR_OPS
#endif

View File

@ -1013,7 +1013,6 @@ decouple library dependencies with standard string, memory and so on.
WC_CIPHER_DES3 = 7,
WC_CIPHER_DES = 8,
WC_CIPHER_CHACHA = 9,
WC_CIPHER_IDEA = 11,
WC_CIPHER_MAX = WC_CIPHER_AES_CCM
};

View File

@ -55,7 +55,6 @@ if(CONFIG_WOLFSSL)
zephyr_library_sources(${ZEPHYR_CURRENT_MODULE_DIR}/wolfcrypt/src/ge_operations.c)
zephyr_library_sources(${ZEPHYR_CURRENT_MODULE_DIR}/wolfcrypt/src/hash.c)
zephyr_library_sources(${ZEPHYR_CURRENT_MODULE_DIR}/wolfcrypt/src/hmac.c)
zephyr_library_sources(${ZEPHYR_CURRENT_MODULE_DIR}/wolfcrypt/src/idea.c)
zephyr_library_sources(${ZEPHYR_CURRENT_MODULE_DIR}/wolfcrypt/src/integer.c)
zephyr_library_sources(${ZEPHYR_CURRENT_MODULE_DIR}/wolfcrypt/src/kdf.c)
zephyr_library_sources(${ZEPHYR_CURRENT_MODULE_DIR}/wolfcrypt/src/logging.c)