| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
package fiat_crypto; |
| 16 |
|
| 17 |
public final class FiatPoly1305 { |
| 18 |
|
| 19 |
static class Box<T> { |
| 20 |
private T value; |
| 21 |
public Box(T value) { this.value = value; } |
| 22 |
public void set(T value) { this.value = value; } |
| 23 |
public T get() { return this.value; } |
| 24 |
} |
| 25 |
|
| 26 |
|
| 27 |
|
| 28 |
|
| 29 |
|
| 30 |
|
| 31 |
|
| 32 |
|
| 33 |
<p> |
| 34 |
|
| 35 |
|
| 36 |
|
| 37 |
|
| 38 |
|
| 39 |
|
| 40 |
|
| 41 |
|
| 42 |
|
| 43 |
static void fiat_Poly1305_addcarryx_u26(Box<Integer> out1, Box<Integer> out2, int arg1, int arg2, int arg3) { |
| 44 |
int x1 = ((arg1 + arg2) + arg3); |
| 45 |
int x2 = (x1 & 0x3ffffff); |
| 46 |
int x3 = (x1 >>> 26); |
| 47 |
out1.set(x2); |
| 48 |
out2.set(x3); |
| 49 |
} |
| 50 |
|
| 51 |
|
| 52 |
|
| 53 |
|
| 54 |
|
| 55 |
|
| 56 |
<p> |
| 57 |
|
| 58 |
|
| 59 |
|
| 60 |
|
| 61 |
|
| 62 |
|
| 63 |
|
| 64 |
|
| 65 |
|
| 66 |
static void fiat_Poly1305_subborrowx_u26(Box<Integer> out1, Box<Integer> out2, int arg1, int arg2, int arg3) { |
| 67 |
int x1 = (((int) Integer.toUnsignedLong(((Number) (arg2)).intValue()) - (int) Integer.toUnsignedLong(((Number) (arg1)).intValue())) - (int) Integer.toUnsignedLong(((Number) (arg3)).intValue())); |
| 68 |
int x2 = (x1 >>> 26); |
| 69 |
int x3 = ((int) Integer.toUnsignedLong(((Number) (x1)).intValue()) & 0x3ffffff); |
| 70 |
out1.set(x3); |
| 71 |
out2.set(((int) Integer.toUnsignedLong(((Number) (0x0)).intValue()) - (int) Integer.toUnsignedLong(((Number) (x2)).intValue()))); |
| 72 |
} |
| 73 |
|
| 74 |
|
| 75 |
|
| 76 |
|
| 77 |
|
| 78 |
|
| 79 |
|
| 80 |
|
| 81 |
|
| 82 |
|
| 83 |
|
| 84 |
|
| 85 |
|
| 86 |
|
| 87 |
static void fiat_Poly1305_cmovznz_u32(Box<Integer> out1, int arg1, int arg2, int arg3) { |
| 88 |
int x1 = (arg1 * 0xffffffff); |
| 89 |
int x2 = ((x1 & arg3) | ((~x1) & arg2)); |
| 90 |
out1.set(x2); |
| 91 |
} |
| 92 |
|
| 93 |
|
| 94 |
|
| 95 |
|
| 96 |
|
| 97 |
|
| 98 |
|
| 99 |
|
| 100 |
|
| 101 |
|
| 102 |
|
| 103 |
|
| 104 |
|
| 105 |
public static void fiat_Poly1305_carry_mul(int[] out1, final int[] arg1, final int[] arg2) { |
| 106 |
long x1 = ((long) Integer.toUnsignedLong(((Number) ((arg1[4]))).intValue()) * (long) Integer.toUnsignedLong(((Number) (((arg2[4]) * 0x5))).intValue())); |
| 107 |
long x2 = ((long) Integer.toUnsignedLong(((Number) ((arg1[4]))).intValue()) * (long) Integer.toUnsignedLong(((Number) (((arg2[3]) * 0x5))).intValue())); |
| 108 |
long x3 = ((long) Integer.toUnsignedLong(((Number) ((arg1[4]))).intValue()) * (long) Integer.toUnsignedLong(((Number) (((arg2[2]) * 0x5))).intValue())); |
| 109 |
long x4 = ((long) Integer.toUnsignedLong(((Number) ((arg1[4]))).intValue()) * (long) Integer.toUnsignedLong(((Number) (((arg2[1]) * 0x5))).intValue())); |
| 110 |
long x5 = ((long) Integer.toUnsignedLong(((Number) ((arg1[3]))).intValue()) * (long) Integer.toUnsignedLong(((Number) (((arg2[4]) * 0x5))).intValue())); |
| 111 |
long x6 = ((long) Integer.toUnsignedLong(((Number) ((arg1[3]))).intValue()) * (long) Integer.toUnsignedLong(((Number) (((arg2[3]) * 0x5))).intValue())); |
| 112 |
long x7 = ((long) Integer.toUnsignedLong(((Number) ((arg1[3]))).intValue()) * (long) Integer.toUnsignedLong(((Number) (((arg2[2]) * 0x5))).intValue())); |
| 113 |
long x8 = ((long) Integer.toUnsignedLong(((Number) ((arg1[2]))).intValue()) * (long) Integer.toUnsignedLong(((Number) (((arg2[4]) * 0x5))).intValue())); |
| 114 |
long x9 = ((long) Integer.toUnsignedLong(((Number) ((arg1[2]))).intValue()) * (long) Integer.toUnsignedLong(((Number) (((arg2[3]) * 0x5))).intValue())); |
| 115 |
long x10 = ((long) Integer.toUnsignedLong(((Number) ((arg1[1]))).intValue()) * (long) Integer.toUnsignedLong(((Number) (((arg2[4]) * 0x5))).intValue())); |
| 116 |
long x11 = ((long) Integer.toUnsignedLong(((Number) ((arg1[4]))).intValue()) * (long) Integer.toUnsignedLong(((Number) ((arg2[0]))).intValue())); |
| 117 |
long x12 = ((long) Integer.toUnsignedLong(((Number) ((arg1[3]))).intValue()) * (long) Integer.toUnsignedLong(((Number) ((arg2[1]))).intValue())); |
| 118 |
long x13 = ((long) Integer.toUnsignedLong(((Number) ((arg1[3]))).intValue()) * (long) Integer.toUnsignedLong(((Number) ((arg2[0]))).intValue())); |
| 119 |
long x14 = ((long) Integer.toUnsignedLong(((Number) ((arg1[2]))).intValue()) * (long) Integer.toUnsignedLong(((Number) ((arg2[2]))).intValue())); |
| 120 |
long x15 = ((long) Integer.toUnsignedLong(((Number) ((arg1[2]))).intValue()) * (long) Integer.toUnsignedLong(((Number) ((arg2[1]))).intValue())); |
| 121 |
long x16 = ((long) Integer.toUnsignedLong(((Number) ((arg1[2]))).intValue()) * (long) Integer.toUnsignedLong(((Number) ((arg2[0]))).intValue())); |
| 122 |
long x17 = ((long) Integer.toUnsignedLong(((Number) ((arg1[1]))).intValue()) * (long) Integer.toUnsignedLong(((Number) ((arg2[3]))).intValue())); |
| 123 |
long x18 = ((long) Integer.toUnsignedLong(((Number) ((arg1[1]))).intValue()) * (long) Integer.toUnsignedLong(((Number) ((arg2[2]))).intValue())); |
| 124 |
long x19 = ((long) Integer.toUnsignedLong(((Number) ((arg1[1]))).intValue()) * (long) Integer.toUnsignedLong(((Number) ((arg2[1]))).intValue())); |
| 125 |
long x20 = ((long) Integer.toUnsignedLong(((Number) ((arg1[1]))).intValue()) * (long) Integer.toUnsignedLong(((Number) ((arg2[0]))).intValue())); |
| 126 |
long x21 = ((long) Integer.toUnsignedLong(((Number) ((arg1[0]))).intValue()) * (long) Integer.toUnsignedLong(((Number) ((arg2[4]))).intValue())); |
| 127 |
long x22 = ((long) Integer.toUnsignedLong(((Number) ((arg1[0]))).intValue()) * (long) Integer.toUnsignedLong(((Number) ((arg2[3]))).intValue())); |
| 128 |
long x23 = ((long) Integer.toUnsignedLong(((Number) ((arg1[0]))).intValue()) * (long) Integer.toUnsignedLong(((Number) ((arg2[2]))).intValue())); |
| 129 |
long x24 = ((long) Integer.toUnsignedLong(((Number) ((arg1[0]))).intValue()) * (long) Integer.toUnsignedLong(((Number) ((arg2[1]))).intValue())); |
| 130 |
long x25 = ((long) Integer.toUnsignedLong(((Number) ((arg1[0]))).intValue()) * (long) Integer.toUnsignedLong(((Number) ((arg2[0]))).intValue())); |
| 131 |
long x26 = (x25 + (x10 + (x9 + (x7 + x4)))); |
| 132 |
long x27 = (x26 >>> 26); |
| 133 |
int x28 = ((int) Integer.toUnsignedLong(((Number) (x26)).intValue()) & 0x3ffffff); |
| 134 |
long x29 = (x21 + (x17 + (x14 + (x12 + x11)))); |
| 135 |
long x30 = (x22 + (x18 + (x15 + (x13 + x1)))); |
| 136 |
long x31 = (x23 + (x19 + (x16 + (x5 + x2)))); |
| 137 |
long x32 = (x24 + (x20 + (x8 + (x6 + x3)))); |
| 138 |
long x33 = (x27 + x32); |
| 139 |
long x34 = (x33 >>> 26); |
| 140 |
int x35 = ((int) Integer.toUnsignedLong(((Number) (x33)).intValue()) & 0x3ffffff); |
| 141 |
long x36 = (x34 + x31); |
| 142 |
long x37 = (x36 >>> 26); |
| 143 |
int x38 = ((int) Integer.toUnsignedLong(((Number) (x36)).intValue()) & 0x3ffffff); |
| 144 |
long x39 = (x37 + x30); |
| 145 |
long x40 = (x39 >>> 26); |
| 146 |
int x41 = ((int) Integer.toUnsignedLong(((Number) (x39)).intValue()) & 0x3ffffff); |
| 147 |
long x42 = (x40 + x29); |
| 148 |
int x43 = (int) Integer.toUnsignedLong(((Number) ((x42 >>> 26))).intValue()); |
| 149 |
int x44 = ((int) Integer.toUnsignedLong(((Number) (x42)).intValue()) & 0x3ffffff); |
| 150 |
long x45 = ((long) Integer.toUnsignedLong(((Number) (x43)).intValue()) * (long) Integer.toUnsignedLong(((Number) (0x5)).intValue())); |
| 151 |
long x46 = ((long) Integer.toUnsignedLong(((Number) (x28)).intValue()) + x45); |
| 152 |
int x47 = (int) Integer.toUnsignedLong(((Number) ((x46 >>> 26))).intValue()); |
| 153 |
int x48 = ((int) Integer.toUnsignedLong(((Number) (x46)).intValue()) & 0x3ffffff); |
| 154 |
int x49 = (x47 + x35); |
| 155 |
int x50 = (x49 >>> 26); |
| 156 |
int x51 = (x49 & 0x3ffffff); |
| 157 |
int x52 = (x50 + x38); |
| 158 |
out1[0] = x48; |
| 159 |
out1[1] = x51; |
| 160 |
out1[2] = x52; |
| 161 |
out1[3] = x41; |
| 162 |
out1[4] = x44; |
| 163 |
} |
| 164 |
|
| 165 |
|
| 166 |
|
| 167 |
|
| 168 |
|
| 169 |
|
| 170 |
|
| 171 |
|
| 172 |
|
| 173 |
|
| 174 |
|
| 175 |
|
| 176 |
public static void fiat_Poly1305_carry_square(int[] out1, final int[] arg1) { |
| 177 |
int x1 = ((arg1[4]) * 0x5); |
| 178 |
int x2 = (x1 * 0x2); |
| 179 |
int x3 = ((arg1[4]) * 0x2); |
| 180 |
int x4 = ((arg1[3]) * 0x5); |
| 181 |
int x5 = (x4 * 0x2); |
| 182 |
int x6 = ((arg1[3]) * 0x2); |
| 183 |
int x7 = ((arg1[2]) * 0x2); |
| 184 |
int x8 = ((arg1[1]) * 0x2); |
| 185 |
long x9 = ((long) Integer.toUnsignedLong(((Number) ((arg1[4]))).intValue()) * (long) Integer.toUnsignedLong(((Number) (x1)).intValue())); |
| 186 |
long x10 = ((long) Integer.toUnsignedLong(((Number) ((arg1[3]))).intValue()) * (long) Integer.toUnsignedLong(((Number) (x2)).intValue())); |
| 187 |
long x11 = ((long) Integer.toUnsignedLong(((Number) ((arg1[3]))).intValue()) * (long) Integer.toUnsignedLong(((Number) (x4)).intValue())); |
| 188 |
long x12 = ((long) Integer.toUnsignedLong(((Number) ((arg1[2]))).intValue()) * (long) Integer.toUnsignedLong(((Number) (x2)).intValue())); |
| 189 |
long x13 = ((long) Integer.toUnsignedLong(((Number) ((arg1[2]))).intValue()) * (long) Integer.toUnsignedLong(((Number) (x5)).intValue())); |
| 190 |
long x14 = ((long) Integer.toUnsignedLong(((Number) ((arg1[2]))).intValue()) * (long) Integer.toUnsignedLong(((Number) ((arg1[2]))).intValue())); |
| 191 |
long x15 = ((long) Integer.toUnsignedLong(((Number) ((arg1[1]))).intValue()) * (long) Integer.toUnsignedLong(((Number) (x2)).intValue())); |
| 192 |
long x16 = ((long) Integer.toUnsignedLong(((Number) ((arg1[1]))).intValue()) * (long) Integer.toUnsignedLong(((Number) (x6)).intValue())); |
| 193 |
long x17 = ((long) Integer.toUnsignedLong(((Number) ((arg1[1]))).intValue()) * (long) Integer.toUnsignedLong(((Number) (x7)).intValue())); |
| 194 |
long x18 = ((long) Integer.toUnsignedLong(((Number) ((arg1[1]))).intValue()) * (long) Integer.toUnsignedLong(((Number) ((arg1[1]))).intValue())); |
| 195 |
long x19 = ((long) Integer.toUnsignedLong(((Number) ((arg1[0]))).intValue()) * (long) Integer.toUnsignedLong(((Number) (x3)).intValue())); |
| 196 |
long x20 = ((long) Integer.toUnsignedLong(((Number) ((arg1[0]))).intValue()) * (long) Integer.toUnsignedLong(((Number) (x6)).intValue())); |
| 197 |
long x21 = ((long) Integer.toUnsignedLong(((Number) ((arg1[0]))).intValue()) * (long) Integer.toUnsignedLong(((Number) (x7)).intValue())); |
| 198 |
long x22 = ((long) Integer.toUnsignedLong(((Number) ((arg1[0]))).intValue()) * (long) Integer.toUnsignedLong(((Number) (x8)).intValue())); |
| 199 |
long x23 = ((long) Integer.toUnsignedLong(((Number) ((arg1[0]))).intValue()) * (long) Integer.toUnsignedLong(((Number) ((arg1[0]))).intValue())); |
| 200 |
long x24 = (x23 + (x15 + x13)); |
| 201 |
long x25 = (x24 >>> 26); |
| 202 |
int x26 = ((int) Integer.toUnsignedLong(((Number) (x24)).intValue()) & 0x3ffffff); |
| 203 |
long x27 = (x19 + (x16 + x14)); |
| 204 |
long x28 = (x20 + (x17 + x9)); |
| 205 |
long x29 = (x21 + (x18 + x10)); |
| 206 |
long x30 = (x22 + (x12 + x11)); |
| 207 |
long x31 = (x25 + x30); |
| 208 |
long x32 = (x31 >>> 26); |
| 209 |
int x33 = ((int) Integer.toUnsignedLong(((Number) (x31)).intValue()) & 0x3ffffff); |
| 210 |
long x34 = (x32 + x29); |
| 211 |
long x35 = (x34 >>> 26); |
| 212 |
int x36 = ((int) Integer.toUnsignedLong(((Number) (x34)).intValue()) & 0x3ffffff); |
| 213 |
long x37 = (x35 + x28); |
| 214 |
long x38 = (x37 >>> 26); |
| 215 |
int x39 = ((int) Integer.toUnsignedLong(((Number) (x37)).intValue()) & 0x3ffffff); |
| 216 |
long x40 = (x38 + x27); |
| 217 |
int x41 = (int) Integer.toUnsignedLong(((Number) ((x40 >>> 26))).intValue()); |
| 218 |
int x42 = ((int) Integer.toUnsignedLong(((Number) (x40)).intValue()) & 0x3ffffff); |
| 219 |
long x43 = ((long) Integer.toUnsignedLong(((Number) (x41)).intValue()) * (long) Integer.toUnsignedLong(((Number) (0x5)).intValue())); |
| 220 |
long x44 = ((long) Integer.toUnsignedLong(((Number) (x26)).intValue()) + x43); |
| 221 |
int x45 = (int) Integer.toUnsignedLong(((Number) ((x44 >>> 26))).intValue()); |
| 222 |
int x46 = ((int) Integer.toUnsignedLong(((Number) (x44)).intValue()) & 0x3ffffff); |
| 223 |
int x47 = (x45 + x33); |
| 224 |
int x48 = (x47 >>> 26); |
| 225 |
int x49 = (x47 & 0x3ffffff); |
| 226 |
int x50 = (x48 + x36); |
| 227 |
out1[0] = x46; |
| 228 |
out1[1] = x49; |
| 229 |
out1[2] = x50; |
| 230 |
out1[3] = x39; |
| 231 |
out1[4] = x42; |
| 232 |
} |
| 233 |
|
| 234 |
|
| 235 |
|
| 236 |
|
| 237 |
|
| 238 |
|
| 239 |
|
| 240 |
|
| 241 |
|
| 242 |
|
| 243 |
|
| 244 |
|
| 245 |
public static void fiat_Poly1305_carry(int[] out1, final int[] arg1) { |
| 246 |
int x1 = (arg1[0]); |
| 247 |
int x2 = ((x1 >>> 26) + (arg1[1])); |
| 248 |
int x3 = ((x2 >>> 26) + (arg1[2])); |
| 249 |
int x4 = ((x3 >>> 26) + (arg1[3])); |
| 250 |
int x5 = ((x4 >>> 26) + (arg1[4])); |
| 251 |
int x6 = ((x1 & 0x3ffffff) + ((x5 >>> 26) * 0x5)); |
| 252 |
int x7 = ((x6 >>> 26) + (x2 & 0x3ffffff)); |
| 253 |
int x8 = (x6 & 0x3ffffff); |
| 254 |
int x9 = (x7 & 0x3ffffff); |
| 255 |
int x10 = ((x7 >>> 26) + (x3 & 0x3ffffff)); |
| 256 |
int x11 = (x4 & 0x3ffffff); |
| 257 |
int x12 = (x5 & 0x3ffffff); |
| 258 |
out1[0] = x8; |
| 259 |
out1[1] = x9; |
| 260 |
out1[2] = x10; |
| 261 |
out1[3] = x11; |
| 262 |
out1[4] = x12; |
| 263 |
} |
| 264 |
|
| 265 |
|
| 266 |
|
| 267 |
|
| 268 |
|
| 269 |
|
| 270 |
|
| 271 |
|
| 272 |
|
| 273 |
|
| 274 |
|
| 275 |
|
| 276 |
|
| 277 |
public static void fiat_Poly1305_add(int[] out1, final int[] arg1, final int[] arg2) { |
| 278 |
int x1 = ((arg1[0]) + (arg2[0])); |
| 279 |
int x2 = ((arg1[1]) + (arg2[1])); |
| 280 |
int x3 = ((arg1[2]) + (arg2[2])); |
| 281 |
int x4 = ((arg1[3]) + (arg2[3])); |
| 282 |
int x5 = ((arg1[4]) + (arg2[4])); |
| 283 |
out1[0] = x1; |
| 284 |
out1[1] = x2; |
| 285 |
out1[2] = x3; |
| 286 |
out1[3] = x4; |
| 287 |
out1[4] = x5; |
| 288 |
} |
| 289 |
|
| 290 |
|
| 291 |
|
| 292 |
|
| 293 |
|
| 294 |
|
| 295 |
|
| 296 |
|
| 297 |
|
| 298 |
|
| 299 |
|
| 300 |
|
| 301 |
|
| 302 |
public static void fiat_Poly1305_sub(int[] out1, final int[] arg1, final int[] arg2) { |
| 303 |
int x1 = ((0x7fffff6 + (arg1[0])) - (arg2[0])); |
| 304 |
int x2 = ((0x7fffffe + (arg1[1])) - (arg2[1])); |
| 305 |
int x3 = ((0x7fffffe + (arg1[2])) - (arg2[2])); |
| 306 |
int x4 = ((0x7fffffe + (arg1[3])) - (arg2[3])); |
| 307 |
int x5 = ((0x7fffffe + (arg1[4])) - (arg2[4])); |
| 308 |
out1[0] = x1; |
| 309 |
out1[1] = x2; |
| 310 |
out1[2] = x3; |
| 311 |
out1[3] = x4; |
| 312 |
out1[4] = x5; |
| 313 |
} |
| 314 |
|
| 315 |
|
| 316 |
|
| 317 |
|
| 318 |
|
| 319 |
|
| 320 |
|
| 321 |
|
| 322 |
|
| 323 |
|
| 324 |
|
| 325 |
|
| 326 |
public static void fiat_Poly1305_opp(int[] out1, final int[] arg1) { |
| 327 |
int x1 = (0x7fffff6 - (arg1[0])); |
| 328 |
int x2 = (0x7fffffe - (arg1[1])); |
| 329 |
int x3 = (0x7fffffe - (arg1[2])); |
| 330 |
int x4 = (0x7fffffe - (arg1[3])); |
| 331 |
int x5 = (0x7fffffe - (arg1[4])); |
| 332 |
out1[0] = x1; |
| 333 |
out1[1] = x2; |
| 334 |
out1[2] = x3; |
| 335 |
out1[3] = x4; |
| 336 |
out1[4] = x5; |
| 337 |
} |
| 338 |
|
| 339 |
|
| 340 |
|
| 341 |
|
| 342 |
|
| 343 |
|
| 344 |
|
| 345 |
|
| 346 |
|
| 347 |
|
| 348 |
|
| 349 |
|
| 350 |
|
| 351 |
|
| 352 |
public static void fiat_Poly1305_selectznz(int[] out1, int arg1, final int[] arg2, final int[] arg3) { |
| 353 |
Box<Integer> x1 = new Box<Integer>((int)0); |
| 354 |
fiat_Poly1305_cmovznz_u32(x1, arg1, (arg2[0]), (arg3[0])); |
| 355 |
Box<Integer> x2 = new Box<Integer>((int)0); |
| 356 |
fiat_Poly1305_cmovznz_u32(x2, arg1, (arg2[1]), (arg3[1])); |
| 357 |
Box<Integer> x3 = new Box<Integer>((int)0); |
| 358 |
fiat_Poly1305_cmovznz_u32(x3, arg1, (arg2[2]), (arg3[2])); |
| 359 |
Box<Integer> x4 = new Box<Integer>((int)0); |
| 360 |
fiat_Poly1305_cmovznz_u32(x4, arg1, (arg2[3]), (arg3[3])); |
| 361 |
Box<Integer> x5 = new Box<Integer>((int)0); |
| 362 |
fiat_Poly1305_cmovznz_u32(x5, arg1, (arg2[4]), (arg3[4])); |
| 363 |
out1[0] = (x1).get(); |
| 364 |
out1[1] = (x2).get(); |
| 365 |
out1[2] = (x3).get(); |
| 366 |
out1[3] = (x4).get(); |
| 367 |
out1[4] = (x5).get(); |
| 368 |
} |
| 369 |
|
| 370 |
|
| 371 |
|
| 372 |
|
| 373 |
|
| 374 |
] <p> |
| 375 |
|
| 376 |
|
| 377 |
|
| 378 |
|
| 379 |
|
| 380 |
|
| 381 |
public static void fiat_Poly1305_to_bytes(int[] out1, final int[] arg1) { |
| 382 |
Box<Integer> x1 = new Box<Integer>((int)0); |
| 383 |
Box<Integer> x2 = new Box<Integer>((int)0); |
| 384 |
fiat_Poly1305_subborrowx_u26(x1, x2, (int) Integer.toUnsignedLong(((Number) (0x0)).intValue()), (arg1[0]), 0x3fffffb); |
| 385 |
Box<Integer> x3 = new Box<Integer>((int)0); |
| 386 |
Box<Integer> x4 = new Box<Integer>((int)0); |
| 387 |
fiat_Poly1305_subborrowx_u26(x3, x4, (x2).get(), (arg1[1]), 0x3ffffff); |
| 388 |
Box<Integer> x5 = new Box<Integer>((int)0); |
| 389 |
Box<Integer> x6 = new Box<Integer>((int)0); |
| 390 |
fiat_Poly1305_subborrowx_u26(x5, x6, (x4).get(), (arg1[2]), 0x3ffffff); |
| 391 |
Box<Integer> x7 = new Box<Integer>((int)0); |
| 392 |
Box<Integer> x8 = new Box<Integer>((int)0); |
| 393 |
fiat_Poly1305_subborrowx_u26(x7, x8, (x6).get(), (arg1[3]), 0x3ffffff); |
| 394 |
Box<Integer> x9 = new Box<Integer>((int)0); |
| 395 |
Box<Integer> x10 = new Box<Integer>((int)0); |
| 396 |
fiat_Poly1305_subborrowx_u26(x9, x10, (x8).get(), (arg1[4]), 0x3ffffff); |
| 397 |
Box<Integer> x11 = new Box<Integer>((int)0); |
| 398 |
fiat_Poly1305_cmovznz_u32(x11, (x10).get(), (int) Integer.toUnsignedLong(((Number) (0x0)).intValue()), 0xffffffff); |
| 399 |
Box<Integer> x12 = new Box<Integer>((int)0); |
| 400 |
Box<Integer> x13 = new Box<Integer>((int)0); |
| 401 |
fiat_Poly1305_addcarryx_u26(x12, x13, 0x0, (x1).get(), ((x11).get() & 0x3fffffb)); |
| 402 |
Box<Integer> x14 = new Box<Integer>((int)0); |
| 403 |
Box<Integer> x15 = new Box<Integer>((int)0); |
| 404 |
fiat_Poly1305_addcarryx_u26(x14, x15, (x13).get(), (x3).get(), ((x11).get() & 0x3ffffff)); |
| 405 |
Box<Integer> x16 = new Box<Integer>((int)0); |
| 406 |
Box<Integer> x17 = new Box<Integer>((int)0); |
| 407 |
fiat_Poly1305_addcarryx_u26(x16, x17, (x15).get(), (x5).get(), ((x11).get() & 0x3ffffff)); |
| 408 |
Box<Integer> x18 = new Box<Integer>((int)0); |
| 409 |
Box<Integer> x19 = new Box<Integer>((int)0); |
| 410 |
fiat_Poly1305_addcarryx_u26(x18, x19, (x17).get(), (x7).get(), ((x11).get() & 0x3ffffff)); |
| 411 |
Box<Integer> x20 = new Box<Integer>((int)0); |
| 412 |
Box<Integer> x21 = new Box<Integer>((int)0); |
| 413 |
fiat_Poly1305_addcarryx_u26(x20, x21, (x19).get(), (x9).get(), ((x11).get() & 0x3ffffff)); |
| 414 |
int x22 = ((x18).get() << 6); |
| 415 |
int x23 = ((x16).get() << 4); |
| 416 |
int x24 = ((x14).get() << 2); |
| 417 |
int x25 = ((x12).get() & 0xff); |
| 418 |
int x26 = ((x12).get() >>> 8); |
| 419 |
int x27 = (x26 & 0xff); |
| 420 |
int x28 = (x26 >>> 8); |
| 421 |
int x29 = (x28 & 0xff); |
| 422 |
int x30 = (x28 >>> 8); |
| 423 |
int x31 = (x24 + x30); |
| 424 |
int x32 = (x31 & 0xff); |
| 425 |
int x33 = (x31 >>> 8); |
| 426 |
int x34 = (x33 & 0xff); |
| 427 |
int x35 = (x33 >>> 8); |
| 428 |
int x36 = (x35 & 0xff); |
| 429 |
int x37 = (x35 >>> 8); |
| 430 |
int x38 = (x23 + x37); |
| 431 |
int x39 = (x38 & 0xff); |
| 432 |
int x40 = (x38 >>> 8); |
| 433 |
int x41 = (x40 & 0xff); |
| 434 |
int x42 = (x40 >>> 8); |
| 435 |
int x43 = (x42 & 0xff); |
| 436 |
int x44 = (x42 >>> 8); |
| 437 |
int x45 = (x22 + x44); |
| 438 |
int x46 = (x45 & 0xff); |
| 439 |
int x47 = (x45 >>> 8); |
| 440 |
int x48 = (x47 & 0xff); |
| 441 |
int x49 = (x47 >>> 8); |
| 442 |
int x50 = (x49 & 0xff); |
| 443 |
int x51 = (x49 >>> 8); |
| 444 |
int x52 = ((x20).get() & 0xff); |
| 445 |
int x53 = ((x20).get() >>> 8); |
| 446 |
int x54 = (x53 & 0xff); |
| 447 |
int x55 = (x53 >>> 8); |
| 448 |
int x56 = (x55 & 0xff); |
| 449 |
int x57 = (x55 >>> 8); |
| 450 |
out1[0] = x25; |
| 451 |
out1[1] = x27; |
| 452 |
out1[2] = x29; |
| 453 |
out1[3] = x32; |
| 454 |
out1[4] = x34; |
| 455 |
out1[5] = x36; |
| 456 |
out1[6] = x39; |
| 457 |
out1[7] = x41; |
| 458 |
out1[8] = x43; |
| 459 |
out1[9] = x46; |
| 460 |
out1[10] = x48; |
| 461 |
out1[11] = x50; |
| 462 |
out1[12] = x51; |
| 463 |
out1[13] = x52; |
| 464 |
out1[14] = x54; |
| 465 |
out1[15] = x56; |
| 466 |
out1[16] = x57; |
| 467 |
} |
| 468 |
|
| 469 |
|
| 470 |
|
| 471 |
|
| 472 |
|
| 473 |
|
| 474 |
|
| 475 |
|
| 476 |
|
| 477 |
|
| 478 |
|
| 479 |
|
| 480 |
public static void fiat_Poly1305_from_bytes(int[] out1, final int[] arg1) { |
| 481 |
int x1 = ((arg1[16]) << 24); |
| 482 |
int x2 = ((arg1[15]) << 16); |
| 483 |
int x3 = ((arg1[14]) << 8); |
| 484 |
int x4 = (arg1[13]); |
| 485 |
int x5 = ((arg1[12]) << 18); |
| 486 |
int x6 = ((arg1[11]) << 10); |
| 487 |
int x7 = ((arg1[10]) << 2); |
| 488 |
int x8 = ((arg1[9]) << 20); |
| 489 |
int x9 = ((arg1[8]) << 12); |
| 490 |
int x10 = ((arg1[7]) << 4); |
| 491 |
int x11 = ((arg1[6]) << 22); |
| 492 |
int x12 = ((arg1[5]) << 14); |
| 493 |
int x13 = ((arg1[4]) << 6); |
| 494 |
int x14 = ((arg1[3]) << 24); |
| 495 |
int x15 = ((arg1[2]) << 16); |
| 496 |
int x16 = ((arg1[1]) << 8); |
| 497 |
int x17 = (arg1[0]); |
| 498 |
int x18 = (x16 + x17); |
| 499 |
int x19 = (x15 + x18); |
| 500 |
int x20 = (x14 + x19); |
| 501 |
int x21 = (x20 & 0x3ffffff); |
| 502 |
int x22 = (x20 >>> 26); |
| 503 |
int x23 = (x13 + x22); |
| 504 |
int x24 = (x12 + x23); |
| 505 |
int x25 = (x11 + x24); |
| 506 |
int x26 = (x25 & 0x3ffffff); |
| 507 |
int x27 = (x25 >>> 26); |
| 508 |
int x28 = (x10 + x27); |
| 509 |
int x29 = (x9 + x28); |
| 510 |
int x30 = (x8 + x29); |
| 511 |
int x31 = (x30 & 0x3ffffff); |
| 512 |
int x32 = (x30 >>> 26); |
| 513 |
int x33 = (x7 + x32); |
| 514 |
int x34 = (x6 + x33); |
| 515 |
int x35 = (x5 + x34); |
| 516 |
int x36 = (x3 + x4); |
| 517 |
int x37 = (x2 + x36); |
| 518 |
int x38 = (x1 + x37); |
| 519 |
out1[0] = x21; |
| 520 |
out1[1] = x26; |
| 521 |
out1[2] = x31; |
| 522 |
out1[3] = x35; |
| 523 |
out1[4] = x38; |
| 524 |
} |
| 525 |
|
| 526 |
|
| 527 |
|
| 528 |
|
| 529 |
|
| 530 |
|
| 531 |
|
| 532 |
|
| 533 |
|
| 534 |
|
| 535 |
|
| 536 |
|
| 537 |
public static void fiat_Poly1305_relax(int[] out1, final int[] arg1) { |
| 538 |
int x1 = (arg1[0]); |
| 539 |
int x2 = (arg1[1]); |
| 540 |
int x3 = (arg1[2]); |
| 541 |
int x4 = (arg1[3]); |
| 542 |
int x5 = (arg1[4]); |
| 543 |
out1[0] = x1; |
| 544 |
out1[1] = x2; |
| 545 |
out1[2] = x3; |
| 546 |
out1[3] = x4; |
| 547 |
out1[4] = x5; |
| 548 |
} |
| 549 |
|
| 550 |
} |