github.com/cloudflare/circl@v1.5.0/dh/sidh/internal/p751/arith_decl.go (about)

     1  // Code generated by go generate; DO NOT EDIT.
     2  // This file was generated by robots.
     3  
     4  //go:build (amd64 && !purego) || (arm64 && !purego)
     5  // +build amd64,!purego arm64,!purego
     6  
     7  package p751
     8  
     9  import (
    10  	. "github.com/cloudflare/circl/dh/sidh/internal/common"
    11  )
    12  
    13  // If choice = 0, leave x unchanged. If choice = 1, sets x to y.
    14  // If choice is neither 0 nor 1 then behaviour is undefined.
    15  // This function executes in constant time.
    16  //
    17  //go:noescape
    18  func cmovP751(x, y *Fp, choice uint8)
    19  
    20  // If choice = 0, leave x,y unchanged. If choice = 1, set x,y = y,x.
    21  // If choice is neither 0 nor 1 then behaviour is undefined.
    22  // This function executes in constant time.
    23  //
    24  //go:noescape
    25  func cswapP751(x, y *Fp, choice uint8)
    26  
    27  // Compute z = x + y (mod p).
    28  //
    29  //go:noescape
    30  func addP751(z, x, y *Fp)
    31  
    32  // Compute z = x - y (mod p).
    33  //
    34  //go:noescape
    35  func subP751(z, x, y *Fp)
    36  
    37  // Compute z = x + y, without reducing mod p.
    38  //
    39  //go:noescape
    40  func adlP751(z, x, y *FpX2)
    41  
    42  // Compute z = x - y, without reducing mod p.
    43  //
    44  //go:noescape
    45  func sulP751(z, x, y *FpX2)
    46  
    47  // Reduce a field element in [0, 2*p) to one in [0,p).
    48  //
    49  //go:noescape
    50  func modP751(x *Fp)
    51  
    52  // Computes z = x * y.
    53  //
    54  //go:noescape
    55  func mulP751(z *FpX2, x, y *Fp)
    56  
    57  // Computes the Montgomery reduction z = x R^{-1} (mod 2*p). On return value
    58  // of x may be changed. z=x not allowed.
    59  //
    60  //go:noescape
    61  func rdcP751(z *Fp, x *FpX2)