MOF is a new canonical representation of signed binary strings, which can be computed not only right-to-left but also left-to-right.
| Contents: |
| Motivation: |
The most common method for computing exponentiation of random elements in Abelian groups are sliding window schemes, which enhance the efficiency of the binary method at the expense of some precomputation. In groups where inversion is easy (e.g. elliptic curves), signed representations of the exponent are meaningful because they decrease the amount of required precomputation. The asymptotic best signed method is wNAF, because it minimizes the precomputation effort whilst the non-zero density is nearly optimal. Unfortunately, wNAF can be computed only from the least significant bit, i.e. right-to-left. However, in connection with memory constraint devices left-to-right recoding schemes are by far more valuable.
In representation an integer d is expressed as d=sum(di 2i) where di is in T. For normal binary
representations T={0,1} which causes an unique representation. If the
set T is larger, i.e. we allow negative digits, one number can be
expressed a few times.
| decimal | binary | T= | ||||||||||
| 181 | = | 1 | 0 | 1 | 1 | 0 | 1 | 0 | 1 | {0,1} | ||
| = | 1 | -1 | 1 | 0 | -1 | 1 | -1 | 1 | -1 | {-1,0,1} | ||
| = | 1 | 0 | -1 | 0 | -1 | 0 | 1 | 0 | 1 | {-1,0,1} | ||
Goals
| MOF: |
MOF Definition
The mutual opposite form (MOF) is an signed binary string that satisfies
the following properties:
Example
Some zero bits are inserted between non-zero bits that have a mutual
opposite sign. An example of MOF is 0 1 0 0 -1 0 1 0 0 0 -1 0 0 1 -1 0.
Converting Binary String to MOF
We show a simple and flexible conversion from n-bit binary string
to (n+1)-bit MOF.
The crucial point is the following observation. The n-bit binary
string d can be converted to a signed binary string by computing
md = 2d - d, where - stands for a bitwise subtraction.
Indeed, we convert d as follows:
| 2d = | dn-1 | dn-2 | ... | di-1 | ... | d1 | d0 | |
| -d = | dn-1 | ... | di | ... | d2 | d1 | d0 | |
| md = | dn-1 | dn-2-dn-1 | ... | di-1-di | ... | d1-d2 | d0-d1 | -d0 |
Algorithm: Left-to-Right Gerneration fom Binary to MOF
|
Algorithm: Right-to-Left Gerneration fom Binary to MOF
|
Theorem
Every non-negative integer d has a representation as wMOF, which is
unique except for the number of leading zeros.
| wNAF |
wNAF Definition
A sequence of signed digits is called wNAF iff the following three
properties hold:
Algorithm: Generation of wNAF
|
The algorithm generates wNAF from the least significant bit, that is right-to-left generation again. The average density of non-zero bits is asymptotically 1/(w+1) for n -> infty, and the digit set equals T={+-1, +-3, ..., +-(2w-1-1)} which seems to be minimal.
It seems impossible to compute wNAF left-to-right. That's the motivation to look for other solutions.
| Window Methods on MOF: |
In this section we show how to decrease the non-zero density of MOF by
applying window methods on it. First we consider the right-to-left
width w sliding window method which surprisingly yields the familiar
wNAF. In contrast to previously known generation methods, the new
one is carry-free, i.e. in each step the
knowledge of at most w+1 consecutive input bits is sufficient.
Then we define the dual new class wMOF as the result of the analogue
left-to-right width w sliding window method on MOF. This conversion
leads to the first left-to-right signed recoding scheme for general width w.
The coherency is shown on the following picture:

Right-to-Left Case: wNAF
In order to describe the proposed scheme, we need the conversion
table for width w. First, we define the conversions for MOF windows of length
l, such that the first and the last bit is non-zero:


Algorithm: Right-to-Left Generation from Binary to wNAF
|
Left-to-Right Case: wMOF
In order to describe the proposed scheme, we need the conversion
table for width w. The conversions for MOF windows of length
l, such that the first and the last bit is non-zero, are defined in
exactly the same way as in the right-to-left case (see the table above and reflect
the assignments). To
generate the complete table for width w, we have to consider all
conversions of length l=2, 3, ..., w as before. The only
difference is that if l < w holds, the window is
filled with closing zeros instead of leading ones.
As an example, we construct the conversion table
Table4SW for width 4:

Algorithm: Left-to-Right Generation from Binary to wMOF
|
Theorem
The average non-zero density of wMOF is asymptotically 1/(w+1) for n
-> infty.
| Compute MOF-representations for the random numbers d (0 < d < 1024 ): |
This is a wMOF converter which compute MOF-representations for the random numbers d (0 < d < 1024 ) and output the answer. After that a left-to-right or right-to-left sliding window method can be applied.