github.com/shogo82148/std@v1.22.1-0.20240327122250-4e474527810c/crypto/internal/nistec/fiat/p224_fiat64.go (about) 1 // Code generated by Fiat Cryptography. DO NOT EDIT. 2 // 3 // Autogenerated: word_by_word_montgomery --lang Go --no-wide-int --cmovznz-by-mul --relax-primitive-carry-to-bitwidth 32,64 --internal-static --public-function-case camelCase --public-type-case camelCase --private-function-case camelCase --private-type-case camelCase --doc-text-before-function-name '' --doc-newline-before-package-declaration --doc-prepend-header 'Code generated by Fiat Cryptography. DO NOT EDIT.' --package-name fiat --no-prefix-fiat p224 64 '2^224 - 2^96 + 1' mul square add sub one from_montgomery to_montgomery selectznz to_bytes from_bytes 4 // 5 // curve description: p224 6 // 7 // machine_wordsize = 64 (from "64") 8 // 9 // requested operations: mul, square, add, sub, one, from_montgomery, to_montgomery, selectznz, to_bytes, from_bytes 10 // 11 // m = 0xffffffffffffffffffffffffffffffff000000000000000000000001 (from "2^224 - 2^96 + 1") 12 // 13 // 14 // 15 // NOTE: In addition to the bounds specified above each function, all 16 // 17 // functions synthesized for this Montgomery arithmetic require the 18 // 19 // input to be strictly less than the prime modulus (m), and also 20 // 21 // require the input to be in the unique saturated representation. 22 // 23 // All functions also ensure that these two properties are true of 24 // 25 // return values. 26 // 27 // 28 // 29 // Computed values: 30 // 31 // eval z = z[0] + (z[1] << 64) + (z[2] << 128) + (z[3] << 192) 32 // 33 // 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) 34 // 35 // twos_complement_eval z = let x1 := z[0] + (z[1] << 64) + (z[2] << 128) + (z[3] << 192) in 36 // 37 // if x1 & (2^256-1) < 2^255 then x1 & (2^256-1) else (x1 & (2^256-1)) - 2^256 38 39 package fiat