libsodium: Needed for Dnscrypto-proxy Release 1.3.0
[tomato.git] / release / src / router / libsodium / src / libsodium / crypto_sign / ed25519 / ref10 / pow22523.h
blob60ffe0d34c82226a3dfc619fa43296acbcc49740
2 /* qhasm: fe z1 */
4 /* qhasm: fe z2 */
6 /* qhasm: fe z8 */
8 /* qhasm: fe z9 */
10 /* qhasm: fe z11 */
12 /* qhasm: fe z22 */
14 /* qhasm: fe z_5_0 */
16 /* qhasm: fe z_10_5 */
18 /* qhasm: fe z_10_0 */
20 /* qhasm: fe z_20_10 */
22 /* qhasm: fe z_20_0 */
24 /* qhasm: fe z_40_20 */
26 /* qhasm: fe z_40_0 */
28 /* qhasm: fe z_50_10 */
30 /* qhasm: fe z_50_0 */
32 /* qhasm: fe z_100_50 */
34 /* qhasm: fe z_100_0 */
36 /* qhasm: fe z_200_100 */
38 /* qhasm: fe z_200_0 */
40 /* qhasm: fe z_250_50 */
42 /* qhasm: fe z_250_0 */
44 /* qhasm: fe z_252_2 */
46 /* qhasm: fe z_252_3 */
48 /* qhasm: enter pow22523 */
50 /* qhasm: z2 = z1^2^1 */
51 /* asm 1: fe_sq(>z2=fe#1,<z1=fe#11); for (i = 1;i < 1;++i) fe_sq(>z2=fe#1,>z2=fe#1); */
52 /* asm 2: fe_sq(>z2=t0,<z1=z); for (i = 1;i < 1;++i) fe_sq(>z2=t0,>z2=t0); */
53 fe_sq(t0,z); for (i = 1;i < 1;++i) fe_sq(t0,t0);
55 /* qhasm: z8 = z2^2^2 */
56 /* asm 1: fe_sq(>z8=fe#2,<z2=fe#1); for (i = 1;i < 2;++i) fe_sq(>z8=fe#2,>z8=fe#2); */
57 /* asm 2: fe_sq(>z8=t1,<z2=t0); for (i = 1;i < 2;++i) fe_sq(>z8=t1,>z8=t1); */
58 fe_sq(t1,t0); for (i = 1;i < 2;++i) fe_sq(t1,t1);
60 /* qhasm: z9 = z1*z8 */
61 /* asm 1: fe_mul(>z9=fe#2,<z1=fe#11,<z8=fe#2); */
62 /* asm 2: fe_mul(>z9=t1,<z1=z,<z8=t1); */
63 fe_mul(t1,z,t1);
65 /* qhasm: z11 = z2*z9 */
66 /* asm 1: fe_mul(>z11=fe#1,<z2=fe#1,<z9=fe#2); */
67 /* asm 2: fe_mul(>z11=t0,<z2=t0,<z9=t1); */
68 fe_mul(t0,t0,t1);
70 /* qhasm: z22 = z11^2^1 */
71 /* asm 1: fe_sq(>z22=fe#1,<z11=fe#1); for (i = 1;i < 1;++i) fe_sq(>z22=fe#1,>z22=fe#1); */
72 /* asm 2: fe_sq(>z22=t0,<z11=t0); for (i = 1;i < 1;++i) fe_sq(>z22=t0,>z22=t0); */
73 fe_sq(t0,t0); for (i = 1;i < 1;++i) fe_sq(t0,t0);
75 /* qhasm: z_5_0 = z9*z22 */
76 /* asm 1: fe_mul(>z_5_0=fe#1,<z9=fe#2,<z22=fe#1); */
77 /* asm 2: fe_mul(>z_5_0=t0,<z9=t1,<z22=t0); */
78 fe_mul(t0,t1,t0);
80 /* qhasm: z_10_5 = z_5_0^2^5 */
81 /* asm 1: fe_sq(>z_10_5=fe#2,<z_5_0=fe#1); for (i = 1;i < 5;++i) fe_sq(>z_10_5=fe#2,>z_10_5=fe#2); */
82 /* asm 2: fe_sq(>z_10_5=t1,<z_5_0=t0); for (i = 1;i < 5;++i) fe_sq(>z_10_5=t1,>z_10_5=t1); */
83 fe_sq(t1,t0); for (i = 1;i < 5;++i) fe_sq(t1,t1);
85 /* qhasm: z_10_0 = z_10_5*z_5_0 */
86 /* asm 1: fe_mul(>z_10_0=fe#1,<z_10_5=fe#2,<z_5_0=fe#1); */
87 /* asm 2: fe_mul(>z_10_0=t0,<z_10_5=t1,<z_5_0=t0); */
88 fe_mul(t0,t1,t0);
90 /* qhasm: z_20_10 = z_10_0^2^10 */
91 /* asm 1: fe_sq(>z_20_10=fe#2,<z_10_0=fe#1); for (i = 1;i < 10;++i) fe_sq(>z_20_10=fe#2,>z_20_10=fe#2); */
92 /* asm 2: fe_sq(>z_20_10=t1,<z_10_0=t0); for (i = 1;i < 10;++i) fe_sq(>z_20_10=t1,>z_20_10=t1); */
93 fe_sq(t1,t0); for (i = 1;i < 10;++i) fe_sq(t1,t1);
95 /* qhasm: z_20_0 = z_20_10*z_10_0 */
96 /* asm 1: fe_mul(>z_20_0=fe#2,<z_20_10=fe#2,<z_10_0=fe#1); */
97 /* asm 2: fe_mul(>z_20_0=t1,<z_20_10=t1,<z_10_0=t0); */
98 fe_mul(t1,t1,t0);
100 /* qhasm: z_40_20 = z_20_0^2^20 */
101 /* asm 1: fe_sq(>z_40_20=fe#3,<z_20_0=fe#2); for (i = 1;i < 20;++i) fe_sq(>z_40_20=fe#3,>z_40_20=fe#3); */
102 /* asm 2: fe_sq(>z_40_20=t2,<z_20_0=t1); for (i = 1;i < 20;++i) fe_sq(>z_40_20=t2,>z_40_20=t2); */
103 fe_sq(t2,t1); for (i = 1;i < 20;++i) fe_sq(t2,t2);
105 /* qhasm: z_40_0 = z_40_20*z_20_0 */
106 /* asm 1: fe_mul(>z_40_0=fe#2,<z_40_20=fe#3,<z_20_0=fe#2); */
107 /* asm 2: fe_mul(>z_40_0=t1,<z_40_20=t2,<z_20_0=t1); */
108 fe_mul(t1,t2,t1);
110 /* qhasm: z_50_10 = z_40_0^2^10 */
111 /* asm 1: fe_sq(>z_50_10=fe#2,<z_40_0=fe#2); for (i = 1;i < 10;++i) fe_sq(>z_50_10=fe#2,>z_50_10=fe#2); */
112 /* asm 2: fe_sq(>z_50_10=t1,<z_40_0=t1); for (i = 1;i < 10;++i) fe_sq(>z_50_10=t1,>z_50_10=t1); */
113 fe_sq(t1,t1); for (i = 1;i < 10;++i) fe_sq(t1,t1);
115 /* qhasm: z_50_0 = z_50_10*z_10_0 */
116 /* asm 1: fe_mul(>z_50_0=fe#1,<z_50_10=fe#2,<z_10_0=fe#1); */
117 /* asm 2: fe_mul(>z_50_0=t0,<z_50_10=t1,<z_10_0=t0); */
118 fe_mul(t0,t1,t0);
120 /* qhasm: z_100_50 = z_50_0^2^50 */
121 /* asm 1: fe_sq(>z_100_50=fe#2,<z_50_0=fe#1); for (i = 1;i < 50;++i) fe_sq(>z_100_50=fe#2,>z_100_50=fe#2); */
122 /* asm 2: fe_sq(>z_100_50=t1,<z_50_0=t0); for (i = 1;i < 50;++i) fe_sq(>z_100_50=t1,>z_100_50=t1); */
123 fe_sq(t1,t0); for (i = 1;i < 50;++i) fe_sq(t1,t1);
125 /* qhasm: z_100_0 = z_100_50*z_50_0 */
126 /* asm 1: fe_mul(>z_100_0=fe#2,<z_100_50=fe#2,<z_50_0=fe#1); */
127 /* asm 2: fe_mul(>z_100_0=t1,<z_100_50=t1,<z_50_0=t0); */
128 fe_mul(t1,t1,t0);
130 /* qhasm: z_200_100 = z_100_0^2^100 */
131 /* asm 1: fe_sq(>z_200_100=fe#3,<z_100_0=fe#2); for (i = 1;i < 100;++i) fe_sq(>z_200_100=fe#3,>z_200_100=fe#3); */
132 /* asm 2: fe_sq(>z_200_100=t2,<z_100_0=t1); for (i = 1;i < 100;++i) fe_sq(>z_200_100=t2,>z_200_100=t2); */
133 fe_sq(t2,t1); for (i = 1;i < 100;++i) fe_sq(t2,t2);
135 /* qhasm: z_200_0 = z_200_100*z_100_0 */
136 /* asm 1: fe_mul(>z_200_0=fe#2,<z_200_100=fe#3,<z_100_0=fe#2); */
137 /* asm 2: fe_mul(>z_200_0=t1,<z_200_100=t2,<z_100_0=t1); */
138 fe_mul(t1,t2,t1);
140 /* qhasm: z_250_50 = z_200_0^2^50 */
141 /* asm 1: fe_sq(>z_250_50=fe#2,<z_200_0=fe#2); for (i = 1;i < 50;++i) fe_sq(>z_250_50=fe#2,>z_250_50=fe#2); */
142 /* asm 2: fe_sq(>z_250_50=t1,<z_200_0=t1); for (i = 1;i < 50;++i) fe_sq(>z_250_50=t1,>z_250_50=t1); */
143 fe_sq(t1,t1); for (i = 1;i < 50;++i) fe_sq(t1,t1);
145 /* qhasm: z_250_0 = z_250_50*z_50_0 */
146 /* asm 1: fe_mul(>z_250_0=fe#1,<z_250_50=fe#2,<z_50_0=fe#1); */
147 /* asm 2: fe_mul(>z_250_0=t0,<z_250_50=t1,<z_50_0=t0); */
148 fe_mul(t0,t1,t0);
150 /* qhasm: z_252_2 = z_250_0^2^2 */
151 /* asm 1: fe_sq(>z_252_2=fe#1,<z_250_0=fe#1); for (i = 1;i < 2;++i) fe_sq(>z_252_2=fe#1,>z_252_2=fe#1); */
152 /* asm 2: fe_sq(>z_252_2=t0,<z_250_0=t0); for (i = 1;i < 2;++i) fe_sq(>z_252_2=t0,>z_252_2=t0); */
153 fe_sq(t0,t0); for (i = 1;i < 2;++i) fe_sq(t0,t0);
155 /* qhasm: z_252_3 = z_252_2*z1 */
156 /* asm 1: fe_mul(>z_252_3=fe#12,<z_252_2=fe#1,<z1=fe#11); */
157 /* asm 2: fe_mul(>z_252_3=out,<z_252_2=t0,<z1=z); */
158 fe_mul(out,t0,z);
160 /* qhasm: return */