Module fiat_crypto::p521_32
source · Expand description
Autogenerated: ‘src/ExtractionOCaml/unsaturated_solinas’ –lang Rust –inline p521 32 ‘(auto)’ ‘2^521 - 1’ carry_mul carry_square carry add sub opp selectznz to_bytes from_bytes relax curve description: p521 machine_wordsize = 32 (from “32”) requested operations: carry_mul, carry_square, carry, add, sub, opp, selectznz, to_bytes, from_bytes, relax n = 19 (from “(auto)”) s-c = 2^521 - [(1, 1)] (from “2^521 - 1”) tight_bounds_multiplier = 1 (from “”)
Computed values: carry_chain = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 0, 1] eval z = z[0] + (z[1] << 28) + (z[2] << 55) + (z[3] << 83) + (z[4] << 110) + (z[5] << 138) + (z[6] << 165) + (z[7] << 192) + (z[8] << 220) + (z[9] << 247) + (z[10] << 0x113) + (z[11] << 0x12e) + (z[12] << 0x14a) + (z[13] << 0x165) + (z[14] << 0x180) + (z[15] << 0x19c) + (z[16] << 0x1b7) + (z[17] << 0x1d3) + (z[18] << 0x1ee) bytes_eval z = z[0] + (z[1] << 8) + (z[2] << 16) + (z[3] << 24) + (z[4] << 32) + (z[5] << 40) + (z[6] << 48) + (z[7] << 56) + (z[8] << 64) + (z[9] << 72) + (z[10] << 80) + (z[11] << 88) + (z[12] << 96) + (z[13] << 104) + (z[14] << 112) + (z[15] << 120) + (z[16] << 128) + (z[17] << 136) + (z[18] << 144) + (z[19] << 152) + (z[20] << 160) + (z[21] << 168) + (z[22] << 176) + (z[23] << 184) + (z[24] << 192) + (z[25] << 200) + (z[26] << 208) + (z[27] << 216) + (z[28] << 224) + (z[29] << 232) + (z[30] << 240) + (z[31] << 248) + (z[32] << 256) + (z[33] << 0x108) + (z[34] << 0x110) + (z[35] << 0x118) + (z[36] << 0x120) + (z[37] << 0x128) + (z[38] << 0x130) + (z[39] << 0x138) + (z[40] << 0x140) + (z[41] << 0x148) + (z[42] << 0x150) + (z[43] << 0x158) + (z[44] << 0x160) + (z[45] << 0x168) + (z[46] << 0x170) + (z[47] << 0x178) + (z[48] << 0x180) + (z[49] << 0x188) + (z[50] << 0x190) + (z[51] << 0x198) + (z[52] << 0x1a0) + (z[53] << 0x1a8) + (z[54] << 0x1b0) + (z[55] << 0x1b8) + (z[56] << 0x1c0) + (z[57] << 0x1c8) + (z[58] << 0x1d0) + (z[59] << 0x1d8) + (z[60] << 0x1e0) + (z[61] << 0x1e8) + (z[62] << 0x1f0) + (z[63] << 0x1f8) + (z[64] << 2^9) + (z[65] << 0x208) balance = [0x1ffffffe, 0xffffffe, 0x1ffffffe, 0xffffffe, 0x1ffffffe, 0xffffffe, 0xffffffe, 0x1ffffffe, 0xffffffe, 0x1ffffffe, 0xffffffe, 0x1ffffffe, 0xffffffe, 0xffffffe, 0x1ffffffe, 0xffffffe, 0x1ffffffe, 0xffffffe, 0xffffffe]
Structs§
- The type fiat_p521_loose_field_element is a field element with loose bounds. Bounds: [[0x0 ~> 0x30000000], [0x0 ~> 0x18000000], [0x0 ~> 0x30000000], [0x0 ~> 0x18000000], [0x0 ~> 0x30000000], [0x0 ~> 0x18000000], [0x0 ~> 0x18000000], [0x0 ~> 0x30000000], [0x0 ~> 0x18000000], [0x0 ~> 0x30000000], [0x0 ~> 0x18000000], [0x0 ~> 0x30000000], [0x0 ~> 0x18000000], [0x0 ~> 0x18000000], [0x0 ~> 0x30000000], [0x0 ~> 0x18000000], [0x0 ~> 0x30000000], [0x0 ~> 0x18000000], [0x0 ~> 0x18000000]]
- The type fiat_p521_tight_field_element is a field element with tight bounds. Bounds: [[0x0 ~> 0x10000000], [0x0 ~> 0x8000000], [0x0 ~> 0x10000000], [0x0 ~> 0x8000000], [0x0 ~> 0x10000000], [0x0 ~> 0x8000000], [0x0 ~> 0x8000000], [0x0 ~> 0x10000000], [0x0 ~> 0x8000000], [0x0 ~> 0x10000000], [0x0 ~> 0x8000000], [0x0 ~> 0x10000000], [0x0 ~> 0x8000000], [0x0 ~> 0x8000000], [0x0 ~> 0x10000000], [0x0 ~> 0x8000000], [0x0 ~> 0x10000000], [0x0 ~> 0x8000000], [0x0 ~> 0x8000000]]
Functions§
- The function fiat_p521_add adds two field elements.
- The function fiat_p521_addcarryx_u27 is an addition with carry.
- The function fiat_p521_addcarryx_u28 is an addition with carry.
- The function fiat_p521_carry reduces a field element.
- The function fiat_p521_carry_mul multiplies two field elements and reduces the result.
- The function fiat_p521_carry_square squares a field element and reduces the result.
- The function fiat_p521_cmovznz_u32 is a single-word conditional move.
- The function fiat_p521_from_bytes deserializes a field element from bytes in little-endian order.
- The function fiat_p521_opp negates a field element.
- The function fiat_p521_relax is the identity function converting from tight field elements to loose field elements.
- The function fiat_p521_selectznz is a multi-limb conditional select.
- The function fiat_p521_sub subtracts two field elements.
- The function fiat_p521_subborrowx_u27 is a subtraction with borrow.
- The function fiat_p521_subborrowx_u28 is a subtraction with borrow.
- The function fiat_p521_to_bytes serializes a field element to bytes in little-endian order.
Type Aliases§
- fiat_p521_i1 represents values of 1 bits, stored in one byte.
- fiat_p521_i2 represents values of 2 bits, stored in one byte.
- fiat_p521_u1 represents values of 1 bits, stored in one byte.
- fiat_p521_u2 represents values of 2 bits, stored in one byte.