Lines Matching +full:12 +full:v
9 /* $OpenBSD: chacha_private.h,v 1.3 2022/02/28 21:56:29 dtucker Exp $ */
19 #define U8C(v) (v##U) argument
20 #define U32C(v) (v##U) argument
22 #define U8V(v) ((u8)(v) & U8C(0xFF)) argument
23 #define U32V(v) ((u32)(v) & U32C(0xFFFFFFFF)) argument
25 #define ROTL32(v, n) \ argument
26 (U32V((v) << (n)) | ((v) >> (32 - (n))))
34 #define U32TO8_LITTLE(p, v) \ argument
36 (p)[0] = U8V((v) ); \
37 (p)[1] = U8V((v) >> 8); \
38 (p)[2] = U8V((v) >> 16); \
39 (p)[3] = U8V((v) >> 24); \
42 #define ROTATE(v,c) (ROTL32(v,c)) argument
43 #define XOR(v,w) ((v) ^ (w)) argument
44 #define PLUS(v,w) (U32V((v) + (w))) argument
45 #define PLUSONE(v) (PLUS((v),1)) argument
49 c = PLUS(c,d); b = ROTATE(XOR(b,c),12); \
64 x->input[7] = U8TO32_LITTLE(k + 12); in chacha_keysetup()
74 x->input[11] = U8TO32_LITTLE(k + 12); in chacha_keysetup()
78 x->input[3] = U8TO32_LITTLE(constants + 12); in chacha_keysetup()
84 x->input[12] = 0; in chacha_ivsetup()
113 j12 = x->input[12]; in chacha_encrypt_bytes()
172 x3 = XOR(x3,U8TO32_LITTLE(m + 12)); in chacha_encrypt_bytes()
196 U32TO8_LITTLE(c + 12,x3); in chacha_encrypt_bytes()
214 x->input[12] = j12; in chacha_encrypt_bytes()