Unbalanced digit sets and the closest choice strategy for minimal weight integer representations
An algorithm is presented that produces an optimal radix-2 representation of an input integer n using digits from the set D(l,u) = {a is an element of Z : l  = 1. The algorithm works by scanning the digits of the binary representation of n from left-to-right (i.e., from most-significant to least-significant); further, the algorithm is of the online variety in that it needs to scan only a bounded number of input digits before giving an output digit (i.e., the algorithm produces output before scanning the entire input). The output representation is optimal in the sense that, of all radix-2 representations of n with digits from D(l,u), it has as few nonzero digits as possible (i.e., it has minimal weight). Such representations are useful in the efficient implementation of elliptic curve cryptography. The strategy the algorithm utilizes is to choose an integer of the form d2(i), where d is an element of D(l,u), that is closest to n with respect to a particular distance function. It is possible to choose values of l and u so that the set D(l,u) is unbalanced in the sense that it contains more negative digits than positive digits, or more positive digits than negative digits. Our distance function takes the possible unbalanced nature of D(l,u) into account.
efficient implementation elliptic curve cryptography digital expansion online algorithm