3 static uint64_t load_3(const unsigned char *in) {
5 result = (uint64_t) in[0];
6 result |= ((uint64_t) in[1]) << 8;
7 result |= ((uint64_t) in[2]) << 16;
11 static uint64_t load_4(const unsigned char *in) {
13 result = (uint64_t) in[0];
14 result |= ((uint64_t) in[1]) << 8;
15 result |= ((uint64_t) in[2]) << 16;
16 result |= ((uint64_t) in[3]) << 24;
20 void fe_frombytes(uint32_t h[10], const unsigned char *s) {
21 int64_t h0 = load_4(s);
22 int64_t h1 = load_3(s + 4) << 6;
23 int64_t h2 = load_3(s + 7) << 5;
24 int64_t h3 = load_3(s + 10) << 3;
25 int64_t h4 = load_3(s + 13) << 2;
26 int64_t h5 = load_4(s + 16);
27 int64_t h6 = load_3(s + 20) << 7;
28 int64_t h7 = load_3(s + 23) << 5;
29 int64_t h8 = load_3(s + 26) << 4;
30 int64_t h9 = (load_3(s + 29) & 8388607) << 2;
42 carry9 = (h9 + (int64_t) (1<<24)) >> 25; h0 += carry9 * 19; h9 -= carry9 << 25;
43 carry1 = (h1 + (int64_t) (1<<24)) >> 25; h2 += carry1; h1 -= carry1 << 25;
44 carry3 = (h3 + (int64_t) (1<<24)) >> 25; h4 += carry3; h3 -= carry3 << 25;
45 carry5 = (h5 + (int64_t) (1<<24)) >> 25; h6 += carry5; h5 -= carry5 << 25;
46 carry7 = (h7 + (int64_t) (1<<24)) >> 25; h8 += carry7; h7 -= carry7 << 25;
48 carry0 = (h0 + (int64_t) (1<<25)) >> 26; h1 += carry0; h0 -= carry0 << 26;
49 carry2 = (h2 + (int64_t) (1<<25)) >> 26; h3 += carry2; h2 -= carry2 << 26;
50 carry4 = (h4 + (int64_t) (1<<25)) >> 26; h5 += carry4; h4 -= carry4 << 26;
51 carry6 = (h6 + (int64_t) (1<<25)) >> 26; h7 += carry6; h6 -= carry6 << 26;
52 carry8 = (h8 + (int64_t) (1<<25)) >> 26; h9 += carry8; h8 -= carry8 << 26;