github.com/cloudflare/circl@v1.5.0/dh/x448/curve_amd64.h (about) 1 #define ladderStepLeg \ 2 addSub(x2,z2) \ 3 addSub(x3,z3) \ 4 integerMulLeg(b0,x2,z3) \ 5 integerMulLeg(b1,x3,z2) \ 6 reduceFromDoubleLeg(t0,b0) \ 7 reduceFromDoubleLeg(t1,b1) \ 8 addSub(t0,t1) \ 9 cselect(x2,x3,regMove) \ 10 cselect(z2,z3,regMove) \ 11 integerSqrLeg(b0,t0) \ 12 integerSqrLeg(b1,t1) \ 13 reduceFromDoubleLeg(x3,b0) \ 14 reduceFromDoubleLeg(z3,b1) \ 15 integerMulLeg(b0,x1,z3) \ 16 reduceFromDoubleLeg(z3,b0) \ 17 integerSqrLeg(b0,x2) \ 18 integerSqrLeg(b1,z2) \ 19 reduceFromDoubleLeg(x2,b0) \ 20 reduceFromDoubleLeg(z2,b1) \ 21 subtraction(t0,x2,z2) \ 22 multiplyA24Leg(t1,t0) \ 23 additionLeg(t1,t1,z2) \ 24 integerMulLeg(b0,x2,z2) \ 25 integerMulLeg(b1,t0,t1) \ 26 reduceFromDoubleLeg(x2,b0) \ 27 reduceFromDoubleLeg(z2,b1) 28 29 #define ladderStepBmi2Adx \ 30 addSub(x2,z2) \ 31 addSub(x3,z3) \ 32 integerMulAdx(b0,x2,z3) \ 33 integerMulAdx(b1,x3,z2) \ 34 reduceFromDoubleAdx(t0,b0) \ 35 reduceFromDoubleAdx(t1,b1) \ 36 addSub(t0,t1) \ 37 cselect(x2,x3,regMove) \ 38 cselect(z2,z3,regMove) \ 39 integerSqrAdx(b0,t0) \ 40 integerSqrAdx(b1,t1) \ 41 reduceFromDoubleAdx(x3,b0) \ 42 reduceFromDoubleAdx(z3,b1) \ 43 integerMulAdx(b0,x1,z3) \ 44 reduceFromDoubleAdx(z3,b0) \ 45 integerSqrAdx(b0,x2) \ 46 integerSqrAdx(b1,z2) \ 47 reduceFromDoubleAdx(x2,b0) \ 48 reduceFromDoubleAdx(z2,b1) \ 49 subtraction(t0,x2,z2) \ 50 multiplyA24Adx(t1,t0) \ 51 additionAdx(t1,t1,z2) \ 52 integerMulAdx(b0,x2,z2) \ 53 integerMulAdx(b1,t0,t1) \ 54 reduceFromDoubleAdx(x2,b0) \ 55 reduceFromDoubleAdx(z2,b1) 56 57 #define difAddLeg \ 58 addSub(x1,z1) \ 59 integerMulLeg(b0,z1,ui) \ 60 reduceFromDoubleLeg(z1,b0) \ 61 addSub(x1,z1) \ 62 integerSqrLeg(b0,x1) \ 63 integerSqrLeg(b1,z1) \ 64 reduceFromDoubleLeg(x1,b0) \ 65 reduceFromDoubleLeg(z1,b1) \ 66 integerMulLeg(b0,x1,z2) \ 67 integerMulLeg(b1,z1,x2) \ 68 reduceFromDoubleLeg(x1,b0) \ 69 reduceFromDoubleLeg(z1,b1) 70 71 #define difAddBmi2Adx \ 72 addSub(x1,z1) \ 73 integerMulAdx(b0,z1,ui) \ 74 reduceFromDoubleAdx(z1,b0) \ 75 addSub(x1,z1) \ 76 integerSqrAdx(b0,x1) \ 77 integerSqrAdx(b1,z1) \ 78 reduceFromDoubleAdx(x1,b0) \ 79 reduceFromDoubleAdx(z1,b1) \ 80 integerMulAdx(b0,x1,z2) \ 81 integerMulAdx(b1,z1,x2) \ 82 reduceFromDoubleAdx(x1,b0) \ 83 reduceFromDoubleAdx(z1,b1) 84 85 #define doubleLeg \ 86 addSub(x1,z1) \ 87 integerSqrLeg(b0,x1) \ 88 integerSqrLeg(b1,z1) \ 89 reduceFromDoubleLeg(x1,b0) \ 90 reduceFromDoubleLeg(z1,b1) \ 91 subtraction(t0,x1,z1) \ 92 multiplyA24Leg(t1,t0) \ 93 additionLeg(t1,t1,z1) \ 94 integerMulLeg(b0,x1,z1) \ 95 integerMulLeg(b1,t0,t1) \ 96 reduceFromDoubleLeg(x1,b0) \ 97 reduceFromDoubleLeg(z1,b1) 98 99 #define doubleBmi2Adx \ 100 addSub(x1,z1) \ 101 integerSqrAdx(b0,x1) \ 102 integerSqrAdx(b1,z1) \ 103 reduceFromDoubleAdx(x1,b0) \ 104 reduceFromDoubleAdx(z1,b1) \ 105 subtraction(t0,x1,z1) \ 106 multiplyA24Adx(t1,t0) \ 107 additionAdx(t1,t1,z1) \ 108 integerMulAdx(b0,x1,z1) \ 109 integerMulAdx(b1,t0,t1) \ 110 reduceFromDoubleAdx(x1,b0) \ 111 reduceFromDoubleAdx(z1,b1)