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

Fix android builds of statusgo for ndk r26b #2

Merged
merged 1 commit into from
Sep 20, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions aesce.c
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ int mbedtls_aesce_has_support(void)
#endif
}

__attribute__((target("aes,crypto")))
static uint8x16_t aesce_encrypt_block(uint8x16_t block,
unsigned char *keys,
int rounds)
Expand All @@ -125,6 +126,7 @@ static uint8x16_t aesce_encrypt_block(uint8x16_t block,
return block;
}

__attribute__((target("aes,crypto")))
static uint8x16_t aesce_decrypt_block(uint8x16_t block,
unsigned char *keys,
int rounds)
Expand Down Expand Up @@ -182,10 +184,12 @@ int mbedtls_aesce_crypt_ecb(mbedtls_aes_context *ctx,
/*
* Compute decryption round keys from encryption round keys
*/
__attribute__((target("aes,crypto")))
void mbedtls_aesce_inverse_key(unsigned char *invkey,
const unsigned char *fwdkey,
int nr)
{

int i, j;
j = nr;
vst1q_u8(invkey, vld1q_u8(fwdkey + j * 16));
Expand All @@ -202,6 +206,7 @@ static inline uint32_t aes_rot_word(uint32_t word)
return (word << (32 - 8)) | (word >> 8);
}

__attribute__((target("aes,crypto")))
static inline uint32_t aes_sub_word(uint32_t in)
{
uint8x16_t v = vreinterpretq_u8_u32(vdupq_n_u32(in));
Expand Down