FastBConv (Β§D-5.1) converts an input value βs base moduli from , but generates a noise equivalent to where integer . If we use FastBConv with SmallMont (Β§D-5.7), we can reduce the generated noise from to where . In this subsection, we introduce FastBConvEx, an algorithm for an exact fast base conversion that can eliminate the entire noise. However, using FastBConvEx has a restriction that the input value should be relatively much smaller than its modulus. This is different from the case of using FastBConv with SmallMont which has no restriction on the input (i.e., can be any value within its modulus range). FastBConvEx is designed as follows:
SummaryΒ D-5.8 Fast Exact Base Conversion: FastBConvEx
Input:
Requirement: The size of should be , where , and (i.e., and are the maximum and minimum possible values of ).
# The constraint that implies that the input should be much smaller than its modulus (i.e., )
Main Steps
We will prove why .
Proof.
# where integer
# since by definition
# since by definition
# by adding
# step 1 proved
# because (since , and )
# applying
# applying
# applying from proof step 2
Necessity of the Centered (i.e., Signed) Residue Representation: In the proof step 2, we treated . To remove the modulo reduction operation, the canonical (i.e., unsigned) residue representation is inappropriate, because if becomes negative, then the residue will underflow and have to be wrapped around, which requires a modulo reduction operation. To prevent the occurrence of both overflow and underflow cases, we need the centered (i.e., signed) residue representation.