mirror of
https://git.suyu.dev/suyu/mbedtls.git
synced 2025-12-24 00:06:32 +01:00
Add aesni_gcm_mult()
This commit is contained in:
parent
9d57482280
commit
d333f67f8c
2 changed files with 131 additions and 1 deletions
|
|
@ -58,13 +58,29 @@ int aesni_supports( unsigned int what );
|
|||
* \param input 16-byte input block
|
||||
* \param output 16-byte output block
|
||||
*
|
||||
* \return 0 if success, 1 if operation failed
|
||||
* \return 0 on success (cannot fail)
|
||||
*/
|
||||
int aesni_crypt_ecb( aes_context *ctx,
|
||||
int mode,
|
||||
const unsigned char input[16],
|
||||
unsigned char output[16] );
|
||||
|
||||
/**
|
||||
* \brief GCM multiplication: c = a * b in GF(2^128)
|
||||
*
|
||||
* \param c Result
|
||||
* \param a First operand
|
||||
* \param b Second operand
|
||||
*
|
||||
* \note Both operands and result are bit strings interpreted as
|
||||
* elements of GF(2^128) as per the GCM spec.
|
||||
*
|
||||
* \return 0 on success (cannot fail)
|
||||
*/
|
||||
int aesni_gcm_mult( unsigned char c[16],
|
||||
const unsigned char a[16],
|
||||
const unsigned char b[16] );
|
||||
|
||||
#endif /* POLARSSL_HAVE_X86_64 */
|
||||
|
||||
#endif /* POLARSSL_AESNI_H */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue