Macro gridiron::fp[][src]

macro_rules! fp {
    ($modname: ident, $classname: ident, $bits: tt, $limbs: tt, $prime: expr, $barrettmu: expr) => { ... };
}

Create an Fp type given the following parameters:

  • modname - the name of the module you want the Fp type in.
  • classname - the name of the Fp struct
  • bits - How many bits the prime is.
  • limbs - Number of limbs (ceil(bits/64))
  • prime - prime number in limbs, least significant digit first. (Note you can get this from sage using num.digits(2 ^ 64)).
  • barrett - barrett reduction for reducing values up to twice the number of prime bits (double limbs). This is floor(2^(64*numlimbs*2)/prime).