Lines Matching refs:i
1622 long long top,p,q,r,i,j; in crypto_sort_int32() local
1630 i = 0; in crypto_sort_int32()
1631 while (i + 2 * p <= n) { in crypto_sort_int32()
1632 for (j = i;j < i + p;++j) in crypto_sort_int32()
1634 i += 2 * p; in crypto_sort_int32()
1636 for (j = i;j < n - p;++j) in crypto_sort_int32()
1639 i = 0; in crypto_sort_int32()
1642 if (j != i) for (;;) { in crypto_sort_int32()
1649 if (j == i + p) { in crypto_sort_int32()
1650 i += 2 * p; in crypto_sort_int32()
1654 while (i + p <= n - q) { in crypto_sort_int32()
1655 for (j = i;j < i + p;++j) { in crypto_sort_int32()
1661 i += 2 * p; in crypto_sort_int32()
1664 j = i; in crypto_sort_int32()
1719 int i, weight = 0; in Weightw_mask() local
1720 for (i = 0; i < p; ++i) weight += crypto_int64_bottombit_01(r[i]); in Weightw_mask()
1758 long long i; in Encode() local
1759 for (i = 0; i < len - 1; i += 2) { in Encode()
1760 uint32_t m0 = M[i]; in Encode()
1761 uint32_t r = R[i] + R[i + 1] * m0; in Encode()
1762 uint32_t m = M[i + 1] * m0; in Encode()
1768 R2[i / 2] = r; in Encode()
1769 M2[i / 2] = m; in Encode()
1771 if (i < len) { in Encode()
1772 R2[i / 2] = R[i]; in Encode()
1773 M2[i / 2] = M[i]; in Encode()
1791 long long i; in Decode() local
1792 for (i = 0; i < len - 1; i += 2) { in Decode()
1793 uint32_t m = M[i] * (uint32_t)M[i + 1]; in Decode()
1795 bottomt[i / 2] = 256 * 256; in Decode()
1796 bottomr[i / 2] = S[0] + 256 * S[1]; in Decode()
1798 M2[i / 2] = (((m + 255) >> 8) + 255) >> 8; in Decode()
1800 bottomt[i / 2] = 256; in Decode()
1801 bottomr[i / 2] = S[0]; in Decode()
1803 M2[i / 2] = (m + 255) >> 8; in Decode()
1805 bottomt[i / 2] = 1; in Decode()
1806 bottomr[i / 2] = 0; in Decode()
1807 M2[i / 2] = m; in Decode()
1810 if (i < len) M2[i / 2] = M[i]; in Decode()
1812 for (i = 0; i < len - 1; i += 2) { in Decode()
1813 uint32_t r1, r = bottomr[i / 2]; in Decode()
1815 r += bottomt[i / 2] * R2[i / 2]; in Decode()
1816 uint32_divmod_uint14(&r1, &r0, r, M[i]); in Decode()
1817 r1 = uint32_mod_uint14(r1, M[i + 1]); in Decode()
1821 if (i < len) *out++ = R2[i / 2]; in Decode()
1826 int i; in R3_fromRq() local
1827 for (i = 0; i < p; ++i) out[i] = F3_freeze(r[i]); in R3_fromRq()
1832 int i, j; in R3_mult() local
1833 for (i = 0; i < p + p - 1; ++i) fg[i] = 0; in R3_mult()
1834 for (i = 0; i < p; ++i) in R3_mult()
1835 for (j = 0; j < p; ++j) fg[i + j] += f[i] * (int16_t)g[j]; in R3_mult()
1836 for (i = p; i < p + p - 1; ++i) fg[i - p] += fg[i]; in R3_mult()
1837 for (i = p; i < p + p - 1; ++i) fg[i - p + 1] += fg[i]; in R3_mult()
1838 for (i = 0; i < p; ++i) h[i] = F3_freeze(fg[i]); in R3_mult()
1843 int sign, swap, t, i, loop, delta = 1; in R3_recip() local
1844 for (i = 0; i < p + 1; ++i) v[i] = 0; in R3_recip()
1845 for (i = 0; i < p + 1; ++i) r[i] = 0; in R3_recip()
1847 for (i = 0; i < p; ++i) f[i] = 0; in R3_recip()
1850 for (i = 0; i < p; ++i) g[p - 1 - i] = in[i]; in R3_recip()
1853 for (i = p; i > 0; --i) v[i] = v[i - 1]; in R3_recip()
1859 for (i = 0; i < p + 1; ++i) { in R3_recip()
1860 t = swap & (f[i] ^ g[i]); in R3_recip()
1861 f[i] ^= t; in R3_recip()
1862 g[i] ^= t; in R3_recip()
1863 t = swap & (v[i] ^ r[i]); in R3_recip()
1864 v[i] ^= t; in R3_recip()
1865 r[i] ^= t; in R3_recip()
1867 for (i = 0; i < p + 1; ++i) g[i] = F3_freeze(g[i] + sign * f[i]); in R3_recip()
1868 for (i = 0; i < p + 1; ++i) r[i] = F3_freeze(r[i] + sign * v[i]); in R3_recip()
1869 for (i = 0; i < p; ++i) g[i] = g[i + 1]; in R3_recip()
1873 for (i = 0; i < p; ++i) out[i] = sign * v[p - 1 - i]; in R3_recip()
1879 int i, j; in Rq_mult_small() local
1880 for (i = 0; i < p + p - 1; ++i) fg[i] = 0; in Rq_mult_small()
1881 for (i = 0; i < p; ++i) in Rq_mult_small()
1882 for (j = 0; j < p; ++j) fg[i + j] += f[i] * (int32_t)g[j]; in Rq_mult_small()
1883 for (i = p; i < p + p - 1; ++i) fg[i - p] += fg[i]; in Rq_mult_small()
1884 for (i = p; i < p + p - 1; ++i) fg[i - p + 1] += fg[i]; in Rq_mult_small()
1885 for (i = 0; i < p; ++i) h[i] = Fq_freeze(fg[i]); in Rq_mult_small()
1889 int i; in Rq_mult3() local
1890 for (i = 0; i < p; ++i) h[i] = Fq_freeze(3 * f[i]); in Rq_mult3()
1894 int i = 1; in Fq_recip() local
1896 while (i < q - 2) { in Fq_recip()
1898 i += 1; in Fq_recip()
1905 int swap, t, i, loop, delta = 1; in Rq_recip3() local
1907 for (i = 0; i < p + 1; ++i) v[i] = 0; in Rq_recip3()
1908 for (i = 0; i < p + 1; ++i) r[i] = 0; in Rq_recip3()
1910 for (i = 0; i < p; ++i) f[i] = 0; in Rq_recip3()
1913 for (i = 0; i < p; ++i) g[p - 1 - i] = in[i]; in Rq_recip3()
1916 for (i = p; i > 0; --i) v[i] = v[i - 1]; in Rq_recip3()
1921 for (i = 0; i < p + 1; ++i) { in Rq_recip3()
1922 t = swap & (f[i] ^ g[i]); in Rq_recip3()
1923 f[i] ^= t; in Rq_recip3()
1924 g[i] ^= t; in Rq_recip3()
1925 t = swap & (v[i] ^ r[i]); in Rq_recip3()
1926 v[i] ^= t; in Rq_recip3()
1927 r[i] ^= t; in Rq_recip3()
1931 for (i = 0; i < p + 1; ++i) g[i] = Fq_freeze(f0 * g[i] - g0 * f[i]); in Rq_recip3()
1932 for (i = 0; i < p + 1; ++i) r[i] = Fq_freeze(f0 * r[i] - g0 * v[i]); in Rq_recip3()
1933 for (i = 0; i < p; ++i) g[i] = g[i + 1]; in Rq_recip3()
1937 for (i = 0; i < p; ++i) out[i] = Fq_freeze(scale * (int32_t)v[p - 1 - i]); in Rq_recip3()
1942 int i; in Round() local
1943 for (i = 0; i < p; ++i) out[i] = a[i] - F3_freeze(a[i]); in Round()
1948 int i; in Short_fromlist() local
1949 for (i = 0; i < w; ++i) L[i] = in[i] & (uint32_t)-2; in Short_fromlist()
1950 for (i = w; i < p; ++i) L[i] = (in[i] & (uint32_t)-3) | 1; in Short_fromlist()
1952 for (i = 0; i < p; ++i) out[i] = (L[i] & 3) - 1; in Short_fromlist()
1957 int i; in Hash_prefix() local
1959 for (i = 0; i < inlen; ++i) x[i + 1] = in[i]; in Hash_prefix()
1961 for (i = 0; i < 32; ++i) out[i] = h[i]; in Hash_prefix()
1967 int i; in urandom32() local
1969 for (i = 0; i < 4; ++i) result += ((uint32_t)c[i]) << (8 * i); in urandom32()
1975 int i; in Short_random() local
1976 for (i = 0; i < p; ++i) L[i] = urandom32(); in Short_random()
1981 int i; in Small_random() local
1982 for (i = 0; i < p; ++i) out[i] = (((urandom32() & 0x3fffffff) * 3) >> 30) - 1; in Small_random()
2009 int mask, i; in Decrypt() local
2015 for (i = 0; i < w; ++i) r[i] = ((ev[i] ^ 1) & ~mask) ^ 1; in Decrypt()
2016 for (i = w; i < p; ++i) r[i] = ev[i] & ~mask; in Decrypt()
2020 int i, j; in Small_encode() local
2021 for (i = 0; i < p / 4; ++i) { in Small_encode()
2030 int i, j; in Small_decode() local
2031 for (i = 0; i < p / 4; ++i) { in Small_decode()
2040 int i; in Rq_encode() local
2041 for (i = 0; i < p; ++i) R[i] = r[i] + q12; in Rq_encode()
2042 for (i = 0; i < p; ++i) M[i] = q; in Rq_encode()
2048 int i; in Rq_decode() local
2049 for (i = 0; i < p; ++i) M[i] = q; in Rq_decode()
2051 for (i = 0; i < p; ++i) r[i] = ((Fq)R[i]) - q12; in Rq_decode()
2056 int i; in Rounded_encode() local
2057 for (i = 0; i < p; ++i) R[i] = ((r[i] + q12) * 10923) >> 15; in Rounded_encode()
2058 for (i = 0; i < p; ++i) M[i] = (q + 2) / 3; in Rounded_encode()
2064 int i; in Rounded_decode() local
2065 for (i = 0; i < p; ++i) M[i] = (q + 2) / 3; in Rounded_decode()
2067 for (i = 0; i < p; ++i) r[i] = R[i] * 3 - q12; in Rounded_decode()
2097 int i; in HashConfirm() local
2099 for (i = 0; i < Hash_bytes; ++i) x[Hash_bytes + i] = cache[i]; in HashConfirm()
2105 int i; in HashSession() local
2107 for (i = 0; i < crypto_kem_sntrup761_CIPHERTEXTBYTES; ++i) x[Hash_bytes + i] = z[i]; in HashSession()
2112 int i; in crypto_kem_sntrup761_keypair() local
2115 for (i = 0; i < crypto_kem_sntrup761_PUBLICKEYBYTES; ++i) *sk++ = pk[i]; in crypto_kem_sntrup761_keypair()
2150 int mask, i; in crypto_kem_sntrup761_dec() local
2154 for (i = 0; i < Small_bytes; ++i) r_enc[i] ^= mask & (r_enc[i] ^ rho[i]); in crypto_kem_sntrup761_dec()