webkit  2cdf99a9e3038c7e01b3c37e8ad903ecbe5eecf1
https://github.com/WebKit/webkit
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
Macros | Functions
chacha.c File Reference
#include <openssl/chacha.h>
#include <assert.h>
#include <string.h>
#include <openssl/cpu.h>
#include "../internal.h"

Macros

#define U8TO32_LITTLE(p)
 
#define ROTATE(v, n)   (((v) << (n)) | ((v) >> (32 - (n))))
 
#define U32TO8_LITTLE(p, v)
 
#define QUARTERROUND(a, b, c, d)
 

Functions

void CRYPTO_chacha_20 (uint8_t *out, const uint8_t *in, size_t in_len, const uint8_t key[32], const uint8_t nonce[12], uint32_t counter)
 

Macro Definition Documentation

◆ QUARTERROUND

#define QUARTERROUND (   a,
  b,
  c,
  d 
)
Value:
x[a] += x[b]; x[d] = ROTATE(x[d] ^ x[a], 16); \
x[c] += x[d]; x[b] = ROTATE(x[b] ^ x[c], 12); \
x[a] += x[b]; x[d] = ROTATE(x[d] ^ x[a], 8); \
x[c] += x[d]; x[b] = ROTATE(x[b] ^ x[c], 7);
int c
Definition: cpp_unittests.cpp:275
#define ROTATE(v, n)
Definition: chacha.c:76
EGLSurface EGLint x
Definition: eglext.h:950
GLboolean GLboolean GLboolean GLboolean a
Definition: gl2ext.h:306
GLboolean GLboolean GLboolean b
Definition: gl2ext.h:306
#define d
Definition: float-mm.c:30

◆ ROTATE

#define ROTATE (   v,
  n 
)    (((v) << (n)) | ((v) >> (32 - (n))))

◆ U32TO8_LITTLE

#define U32TO8_LITTLE (   p,
  v 
)
Value:
{ \
(p)[0] = (v >> 0) & 0xff; \
(p)[1] = (v >> 8) & 0xff; \
(p)[2] = (v >> 16) & 0xff; \
(p)[3] = (v >> 24) & 0xff; \
}
DOMString p
Definition: WebCryptoAPI.idl:116
const GLfloat * v
Definition: gl2.h:514

◆ U8TO32_LITTLE

#define U8TO32_LITTLE (   p)
Value:
(((uint32_t)((p)[0])) | ((uint32_t)((p)[1]) << 8) | \
((uint32_t)((p)[2]) << 16) | ((uint32_t)((p)[3]) << 24))
DOMString p
Definition: WebCryptoAPI.idl:116
std::integral_constant< std::uint32_t, V > uint32_t
Definition: Brigand.h:441

Function Documentation

◆ CRYPTO_chacha_20()

void CRYPTO_chacha_20 ( uint8_t out,
const uint8_t in,
size_t  in_len,
const uint8_t  key[32],
const uint8_t  nonce[12],
uint32_t  counter 
)