Lines Matching full:felem
81 * A field element with four limbs is an 'felem'. One with eight limbs is a
90 typedef limb felem[NLIMBS];
99 /* bin32_to_felem takes a little-endian byte array and converts it into felem
101 static void bin32_to_felem(felem out, const u8 in[32]) {
125 /* BN_to_felem converts an OpenSSL BIGNUM into an felem. */
126 static int BN_to_felem(felem out, const BIGNUM *bn) {
148 /* felem_to_BN converts an felem into an OpenSSL BIGNUM. */
172 static void felem_assign(felem out, const felem in) {
180 static void felem_sum(felem out, const felem in) {
188 static void felem_small_sum(felem out, const smallfelem in) {
196 static void felem_scalar(felem out, const u64 scalar) {
220 static const felem zero105 = {two105m41m9, two105, two105m41p9, two105m41p9};
225 static void smallfelem_neg(felem out, const smallfelem small) {
238 static void felem_diff(felem out, const felem in) {
256 static const felem zero107 = {two107m43m11, two107, two107m43p11, two107m43p11};
264 static void felem_diff_zero107(felem out, const felem in) {
318 static const felem zero110 = {two64m0, two110p32m0, two64m46, two64m32};
320 /* felem_shrink converts an felem into a smallfelem. The result isn't quite
327 static void felem_shrink(smallfelem out, const felem in) {
328 felem tmp;
406 /* smallfelem_expand converts a smallfelem to an felem */
407 static void smallfelem_expand(felem out, const smallfelem in) {
495 static void felem_square(longfelem out, const felem in) {
615 static void felem_mul(longfelem out, const felem in1, const felem in2) {
629 const felem in2) {
640 static const felem zero100 = {two100m36m4, two100, two100m36p4, two100m36p4};
654 static void felem_reduce_(felem out, const longfelem in) {
687 /* felem_reduce converts a longfelem into an felem.
694 static void felem_reduce(felem out, const longfelem in) {
713 /* felem_reduce_zero105 converts a larger longfelem into an felem.
718 static void felem_reduce_zero105(felem out, const longfelem in) {
748 static void felem_contract(smallfelem out, const felem in) {
805 felem tmp;
815 felem tmp;
868 static void felem_inv(felem out, const felem in) {
869 felem ftmp, ftmp2;
871 felem e2, e4, e8, e16, e32, e64;
962 felem tmp;
983 static void point_double(felem x_out, felem y_out, felem z_out,
984 const felem x_in, const felem y_in, const felem z_in) {
986 felem delta, gamma, beta, alpha, ftmp, ftmp2;
1064 felem felem_x_out, felem_y_out, felem_z_out;
1065 felem felem_x_in, felem_y_in, felem_z_in;
1078 static void copy_conditional(felem out, const felem in, limb mask) {
1087 static void copy_small_conditional(felem out, const smallfelem in, limb mask) {
1105 static void point_add(felem x3, felem y3, felem z3, const felem x1,
1106 const felem y1, const felem z1, const int mixed,
1109 felem ftmp, ftmp2, ftmp3, ftmp4, ftmp5, ftmp6, x_out, y_out, z_out;
1268 felem felem_x3, felem_y3, felem_z3;
1269 felem felem_x1, felem_y1, felem_z1;
1505 static void batch_mul(felem x_out, felem y_out, felem z_out,
1511 felem nq[3], ftmp;
1517 memset(nq, 0, 3 * sizeof(felem));
1652 felem z1, z2, x_in, y_in;
1727 felem x_out, y_out, z_out;