Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Implement _mm_aesdeclast_si128 #565

Merged
merged 1 commit into from
Dec 24, 2022
Merged

Conversation

howjmay
Copy link
Contributor

@howjmay howjmay commented Dec 24, 2022

closes #477

@jserv jserv changed the title feat: Impl _mm_aesdeclast_si128 feat: Implement _mm_aesdeclast_si128 Dec 24, 2022
@jserv jserv merged commit a3bf00f into DLTcollab:master Dec 24, 2022
@howjmay howjmay deleted the aesdec branch December 25, 2022 03:54
@wangxiao1254
Copy link
Contributor

wangxiao1254 commented Dec 27, 2022

I got a compiler error here
https://github.com/emp-toolkit/emp-tool/actions/runs/3784574277/jobs/6433980013#step:4:36

and fixed by

@@ -9889,8 +9889,8 @@ FORCE_INLINE __m128i _mm_aesenclast_si128(__m128i a, __m128i RoundKey)
 FORCE_INLINE __m128i _mm_aesdeclast_si128(__m128i a, __m128i RoundKey)
 {
     return vreinterpretq_m128i_u8(
-               vaesdq_u8(vreinterpretq_u8_m128i(a), vdupq_n_u8(0))) ^
-           vreinterpretq_u8_m128i(RoundKey);
+               vaesdq_u8(vreinterpretq_u8_m128i(a), vdupq_n_u8(0)) ^
+           vreinterpretq_u8_m128i(RoundKey));
 }

@jserv
Copy link
Member

jserv commented Dec 27, 2022

Thank @wangxiao1254 for reporting! Applied in commit 6fd46b6 .

@howjmay, we have to automate the cryptographic extension aware tests.

@wangxiao1254
Copy link
Contributor

I think the ) that you deleted in line 9892 should be moved to line 9893 :) I think this should fix #572 as well.

Also the function at line 9898 should be updated as well. Currently it would cause type mismatch when calling vaesimcq_u8 with a in type int64x2_t.

FORCE_INLINE __m128i _mm_aesimc_si128(__m128i a)
 {
-    return vreinterpretq_m128i_u8(vaesimcq_u8(vreinterpretq_u8_m128i(a)));
+    return vreinterpretq_m128i_u8(vaesimcq_u8(a));
 }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Absent _mm_aesdec_si128 and _mm_aesdeclast_si128
3 participants