[][openwrt][common][Add test tool to pass test vector]
[Description]
Add test tool to pass test vector from NIST
Usage:
python3 main.py -a algo -e engine -m
-a: set algorithm
-e: set sw or hw
-m: Monte or not
-l: list all command
List all test command
python3 main.py -a CBC -e hw => Test CBC in hw mode
python3 main.py -a CBC -e hw -m => Test CBC Monte in hw mode
python3 main.py -a ECB -e hw => Test EBC in hw mode
python3 main.py -a ECB -e hw -m => Test EBC Monte in hw mode
python3 main.py -a CCM -e hw => Test CCM in hw mode
python3 main.py -a GCM -e hw => Test GCM in hw mode
python3 main.py -a DRBG -e sw => Test DRBG in sw mode
python3 main.py -a HMAC -e hw => Test HMAC in hw mode
python3 main.py -a HMAC -e sw => Test HMAC in sw mode
python3 main.py -a SHA -e hw => Test SHA in hw mode
python3 main.py -a SHA -e hw -m => Test SHA Monte in hw mode
python3 main.py -a SHA -e sw => Test SHA in sw mode
python3 main.py -a SHA -e sw -m => Test SHA Montein hw mode
python3 main.py -a TDES -e hw => Test TDES in hw mode
python3 main.py -a TDES -e hw -m => Test TDES Monte in hw mode
[Release-log]
Change-Id: Ic7abc570474a8f1214f29106c23c6c71c40501a2
Reviewed-on: https://gerrit.mediatek.inc/c/openwrt/feeds/mtk_openwrt_feeds/+/8312895
diff --git a/feed/fips_test_tool/Makefile b/feed/fips_test_tool/Makefile
new file mode 100644
index 0000000..acbe5b9
--- /dev/null
+++ b/feed/fips_test_tool/Makefile
@@ -0,0 +1,37 @@
+#
+# Copyright (C) 2023 Mediatek Ltd.
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=fips_test_tool
+PKG_VERSION:=1.0
+
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/fips_test_tool
+ SECTION:=Utilities
+ CATEGORY:=Utilities
+ TITLE:=FIPS_TEST_TOOL
+ SUBMENU:=FIPS
+ DEPENDS:=+python3-light
+endef
+
+define Package/fips_test_tool/description
+ fips_test_tool is a script to pass fips140-3.
+ You can run this tool to pass test vector
+ from NIST in local.
+endef
+
+Build/Compile/Default:=
+
+define Package/fips_test_tool/install
+ $(CP) ./files/* $(1)/
+endef
+
+$(eval $(call BuildPackage,fips_test_tool))