mirror of
https://git.suyu.dev/suyu/mbedtls.git
synced 2025-12-23 15:55:10 +01:00
Add aesni_crypt_ecb() and use it
This commit is contained in:
parent
92ac76f9db
commit
5b685653ef
4 changed files with 70 additions and 1 deletions
|
|
@ -38,12 +38,27 @@
|
|||
#if defined(POLARSSL_HAVE_X86_64)
|
||||
|
||||
/**
|
||||
* \brief AES_NI detection routine
|
||||
* \brief AES-NI detection routine
|
||||
*
|
||||
* \return 1 if CPU supports AES-NI, 0 otherwise
|
||||
*/
|
||||
int aesni_supported( void );
|
||||
|
||||
/**
|
||||
* \brief AES-NI AES-ECB block en(de)cryption
|
||||
*
|
||||
* \param ctx AES context
|
||||
* \param mode AES_ENCRYPT or AES_DECRYPT
|
||||
* \param input 16-byte input block
|
||||
* \param output 16-byte output block
|
||||
*
|
||||
* \return 0 if success, 1 if operation failed
|
||||
*/
|
||||
int aesni_crypt_ecb( aes_context *ctx,
|
||||
int mode,
|
||||
const unsigned char input[16],
|
||||
unsigned char output[16] );
|
||||
|
||||
#endif /* POLARSSL_HAVE_X86_64 */
|
||||
|
||||
#endif /* POLARSSL_AESNI_H */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue