- 4D75A96582C1897F5A85DA8983033487653B0B0678D88BC3C7F895FCBB4A0A63B9019426D119CB3EDDF959856959CBBA295BC1D46AE36B0C4B7F4A6F9E2A00A7
+ 7D2EE2B7147B289A76B8731543ADF6CC049B35350C031D1D11BBE0B1D475A879B483368B95C535AF0D10061626060F2CA1438F0AA15F198DA74B0B1F449183B2
ffa/libffa/fz_modex.ads
(2 . 7)(2 . 7)
1011 ------------------------------------------------------------------------------
1012 -- This file is part of 'Finite Field Arithmetic', aka 'FFA'. --
1013 -- --
1014 -- (C) 2017 Stanislav Datskovskiy ( www.loper-os.org ) --
1015 -- (C) 2018 Stanislav Datskovskiy ( www.loper-os.org ) --
1016 -- http://wot.deedbot.org/17215D118B7239507FAFED98B98228A001ABFFC7.html --
1017 -- --
1018 -- You do not have, nor can you ever acquire the right to use, copy or --
(24 . 7)(24 . 7)
1020
1021 pragma Pure;
1022
1023 -- Modular Multiply: Product := X*Y mod Modulus
1024 -- (Conventional) Modular Multiply: Product := X*Y mod Modulus
1025 procedure FZ_Mod_Mul(X : in FZ;
1026 Y : in FZ;
1027 Modulus : in FZ;
(33 . 14)(33 . 14)
1029 Modulus'Length = X'Length and
1030 Product'Length = Modulus'Length;
1031
1032 -- Modular Square: Product := X*X mod Modulus
1033 -- (Conventional) Modular Squaring: Product := X*X mod Modulus
1034 procedure FZ_Mod_Sqr(X : in FZ;
1035 Modulus : in FZ;
1036 Product : out FZ)
1037 with Pre => Modulus'Length = X'Length and
1038 Product'Length = Modulus'Length;
1039
1040 -- Modular Exponent: Result := Base^Exponent mod Modulus
1041 -- (Barrettronic) Modular Exponent: Result := Base^Exponent mod Modulus
1042 procedure FZ_Mod_Exp(Base : in FZ;
1043 Exponent : in FZ;
1044 Modulus : in FZ;