raw
ffa_ch13_measure_...    1 ------------------------------------------------------------------------------
ffa_ch13_measure_... 2 ------------------------------------------------------------------------------
ffa_ch13_measure_... 3 -- This file is part of 'Finite Field Arithmetic', aka 'FFA'. --
ffa_ch13_measure_... 4 -- --
ffa_ch13_measure_... 5 -- (C) 2018 Stanislav Datskovskiy ( www.loper-os.org ) --
ffa_ch13_measure_... 6 -- http://wot.deedbot.org/17215D118B7239507FAFED98B98228A001ABFFC7.html --
ffa_ch13_measure_... 7 -- --
ffa_ch13_measure_... 8 -- You do not have, nor can you ever acquire the right to use, copy or --
ffa_ch13_measure_... 9 -- distribute this software ; Should you use this software for any purpose, --
ffa_ch13_measure_... 10 -- or copy and distribute it to anyone or in any manner, you are breaking --
ffa_ch13_measure_... 11 -- the laws of whatever soi-disant jurisdiction, and you promise to --
ffa_ch13_measure_... 12 -- continue doing so for the indefinite future. In any case, please --
ffa_ch13_measure_... 13 -- always : read and understand any software ; verify any PGP signatures --
ffa_ch13_measure_... 14 -- that you use - for any purpose. --
ffa_ch13_measure_... 15 -- --
ffa_ch13_measure_... 16 -- See also http://trilema.com/2015/a-new-software-licensing-paradigm . --
ffa_ch13_measure_... 17 ------------------------------------------------------------------------------
ffa_ch13_measure_... 18 ------------------------------------------------------------------------------
ffa_ch13_measure_... 19
ffa_ch13_measure_... 20 with Words; use Words;
ffa_ch13_measure_... 21 with FZ_Type; use FZ_Type;
ffa_ch13_measure_... 22
ffa_ch13_measure_... 23
ffa_ch13_measure_... 24 package FZ_QShft is
ffa_ch13_measure_... 25
ffa_ch13_measure_... 26 pragma Pure;
ffa_ch13_measure_... 27
ffa_ch13_measure_... 28 -- Constant-time subword shift, for where there is no barrel shifter
ffa_ch13_measure_... 29 procedure FZ_Quiet_ShiftRight_SubW_Soft(N : in FZ;
ffa_ch13_measure_... 30 ShiftedN : in out FZ;
ffa_ch13_measure_... 31 Count : in WBit_Index);
ffa_ch13_measure_... 32 pragma Inline_Always(FZ_Quiet_ShiftRight_SubW_Soft);
ffa_ch13_measure_... 33
ffa_ch13_measure_... 34 -- Constant-time subword shift, for where there is no barrel shifter
ffa_ch13_measure_... 35 procedure FZ_Quiet_ShiftLeft_SubW_Soft(N : in FZ;
ffa_ch13_measure_... 36 ShiftedN : in out FZ;
ffa_ch13_measure_... 37 Count : in WBit_Index);
ffa_ch13_measure_... 38 pragma Inline_Always(FZ_Quiet_ShiftLeft_SubW_Soft);
ffa_ch13_measure_... 39
ffa_ch13_measure_... 40 -- Constant-time arbitrary right-shift.
ffa_ch13_measure_... 41 procedure FZ_Quiet_ShiftRight(N : in FZ;
ffa_ch13_measure_... 42 ShiftedN : in out FZ;
ffa_ch13_measure_... 43 Count : in FZBit_Index);
ffa_ch13_measure_... 44 pragma Inline_Always(FZ_Quiet_ShiftRight);
ffa_ch13_measure_... 45
ffa_ch13_measure_... 46 -- Constant-time arbitrary left-shift.
ffa_ch13_measure_... 47 procedure FZ_Quiet_ShiftLeft(N : in FZ;
ffa_ch13_measure_... 48 ShiftedN : in out FZ;
ffa_ch13_measure_... 49 Count : in FZBit_Index);
ffa_ch13_measure_... 50 pragma Inline_Always(FZ_Quiet_ShiftLeft);
ffa_ch13_measure_... 51
ffa_ch13_measure_... 52 end FZ_QShft;