- 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
26 lines
581 B
ArmAsm
26 lines
581 B
ArmAsm
.intel_syntax noprefix
|
|
.text
|
|
.p2align 5
|
|
.global zupt_mac_verify_ct
|
|
.type zupt_mac_verify_ct, %function
|
|
zupt_mac_verify_ct:
|
|
mov rax, 0
|
|
mov rcx, qword ptr[rdi]
|
|
mov rdx, qword ptr[rsi]
|
|
xor rcx, rdx
|
|
or rax, rcx
|
|
mov rcx, qword ptr[rdi + 8]
|
|
mov rdx, qword ptr[rsi + 8]
|
|
xor rcx, rdx
|
|
or rax, rcx
|
|
mov rcx, qword ptr[rdi + 16]
|
|
mov rdx, qword ptr[rsi + 16]
|
|
xor rcx, rdx
|
|
or rax, rcx
|
|
mov rcx, qword ptr[rdi + 24]
|
|
mov rdx, qword ptr[rsi + 24]
|
|
xor rcx, rdx
|
|
or rax, rcx
|
|
ret
|
|
.ident "Jasmin Compiler 2026.03.0"
|
|
.section ".note.GNU-stack", "", %progbits
|