Add missing void and const
This commit is contained in:
parent
c8a4e48e0c
commit
5b39ae3e48
@ -39,7 +39,7 @@
|
||||
* to speed up the multiplication.
|
||||
* TODO: optimise with tables
|
||||
*/
|
||||
void cryptonite_aes_generic_gf_mul(block128 *a, block128 *b)
|
||||
void cryptonite_aes_generic_gf_mul(block128 *a, const block128 *b)
|
||||
{
|
||||
uint64_t a0, a1, v0, v1;
|
||||
int i, j;
|
||||
|
||||
@ -32,7 +32,7 @@
|
||||
|
||||
#include "aes/block128.h"
|
||||
|
||||
void cryptonite_aes_generic_gf_mul(block128 *a, block128 *b);
|
||||
void cryptonite_aes_generic_gf_mul(block128 *a, const block128 *b);
|
||||
void cryptonite_aes_generic_gf_mulx(block128 *a);
|
||||
|
||||
#endif
|
||||
|
||||
@ -231,7 +231,7 @@ static __m128i gfmul_pclmuldq(__m128i a, __m128i b)
|
||||
return _mm_shuffle_epi8(tmp6, bswap_mask);
|
||||
}
|
||||
|
||||
void cryptonite_aesni_gf_mul(block128 *a, block128 *b)
|
||||
void cryptonite_aesni_gf_mul(block128 *a, const block128 *b)
|
||||
{
|
||||
__m128i _a, _b, _c;
|
||||
_a = _mm_loadu_si128((__m128i *) a);
|
||||
@ -240,7 +240,7 @@ void cryptonite_aesni_gf_mul(block128 *a, block128 *b)
|
||||
_mm_storeu_si128((__m128i *) a, _c);
|
||||
}
|
||||
|
||||
void cryptonite_aesni_init_pclmul()
|
||||
void cryptonite_aesni_init_pclmul(void)
|
||||
{
|
||||
gfmul_branch_ptr = gfmul_pclmuldq;
|
||||
}
|
||||
|
||||
@ -73,8 +73,8 @@ void cryptonite_aesni_gcm_encrypt128(uint8_t *out, aes_gcm *gcm, aes_key *key, u
|
||||
void cryptonite_aesni_gcm_encrypt256(uint8_t *out, aes_gcm *gcm, aes_key *key, uint8_t *in, uint32_t length);
|
||||
|
||||
#ifdef WITH_PCLMUL
|
||||
void cryptonite_aesni_init_pclmul();
|
||||
void cryptonite_aesni_gf_mul(block128 *a, block128 *b);
|
||||
void cryptonite_aesni_init_pclmul(void);
|
||||
void cryptonite_aesni_gf_mul(block128 *a, const block128 *b);
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
@ -156,7 +156,7 @@ typedef void (*gcm_crypt_f)(uint8_t *output, aes_gcm *gcm, aes_key *key, uint8_t
|
||||
typedef void (*ocb_crypt_f)(uint8_t *output, aes_ocb *ocb, aes_key *key, uint8_t *input, uint32_t length);
|
||||
typedef void (*ccm_crypt_f)(uint8_t *output, aes_ccm *ccm, aes_key *key, uint8_t *input, uint32_t length);
|
||||
typedef void (*block_f)(aes_block *output, aes_key *key, aes_block *input);
|
||||
typedef void (*gf_mul_f)(aes_block *a, aes_block *b);
|
||||
typedef void (*gf_mul_f)(aes_block *a, const aes_block *b);
|
||||
|
||||
#ifdef WITH_AESNI
|
||||
#define GET_INIT(strength) \
|
||||
|
||||
Loading…
Reference in New Issue
Block a user