Topic: AES-NI linker errors

Hi,

I am trying to enable AES-NI hardware accelerations on windows 10 from user_settings.h. I get the following linker errors:

1>wolfssl.lib(aes.obj) : error LNK2001: unresolved external symbol cpuid_get_flags
1>wolfssl.lib(aes.obj) : error LNK2001: unresolved external symbol AES_CBC_encrypt
1>wolfssl.lib(aes.obj) : error LNK2001: unresolved external symbol AES_CBC_decrypt_by8
1>wolfssl.lib(aes.obj) : error LNK2001: unresolved external symbol AES_ECB_encrypt
1>wolfssl.lib(aes.obj) : error LNK2001: unresolved external symbol AES_ECB_decrypt
1>wolfssl.lib(aes.obj) : error LNK2001: unresolved external symbol AES_128_Key_Expansion
1>wolfssl.lib(aes.obj) : error LNK2001: unresolved external symbol AES_192_Key_Expansion
1>wolfssl.lib(aes.obj) : error LNK2001: unresolved external symbol AES_256_Key_Expansion

I am using AES-CCM and ChaCha20-poly1305. Without defining WOLFSSL_AESNI macro, everything compiles and runs fine. Any pointer towards what could be the problem?

Share

Re: AES-NI linker errors

Hi anonazh228,

I believe you need to compile in the assembly versions of the code in `aes_asm.asm`. See the example project here: https://github.com/wolfSSL/wolfssl/blob … xproj#L343

And build options:
https://github.com/wolfSSL/wolfssl/blob … ings.h#L52

Thanks,
David Garske, wolfSSL

Share