feat: add Jasmin assembly integration for crypto acceleration
- Integrated `zupt_mac_verify_ct` in `zupt_decrypt_buffer()` to replace C XOR loop for HMAC-SHA256 - Integrated `zupt_ct_select_32` in `zupt_mlkem768_decaps()` to replace C `cmov()` for FO transformation - Added `include/zupt_jasmin.h` with extern declarations and ABI docs - Added `#ifdef ZUPT_USE_JASMIN` guards with clean C fallbacks in `zupt_crypto.c` and `zupt_mlkem.c` - Makefile now auto-detects `jasmin/*.s`, assembles and links with `-DZUPT_USE_JASMIN` Closes #3
This commit is contained in:
parent
26e45b5c3e
commit
5bb280eb25
43 changed files with 1913 additions and 546 deletions
21
build.bat
Normal file
21
build.bat
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
@echo off
|
||||
echo Zupt v0.4 Build Script for Windows
|
||||
where gcc >nul 2>nul
|
||||
if %ERRORLEVEL% EQU 0 (
|
||||
gcc -Wall -Wextra -O2 -std=c11 -Iinclude ^
|
||||
src\zupt_main.c src\zupt_format.c src\zupt_lz.c src\zupt_lzh.c src\zupt_xxh.c ^
|
||||
src\zupt_sha256.c src\zupt_aes256.c src\zupt_crypto.c src\zupt_predict.c ^
|
||||
-lm -o zupt.exe
|
||||
if %ERRORLEVEL% EQU 0 (echo [OK] zupt.exe) else (echo [FAIL])
|
||||
exit /b %ERRORLEVEL%
|
||||
)
|
||||
where cl >nul 2>nul
|
||||
if %ERRORLEVEL% EQU 0 (
|
||||
cl /nologo /W4 /O2 /Iinclude /D_CRT_SECURE_NO_WARNINGS ^
|
||||
src\zupt_main.c src\zupt_format.c src\zupt_lz.c src\zupt_lzh.c src\zupt_xxh.c ^
|
||||
src\zupt_sha256.c src\zupt_aes256.c src\zupt_crypto.c src\zupt_predict.c ^
|
||||
/Fe:zupt.exe & del *.obj 2>nul
|
||||
exit /b 0
|
||||
)
|
||||
echo No C compiler found.
|
||||
exit /b 1
|
||||
Loading…
Reference in a new issue