| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
#![allow(unused_parens)] |
| 16 |
#![allow(non_camel_case_types)] |
| 17 |
|
| 18 |
|
| 19 |
|
| 20 |
|
| 21 |
struct IndexConst<T: ?Sized>(T); |
| 22 |
|
| 23 |
impl<'a, T, const N: usize> IndexConst<&'a [T; N]> { |
| 24 |
#[inline(always)] |
| 25 |
#[allow(unused)] |
| 26 |
const fn index(self, i: usize) -> &'a T { |
| 27 |
&self.0[i] |
| 28 |
} |
| 29 |
} |
| 30 |
impl<'a, 'b, T, const N: usize> IndexConst<&'a mut &'b mut [T; N]> { |
| 31 |
#[inline(always)] |
| 32 |
#[allow(unused)] |
| 33 |
const fn index_mut(self, i: usize) -> &'a mut T { |
| 34 |
&mut self.0[i] |
| 35 |
} |
| 36 |
} |
| 37 |
|
| 38 |
|
| 39 |
pub type fiat_25519_u1 = u8; |
| 40 |
|
| 41 |
pub type fiat_25519_i1 = i8; |
| 42 |
|
| 43 |
pub type fiat_25519_u2 = u8; |
| 44 |
|
| 45 |
pub type fiat_25519_i2 = i8; |
| 46 |
|
| 47 |
|
| 48 |
|
| 49 |
#[derive(Clone, Copy)] |
| 50 |
pub struct fiat_25519_loose_field_element(pub [u32; 10]); |
| 51 |
|
| 52 |
impl core::ops::Index<usize> for fiat_25519_loose_field_element { |
| 53 |
type Output = u32; |
| 54 |
#[inline] |
| 55 |
fn index(&self, index: usize) -> &Self::Output { |
| 56 |
&self.0[index] |
| 57 |
} |
| 58 |
} |
| 59 |
|
| 60 |
impl core::ops::IndexMut<usize> for fiat_25519_loose_field_element { |
| 61 |
#[inline] |
| 62 |
fn index_mut(&mut self, index: usize) -> &mut Self::Output { |
| 63 |
&mut self.0[index] |
| 64 |
} |
| 65 |
} |
| 66 |
|
| 67 |
impl<'a> IndexConst<&'a fiat_25519_loose_field_element> { |
| 68 |
#[allow(unused)] |
| 69 |
#[inline(always)] |
| 70 |
const fn index(self, i: usize) -> &'a u32 { |
| 71 |
&self.0.0[i] |
| 72 |
} |
| 73 |
} |
| 74 |
|
| 75 |
impl<'a, 'b> IndexConst<&'a mut &'b mut fiat_25519_loose_field_element> { |
| 76 |
#[allow(unused)] |
| 77 |
#[inline(always)] |
| 78 |
const fn index_mut(self, i: usize) -> &'a mut u32 { |
| 79 |
&mut self.0.0[i] |
| 80 |
} |
| 81 |
} |
| 82 |
|
| 83 |
|
| 84 |
|
| 85 |
#[derive(Clone, Copy)] |
| 86 |
pub struct fiat_25519_tight_field_element(pub [u32; 10]); |
| 87 |
|
| 88 |
impl core::ops::Index<usize> for fiat_25519_tight_field_element { |
| 89 |
type Output = u32; |
| 90 |
#[inline] |
| 91 |
fn index(&self, index: usize) -> &Self::Output { |
| 92 |
&self.0[index] |
| 93 |
} |
| 94 |
} |
| 95 |
|
| 96 |
impl core::ops::IndexMut<usize> for fiat_25519_tight_field_element { |
| 97 |
#[inline] |
| 98 |
fn index_mut(&mut self, index: usize) -> &mut Self::Output { |
| 99 |
&mut self.0[index] |
| 100 |
} |
| 101 |
} |
| 102 |
|
| 103 |
impl<'a> IndexConst<&'a fiat_25519_tight_field_element> { |
| 104 |
#[allow(unused)] |
| 105 |
#[inline(always)] |
| 106 |
const fn index(self, i: usize) -> &'a u32 { |
| 107 |
&self.0.0[i] |
| 108 |
} |
| 109 |
} |
| 110 |
|
| 111 |
impl<'a, 'b> IndexConst<&'a mut &'b mut fiat_25519_tight_field_element> { |
| 112 |
#[allow(unused)] |
| 113 |
#[inline(always)] |
| 114 |
const fn index_mut(self, i: usize) -> &'a mut u32 { |
| 115 |
&mut self.0.0[i] |
| 116 |
} |
| 117 |
} |
| 118 |
|
| 119 |
|
| 120 |
|
| 121 |
|
| 122 |
|
| 123 |
|
| 124 |
6⌋ |
| 125 |
|
| 126 |
|
| 127 |
|
| 128 |
|
| 129 |
|
| 130 |
|
| 131 |
|
| 132 |
|
| 133 |
#[inline] |
| 134 |
pub const fn fiat_25519_addcarryx_u26(out1: &mut u32, out2: &mut fiat_25519_u1, arg1: fiat_25519_u1, arg2: u32, arg3: u32) { |
| 135 |
let x1: u32 = (((arg1 as u32) + arg2) + arg3); |
| 136 |
let x2: u32 = (x1 & 0x3ffffff); |
| 137 |
let x3: fiat_25519_u1 = ((x1 >> 26) as fiat_25519_u1); |
| 138 |
*out1 = x2; |
| 139 |
*out2 = x3; |
| 140 |
} |
| 141 |
|
| 142 |
|
| 143 |
|
| 144 |
|
| 145 |
|
| 146 |
6⌋ |
| 147 |
|
| 148 |
|
| 149 |
|
| 150 |
|
| 151 |
|
| 152 |
|
| 153 |
|
| 154 |
|
| 155 |
#[inline] |
| 156 |
pub const fn fiat_25519_subborrowx_u26(out1: &mut u32, out2: &mut fiat_25519_u1, arg1: fiat_25519_u1, arg2: u32, arg3: u32) { |
| 157 |
let x1: i32 = ((((((arg2 as i64) - (arg1 as i64)) as i32) as i64) - (arg3 as i64)) as i32); |
| 158 |
let x2: fiat_25519_i1 = ((x1 >> 26) as fiat_25519_i1); |
| 159 |
let x3: u32 = (((x1 as i64) & (0x3ffffff as i64)) as u32); |
| 160 |
*out1 = x3; |
| 161 |
*out2 = (((0x0 as fiat_25519_i2) - (x2 as fiat_25519_i2)) as fiat_25519_u1); |
| 162 |
} |
| 163 |
|
| 164 |
|
| 165 |
|
| 166 |
|
| 167 |
|
| 168 |
5⌋ |
| 169 |
|
| 170 |
|
| 171 |
|
| 172 |
|
| 173 |
|
| 174 |
|
| 175 |
|
| 176 |
|
| 177 |
#[inline] |
| 178 |
pub const fn fiat_25519_addcarryx_u25(out1: &mut u32, out2: &mut fiat_25519_u1, arg1: fiat_25519_u1, arg2: u32, arg3: u32) { |
| 179 |
let x1: u32 = (((arg1 as u32) + arg2) + arg3); |
| 180 |
let x2: u32 = (x1 & 0x1ffffff); |
| 181 |
let x3: fiat_25519_u1 = ((x1 >> 25) as fiat_25519_u1); |
| 182 |
*out1 = x2; |
| 183 |
*out2 = x3; |
| 184 |
} |
| 185 |
|
| 186 |
|
| 187 |
|
| 188 |
|
| 189 |
|
| 190 |
5⌋ |
| 191 |
|
| 192 |
|
| 193 |
|
| 194 |
|
| 195 |
|
| 196 |
|
| 197 |
|
| 198 |
|
| 199 |
#[inline] |
| 200 |
pub const fn fiat_25519_subborrowx_u25(out1: &mut u32, out2: &mut fiat_25519_u1, arg1: fiat_25519_u1, arg2: u32, arg3: u32) { |
| 201 |
let x1: i32 = ((((((arg2 as i64) - (arg1 as i64)) as i32) as i64) - (arg3 as i64)) as i32); |
| 202 |
let x2: fiat_25519_i1 = ((x1 >> 25) as fiat_25519_i1); |
| 203 |
let x3: u32 = (((x1 as i64) & (0x1ffffff as i64)) as u32); |
| 204 |
*out1 = x3; |
| 205 |
*out2 = (((0x0 as fiat_25519_i2) - (x2 as fiat_25519_i2)) as fiat_25519_u1); |
| 206 |
} |
| 207 |
|
| 208 |
|
| 209 |
|
| 210 |
|
| 211 |
|
| 212 |
|
| 213 |
|
| 214 |
|
| 215 |
|
| 216 |
|
| 217 |
|
| 218 |
|
| 219 |
#[inline] |
| 220 |
pub const fn fiat_25519_cmovznz_u32(out1: &mut u32, arg1: fiat_25519_u1, arg2: u32, arg3: u32) { |
| 221 |
let x1: fiat_25519_u1 = (!(!arg1)); |
| 222 |
let x2: u32 = ((((((0x0 as fiat_25519_i2) - (x1 as fiat_25519_i2)) as fiat_25519_i1) as i64) & (0xffffffff as i64)) as u32); |
| 223 |
let x3: u32 = ((x2 & arg3) | ((!x2) & arg2)); |
| 224 |
*out1 = x3; |
| 225 |
} |
| 226 |
|
| 227 |
|
| 228 |
|
| 229 |
|
| 230 |
|
| 231 |
|
| 232 |
#[inline] |
| 233 |
pub const fn fiat_25519_carry_mul(mut out1: &mut fiat_25519_tight_field_element, arg1: &fiat_25519_loose_field_element, arg2: &fiat_25519_loose_field_element) { |
| 234 |
let x1: u64 = (((*IndexConst(arg1).index(9)) as u64) * (((*IndexConst(arg2).index(9)) * 0x26) as u64)); |
| 235 |
let x2: u64 = (((*IndexConst(arg1).index(9)) as u64) * (((*IndexConst(arg2).index(8)) * 0x13) as u64)); |
| 236 |
let x3: u64 = (((*IndexConst(arg1).index(9)) as u64) * (((*IndexConst(arg2).index(7)) * 0x26) as u64)); |
| 237 |
let x4: u64 = (((*IndexConst(arg1).index(9)) as u64) * (((*IndexConst(arg2).index(6)) * 0x13) as u64)); |
| 238 |
let x5: u64 = (((*IndexConst(arg1).index(9)) as u64) * (((*IndexConst(arg2).index(5)) * 0x26) as u64)); |
| 239 |
let x6: u64 = (((*IndexConst(arg1).index(9)) as u64) * (((*IndexConst(arg2).index(4)) * 0x13) as u64)); |
| 240 |
let x7: u64 = (((*IndexConst(arg1).index(9)) as u64) * (((*IndexConst(arg2).index(3)) * 0x26) as u64)); |
| 241 |
let x8: u64 = (((*IndexConst(arg1).index(9)) as u64) * (((*IndexConst(arg2).index(2)) * 0x13) as u64)); |
| 242 |
let x9: u64 = (((*IndexConst(arg1).index(9)) as u64) * (((*IndexConst(arg2).index(1)) * 0x26) as u64)); |
| 243 |
let x10: u64 = (((*IndexConst(arg1).index(8)) as u64) * (((*IndexConst(arg2).index(9)) * 0x13) as u64)); |
| 244 |
let x11: u64 = (((*IndexConst(arg1).index(8)) as u64) * (((*IndexConst(arg2).index(8)) * 0x13) as u64)); |
| 245 |
let x12: u64 = (((*IndexConst(arg1).index(8)) as u64) * (((*IndexConst(arg2).index(7)) * 0x13) as u64)); |
| 246 |
let x13: u64 = (((*IndexConst(arg1).index(8)) as u64) * (((*IndexConst(arg2).index(6)) * 0x13) as u64)); |
| 247 |
let x14: u64 = (((*IndexConst(arg1).index(8)) as u64) * (((*IndexConst(arg2).index(5)) * 0x13) as u64)); |
| 248 |
let x15: u64 = (((*IndexConst(arg1).index(8)) as u64) * (((*IndexConst(arg2).index(4)) * 0x13) as u64)); |
| 249 |
let x16: u64 = (((*IndexConst(arg1).index(8)) as u64) * (((*IndexConst(arg2).index(3)) * 0x13) as u64)); |
| 250 |
let x17: u64 = (((*IndexConst(arg1).index(8)) as u64) * (((*IndexConst(arg2).index(2)) * 0x13) as u64)); |
| 251 |
let x18: u64 = (((*IndexConst(arg1).index(7)) as u64) * (((*IndexConst(arg2).index(9)) * 0x26) as u64)); |
| 252 |
let x19: u64 = (((*IndexConst(arg1).index(7)) as u64) * (((*IndexConst(arg2).index(8)) * 0x13) as u64)); |
| 253 |
let x20: u64 = (((*IndexConst(arg1).index(7)) as u64) * (((*IndexConst(arg2).index(7)) * 0x26) as u64)); |
| 254 |
let x21: u64 = (((*IndexConst(arg1).index(7)) as u64) * (((*IndexConst(arg2).index(6)) * 0x13) as u64)); |
| 255 |
let x22: u64 = (((*IndexConst(arg1).index(7)) as u64) * (((*IndexConst(arg2).index(5)) * 0x26) as u64)); |
| 256 |
let x23: u64 = (((*IndexConst(arg1).index(7)) as u64) * (((*IndexConst(arg2).index(4)) * 0x13) as u64)); |
| 257 |
let x24: u64 = (((*IndexConst(arg1).index(7)) as u64) * (((*IndexConst(arg2).index(3)) * 0x26) as u64)); |
| 258 |
let x25: u64 = (((*IndexConst(arg1).index(6)) as u64) * (((*IndexConst(arg2).index(9)) * 0x13) as u64)); |
| 259 |
let x26: u64 = (((*IndexConst(arg1).index(6)) as u64) * (((*IndexConst(arg2).index(8)) * 0x13) as u64)); |
| 260 |
let x27: u64 = (((*IndexConst(arg1).index(6)) as u64) * (((*IndexConst(arg2).index(7)) * 0x13) as u64)); |
| 261 |
let x28: u64 = (((*IndexConst(arg1).index(6)) as u64) * (((*IndexConst(arg2).index(6)) * 0x13) as u64)); |
| 262 |
let x29: u64 = (((*IndexConst(arg1).index(6)) as u64) * (((*IndexConst(arg2).index(5)) * 0x13) as u64)); |
| 263 |
let x30: u64 = (((*IndexConst(arg1).index(6)) as u64) * (((*IndexConst(arg2).index(4)) * 0x13) as u64)); |
| 264 |
let x31: u64 = (((*IndexConst(arg1).index(5)) as u64) * (((*IndexConst(arg2).index(9)) * 0x26) as u64)); |
| 265 |
let x32: u64 = (((*IndexConst(arg1).index(5)) as u64) * (((*IndexConst(arg2).index(8)) * 0x13) as u64)); |
| 266 |
let x33: u64 = (((*IndexConst(arg1).index(5)) as u64) * (((*IndexConst(arg2).index(7)) * 0x26) as u64)); |
| 267 |
let x34: u64 = (((*IndexConst(arg1).index(5)) as u64) * (((*IndexConst(arg2).index(6)) * 0x13) as u64)); |
| 268 |
let x35: u64 = (((*IndexConst(arg1).index(5)) as u64) * (((*IndexConst(arg2).index(5)) * 0x26) as u64)); |
| 269 |
let x36: u64 = (((*IndexConst(arg1).index(4)) as u64) * (((*IndexConst(arg2).index(9)) * 0x13) as u64)); |
| 270 |
let x37: u64 = (((*IndexConst(arg1).index(4)) as u64) * (((*IndexConst(arg2).index(8)) * 0x13) as u64)); |
| 271 |
let x38: u64 = (((*IndexConst(arg1).index(4)) as u64) * (((*IndexConst(arg2).index(7)) * 0x13) as u64)); |
| 272 |
let x39: u64 = (((*IndexConst(arg1).index(4)) as u64) * (((*IndexConst(arg2).index(6)) * 0x13) as u64)); |
| 273 |
let x40: u64 = (((*IndexConst(arg1).index(3)) as u64) * (((*IndexConst(arg2).index(9)) * 0x26) as u64)); |
| 274 |
let x41: u64 = (((*IndexConst(arg1).index(3)) as u64) * (((*IndexConst(arg2).index(8)) * 0x13) as u64)); |
| 275 |
let x42: u64 = (((*IndexConst(arg1).index(3)) as u64) * (((*IndexConst(arg2).index(7)) * 0x26) as u64)); |
| 276 |
let x43: u64 = (((*IndexConst(arg1).index(2)) as u64) * (((*IndexConst(arg2).index(9)) * 0x13) as u64)); |
| 277 |
let x44: u64 = (((*IndexConst(arg1).index(2)) as u64) * (((*IndexConst(arg2).index(8)) * 0x13) as u64)); |
| 278 |
let x45: u64 = (((*IndexConst(arg1).index(1)) as u64) * (((*IndexConst(arg2).index(9)) * 0x26) as u64)); |
| 279 |
let x46: u64 = (((*IndexConst(arg1).index(9)) as u64) * ((*IndexConst(arg2).index(0)) as u64)); |
| 280 |
let x47: u64 = (((*IndexConst(arg1).index(8)) as u64) * ((*IndexConst(arg2).index(1)) as u64)); |
| 281 |
let x48: u64 = (((*IndexConst(arg1).index(8)) as u64) * ((*IndexConst(arg2).index(0)) as u64)); |
| 282 |
let x49: u64 = (((*IndexConst(arg1).index(7)) as u64) * ((*IndexConst(arg2).index(2)) as u64)); |
| 283 |
let x50: u64 = (((*IndexConst(arg1).index(7)) as u64) * (((*IndexConst(arg2).index(1)) * 0x2) as u64)); |
| 284 |
let x51: u64 = (((*IndexConst(arg1).index(7)) as u64) * ((*IndexConst(arg2).index(0)) as u64)); |
| 285 |
let x52: u64 = (((*IndexConst(arg1).index(6)) as u64) * ((*IndexConst(arg2).index(3)) as u64)); |
| 286 |
let x53: u64 = (((*IndexConst(arg1).index(6)) as u64) * ((*IndexConst(arg2).index(2)) as u64)); |
| 287 |
let x54: u64 = (((*IndexConst(arg1).index(6)) as u64) * ((*IndexConst(arg2).index(1)) as u64)); |
| 288 |
let x55: u64 = (((*IndexConst(arg1).index(6)) as u64) * ((*IndexConst(arg2).index(0)) as u64)); |
| 289 |
let x56: u64 = (((*IndexConst(arg1).index(5)) as u64) * ((*IndexConst(arg2).index(4)) as u64)); |
| 290 |
let x57: u64 = (((*IndexConst(arg1).index(5)) as u64) * (((*IndexConst(arg2).index(3)) * 0x2) as u64)); |
| 291 |
let x58: u64 = (((*IndexConst(arg1).index(5)) as u64) * ((*IndexConst(arg2).index(2)) as u64)); |
| 292 |
let x59: u64 = (((*IndexConst(arg1).index(5)) as u64) * (((*IndexConst(arg2).index(1)) * 0x2) as u64)); |
| 293 |
let x60: u64 = (((*IndexConst(arg1).index(5)) as u64) * ((*IndexConst(arg2).index(0)) as u64)); |
| 294 |
let x61: u64 = (((*IndexConst(arg1).index(4)) as u64) * ((*IndexConst(arg2).index(5)) as u64)); |
| 295 |
let x62: u64 = (((*IndexConst(arg1).index(4)) as u64) * ((*IndexConst(arg2).index(4)) as u64)); |
| 296 |
let x63: u64 = (((*IndexConst(arg1).index(4)) as u64) * ((*IndexConst(arg2).index(3)) as u64)); |
| 297 |
let x64: u64 = (((*IndexConst(arg1).index(4)) as u64) * ((*IndexConst(arg2).index(2)) as u64)); |
| 298 |
let x65: u64 = (((*IndexConst(arg1).index(4)) as u64) * ((*IndexConst(arg2).index(1)) as u64)); |
| 299 |
let x66: u64 = (((*IndexConst(arg1).index(4)) as u64) * ((*IndexConst(arg2).index(0)) as u64)); |
| 300 |
let x67: u64 = (((*IndexConst(arg1).index(3)) as u64) * ((*IndexConst(arg2).index(6)) as u64)); |
| 301 |
let x68: u64 = (((*IndexConst(arg1).index(3)) as u64) * (((*IndexConst(arg2).index(5)) * 0x2) as u64)); |
| 302 |
let x69: u64 = (((*IndexConst(arg1).index(3)) as u64) * ((*IndexConst(arg2).index(4)) as u64)); |
| 303 |
let x70: u64 = (((*IndexConst(arg1).index(3)) as u64) * (((*IndexConst(arg2).index(3)) * 0x2) as u64)); |
| 304 |
let x71: u64 = (((*IndexConst(arg1).index(3)) as u64) * ((*IndexConst(arg2).index(2)) as u64)); |
| 305 |
let x72: u64 = (((*IndexConst(arg1).index(3)) as u64) * (((*IndexConst(arg2).index(1)) * 0x2) as u64)); |
| 306 |
let x73: u64 = (((*IndexConst(arg1).index(3)) as u64) * ((*IndexConst(arg2).index(0)) as u64)); |
| 307 |
let x74: u64 = (((*IndexConst(arg1).index(2)) as u64) * ((*IndexConst(arg2).index(7)) as u64)); |
| 308 |
let x75: u64 = (((*IndexConst(arg1).index(2)) as u64) * ((*IndexConst(arg2).index(6)) as u64)); |
| 309 |
let x76: u64 = (((*IndexConst(arg1).index(2)) as u64) * ((*IndexConst(arg2).index(5)) as u64)); |
| 310 |
let x77: u64 = (((*IndexConst(arg1).index(2)) as u64) * ((*IndexConst(arg2).index(4)) as u64)); |
| 311 |
let x78: u64 = (((*IndexConst(arg1).index(2)) as u64) * ((*IndexConst(arg2).index(3)) as u64)); |
| 312 |
let x79: u64 = (((*IndexConst(arg1).index(2)) as u64) * ((*IndexConst(arg2).index(2)) as u64)); |
| 313 |
let x80: u64 = (((*IndexConst(arg1).index(2)) as u64) * ((*IndexConst(arg2).index(1)) as u64)); |
| 314 |
let x81: u64 = (((*IndexConst(arg1).index(2)) as u64) * ((*IndexConst(arg2).index(0)) as u64)); |
| 315 |
let x82: u64 = (((*IndexConst(arg1).index(1)) as u64) * ((*IndexConst(arg2).index(8)) as u64)); |
| 316 |
let x83: u64 = (((*IndexConst(arg1).index(1)) as u64) * (((*IndexConst(arg2).index(7)) * 0x2) as u64)); |
| 317 |
let x84: u64 = (((*IndexConst(arg1).index(1)) as u64) * ((*IndexConst(arg2).index(6)) as u64)); |
| 318 |
let x85: u64 = (((*IndexConst(arg1).index(1)) as u64) * (((*IndexConst(arg2).index(5)) * 0x2) as u64)); |
| 319 |
let x86: u64 = (((*IndexConst(arg1).index(1)) as u64) * ((*IndexConst(arg2).index(4)) as u64)); |
| 320 |
let x87: u64 = (((*IndexConst(arg1).index(1)) as u64) * (((*IndexConst(arg2).index(3)) * 0x2) as u64)); |
| 321 |
let x88: u64 = (((*IndexConst(arg1).index(1)) as u64) * ((*IndexConst(arg2).index(2)) as u64)); |
| 322 |
let x89: u64 = (((*IndexConst(arg1).index(1)) as u64) * (((*IndexConst(arg2).index(1)) * 0x2) as u64)); |
| 323 |
let x90: u64 = (((*IndexConst(arg1).index(1)) as u64) * ((*IndexConst(arg2).index(0)) as u64)); |
| 324 |
let x91: u64 = (((*IndexConst(arg1).index(0)) as u64) * ((*IndexConst(arg2).index(9)) as u64)); |
| 325 |
let x92: u64 = (((*IndexConst(arg1).index(0)) as u64) * ((*IndexConst(arg2).index(8)) as u64)); |
| 326 |
let x93: u64 = (((*IndexConst(arg1).index(0)) as u64) * ((*IndexConst(arg2).index(7)) as u64)); |
| 327 |
let x94: u64 = (((*IndexConst(arg1).index(0)) as u64) * ((*IndexConst(arg2).index(6)) as u64)); |
| 328 |
let x95: u64 = (((*IndexConst(arg1).index(0)) as u64) * ((*IndexConst(arg2).index(5)) as u64)); |
| 329 |
let x96: u64 = (((*IndexConst(arg1).index(0)) as u64) * ((*IndexConst(arg2).index(4)) as u64)); |
| 330 |
let x97: u64 = (((*IndexConst(arg1).index(0)) as u64) * ((*IndexConst(arg2).index(3)) as u64)); |
| 331 |
let x98: u64 = (((*IndexConst(arg1).index(0)) as u64) * ((*IndexConst(arg2).index(2)) as u64)); |
| 332 |
let x99: u64 = (((*IndexConst(arg1).index(0)) as u64) * ((*IndexConst(arg2).index(1)) as u64)); |
| 333 |
let x100: u64 = (((*IndexConst(arg1).index(0)) as u64) * ((*IndexConst(arg2).index(0)) as u64)); |
| 334 |
let x101: u64 = (x100 + (x45 + (x44 + (x42 + (x39 + (x35 + (x30 + (x24 + (x17 + x9))))))))); |
| 335 |
let x102: u64 = (x101 >> 26); |
| 336 |
let x103: u32 = ((x101 & (0x3ffffff as u64)) as u32); |
| 337 |
let x104: u64 = (x91 + (x82 + (x74 + (x67 + (x61 + (x56 + (x52 + (x49 + (x47 + x46))))))))); |
| 338 |
let x105: u64 = (x92 + (x83 + (x75 + (x68 + (x62 + (x57 + (x53 + (x50 + (x48 + x1))))))))); |
| 339 |
let x106: u64 = (x93 + (x84 + (x76 + (x69 + (x63 + (x58 + (x54 + (x51 + (x10 + x2))))))))); |
| 340 |
let x107: u64 = (x94 + (x85 + (x77 + (x70 + (x64 + (x59 + (x55 + (x18 + (x11 + x3))))))))); |
| 341 |
let x108: u64 = (x95 + (x86 + (x78 + (x71 + (x65 + (x60 + (x25 + (x19 + (x12 + x4))))))))); |
| 342 |
let x109: u64 = (x96 + (x87 + (x79 + (x72 + (x66 + (x31 + (x26 + (x20 + (x13 + x5))))))))); |
| 343 |
let x110: u64 = (x97 + (x88 + (x80 + (x73 + (x36 + (x32 + (x27 + (x21 + (x14 + x6))))))))); |
| 344 |
let x111: u64 = (x98 + (x89 + (x81 + (x40 + (x37 + (x33 + (x28 + (x22 + (x15 + x7))))))))); |
| 345 |
let x112: u64 = (x99 + (x90 + (x43 + (x41 + (x38 + (x34 + (x29 + (x23 + (x16 + x8))))))))); |
| 346 |
let x113: u64 = (x102 + x112); |
| 347 |
let x114: u64 = (x113 >> 25); |
| 348 |
let x115: u32 = ((x113 & (0x1ffffff as u64)) as u32); |
| 349 |
let x116: u64 = (x114 + x111); |
| 350 |
let x117: u64 = (x116 >> 26); |
| 351 |
let x118: u32 = ((x116 & (0x3ffffff as u64)) as u32); |
| 352 |
let x119: u64 = (x117 + x110); |
| 353 |
let x120: u64 = (x119 >> 25); |
| 354 |
let x121: u32 = ((x119 & (0x1ffffff as u64)) as u32); |
| 355 |
let x122: u64 = (x120 + x109); |
| 356 |
let x123: u64 = (x122 >> 26); |
| 357 |
let x124: u32 = ((x122 & (0x3ffffff as u64)) as u32); |
| 358 |
let x125: u64 = (x123 + x108); |
| 359 |
let x126: u64 = (x125 >> 25); |
| 360 |
let x127: u32 = ((x125 & (0x1ffffff as u64)) as u32); |
| 361 |
let x128: u64 = (x126 + x107); |
| 362 |
let x129: u64 = (x128 >> 26); |
| 363 |
let x130: u32 = ((x128 & (0x3ffffff as u64)) as u32); |
| 364 |
let x131: u64 = (x129 + x106); |
| 365 |
let x132: u64 = (x131 >> 25); |
| 366 |
let x133: u32 = ((x131 & (0x1ffffff as u64)) as u32); |
| 367 |
let x134: u64 = (x132 + x105); |
| 368 |
let x135: u64 = (x134 >> 26); |
| 369 |
let x136: u32 = ((x134 & (0x3ffffff as u64)) as u32); |
| 370 |
let x137: u64 = (x135 + x104); |
| 371 |
let x138: u64 = (x137 >> 25); |
| 372 |
let x139: u32 = ((x137 & (0x1ffffff as u64)) as u32); |
| 373 |
let x140: u64 = (x138 * (0x13 as u64)); |
| 374 |
let x141: u64 = ((x103 as u64) + x140); |
| 375 |
let x142: u32 = ((x141 >> 26) as u32); |
| 376 |
let x143: u32 = ((x141 & (0x3ffffff as u64)) as u32); |
| 377 |
let x144: u32 = (x142 + x115); |
| 378 |
let x145: fiat_25519_u1 = ((x144 >> 25) as fiat_25519_u1); |
| 379 |
let x146: u32 = (x144 & 0x1ffffff); |
| 380 |
let x147: u32 = ((x145 as u32) + x118); |
| 381 |
*IndexConst(&mut out1).index_mut(0) = x143; |
| 382 |
*IndexConst(&mut out1).index_mut(1) = x146; |
| 383 |
*IndexConst(&mut out1).index_mut(2) = x147; |
| 384 |
*IndexConst(&mut out1).index_mut(3) = x121; |
| 385 |
*IndexConst(&mut out1).index_mut(4) = x124; |
| 386 |
*IndexConst(&mut out1).index_mut(5) = x127; |
| 387 |
*IndexConst(&mut out1).index_mut(6) = x130; |
| 388 |
*IndexConst(&mut out1).index_mut(7) = x133; |
| 389 |
*IndexConst(&mut out1).index_mut(8) = x136; |
| 390 |
*IndexConst(&mut out1).index_mut(9) = x139; |
| 391 |
} |
| 392 |
|
| 393 |
|
| 394 |
|
| 395 |
|
| 396 |
|
| 397 |
|
| 398 |
#[inline] |
| 399 |
pub const fn fiat_25519_carry_square(mut out1: &mut fiat_25519_tight_field_element, arg1: &fiat_25519_loose_field_element) { |
| 400 |
let x1: u32 = ((*IndexConst(arg1).index(9)) * 0x13); |
| 401 |
let x2: u32 = (x1 * 0x2); |
| 402 |
let x3: u32 = ((*IndexConst(arg1).index(9)) * 0x2); |
| 403 |
let x4: u32 = ((*IndexConst(arg1).index(8)) * 0x13); |
| 404 |
let x5: u64 = ((x4 as u64) * (0x2 as u64)); |
| 405 |
let x6: u32 = ((*IndexConst(arg1).index(8)) * 0x2); |
| 406 |
let x7: u32 = ((*IndexConst(arg1).index(7)) * 0x13); |
| 407 |
let x8: u32 = (x7 * 0x2); |
| 408 |
let x9: u32 = ((*IndexConst(arg1).index(7)) * 0x2); |
| 409 |
let x10: u32 = ((*IndexConst(arg1).index(6)) * 0x13); |
| 410 |
let x11: u64 = ((x10 as u64) * (0x2 as u64)); |
| 411 |
let x12: u32 = ((*IndexConst(arg1).index(6)) * 0x2); |
| 412 |
let x13: u32 = ((*IndexConst(arg1).index(5)) * 0x13); |
| 413 |
let x14: u32 = ((*IndexConst(arg1).index(5)) * 0x2); |
| 414 |
let x15: u32 = ((*IndexConst(arg1).index(4)) * 0x2); |
| 415 |
let x16: u32 = ((*IndexConst(arg1).index(3)) * 0x2); |
| 416 |
let x17: u32 = ((*IndexConst(arg1).index(2)) * 0x2); |
| 417 |
let x18: u32 = ((*IndexConst(arg1).index(1)) * 0x2); |
| 418 |
let x19: u64 = (((*IndexConst(arg1).index(9)) as u64) * ((x1 * 0x2) as u64)); |
| 419 |
let x20: u64 = (((*IndexConst(arg1).index(8)) as u64) * (x2 as u64)); |
| 420 |
let x21: u64 = (((*IndexConst(arg1).index(8)) as u64) * (x4 as u64)); |
| 421 |
let x22: u64 = (((*IndexConst(arg1).index(7)) as u64) * ((x2 as u64) * (0x2 as u64))); |
| 422 |
let x23: u64 = (((*IndexConst(arg1).index(7)) as u64) * x5); |
| 423 |
let x24: u64 = (((*IndexConst(arg1).index(7)) as u64) * ((x7 * 0x2) as u64)); |
| 424 |
let x25: u64 = (((*IndexConst(arg1).index(6)) as u64) * (x2 as u64)); |
| 425 |
let x26: u64 = (((*IndexConst(arg1).index(6)) as u64) * x5); |
| 426 |
let x27: u64 = (((*IndexConst(arg1).index(6)) as u64) * (x8 as u64)); |
| 427 |
let x28: u64 = (((*IndexConst(arg1).index(6)) as u64) * (x10 as u64)); |
| 428 |
let x29: u64 = (((*IndexConst(arg1).index(5)) as u64) * ((x2 as u64) * (0x2 as u64))); |
| 429 |
let x30: u64 = (((*IndexConst(arg1).index(5)) as u64) * x5); |
| 430 |
let x31: u64 = (((*IndexConst(arg1).index(5)) as u64) * ((x8 as u64) * (0x2 as u64))); |
| 431 |
let x32: u64 = (((*IndexConst(arg1).index(5)) as u64) * x11); |
| 432 |
let x33: u64 = (((*IndexConst(arg1).index(5)) as u64) * ((x13 * 0x2) as u64)); |
| 433 |
let x34: u64 = (((*IndexConst(arg1).index(4)) as u64) * (x2 as u64)); |
| 434 |
let x35: u64 = (((*IndexConst(arg1).index(4)) as u64) * x5); |
| 435 |
let x36: u64 = (((*IndexConst(arg1).index(4)) as u64) * (x8 as u64)); |
| 436 |
let x37: u64 = (((*IndexConst(arg1).index(4)) as u64) * x11); |
| 437 |
let x38: u64 = (((*IndexConst(arg1).index(4)) as u64) * (x14 as u64)); |
| 438 |
let x39: u64 = (((*IndexConst(arg1).index(4)) as u64) * ((*IndexConst(arg1).index(4)) as u64)); |
| 439 |
let x40: u64 = (((*IndexConst(arg1).index(3)) as u64) * ((x2 as u64) * (0x2 as u64))); |
| 440 |
let x41: u64 = (((*IndexConst(arg1).index(3)) as u64) * x5); |
| 441 |
let x42: u64 = (((*IndexConst(arg1).index(3)) as u64) * ((x8 as u64) * (0x2 as u64))); |
| 442 |
let x43: u64 = (((*IndexConst(arg1).index(3)) as u64) * (x12 as u64)); |
| 443 |
let x44: u64 = (((*IndexConst(arg1).index(3)) as u64) * ((x14 * 0x2) as u64)); |
| 444 |
let x45: u64 = (((*IndexConst(arg1).index(3)) as u64) * (x15 as u64)); |
| 445 |
let x46: u64 = (((*IndexConst(arg1).index(3)) as u64) * (((*IndexConst(arg1).index(3)) * 0x2) as u64)); |
| 446 |
let x47: u64 = (((*IndexConst(arg1).index(2)) as u64) * (x2 as u64)); |
| 447 |
let x48: u64 = (((*IndexConst(arg1).index(2)) as u64) * x5); |
| 448 |
let x49: u64 = (((*IndexConst(arg1).index(2)) as u64) * (x9 as u64)); |
| 449 |
let x50: u64 = (((*IndexConst(arg1).index(2)) as u64) * (x12 as u64)); |
| 450 |
let x51: u64 = (((*IndexConst(arg1).index(2)) as u64) * (x14 as u64)); |
| 451 |
let x52: u64 = (((*IndexConst(arg1).index(2)) as u64) * (x15 as u64)); |
| 452 |
let x53: u64 = (((*IndexConst(arg1).index(2)) as u64) * (x16 as u64)); |
| 453 |
let x54: u64 = (((*IndexConst(arg1).index(2)) as u64) * ((*IndexConst(arg1).index(2)) as u64)); |
| 454 |
let x55: u64 = (((*IndexConst(arg1).index(1)) as u64) * ((x2 as u64) * (0x2 as u64))); |
| 455 |
let x56: u64 = (((*IndexConst(arg1).index(1)) as u64) * (x6 as u64)); |
| 456 |
let x57: u64 = (((*IndexConst(arg1).index(1)) as u64) * ((x9 * 0x2) as u64)); |
| 457 |
let x58: u64 = (((*IndexConst(arg1).index(1)) as u64) * (x12 as u64)); |
| 458 |
let x59: u64 = (((*IndexConst(arg1).index(1)) as u64) * ((x14 * 0x2) as u64)); |
| 459 |
let x60: u64 = (((*IndexConst(arg1).index(1)) as u64) * (x15 as u64)); |
| 460 |
let x61: u64 = (((*IndexConst(arg1).index(1)) as u64) * ((x16 * 0x2) as u64)); |
| 461 |
let x62: u64 = (((*IndexConst(arg1).index(1)) as u64) * (x17 as u64)); |
| 462 |
let x63: u64 = (((*IndexConst(arg1).index(1)) as u64) * (((*IndexConst(arg1).index(1)) * 0x2) as u64)); |
| 463 |
let x64: u64 = (((*IndexConst(arg1).index(0)) as u64) * (x3 as u64)); |
| 464 |
let x65: u64 = (((*IndexConst(arg1).index(0)) as u64) * (x6 as u64)); |
| 465 |
let x66: u64 = (((*IndexConst(arg1).index(0)) as u64) * (x9 as u64)); |
| 466 |
let x67: u64 = (((*IndexConst(arg1).index(0)) as u64) * (x12 as u64)); |
| 467 |
let x68: u64 = (((*IndexConst(arg1).index(0)) as u64) * (x14 as u64)); |
| 468 |
let x69: u64 = (((*IndexConst(arg1).index(0)) as u64) * (x15 as u64)); |
| 469 |
let x70: u64 = (((*IndexConst(arg1).index(0)) as u64) * (x16 as u64)); |
| 470 |
let x71: u64 = (((*IndexConst(arg1).index(0)) as u64) * (x17 as u64)); |
| 471 |
let x72: u64 = (((*IndexConst(arg1).index(0)) as u64) * (x18 as u64)); |
| 472 |
let x73: u64 = (((*IndexConst(arg1).index(0)) as u64) * ((*IndexConst(arg1).index(0)) as u64)); |
| 473 |
let x74: u64 = (x73 + (x55 + (x48 + (x42 + (x37 + x33))))); |
| 474 |
let x75: u64 = (x74 >> 26); |
| 475 |
let x76: u32 = ((x74 & (0x3ffffff as u64)) as u32); |
| 476 |
let x77: u64 = (x64 + (x56 + (x49 + (x43 + x38)))); |
| 477 |
let x78: u64 = (x65 + (x57 + (x50 + (x44 + (x39 + x19))))); |
| 478 |
let x79: u64 = (x66 + (x58 + (x51 + (x45 + x20)))); |
| 479 |
let x80: u64 = (x67 + (x59 + (x52 + (x46 + (x22 + x21))))); |
| 480 |
let x81: u64 = (x68 + (x60 + (x53 + (x25 + x23)))); |
| 481 |
let x82: u64 = (x69 + (x61 + (x54 + (x29 + (x26 + x24))))); |
| 482 |
let x83: u64 = (x70 + (x62 + (x34 + (x30 + x27)))); |
| 483 |
let x84: u64 = (x71 + (x63 + (x40 + (x35 + (x31 + x28))))); |
| 484 |
let x85: u64 = (x72 + (x47 + (x41 + (x36 + x32)))); |
| 485 |
let x86: u64 = (x75 + x85); |
| 486 |
let x87: u64 = (x86 >> 25); |
| 487 |
let x88: u32 = ((x86 & (0x1ffffff as u64)) as u32); |
| 488 |
let x89: u64 = (x87 + x84); |
| 489 |
let x90: u64 = (x89 >> 26); |
| 490 |
let x91: u32 = ((x89 & (0x3ffffff as u64)) as u32); |
| 491 |
let x92: u64 = (x90 + x83); |
| 492 |
let x93: u64 = (x92 >> 25); |
| 493 |
let x94: u32 = ((x92 & (0x1ffffff as u64)) as u32); |
| 494 |
let x95: u64 = (x93 + x82); |
| 495 |
let x96: u64 = (x95 >> 26); |
| 496 |
let x97: u32 = ((x95 & (0x3ffffff as u64)) as u32); |
| 497 |
let x98: u64 = (x96 + x81); |
| 498 |
let x99: u64 = (x98 >> 25); |
| 499 |
let x100: u32 = ((x98 & (0x1ffffff as u64)) as u32); |
| 500 |
let x101: u64 = (x99 + x80); |
| 501 |
let x102: u64 = (x101 >> 26); |
| 502 |
let x103: u32 = ((x101 & (0x3ffffff as u64)) as u32); |
| 503 |
let x104: u64 = (x102 + x79); |
| 504 |
let x105: u64 = (x104 >> 25); |
| 505 |
let x106: u32 = ((x104 & (0x1ffffff as u64)) as u32); |
| 506 |
let x107: u64 = (x105 + x78); |
| 507 |
let x108: u64 = (x107 >> 26); |
| 508 |
let x109: u32 = ((x107 & (0x3ffffff as u64)) as u32); |
| 509 |
let x110: u64 = (x108 + x77); |
| 510 |
let x111: u64 = (x110 >> 25); |
| 511 |
let x112: u32 = ((x110 & (0x1ffffff as u64)) as u32); |
| 512 |
let x113: u64 = (x111 * (0x13 as u64)); |
| 513 |
let x114: u64 = ((x76 as u64) + x113); |
| 514 |
let x115: u32 = ((x114 >> 26) as u32); |
| 515 |
let x116: u32 = ((x114 & (0x3ffffff as u64)) as u32); |
| 516 |
let x117: u32 = (x115 + x88); |
| 517 |
let x118: fiat_25519_u1 = ((x117 >> 25) as fiat_25519_u1); |
| 518 |
let x119: u32 = (x117 & 0x1ffffff); |
| 519 |
let x120: u32 = ((x118 as u32) + x91); |
| 520 |
*IndexConst(&mut out1).index_mut(0) = x116; |
| 521 |
*IndexConst(&mut out1).index_mut(1) = x119; |
| 522 |
*IndexConst(&mut out1).index_mut(2) = x120; |
| 523 |
*IndexConst(&mut out1).index_mut(3) = x94; |
| 524 |
*IndexConst(&mut out1).index_mut(4) = x97; |
| 525 |
*IndexConst(&mut out1).index_mut(5) = x100; |
| 526 |
*IndexConst(&mut out1).index_mut(6) = x103; |
| 527 |
*IndexConst(&mut out1).index_mut(7) = x106; |
| 528 |
*IndexConst(&mut out1).index_mut(8) = x109; |
| 529 |
*IndexConst(&mut out1).index_mut(9) = x112; |
| 530 |
} |
| 531 |
|
| 532 |
|
| 533 |
|
| 534 |
|
| 535 |
|
| 536 |
|
| 537 |
#[inline] |
| 538 |
pub const fn fiat_25519_carry(mut out1: &mut fiat_25519_tight_field_element, arg1: &fiat_25519_loose_field_element) { |
| 539 |
let x1: u32 = (*IndexConst(arg1).index(0)); |
| 540 |
let x2: u32 = ((x1 >> 26) + (*IndexConst(arg1).index(1))); |
| 541 |
let x3: u32 = ((x2 >> 25) + (*IndexConst(arg1).index(2))); |
| 542 |
let x4: u32 = ((x3 >> 26) + (*IndexConst(arg1).index(3))); |
| 543 |
let x5: u32 = ((x4 >> 25) + (*IndexConst(arg1).index(4))); |
| 544 |
let x6: u32 = ((x5 >> 26) + (*IndexConst(arg1).index(5))); |
| 545 |
let x7: u32 = ((x6 >> 25) + (*IndexConst(arg1).index(6))); |
| 546 |
let x8: u32 = ((x7 >> 26) + (*IndexConst(arg1).index(7))); |
| 547 |
let x9: u32 = ((x8 >> 25) + (*IndexConst(arg1).index(8))); |
| 548 |
let x10: u32 = ((x9 >> 26) + (*IndexConst(arg1).index(9))); |
| 549 |
let x11: u32 = ((x1 & 0x3ffffff) + ((x10 >> 25) * 0x13)); |
| 550 |
let x12: u32 = ((((x11 >> 26) as fiat_25519_u1) as u32) + (x2 & 0x1ffffff)); |
| 551 |
let x13: u32 = (x11 & 0x3ffffff); |
| 552 |
let x14: u32 = (x12 & 0x1ffffff); |
| 553 |
let x15: u32 = ((((x12 >> 25) as fiat_25519_u1) as u32) + (x3 & 0x3ffffff)); |
| 554 |
let x16: u32 = (x4 & 0x1ffffff); |
| 555 |
let x17: u32 = (x5 & 0x3ffffff); |
| 556 |
let x18: u32 = (x6 & 0x1ffffff); |
| 557 |
let x19: u32 = (x7 & 0x3ffffff); |
| 558 |
let x20: u32 = (x8 & 0x1ffffff); |
| 559 |
let x21: u32 = (x9 & 0x3ffffff); |
| 560 |
let x22: u32 = (x10 & 0x1ffffff); |
| 561 |
*IndexConst(&mut out1).index_mut(0) = x13; |
| 562 |
*IndexConst(&mut out1).index_mut(1) = x14; |
| 563 |
*IndexConst(&mut out1).index_mut(2) = x15; |
| 564 |
*IndexConst(&mut out1).index_mut(3) = x16; |
| 565 |
*IndexConst(&mut out1).index_mut(4) = x17; |
| 566 |
*IndexConst(&mut out1).index_mut(5) = x18; |
| 567 |
*IndexConst(&mut out1).index_mut(6) = x19; |
| 568 |
*IndexConst(&mut out1).index_mut(7) = x20; |
| 569 |
*IndexConst(&mut out1).index_mut(8) = x21; |
| 570 |
*IndexConst(&mut out1).index_mut(9) = x22; |
| 571 |
} |
| 572 |
|
| 573 |
|
| 574 |
|
| 575 |
|
| 576 |
|
| 577 |
|
| 578 |
#[inline] |
| 579 |
pub const fn fiat_25519_add(mut out1: &mut fiat_25519_loose_field_element, arg1: &fiat_25519_tight_field_element, arg2: &fiat_25519_tight_field_element) { |
| 580 |
let x1: u32 = ((*IndexConst(arg1).index(0)) + (*IndexConst(arg2).index(0))); |
| 581 |
let x2: u32 = ((*IndexConst(arg1).index(1)) + (*IndexConst(arg2).index(1))); |
| 582 |
let x3: u32 = ((*IndexConst(arg1).index(2)) + (*IndexConst(arg2).index(2))); |
| 583 |
let x4: u32 = ((*IndexConst(arg1).index(3)) + (*IndexConst(arg2).index(3))); |
| 584 |
let x5: u32 = ((*IndexConst(arg1).index(4)) + (*IndexConst(arg2).index(4))); |
| 585 |
let x6: u32 = ((*IndexConst(arg1).index(5)) + (*IndexConst(arg2).index(5))); |
| 586 |
let x7: u32 = ((*IndexConst(arg1).index(6)) + (*IndexConst(arg2).index(6))); |
| 587 |
let x8: u32 = ((*IndexConst(arg1).index(7)) + (*IndexConst(arg2).index(7))); |
| 588 |
let x9: u32 = ((*IndexConst(arg1).index(8)) + (*IndexConst(arg2).index(8))); |
| 589 |
let x10: u32 = ((*IndexConst(arg1).index(9)) + (*IndexConst(arg2).index(9))); |
| 590 |
*IndexConst(&mut out1).index_mut(0) = x1; |
| 591 |
*IndexConst(&mut out1).index_mut(1) = x2; |
| 592 |
*IndexConst(&mut out1).index_mut(2) = x3; |
| 593 |
*IndexConst(&mut out1).index_mut(3) = x4; |
| 594 |
*IndexConst(&mut out1).index_mut(4) = x5; |
| 595 |
*IndexConst(&mut out1).index_mut(5) = x6; |
| 596 |
*IndexConst(&mut out1).index_mut(6) = x7; |
| 597 |
*IndexConst(&mut out1).index_mut(7) = x8; |
| 598 |
*IndexConst(&mut out1).index_mut(8) = x9; |
| 599 |
*IndexConst(&mut out1).index_mut(9) = x10; |
| 600 |
} |
| 601 |
|
| 602 |
|
| 603 |
|
| 604 |
|
| 605 |
|
| 606 |
|
| 607 |
#[inline] |
| 608 |
pub const fn fiat_25519_sub(mut out1: &mut fiat_25519_loose_field_element, arg1: &fiat_25519_tight_field_element, arg2: &fiat_25519_tight_field_element) { |
| 609 |
let x1: u32 = ((0x7ffffda + (*IndexConst(arg1).index(0))) - (*IndexConst(arg2).index(0))); |
| 610 |
let x2: u32 = ((0x3fffffe + (*IndexConst(arg1).index(1))) - (*IndexConst(arg2).index(1))); |
| 611 |
let x3: u32 = ((0x7fffffe + (*IndexConst(arg1).index(2))) - (*IndexConst(arg2).index(2))); |
| 612 |
let x4: u32 = ((0x3fffffe + (*IndexConst(arg1).index(3))) - (*IndexConst(arg2).index(3))); |
| 613 |
let x5: u32 = ((0x7fffffe + (*IndexConst(arg1).index(4))) - (*IndexConst(arg2).index(4))); |
| 614 |
let x6: u32 = ((0x3fffffe + (*IndexConst(arg1).index(5))) - (*IndexConst(arg2).index(5))); |
| 615 |
let x7: u32 = ((0x7fffffe + (*IndexConst(arg1).index(6))) - (*IndexConst(arg2).index(6))); |
| 616 |
let x8: u32 = ((0x3fffffe + (*IndexConst(arg1).index(7))) - (*IndexConst(arg2).index(7))); |
| 617 |
let x9: u32 = ((0x7fffffe + (*IndexConst(arg1).index(8))) - (*IndexConst(arg2).index(8))); |
| 618 |
let x10: u32 = ((0x3fffffe + (*IndexConst(arg1).index(9))) - (*IndexConst(arg2).index(9))); |
| 619 |
*IndexConst(&mut out1).index_mut(0) = x1; |
| 620 |
*IndexConst(&mut out1).index_mut(1) = x2; |
| 621 |
*IndexConst(&mut out1).index_mut(2) = x3; |
| 622 |
*IndexConst(&mut out1).index_mut(3) = x4; |
| 623 |
*IndexConst(&mut out1).index_mut(4) = x5; |
| 624 |
*IndexConst(&mut out1).index_mut(5) = x6; |
| 625 |
*IndexConst(&mut out1).index_mut(6) = x7; |
| 626 |
*IndexConst(&mut out1).index_mut(7) = x8; |
| 627 |
*IndexConst(&mut out1).index_mut(8) = x9; |
| 628 |
*IndexConst(&mut out1).index_mut(9) = x10; |
| 629 |
} |
| 630 |
|
| 631 |
|
| 632 |
|
| 633 |
|
| 634 |
|
| 635 |
|
| 636 |
#[inline] |
| 637 |
pub const fn fiat_25519_opp(mut out1: &mut fiat_25519_loose_field_element, arg1: &fiat_25519_tight_field_element) { |
| 638 |
let x1: u32 = (0x7ffffda - (*IndexConst(arg1).index(0))); |
| 639 |
let x2: u32 = (0x3fffffe - (*IndexConst(arg1).index(1))); |
| 640 |
let x3: u32 = (0x7fffffe - (*IndexConst(arg1).index(2))); |
| 641 |
let x4: u32 = (0x3fffffe - (*IndexConst(arg1).index(3))); |
| 642 |
let x5: u32 = (0x7fffffe - (*IndexConst(arg1).index(4))); |
| 643 |
let x6: u32 = (0x3fffffe - (*IndexConst(arg1).index(5))); |
| 644 |
let x7: u32 = (0x7fffffe - (*IndexConst(arg1).index(6))); |
| 645 |
let x8: u32 = (0x3fffffe - (*IndexConst(arg1).index(7))); |
| 646 |
let x9: u32 = (0x7fffffe - (*IndexConst(arg1).index(8))); |
| 647 |
let x10: u32 = (0x3fffffe - (*IndexConst(arg1).index(9))); |
| 648 |
*IndexConst(&mut out1).index_mut(0) = x1; |
| 649 |
*IndexConst(&mut out1).index_mut(1) = x2; |
| 650 |
*IndexConst(&mut out1).index_mut(2) = x3; |
| 651 |
*IndexConst(&mut out1).index_mut(3) = x4; |
| 652 |
*IndexConst(&mut out1).index_mut(4) = x5; |
| 653 |
*IndexConst(&mut out1).index_mut(5) = x6; |
| 654 |
*IndexConst(&mut out1).index_mut(6) = x7; |
| 655 |
*IndexConst(&mut out1).index_mut(7) = x8; |
| 656 |
*IndexConst(&mut out1).index_mut(8) = x9; |
| 657 |
*IndexConst(&mut out1).index_mut(9) = x10; |
| 658 |
} |
| 659 |
|
| 660 |
|
| 661 |
|
| 662 |
|
| 663 |
|
| 664 |
|
| 665 |
|
| 666 |
|
| 667 |
|
| 668 |
|
| 669 |
|
| 670 |
|
| 671 |
#[inline] |
| 672 |
pub const fn fiat_25519_selectznz(mut out1: &mut [u32; 10], arg1: fiat_25519_u1, arg2: &[u32; 10], arg3: &[u32; 10]) { |
| 673 |
let mut x1: u32 = 0; |
| 674 |
fiat_25519_cmovznz_u32(&mut x1, arg1, (*IndexConst(arg2).index(0)), (*IndexConst(arg3).index(0))); |
| 675 |
let mut x2: u32 = 0; |
| 676 |
fiat_25519_cmovznz_u32(&mut x2, arg1, (*IndexConst(arg2).index(1)), (*IndexConst(arg3).index(1))); |
| 677 |
let mut x3: u32 = 0; |
| 678 |
fiat_25519_cmovznz_u32(&mut x3, arg1, (*IndexConst(arg2).index(2)), (*IndexConst(arg3).index(2))); |
| 679 |
let mut x4: u32 = 0; |
| 680 |
fiat_25519_cmovznz_u32(&mut x4, arg1, (*IndexConst(arg2).index(3)), (*IndexConst(arg3).index(3))); |
| 681 |
let mut x5: u32 = 0; |
| 682 |
fiat_25519_cmovznz_u32(&mut x5, arg1, (*IndexConst(arg2).index(4)), (*IndexConst(arg3).index(4))); |
| 683 |
let mut x6: u32 = 0; |
| 684 |
fiat_25519_cmovznz_u32(&mut x6, arg1, (*IndexConst(arg2).index(5)), (*IndexConst(arg3).index(5))); |
| 685 |
let mut x7: u32 = 0; |
| 686 |
fiat_25519_cmovznz_u32(&mut x7, arg1, (*IndexConst(arg2).index(6)), (*IndexConst(arg3).index(6))); |
| 687 |
let mut x8: u32 = 0; |
| 688 |
fiat_25519_cmovznz_u32(&mut x8, arg1, (*IndexConst(arg2).index(7)), (*IndexConst(arg3).index(7))); |
| 689 |
let mut x9: u32 = 0; |
| 690 |
fiat_25519_cmovznz_u32(&mut x9, arg1, (*IndexConst(arg2).index(8)), (*IndexConst(arg3).index(8))); |
| 691 |
let mut x10: u32 = 0; |
| 692 |
fiat_25519_cmovznz_u32(&mut x10, arg1, (*IndexConst(arg2).index(9)), (*IndexConst(arg3).index(9))); |
| 693 |
*IndexConst(&mut out1).index_mut(0) = x1; |
| 694 |
*IndexConst(&mut out1).index_mut(1) = x2; |
| 695 |
*IndexConst(&mut out1).index_mut(2) = x3; |
| 696 |
*IndexConst(&mut out1).index_mut(3) = x4; |
| 697 |
*IndexConst(&mut out1).index_mut(4) = x5; |
| 698 |
*IndexConst(&mut out1).index_mut(5) = x6; |
| 699 |
*IndexConst(&mut out1).index_mut(6) = x7; |
| 700 |
*IndexConst(&mut out1).index_mut(7) = x8; |
| 701 |
*IndexConst(&mut out1).index_mut(8) = x9; |
| 702 |
*IndexConst(&mut out1).index_mut(9) = x10; |
| 703 |
} |
| 704 |
|
| 705 |
|
| 706 |
|
| 707 |
|
| 708 |
..31] |
| 709 |
|
| 710 |
|
| 711 |
|
| 712 |
#[inline] |
| 713 |
pub const fn fiat_25519_to_bytes(mut out1: &mut [u8; 32], arg1: &fiat_25519_tight_field_element) { |
| 714 |
let mut x1: u32 = 0; |
| 715 |
let mut x2: fiat_25519_u1 = 0; |
| 716 |
fiat_25519_subborrowx_u26(&mut x1, &mut x2, 0x0, (*IndexConst(arg1).index(0)), 0x3ffffed); |
| 717 |
let mut x3: u32 = 0; |
| 718 |
let mut x4: fiat_25519_u1 = 0; |
| 719 |
fiat_25519_subborrowx_u25(&mut x3, &mut x4, x2, (*IndexConst(arg1).index(1)), 0x1ffffff); |
| 720 |
let mut x5: u32 = 0; |
| 721 |
let mut x6: fiat_25519_u1 = 0; |
| 722 |
fiat_25519_subborrowx_u26(&mut x5, &mut x6, x4, (*IndexConst(arg1).index(2)), 0x3ffffff); |
| 723 |
let mut x7: u32 = 0; |
| 724 |
let mut x8: fiat_25519_u1 = 0; |
| 725 |
fiat_25519_subborrowx_u25(&mut x7, &mut x8, x6, (*IndexConst(arg1).index(3)), 0x1ffffff); |
| 726 |
let mut x9: u32 = 0; |
| 727 |
let mut x10: fiat_25519_u1 = 0; |
| 728 |
fiat_25519_subborrowx_u26(&mut x9, &mut x10, x8, (*IndexConst(arg1).index(4)), 0x3ffffff); |
| 729 |
let mut x11: u32 = 0; |
| 730 |
let mut x12: fiat_25519_u1 = 0; |
| 731 |
fiat_25519_subborrowx_u25(&mut x11, &mut x12, x10, (*IndexConst(arg1).index(5)), 0x1ffffff); |
| 732 |
let mut x13: u32 = 0; |
| 733 |
let mut x14: fiat_25519_u1 = 0; |
| 734 |
fiat_25519_subborrowx_u26(&mut x13, &mut x14, x12, (*IndexConst(arg1).index(6)), 0x3ffffff); |
| 735 |
let mut x15: u32 = 0; |
| 736 |
let mut x16: fiat_25519_u1 = 0; |
| 737 |
fiat_25519_subborrowx_u25(&mut x15, &mut x16, x14, (*IndexConst(arg1).index(7)), 0x1ffffff); |
| 738 |
let mut x17: u32 = 0; |
| 739 |
let mut x18: fiat_25519_u1 = 0; |
| 740 |
fiat_25519_subborrowx_u26(&mut x17, &mut x18, x16, (*IndexConst(arg1).index(8)), 0x3ffffff); |
| 741 |
let mut x19: u32 = 0; |
| 742 |
let mut x20: fiat_25519_u1 = 0; |
| 743 |
fiat_25519_subborrowx_u25(&mut x19, &mut x20, x18, (*IndexConst(arg1).index(9)), 0x1ffffff); |
| 744 |
let mut x21: u32 = 0; |
| 745 |
fiat_25519_cmovznz_u32(&mut x21, x20, (0x0 as u32), 0xffffffff); |
| 746 |
let mut x22: u32 = 0; |
| 747 |
let mut x23: fiat_25519_u1 = 0; |
| 748 |
fiat_25519_addcarryx_u26(&mut x22, &mut x23, 0x0, x1, (x21 & 0x3ffffed)); |
| 749 |
let mut x24: u32 = 0; |
| 750 |
let mut x25: fiat_25519_u1 = 0; |
| 751 |
fiat_25519_addcarryx_u25(&mut x24, &mut x25, x23, x3, (x21 & 0x1ffffff)); |
| 752 |
let mut x26: u32 = 0; |
| 753 |
let mut x27: fiat_25519_u1 = 0; |
| 754 |
fiat_25519_addcarryx_u26(&mut x26, &mut x27, x25, x5, (x21 & 0x3ffffff)); |
| 755 |
let mut x28: u32 = 0; |
| 756 |
let mut x29: fiat_25519_u1 = 0; |
| 757 |
fiat_25519_addcarryx_u25(&mut x28, &mut x29, x27, x7, (x21 & 0x1ffffff)); |
| 758 |
let mut x30: u32 = 0; |
| 759 |
let mut x31: fiat_25519_u1 = 0; |
| 760 |
fiat_25519_addcarryx_u26(&mut x30, &mut x31, x29, x9, (x21 & 0x3ffffff)); |
| 761 |
let mut x32: u32 = 0; |
| 762 |
let mut x33: fiat_25519_u1 = 0; |
| 763 |
fiat_25519_addcarryx_u25(&mut x32, &mut x33, x31, x11, (x21 & 0x1ffffff)); |
| 764 |
let mut x34: u32 = 0; |
| 765 |
let mut x35: fiat_25519_u1 = 0; |
| 766 |
fiat_25519_addcarryx_u26(&mut x34, &mut x35, x33, x13, (x21 & 0x3ffffff)); |
| 767 |
let mut x36: u32 = 0; |
| 768 |
let mut x37: fiat_25519_u1 = 0; |
| 769 |
fiat_25519_addcarryx_u25(&mut x36, &mut x37, x35, x15, (x21 & 0x1ffffff)); |
| 770 |
let mut x38: u32 = 0; |
| 771 |
let mut x39: fiat_25519_u1 = 0; |
| 772 |
fiat_25519_addcarryx_u26(&mut x38, &mut x39, x37, x17, (x21 & 0x3ffffff)); |
| 773 |
let mut x40: u32 = 0; |
| 774 |
let mut x41: fiat_25519_u1 = 0; |
| 775 |
fiat_25519_addcarryx_u25(&mut x40, &mut x41, x39, x19, (x21 & 0x1ffffff)); |
| 776 |
let x42: u32 = (x40 << 6); |
| 777 |
let x43: u32 = (x38 << 4); |
| 778 |
let x44: u32 = (x36 << 3); |
| 779 |
let x45: u32 = (x34 * (0x2 as u32)); |
| 780 |
let x46: u32 = (x30 << 6); |
| 781 |
let x47: u32 = (x28 << 5); |
| 782 |
let x48: u32 = (x26 << 3); |
| 783 |
let x49: u32 = (x24 << 2); |
| 784 |
let x50: u8 = ((x22 & (0xff as u32)) as u8); |
| 785 |
let x51: u32 = (x22 >> 8); |
| 786 |
let x52: u8 = ((x51 & (0xff as u32)) as u8); |
| 787 |
let x53: u32 = (x51 >> 8); |
| 788 |
let x54: u8 = ((x53 & (0xff as u32)) as u8); |
| 789 |
let x55: u8 = ((x53 >> 8) as u8); |
| 790 |
let x56: u32 = (x49 + (x55 as u32)); |
| 791 |
let x57: u8 = ((x56 & (0xff as u32)) as u8); |
| 792 |
let x58: u32 = (x56 >> 8); |
| 793 |
let x59: u8 = ((x58 & (0xff as u32)) as u8); |
| 794 |
let x60: u32 = (x58 >> 8); |
| 795 |
let x61: u8 = ((x60 & (0xff as u32)) as u8); |
| 796 |
let x62: u8 = ((x60 >> 8) as u8); |
| 797 |
let x63: u32 = (x48 + (x62 as u32)); |
| 798 |
let x64: u8 = ((x63 & (0xff as u32)) as u8); |
| 799 |
let x65: u32 = (x63 >> 8); |
| 800 |
let x66: u8 = ((x65 & (0xff as u32)) as u8); |
| 801 |
let x67: u32 = (x65 >> 8); |
| 802 |
let x68: u8 = ((x67 & (0xff as u32)) as u8); |
| 803 |
let x69: u8 = ((x67 >> 8) as u8); |
| 804 |
let x70: u32 = (x47 + (x69 as u32)); |
| 805 |
let x71: u8 = ((x70 & (0xff as u32)) as u8); |
| 806 |
let x72: u32 = (x70 >> 8); |
| 807 |
let x73: u8 = ((x72 & (0xff as u32)) as u8); |
| 808 |
let x74: u32 = (x72 >> 8); |
| 809 |
let x75: u8 = ((x74 & (0xff as u32)) as u8); |
| 810 |
let x76: u8 = ((x74 >> 8) as u8); |
| 811 |
let x77: u32 = (x46 + (x76 as u32)); |
| 812 |
let x78: u8 = ((x77 & (0xff as u32)) as u8); |
| 813 |
let x79: u32 = (x77 >> 8); |
| 814 |
let x80: u8 = ((x79 & (0xff as u32)) as u8); |
| 815 |
let x81: u32 = (x79 >> 8); |
| 816 |
let x82: u8 = ((x81 & (0xff as u32)) as u8); |
| 817 |
let x83: u8 = ((x81 >> 8) as u8); |
| 818 |
let x84: u8 = ((x32 & (0xff as u32)) as u8); |
| 819 |
let x85: u32 = (x32 >> 8); |
| 820 |
let x86: u8 = ((x85 & (0xff as u32)) as u8); |
| 821 |
let x87: u32 = (x85 >> 8); |
| 822 |
let x88: u8 = ((x87 & (0xff as u32)) as u8); |
| 823 |
let x89: fiat_25519_u1 = ((x87 >> 8) as fiat_25519_u1); |
| 824 |
let x90: u32 = (x45 + (x89 as u32)); |
| 825 |
let x91: u8 = ((x90 & (0xff as u32)) as u8); |
| 826 |
let x92: u32 = (x90 >> 8); |
| 827 |
let x93: u8 = ((x92 & (0xff as u32)) as u8); |
| 828 |
let x94: u32 = (x92 >> 8); |
| 829 |
let x95: u8 = ((x94 & (0xff as u32)) as u8); |
| 830 |
let x96: u8 = ((x94 >> 8) as u8); |
| 831 |
let x97: u32 = (x44 + (x96 as u32)); |
| 832 |
let x98: u8 = ((x97 & (0xff as u32)) as u8); |
| 833 |
let x99: u32 = (x97 >> 8); |
| 834 |
let x100: u8 = ((x99 & (0xff as u32)) as u8); |
| 835 |
let x101: u32 = (x99 >> 8); |
| 836 |
let x102: u8 = ((x101 & (0xff as u32)) as u8); |
| 837 |
let x103: u8 = ((x101 >> 8) as u8); |
| 838 |
let x104: u32 = (x43 + (x103 as u32)); |
| 839 |
let x105: u8 = ((x104 & (0xff as u32)) as u8); |
| 840 |
let x106: u32 = (x104 >> 8); |
| 841 |
let x107: u8 = ((x106 & (0xff as u32)) as u8); |
| 842 |
let x108: u32 = (x106 >> 8); |
| 843 |
let x109: u8 = ((x108 & (0xff as u32)) as u8); |
| 844 |
let x110: u8 = ((x108 >> 8) as u8); |
| 845 |
let x111: u32 = (x42 + (x110 as u32)); |
| 846 |
let x112: u8 = ((x111 & (0xff as u32)) as u8); |
| 847 |
let x113: u32 = (x111 >> 8); |
| 848 |
let x114: u8 = ((x113 & (0xff as u32)) as u8); |
| 849 |
let x115: u32 = (x113 >> 8); |
| 850 |
let x116: u8 = ((x115 & (0xff as u32)) as u8); |
| 851 |
let x117: u8 = ((x115 >> 8) as u8); |
| 852 |
*IndexConst(&mut out1).index_mut(0) = x50; |
| 853 |
*IndexConst(&mut out1).index_mut(1) = x52; |
| 854 |
*IndexConst(&mut out1).index_mut(2) = x54; |
| 855 |
*IndexConst(&mut out1).index_mut(3) = x57; |
| 856 |
*IndexConst(&mut out1).index_mut(4) = x59; |
| 857 |
*IndexConst(&mut out1).index_mut(5) = x61; |
| 858 |
*IndexConst(&mut out1).index_mut(6) = x64; |
| 859 |
*IndexConst(&mut out1).index_mut(7) = x66; |
| 860 |
*IndexConst(&mut out1).index_mut(8) = x68; |
| 861 |
*IndexConst(&mut out1).index_mut(9) = x71; |
| 862 |
*IndexConst(&mut out1).index_mut(10) = x73; |
| 863 |
*IndexConst(&mut out1).index_mut(11) = x75; |
| 864 |
*IndexConst(&mut out1).index_mut(12) = x78; |
| 865 |
*IndexConst(&mut out1).index_mut(13) = x80; |
| 866 |
*IndexConst(&mut out1).index_mut(14) = x82; |
| 867 |
*IndexConst(&mut out1).index_mut(15) = x83; |
| 868 |
*IndexConst(&mut out1).index_mut(16) = x84; |
| 869 |
*IndexConst(&mut out1).index_mut(17) = x86; |
| 870 |
*IndexConst(&mut out1).index_mut(18) = x88; |
| 871 |
*IndexConst(&mut out1).index_mut(19) = x91; |
| 872 |
*IndexConst(&mut out1).index_mut(20) = x93; |
| 873 |
*IndexConst(&mut out1).index_mut(21) = x95; |
| 874 |
*IndexConst(&mut out1).index_mut(22) = x98; |
| 875 |
*IndexConst(&mut out1).index_mut(23) = x100; |
| 876 |
*IndexConst(&mut out1).index_mut(24) = x102; |
| 877 |
*IndexConst(&mut out1).index_mut(25) = x105; |
| 878 |
*IndexConst(&mut out1).index_mut(26) = x107; |
| 879 |
*IndexConst(&mut out1).index_mut(27) = x109; |
| 880 |
*IndexConst(&mut out1).index_mut(28) = x112; |
| 881 |
*IndexConst(&mut out1).index_mut(29) = x114; |
| 882 |
*IndexConst(&mut out1).index_mut(30) = x116; |
| 883 |
*IndexConst(&mut out1).index_mut(31) = x117; |
| 884 |
} |
| 885 |
|
| 886 |
|
| 887 |
|
| 888 |
|
| 889 |
|
| 890 |
|
| 891 |
|
| 892 |
|
| 893 |
#[inline] |
| 894 |
pub const fn fiat_25519_from_bytes(mut out1: &mut fiat_25519_tight_field_element, arg1: &[u8; 32]) { |
| 895 |
let x1: u32 = (((*IndexConst(arg1).index(31)) as u32) << 18); |
| 896 |
let x2: u32 = (((*IndexConst(arg1).index(30)) as u32) << 10); |
| 897 |
let x3: u32 = (((*IndexConst(arg1).index(29)) as u32) << 2); |
| 898 |
let x4: u32 = (((*IndexConst(arg1).index(28)) as u32) << 20); |
| 899 |
let x5: u32 = (((*IndexConst(arg1).index(27)) as u32) << 12); |
| 900 |
let x6: u32 = (((*IndexConst(arg1).index(26)) as u32) << 4); |
| 901 |
let x7: u32 = (((*IndexConst(arg1).index(25)) as u32) << 21); |
| 902 |
let x8: u32 = (((*IndexConst(arg1).index(24)) as u32) << 13); |
| 903 |
let x9: u32 = (((*IndexConst(arg1).index(23)) as u32) << 5); |
| 904 |
let x10: u32 = (((*IndexConst(arg1).index(22)) as u32) << 23); |
| 905 |
let x11: u32 = (((*IndexConst(arg1).index(21)) as u32) << 15); |
| 906 |
let x12: u32 = (((*IndexConst(arg1).index(20)) as u32) << 7); |
| 907 |
let x13: u32 = (((*IndexConst(arg1).index(19)) as u32) << 24); |
| 908 |
let x14: u32 = (((*IndexConst(arg1).index(18)) as u32) << 16); |
| 909 |
let x15: u32 = (((*IndexConst(arg1).index(17)) as u32) << 8); |
| 910 |
let x16: u8 = (*IndexConst(arg1).index(16)); |
| 911 |
let x17: u32 = (((*IndexConst(arg1).index(15)) as u32) << 18); |
| 912 |
let x18: u32 = (((*IndexConst(arg1).index(14)) as u32) << 10); |
| 913 |
let x19: u32 = (((*IndexConst(arg1).index(13)) as u32) << 2); |
| 914 |
let x20: u32 = (((*IndexConst(arg1).index(12)) as u32) << 19); |
| 915 |
let x21: u32 = (((*IndexConst(arg1).index(11)) as u32) << 11); |
| 916 |
let x22: u32 = (((*IndexConst(arg1).index(10)) as u32) << 3); |
| 917 |
let x23: u32 = (((*IndexConst(arg1).index(9)) as u32) << 21); |
| 918 |
let x24: u32 = (((*IndexConst(arg1).index(8)) as u32) << 13); |
| 919 |
let x25: u32 = (((*IndexConst(arg1).index(7)) as u32) << 5); |
| 920 |
let x26: u32 = (((*IndexConst(arg1).index(6)) as u32) << 22); |
| 921 |
let x27: u32 = (((*IndexConst(arg1).index(5)) as u32) << 14); |
| 922 |
let x28: u32 = (((*IndexConst(arg1).index(4)) as u32) << 6); |
| 923 |
let x29: u32 = (((*IndexConst(arg1).index(3)) as u32) << 24); |
| 924 |
let x30: u32 = (((*IndexConst(arg1).index(2)) as u32) << 16); |
| 925 |
let x31: u32 = (((*IndexConst(arg1).index(1)) as u32) << 8); |
| 926 |
let x32: u8 = (*IndexConst(arg1).index(0)); |
| 927 |
let x33: u32 = (x31 + (x32 as u32)); |
| 928 |
let x34: u32 = (x30 + x33); |
| 929 |
let x35: u32 = (x29 + x34); |
| 930 |
let x36: u32 = (x35 & 0x3ffffff); |
| 931 |
let x37: u8 = ((x35 >> 26) as u8); |
| 932 |
let x38: u32 = (x28 + (x37 as u32)); |
| 933 |
let x39: u32 = (x27 + x38); |
| 934 |
let x40: u32 = (x26 + x39); |
| 935 |
let x41: u32 = (x40 & 0x1ffffff); |
| 936 |
let x42: u8 = ((x40 >> 25) as u8); |
| 937 |
let x43: u32 = (x25 + (x42 as u32)); |
| 938 |
let x44: u32 = (x24 + x43); |
| 939 |
let x45: u32 = (x23 + x44); |
| 940 |
let x46: u32 = (x45 & 0x3ffffff); |
| 941 |
let x47: u8 = ((x45 >> 26) as u8); |
| 942 |
let x48: u32 = (x22 + (x47 as u32)); |
| 943 |
let x49: u32 = (x21 + x48); |
| 944 |
let x50: u32 = (x20 + x49); |
| 945 |
let x51: u32 = (x50 & 0x1ffffff); |
| 946 |
let x52: u8 = ((x50 >> 25) as u8); |
| 947 |
let x53: u32 = (x19 + (x52 as u32)); |
| 948 |
let x54: u32 = (x18 + x53); |
| 949 |
let x55: u32 = (x17 + x54); |
| 950 |
let x56: u32 = (x15 + (x16 as u32)); |
| 951 |
let x57: u32 = (x14 + x56); |
| 952 |
let x58: u32 = (x13 + x57); |
| 953 |
let x59: u32 = (x58 & 0x1ffffff); |
| 954 |
let x60: u8 = ((x58 >> 25) as u8); |
| 955 |
let x61: u32 = (x12 + (x60 as u32)); |
| 956 |
let x62: u32 = (x11 + x61); |
| 957 |
let x63: u32 = (x10 + x62); |
| 958 |
let x64: u32 = (x63 & 0x3ffffff); |
| 959 |
let x65: u8 = ((x63 >> 26) as u8); |
| 960 |
let x66: u32 = (x9 + (x65 as u32)); |
| 961 |
let x67: u32 = (x8 + x66); |
| 962 |
let x68: u32 = (x7 + x67); |
| 963 |
let x69: u32 = (x68 & 0x1ffffff); |
| 964 |
let x70: u8 = ((x68 >> 25) as u8); |
| 965 |
let x71: u32 = (x6 + (x70 as u32)); |
| 966 |
let x72: u32 = (x5 + x71); |
| 967 |
let x73: u32 = (x4 + x72); |
| 968 |
let x74: u32 = (x73 & 0x3ffffff); |
| 969 |
let x75: u8 = ((x73 >> 26) as u8); |
| 970 |
let x76: u32 = (x3 + (x75 as u32)); |
| 971 |
let x77: u32 = (x2 + x76); |
| 972 |
let x78: u32 = (x1 + x77); |
| 973 |
*IndexConst(&mut out1).index_mut(0) = x36; |
| 974 |
*IndexConst(&mut out1).index_mut(1) = x41; |
| 975 |
*IndexConst(&mut out1).index_mut(2) = x46; |
| 976 |
*IndexConst(&mut out1).index_mut(3) = x51; |
| 977 |
*IndexConst(&mut out1).index_mut(4) = x55; |
| 978 |
*IndexConst(&mut out1).index_mut(5) = x59; |
| 979 |
*IndexConst(&mut out1).index_mut(6) = x64; |
| 980 |
*IndexConst(&mut out1).index_mut(7) = x69; |
| 981 |
*IndexConst(&mut out1).index_mut(8) = x74; |
| 982 |
*IndexConst(&mut out1).index_mut(9) = x78; |
| 983 |
} |
| 984 |
|
| 985 |
|
| 986 |
|
| 987 |
|
| 988 |
|
| 989 |
|
| 990 |
#[inline] |
| 991 |
pub const fn fiat_25519_relax(mut out1: &mut fiat_25519_loose_field_element, arg1: &fiat_25519_tight_field_element) { |
| 992 |
let x1: u32 = (*IndexConst(arg1).index(0)); |
| 993 |
let x2: u32 = (*IndexConst(arg1).index(1)); |
| 994 |
let x3: u32 = (*IndexConst(arg1).index(2)); |
| 995 |
let x4: u32 = (*IndexConst(arg1).index(3)); |
| 996 |
let x5: u32 = (*IndexConst(arg1).index(4)); |
| 997 |
let x6: u32 = (*IndexConst(arg1).index(5)); |
| 998 |
let x7: u32 = (*IndexConst(arg1).index(6)); |
| 999 |
let x8: u32 = (*IndexConst(arg1).index(7)); |
| 1000 |
let x9: u32 = (*IndexConst(arg1).index(8)); |
| 1001 |
let x10: u32 = (*IndexConst(arg1).index(9)); |
| 1002 |
*IndexConst(&mut out1).index_mut(0) = x1; |
| 1003 |
*IndexConst(&mut out1).index_mut(1) = x2; |
| 1004 |
*IndexConst(&mut out1).index_mut(2) = x3; |
| 1005 |
*IndexConst(&mut out1).index_mut(3) = x4; |
| 1006 |
*IndexConst(&mut out1).index_mut(4) = x5; |
| 1007 |
*IndexConst(&mut out1).index_mut(5) = x6; |
| 1008 |
*IndexConst(&mut out1).index_mut(6) = x7; |
| 1009 |
*IndexConst(&mut out1).index_mut(7) = x8; |
| 1010 |
*IndexConst(&mut out1).index_mut(8) = x9; |
| 1011 |
*IndexConst(&mut out1).index_mut(9) = x10; |
| 1012 |
} |
| 1013 |
|
| 1014 |
|
| 1015 |
|
| 1016 |
|
| 1017 |
|
| 1018 |
|
| 1019 |
#[inline] |
| 1020 |
pub const fn fiat_25519_carry_scmul_121666(mut out1: &mut fiat_25519_tight_field_element, arg1: &fiat_25519_loose_field_element) { |
| 1021 |
let x1: u64 = ((0x1db42 as u64) * ((*IndexConst(arg1).index(9)) as u64)); |
| 1022 |
let x2: u64 = ((0x1db42 as u64) * ((*IndexConst(arg1).index(8)) as u64)); |
| 1023 |
let x3: u64 = ((0x1db42 as u64) * ((*IndexConst(arg1).index(7)) as u64)); |
| 1024 |
let x4: u64 = ((0x1db42 as u64) * ((*IndexConst(arg1).index(6)) as u64)); |
| 1025 |
let x5: u64 = ((0x1db42 as u64) * ((*IndexConst(arg1).index(5)) as u64)); |
| 1026 |
let x6: u64 = ((0x1db42 as u64) * ((*IndexConst(arg1).index(4)) as u64)); |
| 1027 |
let x7: u64 = ((0x1db42 as u64) * ((*IndexConst(arg1).index(3)) as u64)); |
| 1028 |
let x8: u64 = ((0x1db42 as u64) * ((*IndexConst(arg1).index(2)) as u64)); |
| 1029 |
let x9: u64 = ((0x1db42 as u64) * ((*IndexConst(arg1).index(1)) as u64)); |
| 1030 |
let x10: u64 = ((0x1db42 as u64) * ((*IndexConst(arg1).index(0)) as u64)); |
| 1031 |
let x11: u32 = ((x10 >> 26) as u32); |
| 1032 |
let x12: u32 = ((x10 & (0x3ffffff as u64)) as u32); |
| 1033 |
let x13: u64 = ((x11 as u64) + x9); |
| 1034 |
let x14: u32 = ((x13 >> 25) as u32); |
| 1035 |
let x15: u32 = ((x13 & (0x1ffffff as u64)) as u32); |
| 1036 |
let x16: u64 = ((x14 as u64) + x8); |
| 1037 |
let x17: u32 = ((x16 >> 26) as u32); |
| 1038 |
let x18: u32 = ((x16 & (0x3ffffff as u64)) as u32); |
| 1039 |
let x19: u64 = ((x17 as u64) + x7); |
| 1040 |
let x20: u32 = ((x19 >> 25) as u32); |
| 1041 |
let x21: u32 = ((x19 & (0x1ffffff as u64)) as u32); |
| 1042 |
let x22: u64 = ((x20 as u64) + x6); |
| 1043 |
let x23: u32 = ((x22 >> 26) as u32); |
| 1044 |
let x24: u32 = ((x22 & (0x3ffffff as u64)) as u32); |
| 1045 |
let x25: u64 = ((x23 as u64) + x5); |
| 1046 |
let x26: u32 = ((x25 >> 25) as u32); |
| 1047 |
let x27: u32 = ((x25 & (0x1ffffff as u64)) as u32); |
| 1048 |
let x28: u64 = ((x26 as u64) + x4); |
| 1049 |
let x29: u32 = ((x28 >> 26) as u32); |
| 1050 |
let x30: u32 = ((x28 & (0x3ffffff as u64)) as u32); |
| 1051 |
let x31: u64 = ((x29 as u64) + x3); |
| 1052 |
let x32: u32 = ((x31 >> 25) as u32); |
| 1053 |
let x33: u32 = ((x31 & (0x1ffffff as u64)) as u32); |
| 1054 |
let x34: u64 = ((x32 as u64) + x2); |
| 1055 |
let x35: u32 = ((x34 >> 26) as u32); |
| 1056 |
let x36: u32 = ((x34 & (0x3ffffff as u64)) as u32); |
| 1057 |
let x37: u64 = ((x35 as u64) + x1); |
| 1058 |
let x38: u32 = ((x37 >> 25) as u32); |
| 1059 |
let x39: u32 = ((x37 & (0x1ffffff as u64)) as u32); |
| 1060 |
let x40: u32 = (x38 * 0x13); |
| 1061 |
let x41: u32 = (x12 + x40); |
| 1062 |
let x42: fiat_25519_u1 = ((x41 >> 26) as fiat_25519_u1); |
| 1063 |
let x43: u32 = (x41 & 0x3ffffff); |
| 1064 |
let x44: u32 = ((x42 as u32) + x15); |
| 1065 |
let x45: fiat_25519_u1 = ((x44 >> 25) as fiat_25519_u1); |
| 1066 |
let x46: u32 = (x44 & 0x1ffffff); |
| 1067 |
let x47: u32 = ((x45 as u32) + x18); |
| 1068 |
*IndexConst(&mut out1).index_mut(0) = x43; |
| 1069 |
*IndexConst(&mut out1).index_mut(1) = x46; |
| 1070 |
*IndexConst(&mut out1).index_mut(2) = x47; |
| 1071 |
*IndexConst(&mut out1).index_mut(3) = x21; |
| 1072 |
*IndexConst(&mut out1).index_mut(4) = x24; |
| 1073 |
*IndexConst(&mut out1).index_mut(5) = x27; |
| 1074 |
*IndexConst(&mut out1).index_mut(6) = x30; |
| 1075 |
*IndexConst(&mut out1).index_mut(7) = x33; |
| 1076 |
*IndexConst(&mut out1).index_mut(8) = x36; |
| 1077 |
*IndexConst(&mut out1).index_mut(9) = x39; |
| 1078 |
} |