(18 . 6)(18 . 7)
322 ------------------------------------------------------------------------------
323
324 with FZ_Type; use FZ_Type;
325 with FZ_Barr; use FZ_Barr;
326
327
328 package FZ_ModEx is
(40 . 6)(41 . 19)
330 with Pre => Modulus'Length = X'Length and
331 Product'Length = Modulus'Length;
332
333 -- (Barrettronic) Modular Squaring, using given Barrettoid
334 procedure FZ_Mod_Sqr_Barrett(X : in FZ;
335 Bar : in Barretoid;
336 Product : out FZ);
337 pragma Inline_Always(FZ_Mod_Sqr_Barrett);
338
339 -- Barrettronic Modular Exponent, using given Barrettoid
340 procedure FZ_Mod_Exp_Barrett(Base : in FZ;
341 Exponent : in FZ;
342 Bar : in Barretoid;
343 Result : out FZ);
344 pragma Inline_Always(FZ_Mod_Exp_Barrett);
345
346 -- (Barrettronic) Modular Exponent: Result := Base^Exponent mod Modulus
347 procedure FZ_Mod_Exp(Base : in FZ;
348 Exponent : in FZ;