Botan  2.11.0
Crypto and TLS for C++11
poly_dbl.h
Go to the documentation of this file.
1 /*
2 * (C) 2017 Jack Lloyd
3 *
4 * Botan is released under the Simplified BSD License (see license.txt)
5 */
6 
7 #ifndef BOTAN_POLY_DBL_H_
8 #define BOTAN_POLY_DBL_H_
9 
10 #include <botan/types.h>
11 
12 namespace Botan {
13 
14 /**
15 * Polynomial doubling in GF(2^n)
16 */
17 void BOTAN_PUBLIC_API(2,3) poly_double_n(uint8_t out[], const uint8_t in[], size_t n);
18 
19 /**
20 * Returns true iff poly_double_n is implemented for this size.
21 */
22 inline bool poly_double_supported_size(size_t n)
23  {
24  return (n == 8 || n == 16 || n == 24 || n == 32 || n == 64 || n == 128);
25  }
26 
27 inline void poly_double_n(uint8_t buf[], size_t n)
28  {
29  return poly_double_n(buf, buf, n);
30  }
31 
32 /*
33 * Little endian convention - used for XTS
34 */
35 void poly_double_n_le(uint8_t out[], const uint8_t in[], size_t n);
36 
37 }
38 
39 #endif
BigInt size_t n
Definition: bigint.h:1096
const uint8_t * buf
Definition: ffi.h:371
void const uint8_t in[]
Definition: mgf1.h:26
void poly_double_n_le(uint8_t out[], const uint8_t in[], size_t n)
Definition: poly_dbl.cpp:94
Definition: alg_id.cpp:13
uint8_t out[]
Definition: pbkdf2.h:19
class BOTAN_PUBLIC_API(2, 0) AlgorithmIdentifier final bool BOTAN_PUBLIC_API(2, 0) operator
Name Constraints.
Definition: asn1_obj.h:66
void poly_double_n(uint8_t out[], const uint8_t in[], size_t n)
Definition: poly_dbl.cpp:73
bool poly_double_supported_size(size_t n)
Definition: poly_dbl.h:22