diff options
Diffstat (limited to 'vendor/fiat-crypto/src/curve25519_solinas_64.rs')
-rw-r--r-- | vendor/fiat-crypto/src/curve25519_solinas_64.rs | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/vendor/fiat-crypto/src/curve25519_solinas_64.rs b/vendor/fiat-crypto/src/curve25519_solinas_64.rs index edda9bb43..1c9fa172c 100644 --- a/vendor/fiat-crypto/src/curve25519_solinas_64.rs +++ b/vendor/fiat-crypto/src/curve25519_solinas_64.rs @@ -10,9 +10,13 @@ #![allow(unused_parens)] #![allow(non_camel_case_types)] +/** fiat_curve25519_solinas_u1 represents values of 1 bits, stored in one byte. */ pub type fiat_curve25519_solinas_u1 = u8; +/** fiat_curve25519_solinas_i1 represents values of 1 bits, stored in one byte. */ pub type fiat_curve25519_solinas_i1 = i8; +/** fiat_curve25519_solinas_u2 represents values of 2 bits, stored in one byte. */ pub type fiat_curve25519_solinas_u2 = u8; +/** fiat_curve25519_solinas_i2 represents values of 2 bits, stored in one byte. */ pub type fiat_curve25519_solinas_i2 = i8; @@ -30,7 +34,7 @@ pub type fiat_curve25519_solinas_i2 = i8; /// out1: [0x0 ~> 0xffffffffffffffff] /// out2: [0x0 ~> 0x1] #[inline] -pub fn fiat_curve25519_solinas_addcarryx_u64(out1: &mut u64, out2: &mut fiat_curve25519_solinas_u1, arg1: fiat_curve25519_solinas_u1, arg2: u64, arg3: u64) -> () { +pub fn fiat_curve25519_solinas_addcarryx_u64(out1: &mut u64, out2: &mut fiat_curve25519_solinas_u1, arg1: fiat_curve25519_solinas_u1, arg2: u64, arg3: u64) { let x1: u128 = (((arg1 as u128) + (arg2 as u128)) + (arg3 as u128)); let x2: u64 = ((x1 & (0xffffffffffffffff as u128)) as u64); let x3: fiat_curve25519_solinas_u1 = ((x1 >> 64) as fiat_curve25519_solinas_u1); @@ -52,7 +56,7 @@ pub fn fiat_curve25519_solinas_addcarryx_u64(out1: &mut u64, out2: &mut fiat_cur /// out1: [0x0 ~> 0xffffffffffffffff] /// out2: [0x0 ~> 0x1] #[inline] -pub fn fiat_curve25519_solinas_subborrowx_u64(out1: &mut u64, out2: &mut fiat_curve25519_solinas_u1, arg1: fiat_curve25519_solinas_u1, arg2: u64, arg3: u64) -> () { +pub fn fiat_curve25519_solinas_subborrowx_u64(out1: &mut u64, out2: &mut fiat_curve25519_solinas_u1, arg1: fiat_curve25519_solinas_u1, arg2: u64, arg3: u64) { let x1: i128 = (((arg2 as i128) - (arg1 as i128)) - (arg3 as i128)); let x2: fiat_curve25519_solinas_i1 = ((x1 >> 64) as fiat_curve25519_solinas_i1); let x3: u64 = ((x1 & (0xffffffffffffffff as i128)) as u64); @@ -73,7 +77,7 @@ pub fn fiat_curve25519_solinas_subborrowx_u64(out1: &mut u64, out2: &mut fiat_cu /// out1: [0x0 ~> 0xffffffffffffffff] /// out2: [0x0 ~> 0xffffffffffffffff] #[inline] -pub fn fiat_curve25519_solinas_mulx_u64(out1: &mut u64, out2: &mut u64, arg1: u64, arg2: u64) -> () { +pub fn fiat_curve25519_solinas_mulx_u64(out1: &mut u64, out2: &mut u64, arg1: u64, arg2: u64) { let x1: u128 = ((arg1 as u128) * (arg2 as u128)); let x2: u64 = ((x1 & (0xffffffffffffffff as u128)) as u64); let x3: u64 = ((x1 >> 64) as u64); @@ -93,7 +97,7 @@ pub fn fiat_curve25519_solinas_mulx_u64(out1: &mut u64, out2: &mut u64, arg1: u6 /// Output Bounds: /// out1: [0x0 ~> 0xffffffffffffffff] #[inline] -pub fn fiat_curve25519_solinas_cmovznz_u64(out1: &mut u64, arg1: fiat_curve25519_solinas_u1, arg2: u64, arg3: u64) -> () { +pub fn fiat_curve25519_solinas_cmovznz_u64(out1: &mut u64, arg1: fiat_curve25519_solinas_u1, arg2: u64, arg3: u64) { let x1: fiat_curve25519_solinas_u1 = (!(!arg1)); let x2: u64 = ((((((0x0 as fiat_curve25519_solinas_i2) - (x1 as fiat_curve25519_solinas_i2)) as fiat_curve25519_solinas_i1) as i128) & (0xffffffffffffffff as i128)) as u64); let x3: u64 = ((x2 & arg3) | ((!x2) & arg2)); @@ -111,7 +115,7 @@ pub fn fiat_curve25519_solinas_cmovznz_u64(out1: &mut u64, arg1: fiat_curve25519 /// Output Bounds: /// out1: [[0x0 ~> 0xffffffffffffffff], [0x0 ~> 0xffffffffffffffff], [0x0 ~> 0xffffffffffffffff], [0x0 ~> 0xffffffffffffffff]] #[inline] -pub fn fiat_curve25519_solinas_mul(out1: &mut [u64; 4], arg1: &[u64; 4], arg2: &[u64; 4]) -> () { +pub fn fiat_curve25519_solinas_mul(out1: &mut [u64; 4], arg1: &[u64; 4], arg2: &[u64; 4]) { let mut x1: u64 = 0; let mut x2: u64 = 0; fiat_curve25519_solinas_mulx_u64(&mut x1, &mut x2, (arg1[3]), (arg2[3])); @@ -324,7 +328,7 @@ pub fn fiat_curve25519_solinas_mul(out1: &mut [u64; 4], arg1: &[u64; 4], arg2: & /// Output Bounds: /// out1: [[0x0 ~> 0xffffffffffffffff], [0x0 ~> 0xffffffffffffffff], [0x0 ~> 0xffffffffffffffff], [0x0 ~> 0xffffffffffffffff]] #[inline] -pub fn fiat_curve25519_solinas_square(out1: &mut [u64; 4], arg1: &[u64; 4]) -> () { +pub fn fiat_curve25519_solinas_square(out1: &mut [u64; 4], arg1: &[u64; 4]) { let mut x1: u64 = 0; let mut x2: u64 = 0; fiat_curve25519_solinas_mulx_u64(&mut x1, &mut x2, (arg1[0]), (arg1[3])); |