Hamming Weight of the Non-Adjacent-Form under Various Input - - PowerPoint PPT Presentation

hamming weight of the non adjacent form under various
SMART_READER_LITE
LIVE PREVIEW

Hamming Weight of the Non-Adjacent-Form under Various Input - - PowerPoint PPT Presentation

Signed Digit Expansions in Cryptography Given Input Weight Binary and NAF Weight as Random Vector Quasi-Power Theorem Hamming Weight of the Non-Adjacent-Form under Various Input Statistics and a Two-Dimensional Version of Hwangs


slide-1
SLIDE 1

Signed Digit Expansions in Cryptography Given Input Weight Binary and NAF Weight as Random Vector Quasi-Power Theorem

Hamming Weight of the Non-Adjacent-Form under Various Input Statistics and a Two-Dimensional Version of Hwang’s Quasi-Power-Theorem

Clemens Heuberger

Graz University of Technology, Austria partly based on joint work with

  • H. Prodinger, Stellenbosch University, South Africa

Supported by the Austrian Science Foundation , project S9606, that is part of the Austrian National Research Network “Analytic Combinatorics and Probabilistic Number Theory.”

Maresias, AofA 2008, April 16th, 2008

Clemens Heuberger Hamming Weight of the Non-Adjacent-Form

slide-2
SLIDE 2

Signed Digit Expansions in Cryptography Given Input Weight Binary and NAF Weight as Random Vector Quasi-Power Theorem Elliptic Curve Cryptography Signed Digit Expansions and Scalar Multiplication Non-Adjacent Form Other Input Statistics

Elliptic curve cryptography

Elliptic Curve E : y2 = x3 + ax2 + bx + c For P ∈ E and n ∈ Z, nP can be calculated easily.

P Q P + Q −P R 2R E

Clemens Heuberger Hamming Weight of the Non-Adjacent-Form

slide-3
SLIDE 3

Signed Digit Expansions in Cryptography Given Input Weight Binary and NAF Weight as Random Vector Quasi-Power Theorem Elliptic Curve Cryptography Signed Digit Expansions and Scalar Multiplication Non-Adjacent Form Other Input Statistics

Elliptic curve cryptography

Elliptic Curve E : y2 = x3 + ax2 + bx + c For P ∈ E and n ∈ Z, nP can be calculated easily. No efficient algorithm to calculate n from P and nP? Fast calculation of nP desirable!

P Q P + Q −P R 2R E

Clemens Heuberger Hamming Weight of the Non-Adjacent-Form

slide-4
SLIDE 4

Signed Digit Expansions in Cryptography Given Input Weight Binary and NAF Weight as Random Vector Quasi-Power Theorem Elliptic Curve Cryptography Signed Digit Expansions and Scalar Multiplication Non-Adjacent Form Other Input Statistics

Double-and-Add Algorithm

Calculating 27P via a doubling and adding scheme using the standard binary expansion of 27: 27 =(11011)2, 27P =2(2(2(2(P) + P) + 0) + P) + P.

Clemens Heuberger Hamming Weight of the Non-Adjacent-Form

slide-5
SLIDE 5

Signed Digit Expansions in Cryptography Given Input Weight Binary and NAF Weight as Random Vector Quasi-Power Theorem Elliptic Curve Cryptography Signed Digit Expansions and Scalar Multiplication Non-Adjacent Form Other Input Statistics

Double-and-Add Algorithm

Calculating 27P via a doubling and adding scheme using the standard binary expansion of 27: 27 =(11011)2, 27P =2(2(2(2(P) + P) + 0) + P) + P. Number of additions ∼ Hamming weight of the binary expansion (Number of nonzero digits)

Clemens Heuberger Hamming Weight of the Non-Adjacent-Form

slide-6
SLIDE 6

Signed Digit Expansions in Cryptography Given Input Weight Binary and NAF Weight as Random Vector Quasi-Power Theorem Elliptic Curve Cryptography Signed Digit Expansions and Scalar Multiplication Non-Adjacent Form Other Input Statistics

Double-and-Add Algorithm

Calculating 27P via a doubling and adding scheme using the standard binary expansion of 27: 27 =(11011)2, 27P =2(2(2(2(P) + P) + 0) + P) + P. Number of additions ∼ Hamming weight of the binary expansion (Number of nonzero digits) Number of multiplications ∼ length of the expansion

Clemens Heuberger Hamming Weight of the Non-Adjacent-Form

slide-7
SLIDE 7

Signed Digit Expansions in Cryptography Given Input Weight Binary and NAF Weight as Random Vector Quasi-Power Theorem Elliptic Curve Cryptography Signed Digit Expansions and Scalar Multiplication Non-Adjacent Form Other Input Statistics

Double, Add, and Subtract Algorithm

Subtraction is as cheap as addition! 27 =(100¯ 10¯ 1)2, 27P =2(2(2(2(2(P) + 0) + 0) − P) + 0) − P. (¯ 1 := −1)

P Q P + Q −P R 2R E

Clemens Heuberger Hamming Weight of the Non-Adjacent-Form

slide-8
SLIDE 8

Signed Digit Expansions in Cryptography Given Input Weight Binary and NAF Weight as Random Vector Quasi-Power Theorem Elliptic Curve Cryptography Signed Digit Expansions and Scalar Multiplication Non-Adjacent Form Other Input Statistics

Double, Add, and Subtract Algorithm

Subtraction is as cheap as addition! 27 =(100¯ 10¯ 1)2, 27P =2(2(2(2(2(P) + 0) + 0) − P) + 0) − P. (¯ 1 := −1) = ⇒ Use of signed digit expansions

P Q P + Q −P R 2R E

Clemens Heuberger Hamming Weight of the Non-Adjacent-Form

slide-9
SLIDE 9

Signed Digit Expansions in Cryptography Given Input Weight Binary and NAF Weight as Random Vector Quasi-Power Theorem Elliptic Curve Cryptography Signed Digit Expansions and Scalar Multiplication Non-Adjacent Form Other Input Statistics

Double, Add, and Subtract Algorithm

Subtraction is as cheap as addition! 27 =(100¯ 10¯ 1)2, 27P =2(2(2(2(2(P) + 0) + 0) − P) + 0) − P. (¯ 1 := −1) = ⇒ Use of signed digit expansions Number of additions/subtractions ∼ Hamming weight of the binary expansion

P Q P + Q −P R 2R E

Clemens Heuberger Hamming Weight of the Non-Adjacent-Form

slide-10
SLIDE 10

Signed Digit Expansions in Cryptography Given Input Weight Binary and NAF Weight as Random Vector Quasi-Power Theorem Elliptic Curve Cryptography Signed Digit Expansions and Scalar Multiplication Non-Adjacent Form Other Input Statistics

Double, Add, and Subtract Algorithm

Subtraction is as cheap as addition! 27 =(100¯ 10¯ 1)2, 27P =2(2(2(2(2(P) + 0) + 0) − P) + 0) − P. (¯ 1 := −1) = ⇒ Use of signed digit expansions Number of additions/subtractions ∼ Hamming weight of the binary expansion Number of multiplications ∼ length of the expansion

P Q P + Q −P R 2R E

Clemens Heuberger Hamming Weight of the Non-Adjacent-Form

slide-11
SLIDE 11

Signed Digit Expansions in Cryptography Given Input Weight Binary and NAF Weight as Random Vector Quasi-Power Theorem Elliptic Curve Cryptography Signed Digit Expansions and Scalar Multiplication Non-Adjacent Form Other Input Statistics

Double, Add, and Subtract Algorithm

Subtraction is as cheap as addition! 27 =(100¯ 10¯ 1)2, 27P =2(2(2(2(2(P) + 0) + 0) − P) + 0) − P. (¯ 1 := −1) = ⇒ Use of signed digit expansions Number of additions/subtractions ∼ Hamming weight of the binary expansion Number of multiplications ∼ length of the expansion There are (infinitely) many signed binary expansions of an integer (Redundancy)

P Q P + Q −P R 2R E

Clemens Heuberger Hamming Weight of the Non-Adjacent-Form

slide-12
SLIDE 12

Signed Digit Expansions in Cryptography Given Input Weight Binary and NAF Weight as Random Vector Quasi-Power Theorem Elliptic Curve Cryptography Signed Digit Expansions and Scalar Multiplication Non-Adjacent Form Other Input Statistics

Double, Add, and Subtract Algorithm

Subtraction is as cheap as addition! 27 =(100¯ 10¯ 1)2, 27P =2(2(2(2(2(P) + 0) + 0) − P) + 0) − P. (¯ 1 := −1) = ⇒ Use of signed digit expansions Number of additions/subtractions ∼ Hamming weight of the binary expansion Number of multiplications ∼ length of the expansion There are (infinitely) many signed binary expansions of an integer (Redundancy) = ⇒ find expansion of minimal Hamming weight.

P Q P + Q −P R 2R E

Clemens Heuberger Hamming Weight of the Non-Adjacent-Form

slide-13
SLIDE 13

Signed Digit Expansions in Cryptography Given Input Weight Binary and NAF Weight as Random Vector Quasi-Power Theorem Elliptic Curve Cryptography Signed Digit Expansions and Scalar Multiplication Non-Adjacent Form Other Input Statistics

Deriving a Low-Weight Representation

Take an integer n.

Clemens Heuberger Hamming Weight of the Non-Adjacent-Form

slide-14
SLIDE 14

Signed Digit Expansions in Cryptography Given Input Weight Binary and NAF Weight as Random Vector Quasi-Power Theorem Elliptic Curve Cryptography Signed Digit Expansions and Scalar Multiplication Non-Adjacent Form Other Input Statistics

Deriving a Low-Weight Representation

Take an integer n. If n is even, we have to take 0 as least significant digit and continue with n/2.

Clemens Heuberger Hamming Weight of the Non-Adjacent-Form

slide-15
SLIDE 15

Signed Digit Expansions in Cryptography Given Input Weight Binary and NAF Weight as Random Vector Quasi-Power Theorem Elliptic Curve Cryptography Signed Digit Expansions and Scalar Multiplication Non-Adjacent Form Other Input Statistics

Deriving a Low-Weight Representation

Take an integer n. If n is even, we have to take 0 as least significant digit and continue with n/2. If n ≡ 1 (mod 4), we take 1 as least significant digit and continue with (n − 1)/2. This is even and guarantees a zero in the next step.

Clemens Heuberger Hamming Weight of the Non-Adjacent-Form

slide-16
SLIDE 16

Signed Digit Expansions in Cryptography Given Input Weight Binary and NAF Weight as Random Vector Quasi-Power Theorem Elliptic Curve Cryptography Signed Digit Expansions and Scalar Multiplication Non-Adjacent Form Other Input Statistics

Deriving a Low-Weight Representation

Take an integer n. If n is even, we have to take 0 as least significant digit and continue with n/2. If n ≡ 1 (mod 4), we take 1 as least significant digit and continue with (n − 1)/2. This is even and guarantees a zero in the next step. If n ≡ 3 ≡ −1 (mod 4), we take −1 as least significant digit and continue with (n + 1)/2. This is even and guarantees a zero in the next step.

Clemens Heuberger Hamming Weight of the Non-Adjacent-Form

slide-17
SLIDE 17

Signed Digit Expansions in Cryptography Given Input Weight Binary and NAF Weight as Random Vector Quasi-Power Theorem Elliptic Curve Cryptography Signed Digit Expansions and Scalar Multiplication Non-Adjacent Form Other Input Statistics

Deriving a Low-Weight Representation

Take an integer n. If n is even, we have to take 0 as least significant digit and continue with n/2. If n ≡ 1 (mod 4), we take 1 as least significant digit and continue with (n − 1)/2. This is even and guarantees a zero in the next step. If n ≡ 3 ≡ −1 (mod 4), we take −1 as least significant digit and continue with (n + 1)/2. This is even and guarantees a zero in the next step. This procedure yields a zero after every non-zero, which should yield a low weight expansion.

Clemens Heuberger Hamming Weight of the Non-Adjacent-Form

slide-18
SLIDE 18

Signed Digit Expansions in Cryptography Given Input Weight Binary and NAF Weight as Random Vector Quasi-Power Theorem Elliptic Curve Cryptography Signed Digit Expansions and Scalar Multiplication Non-Adjacent Form Other Input Statistics

Deriving a Low-Weight Representation

Take an integer n. If n is even, we have to take 0 as least significant digit and continue with n/2. If n ≡ 1 (mod 4), we take 1 as least significant digit and continue with (n − 1)/2. This is even and guarantees a zero in the next step. If n ≡ 3 ≡ −1 (mod 4), we take −1 as least significant digit and continue with (n + 1)/2. This is even and guarantees a zero in the next step. This procedure yields a zero after every non-zero, which should yield a low weight expansion. There are no adjacent non-zeros.

Clemens Heuberger Hamming Weight of the Non-Adjacent-Form

slide-19
SLIDE 19

Signed Digit Expansions in Cryptography Given Input Weight Binary and NAF Weight as Random Vector Quasi-Power Theorem Elliptic Curve Cryptography Signed Digit Expansions and Scalar Multiplication Non-Adjacent Form Other Input Statistics

Non-Adjacent Form

Theorem (Reitwiesner 1960) Let n ∈ Z, then there is exactly one signed binary expansion ε ∈ {−1, 0, 1}N0 of n such that n =

  • j≥0

εj2j, (ε is a binary expansion of n), εjεj+1 = 0 for all j ≥ 0. It is called the Non-Adjacent Form (NAF) of n.

Clemens Heuberger Hamming Weight of the Non-Adjacent-Form

slide-20
SLIDE 20

Signed Digit Expansions in Cryptography Given Input Weight Binary and NAF Weight as Random Vector Quasi-Power Theorem Elliptic Curve Cryptography Signed Digit Expansions and Scalar Multiplication Non-Adjacent Form Other Input Statistics

Non-Adjacent Form

Theorem (Reitwiesner 1960) Let n ∈ Z, then there is exactly one signed binary expansion ε ∈ {−1, 0, 1}N0 of n such that n =

  • j≥0

εj2j, (ε is a binary expansion of n), εjεj+1 = 0 for all j ≥ 0. It is called the Non-Adjacent Form (NAF) of n. It minimises the Hamming weight amongst all signed binary expansions with digits {0, ±1} of n.

Clemens Heuberger Hamming Weight of the Non-Adjacent-Form

slide-21
SLIDE 21

Signed Digit Expansions in Cryptography Given Input Weight Binary and NAF Weight as Random Vector Quasi-Power Theorem Elliptic Curve Cryptography Signed Digit Expansions and Scalar Multiplication Non-Adjacent Form Other Input Statistics

Non-Adjacent Form: Applications

Efficient arithmetic operations (Reitwiesner 1960)

Clemens Heuberger Hamming Weight of the Non-Adjacent-Form

slide-22
SLIDE 22

Signed Digit Expansions in Cryptography Given Input Weight Binary and NAF Weight as Random Vector Quasi-Power Theorem Elliptic Curve Cryptography Signed Digit Expansions and Scalar Multiplication Non-Adjacent Form Other Input Statistics

Non-Adjacent Form: Applications

Efficient arithmetic operations (Reitwiesner 1960) Coding Theory

Clemens Heuberger Hamming Weight of the Non-Adjacent-Form

slide-23
SLIDE 23

Signed Digit Expansions in Cryptography Given Input Weight Binary and NAF Weight as Random Vector Quasi-Power Theorem Elliptic Curve Cryptography Signed Digit Expansions and Scalar Multiplication Non-Adjacent Form Other Input Statistics

Non-Adjacent Form: Applications

Efficient arithmetic operations (Reitwiesner 1960) Coding Theory Elliptic Curve Cryptography (Morain and Olivos 1990)

Clemens Heuberger Hamming Weight of the Non-Adjacent-Form

slide-24
SLIDE 24

Signed Digit Expansions in Cryptography Given Input Weight Binary and NAF Weight as Random Vector Quasi-Power Theorem Elliptic Curve Cryptography Signed Digit Expansions and Scalar Multiplication Non-Adjacent Form Other Input Statistics

Analysis of the NAF — Known Results

Theorem E(Hℓ) = 1 3ℓ + 2 9 + O(2−ℓ), where Hℓ is the Hamming weight of a random NAF of length ≤ ℓ (all NAFs of length ≤ ℓ are considered to be equally likely).

Clemens Heuberger Hamming Weight of the Non-Adjacent-Form

slide-25
SLIDE 25

Signed Digit Expansions in Cryptography Given Input Weight Binary and NAF Weight as Random Vector Quasi-Power Theorem Elliptic Curve Cryptography Signed Digit Expansions and Scalar Multiplication Non-Adjacent Form Other Input Statistics

Analysis of the NAF — Known Results

Theorem E(Hℓ) = 1 3ℓ + 2 9 + O(2−ℓ), V(Hℓ) = 2 27ℓ + 8 81 + O(ℓ2−ℓ), where Hℓ is the Hamming weight of a random NAF of length ≤ ℓ (all NAFs of length ≤ ℓ are considered to be equally likely).

Clemens Heuberger Hamming Weight of the Non-Adjacent-Form

slide-26
SLIDE 26

Signed Digit Expansions in Cryptography Given Input Weight Binary and NAF Weight as Random Vector Quasi-Power Theorem Elliptic Curve Cryptography Signed Digit Expansions and Scalar Multiplication Non-Adjacent Form Other Input Statistics

Analysis of the NAF — Known Results

Theorem E(Hℓ) = 1 3ℓ + 2 9 + O(2−ℓ), V(Hℓ) = 2 27ℓ + 8 81 + O(ℓ2−ℓ), lim

ℓ→∞ P

  • Hℓ ≤ ℓ

3 + h

  • 2ℓ

27

  • =

1 √ 2π h e−t2/2 dt, where Hℓ is the Hamming weight of a random NAF of length ≤ ℓ (all NAFs of length ≤ ℓ are considered to be equally likely).

Clemens Heuberger Hamming Weight of the Non-Adjacent-Form

slide-27
SLIDE 27

Signed Digit Expansions in Cryptography Given Input Weight Binary and NAF Weight as Random Vector Quasi-Power Theorem Elliptic Curve Cryptography Signed Digit Expansions and Scalar Multiplication Non-Adjacent Form Other Input Statistics

A Note on Probabilistic Models

There are other probabilistic models:

Clemens Heuberger Hamming Weight of the Non-Adjacent-Form

slide-28
SLIDE 28

Signed Digit Expansions in Cryptography Given Input Weight Binary and NAF Weight as Random Vector Quasi-Power Theorem Elliptic Curve Cryptography Signed Digit Expansions and Scalar Multiplication Non-Adjacent Form Other Input Statistics

A Note on Probabilistic Models

There are other probabilistic models: Random NAF whose corresponding standard binary expansion has length ≤ ℓ,

Clemens Heuberger Hamming Weight of the Non-Adjacent-Form

slide-29
SLIDE 29

Signed Digit Expansions in Cryptography Given Input Weight Binary and NAF Weight as Random Vector Quasi-Power Theorem Elliptic Curve Cryptography Signed Digit Expansions and Scalar Multiplication Non-Adjacent Form Other Input Statistics

A Note on Probabilistic Models

There are other probabilistic models: Random NAF whose corresponding standard binary expansion has length ≤ ℓ, Random NAF of length ≤ ℓ where all residue classes modulo 2ℓ have the same probability.

Clemens Heuberger Hamming Weight of the Non-Adjacent-Form

slide-30
SLIDE 30

Signed Digit Expansions in Cryptography Given Input Weight Binary and NAF Weight as Random Vector Quasi-Power Theorem Elliptic Curve Cryptography Signed Digit Expansions and Scalar Multiplication Non-Adjacent Form Other Input Statistics

A Note on Probabilistic Models

There are other probabilistic models: Random NAF whose corresponding standard binary expansion has length ≤ ℓ, Random NAF of length ≤ ℓ where all residue classes modulo 2ℓ have the same probability. For instance, 101 and ¯ 101 represent the same residue class modulo 23.

Clemens Heuberger Hamming Weight of the Non-Adjacent-Form

slide-31
SLIDE 31

Signed Digit Expansions in Cryptography Given Input Weight Binary and NAF Weight as Random Vector Quasi-Power Theorem Elliptic Curve Cryptography Signed Digit Expansions and Scalar Multiplication Non-Adjacent Form Other Input Statistics

Subblock Occurrences without Restricting to Full Blocks

Let b = (br−1, . . . , b0) = 0 be an admissible block, (. . . ε2(n)ε1(n)ε0(n)) the NAF of n.

Clemens Heuberger Hamming Weight of the Non-Adjacent-Form

slide-32
SLIDE 32

Signed Digit Expansions in Cryptography Given Input Weight Binary and NAF Weight as Random Vector Quasi-Power Theorem Elliptic Curve Cryptography Signed Digit Expansions and Scalar Multiplication Non-Adjacent Form Other Input Statistics

Subblock Occurrences without Restricting to Full Blocks

Let b = (br−1, . . . , b0) = 0 be an admissible block, (. . . ε2(n)ε1(n)ε0(n)) the NAF of n. We consider Sb(N) :=

  • n<N

  • k=0

[(εk+r−1(n), . . . , εk(n)) = b], i.e. the number of occurrences of the block b in the NAFs of the positive integers less than N.

Clemens Heuberger Hamming Weight of the Non-Adjacent-Form

slide-33
SLIDE 33

Signed Digit Expansions in Cryptography Given Input Weight Binary and NAF Weight as Random Vector Quasi-Power Theorem Elliptic Curve Cryptography Signed Digit Expansions and Scalar Multiplication Non-Adjacent Form Other Input Statistics

Subblock Occurrences

Theorem (Grabner-H.-Prodinger 2003) If br−1 = 0, then Sb(N) = Q(b0) 3 · 2r N log2 N + Nh0(b) + NHb(log2 N) + o(N),

Clemens Heuberger Hamming Weight of the Non-Adjacent-Form

slide-34
SLIDE 34

Signed Digit Expansions in Cryptography Given Input Weight Binary and NAF Weight as Random Vector Quasi-Power Theorem Elliptic Curve Cryptography Signed Digit Expansions and Scalar Multiplication Non-Adjacent Form Other Input Statistics

Subblock Occurrences

Theorem (Grabner-H.-Prodinger 2003) If br−1 = 0, then Sb(N) = Q(b0) 3 · 2r N log2 N + Nh0(b) + NHb(log2 N) + o(N), where Q(η) =2 + 2 [η = 0] Hb(x) =

  • k∈Z\{0}

hk(b)e2kπix for explicitly known constants hk(b), k ∈ Z.

Clemens Heuberger Hamming Weight of the Non-Adjacent-Form

slide-35
SLIDE 35

Signed Digit Expansions in Cryptography Given Input Weight Binary and NAF Weight as Random Vector Quasi-Power Theorem Elliptic Curve Cryptography Signed Digit Expansions and Scalar Multiplication Non-Adjacent Form Other Input Statistics

Subblock Occurrences

Theorem (Grabner-H.-Prodinger 2003) If br−1 = 0, then Sb(N) = Q(b0) 3 · 2r N log2 N + Nh0(b) + NHb(log2 N) + o(N), where Q(η) =2 + 2 [η = 0] Hb(x) =

  • k∈Z\{0}

hk(b)e2kπix for explicitly known constants hk(b), k ∈ Z. Hb(x) is a 1-periodic continuous function.

Clemens Heuberger Hamming Weight of the Non-Adjacent-Form

slide-36
SLIDE 36

Signed Digit Expansions in Cryptography Given Input Weight Binary and NAF Weight as Random Vector Quasi-Power Theorem Elliptic Curve Cryptography Signed Digit Expansions and Scalar Multiplication Non-Adjacent Form Other Input Statistics

NAF: Counting Subblocks — Explicit constants

hk(b) = ζ

  • 2kπi

log 2, αmin(b)

  • − ζ
  • 2kπi

log 2, αmax(b)

  • 2kπi(1 + 2kπi

log 2)

for k = 0, h0(b) = log2 Γ(αmin(b)) − log2 Γ(αmax(b)) − Q(b0) 3 · 2r

  • r + 1

6 + 1 log 2

  • +

1 3 · 2r−1 , αmin(b) = [value(b) < 0] + 2−rvalue(b) − 1 + [b0 even] 3 · 2r αmax(b) = [value(b) < 0] + 2−rvalue(b) + 1 + [b0 even] 3 · 2r ζ(s, x) denotes the Hurwitz ζ-function.

Clemens Heuberger Hamming Weight of the Non-Adjacent-Form

slide-37
SLIDE 37

Signed Digit Expansions in Cryptography Given Input Weight Binary and NAF Weight as Random Vector Quasi-Power Theorem Elliptic Curve Cryptography Signed Digit Expansions and Scalar Multiplication Non-Adjacent Form Other Input Statistics

NAF: Counting Subblocks — Explicit constants

hk(b) = ζ

  • 2kπi

log 2, αmin(b)

  • − ζ
  • 2kπi

log 2, αmax(b)

  • 2kπi(1 + 2kπi

log 2)

for k = 0, h0(b) = log2 Γ(αmin(b)) − log2 Γ(αmax(b)) − Q(b0) 3 · 2r

  • r + 1

6 + 1 log 2

  • +

1 3 · 2r−1 , αmin(b) = [value(b) < 0] + 2−rvalue(b) − 1 + [b0 even] 3 · 2r αmax(b) = [value(b) < 0] + 2−rvalue(b) + 1 + [b0 even] 3 · 2r ζ(s, x) denotes the Hurwitz ζ-function. The case r = 1 is contained in Thuswaldner (1999).

Clemens Heuberger Hamming Weight of the Non-Adjacent-Form

slide-38
SLIDE 38

Signed Digit Expansions in Cryptography Given Input Weight Binary and NAF Weight as Random Vector Quasi-Power Theorem Elliptic Curve Cryptography Signed Digit Expansions and Scalar Multiplication Non-Adjacent Form Other Input Statistics

When does the NAF really have an advantage?

Suggestions by various authors: If the standard binary expansion of n has low Hamming weight, there is not much room for improvement of the Hamming weight.

Clemens Heuberger Hamming Weight of the Non-Adjacent-Form

slide-39
SLIDE 39

Signed Digit Expansions in Cryptography Given Input Weight Binary and NAF Weight as Random Vector Quasi-Power Theorem Elliptic Curve Cryptography Signed Digit Expansions and Scalar Multiplication Non-Adjacent Form Other Input Statistics

When does the NAF really have an advantage?

Suggestions by various authors: If the standard binary expansion of n has low Hamming weight, there is not much room for improvement of the Hamming weight. So it might be desirable to keep the standard binary expansion.

Clemens Heuberger Hamming Weight of the Non-Adjacent-Form

slide-40
SLIDE 40

Signed Digit Expansions in Cryptography Given Input Weight Binary and NAF Weight as Random Vector Quasi-Power Theorem Elliptic Curve Cryptography Signed Digit Expansions and Scalar Multiplication Non-Adjacent Form Other Input Statistics

When does the NAF really have an advantage?

Suggestions by various authors: If the standard binary expansion of n has low Hamming weight, there is not much room for improvement of the Hamming weight. So it might be desirable to keep the standard binary expansion. If, on the other hand, the Hamming weight of the standard binary expansion has very high Hamming weight,

Clemens Heuberger Hamming Weight of the Non-Adjacent-Form

slide-41
SLIDE 41

Signed Digit Expansions in Cryptography Given Input Weight Binary and NAF Weight as Random Vector Quasi-Power Theorem Elliptic Curve Cryptography Signed Digit Expansions and Scalar Multiplication Non-Adjacent Form Other Input Statistics

When does the NAF really have an advantage?

Suggestions by various authors: If the standard binary expansion of n has low Hamming weight, there is not much room for improvement of the Hamming weight. So it might be desirable to keep the standard binary expansion. If, on the other hand, the Hamming weight of the standard binary expansion has very high Hamming weight, the ones’ complement of n has low Hamming weight and could be used: n =

ℓ−1

  • j=0

εj2j = 2ℓ −

ℓ−1

  • j=0

(1 − εj)2j − 1 The weight of this new expansion is ℓ + 2 − h, where h is the weight of the standard binary expansion.

Clemens Heuberger Hamming Weight of the Non-Adjacent-Form

slide-42
SLIDE 42

Signed Digit Expansions in Cryptography Given Input Weight Binary and NAF Weight as Random Vector Quasi-Power Theorem Elliptic Curve Cryptography Signed Digit Expansions and Scalar Multiplication Non-Adjacent Form Other Input Statistics

Relation Between Weights

So, for given input weight (i.e., Hamming weight of the standard binary expansion), what is the expected Hamming weight of the NAF?

Clemens Heuberger Hamming Weight of the Non-Adjacent-Form

slide-43
SLIDE 43

Signed Digit Expansions in Cryptography Given Input Weight Binary and NAF Weight as Random Vector Quasi-Power Theorem Elliptic Curve Cryptography Signed Digit Expansions and Scalar Multiplication Non-Adjacent Form Other Input Statistics

Relation Between Weights

So, for given input weight (i.e., Hamming weight of the standard binary expansion), what is the expected Hamming weight of the NAF? How are the weight of the standard expansion and the weight

  • f the NAF related?

Clemens Heuberger Hamming Weight of the Non-Adjacent-Form

slide-44
SLIDE 44

Signed Digit Expansions in Cryptography Given Input Weight Binary and NAF Weight as Random Vector Quasi-Power Theorem Elliptic Curve Cryptography Signed Digit Expansions and Scalar Multiplication Non-Adjacent Form Other Input Statistics

Outline of the Remaining Talk

1

Signed Digit Expansions in Cryptography

Clemens Heuberger Hamming Weight of the Non-Adjacent-Form

slide-45
SLIDE 45

Signed Digit Expansions in Cryptography Given Input Weight Binary and NAF Weight as Random Vector Quasi-Power Theorem Elliptic Curve Cryptography Signed Digit Expansions and Scalar Multiplication Non-Adjacent Form Other Input Statistics

Outline of the Remaining Talk

1

Signed Digit Expansions in Cryptography

2

Given Input Weight

Clemens Heuberger Hamming Weight of the Non-Adjacent-Form

slide-46
SLIDE 46

Signed Digit Expansions in Cryptography Given Input Weight Binary and NAF Weight as Random Vector Quasi-Power Theorem Elliptic Curve Cryptography Signed Digit Expansions and Scalar Multiplication Non-Adjacent Form Other Input Statistics

Outline of the Remaining Talk

1

Signed Digit Expansions in Cryptography

2

Given Input Weight

3

Binary and NAF Weight as Random Vector

Clemens Heuberger Hamming Weight of the Non-Adjacent-Form

slide-47
SLIDE 47

Signed Digit Expansions in Cryptography Given Input Weight Binary and NAF Weight as Random Vector Quasi-Power Theorem Elliptic Curve Cryptography Signed Digit Expansions and Scalar Multiplication Non-Adjacent Form Other Input Statistics

Outline of the Remaining Talk

1

Signed Digit Expansions in Cryptography

2

Given Input Weight

3

Binary and NAF Weight as Random Vector

4

Quasi-Power Theorem

Clemens Heuberger Hamming Weight of the Non-Adjacent-Form

slide-48
SLIDE 48

Signed Digit Expansions in Cryptography Given Input Weight Binary and NAF Weight as Random Vector Quasi-Power Theorem Fixed Input Weight/Length Ratio Fixed Input Weight Large Input Weight

1

Signed Digit Expansions in Cryptography

2

Given Input Weight Fixed Input Weight/Length Ratio Fixed Input Weight Large Input Weight

3

Binary and NAF Weight as Random Vector

4

Quasi-Power Theorem

Clemens Heuberger Hamming Weight of the Non-Adjacent-Form

slide-49
SLIDE 49

Signed Digit Expansions in Cryptography Given Input Weight Binary and NAF Weight as Random Vector Quasi-Power Theorem Fixed Input Weight/Length Ratio Fixed Input Weight Large Input Weight

Fixed Input Weight/Length Ratio

Theorem Let 0 < c < d < 1 be real

  • numbers. Then the expected

Hamming weight of the NAF of a nonnegative integer less than 2n with unsigned binary digit expansion of Hamming weight k is asymptotically ∼ 1 − 4 k

n − 1 2

2 3 + 4 k

n − 1 2

2 n, uniformly for c ≤ k/n ≤ d.

Clemens Heuberger Hamming Weight of the Non-Adjacent-Form

slide-50
SLIDE 50

Signed Digit Expansions in Cryptography Given Input Weight Binary and NAF Weight as Random Vector Quasi-Power Theorem Fixed Input Weight/Length Ratio Fixed Input Weight Large Input Weight

Fixed Input Weight/Length Ratio

Theorem Let 0 < c < d < 1 be real

  • numbers. Then the expected

Hamming weight of the NAF of a nonnegative integer less than 2n with unsigned binary digit expansion of Hamming weight k is asymptotically ∼ 1 − 4 k

n − 1 2

2 3 + 4 k

n − 1 2

2 n, uniformly for c ≤ k/n ≤ d.

0.2 0.4 0.6 0.8 1 0.05 0.1 0.15 0.2 0.25 0.3

f (x) = 1 − 4

  • x − 1

2

2 3 + 4

  • x − 1

2

2

Clemens Heuberger Hamming Weight of the Non-Adjacent-Form

slide-51
SLIDE 51

Signed Digit Expansions in Cryptography Given Input Weight Binary and NAF Weight as Random Vector Quasi-Power Theorem Fixed Input Weight/Length Ratio Fixed Input Weight Large Input Weight

Comments

Maximum at k/n = 1/2: Density 1/3.

0.2 0.4 0.6 0.8 1 0.05 0.1 0.15 0.2 0.25 0.3

f (x) = 1 − 4

  • x − 1

2

2 3 + 4

  • x − 1

2

2

Clemens Heuberger Hamming Weight of the Non-Adjacent-Form

slide-52
SLIDE 52

Signed Digit Expansions in Cryptography Given Input Weight Binary and NAF Weight as Random Vector Quasi-Power Theorem Fixed Input Weight/Length Ratio Fixed Input Weight Large Input Weight

Comments

Maximum at k/n = 1/2: Density 1/3. This is also the average density without any restriction on the input weight.

0.2 0.4 0.6 0.8 1 0.05 0.1 0.15 0.2 0.25 0.3

f (x) = 1 − 4

  • x − 1

2

2 3 + 4

  • x − 1

2

2

Clemens Heuberger Hamming Weight of the Non-Adjacent-Form

slide-53
SLIDE 53

Signed Digit Expansions in Cryptography Given Input Weight Binary and NAF Weight as Random Vector Quasi-Power Theorem Fixed Input Weight/Length Ratio Fixed Input Weight Large Input Weight

Comments

Maximum at k/n = 1/2: Density 1/3. This is also the average density without any restriction on the input weight. Reason: There are especially many standard binary expansions of length ≤ n of weight ≈ n/2, namely

  • n

⌊n/2⌋

  • .

0.2 0.4 0.6 0.8 1 0.05 0.1 0.15 0.2 0.25 0.3

f (x) = 1 − 4

  • x − 1

2

2 3 + 4

  • x − 1

2

2

Clemens Heuberger Hamming Weight of the Non-Adjacent-Form

slide-54
SLIDE 54

Signed Digit Expansions in Cryptography Given Input Weight Binary and NAF Weight as Random Vector Quasi-Power Theorem Fixed Input Weight/Length Ratio Fixed Input Weight Large Input Weight

Comments

Maximum at k/n = 1/2: Density 1/3. This is also the average density without any restriction on the input weight. Reason: There are especially many standard binary expansions of length ≤ n of weight ≈ n/2, namely

  • n

⌊n/2⌋

  • .

For small or large k/n, the density of the NAF decreases.

0.2 0.4 0.6 0.8 1 0.05 0.1 0.15 0.2 0.25 0.3

f (x) = 1 − 4

  • x − 1

2

2 3 + 4

  • x − 1

2

2

Clemens Heuberger Hamming Weight of the Non-Adjacent-Form

slide-55
SLIDE 55

Signed Digit Expansions in Cryptography Given Input Weight Binary and NAF Weight as Random Vector Quasi-Power Theorem Fixed Input Weight/Length Ratio Fixed Input Weight Large Input Weight

Idea of the Proof (1)

Let akℓn be the number of nonnegative integers whose unsigned binary expansion has length ≤ n and Hamming weight k and whose NAF has Hamming weight ℓ.

Clemens Heuberger Hamming Weight of the Non-Adjacent-Form

slide-56
SLIDE 56

Signed Digit Expansions in Cryptography Given Input Weight Binary and NAF Weight as Random Vector Quasi-Power Theorem Fixed Input Weight/Length Ratio Fixed Input Weight Large Input Weight

Idea of the Proof (1)

Let akℓn be the number of nonnegative integers whose unsigned binary expansion has length ≤ n and Hamming weight k and whose NAF has Hamming weight ℓ. We consider the generating function G(x, y, z) =

  • k,ℓ,n≥0

ak,ℓ,nxkyℓzn.

Clemens Heuberger Hamming Weight of the Non-Adjacent-Form

slide-57
SLIDE 57

Signed Digit Expansions in Cryptography Given Input Weight Binary and NAF Weight as Random Vector Quasi-Power Theorem Fixed Input Weight/Length Ratio Fixed Input Weight Large Input Weight

Idea of the Proof (1)

Let akℓn be the number of nonnegative integers whose unsigned binary expansion has length ≤ n and Hamming weight k and whose NAF has Hamming weight ℓ. We consider the generating function G(x, y, z) =

  • k,ℓ,n≥0

ak,ℓ,nxkyℓzn. Consider the transducer automaton

.1 1 0|0 1|ε 0|01 1|0¯ 1 0|ε 1|0

converting the standard binary expansion to the NAF.

Clemens Heuberger Hamming Weight of the Non-Adjacent-Form

slide-58
SLIDE 58

Signed Digit Expansions in Cryptography Given Input Weight Binary and NAF Weight as Random Vector Quasi-Power Theorem Fixed Input Weight/Length Ratio Fixed Input Weight Large Input Weight

Idea of the Proof (1)

Let akℓn be the number of nonnegative integers whose unsigned binary expansion has length ≤ n and Hamming weight k and whose NAF has Hamming weight ℓ. We consider the generating function G(x, y, z) =

  • k,ℓ,n≥0

ak,ℓ,nxkyℓzn. Consider the transducer automaton

.1 1 0|0 1|ε 0|01 1|0¯ 1 0|ε 1|0

converting the standard binary expansion to the NAF. This yields G(x, y, z) = x2y2z2 − x2yz2 − xyz2 − xz + xyz + 1 x2yz3 + xyz3 + xz2 − 2xyz2 − xz − z + 1.

Clemens Heuberger Hamming Weight of the Non-Adjacent-Form

slide-59
SLIDE 59

Signed Digit Expansions in Cryptography Given Input Weight Binary and NAF Weight as Random Vector Quasi-Power Theorem Fixed Input Weight/Length Ratio Fixed Input Weight Large Input Weight

Idea of the Proof (2)

G(x, y, z) =

  • k,ℓ,n≥0

ak,ℓ,nxkyℓzn = x2y2z2 − x2yz2 − xyz2 − xz + xyz + 1 x2yz3 + xyz3 + xz2 − 2xyz2 − xz − z + 1.

Clemens Heuberger Hamming Weight of the Non-Adjacent-Form

slide-60
SLIDE 60

Signed Digit Expansions in Cryptography Given Input Weight Binary and NAF Weight as Random Vector Quasi-Power Theorem Fixed Input Weight/Length Ratio Fixed Input Weight Large Input Weight

Idea of the Proof (2)

G(x, y, z) =

  • k,ℓ,n≥0

ak,ℓ,nxkyℓzn = x2y2z2 − x2yz2 − xyz2 − xz + xyz + 1 x2yz3 + xyz3 + xz2 − 2xyz2 − xz − z + 1. Taking the derivative w.r.t. y and setting y = 1 yields ∂ ∂y G(x, y, z)

  • y=1

=

  • k,ℓ,n≥0

ℓak,ℓ,nxkzn = xz

  • x2z2 + xz2 − 1
  • (xz + z − 1)2 (xz2 − 1).

Clemens Heuberger Hamming Weight of the Non-Adjacent-Form

slide-61
SLIDE 61

Signed Digit Expansions in Cryptography Given Input Weight Binary and NAF Weight as Random Vector Quasi-Power Theorem Fixed Input Weight/Length Ratio Fixed Input Weight Large Input Weight

Idea of the Proof (2)

G(x, y, z) =

  • k,ℓ,n≥0

ak,ℓ,nxkyℓzn = x2y2z2 − x2yz2 − xyz2 − xz + xyz + 1 x2yz3 + xyz3 + xz2 − 2xyz2 − xz − z + 1. Taking the derivative w.r.t. y and setting y = 1 yields ∂ ∂y G(x, y, z)

  • y=1

=

  • k,ℓ,n≥0

ℓak,ℓ,nxkzn = xz

  • x2z2 + xz2 − 1
  • (xz + z − 1)2 (xz2 − 1).

Dividing the coefficient of xkzn by the number n

k

  • f standard

binary expansions of length ≤ n and weight k gives the expected Hamming weight.

Clemens Heuberger Hamming Weight of the Non-Adjacent-Form

slide-62
SLIDE 62

Signed Digit Expansions in Cryptography Given Input Weight Binary and NAF Weight as Random Vector Quasi-Power Theorem Fixed Input Weight/Length Ratio Fixed Input Weight Large Input Weight

Idea of the Proof (2)

G(x, y, z) =

  • k,ℓ,n≥0

ak,ℓ,nxkyℓzn = x2y2z2 − x2yz2 − xyz2 − xz + xyz + 1 x2yz3 + xyz3 + xz2 − 2xyz2 − xz − z + 1. Taking the derivative w.r.t. y and setting y = 1 yields ∂ ∂y G(x, y, z)

  • y=1

=

  • k,ℓ,n≥0

ℓak,ℓ,nxkzn = xz

  • x2z2 + xz2 − 1
  • (xz + z − 1)2 (xz2 − 1).

Dividing the coefficient of xkzn by the number n

k

  • f standard

binary expansions of length ≤ n and weight k gives the expected Hamming weight. Using methods of multivariate asymptotics gives the result: Bender and Richmond’s method is used.

Clemens Heuberger Hamming Weight of the Non-Adjacent-Form

slide-63
SLIDE 63

Signed Digit Expansions in Cryptography Given Input Weight Binary and NAF Weight as Random Vector Quasi-Power Theorem Fixed Input Weight/Length Ratio Fixed Input Weight Large Input Weight

Fixed Input Weight

Other point of view: fixed input Hamming weight, length n → ∞.

Clemens Heuberger Hamming Weight of the Non-Adjacent-Form

slide-64
SLIDE 64

Signed Digit Expansions in Cryptography Given Input Weight Binary and NAF Weight as Random Vector Quasi-Power Theorem Fixed Input Weight/Length Ratio Fixed Input Weight Large Input Weight

Fixed Input Weight

Other point of view: fixed input Hamming weight, length n → ∞. Theorem Let k be a fixed integer. Then the expected Hamming weight of the NAF of an integer with standard binary digit expansion of Hamming weight k and length ≤ n is asymptotically k − k(k2 − 3k + 2) n2 + O 1 n3 + 1 nk−1

  • ,

Clemens Heuberger Hamming Weight of the Non-Adjacent-Form

slide-65
SLIDE 65

Signed Digit Expansions in Cryptography Given Input Weight Binary and NAF Weight as Random Vector Quasi-Power Theorem Fixed Input Weight/Length Ratio Fixed Input Weight Large Input Weight

Fixed Input Weight

Other point of view: fixed input Hamming weight, length n → ∞. Theorem Let k be a fixed integer. Then the expected Hamming weight of the NAF of an integer with standard binary digit expansion of Hamming weight k and length ≤ n is asymptotically k − k(k2 − 3k + 2) n2 + O 1 n3 + 1 nk−1

  • ,

whereas the expected Hamming weight of the NAF of an integer with standard binary digit expansion of Hamming weight (n − k) and length ≤ n is asymptotically (k + 2) − 2k n − (k − 1)k(k + 2) n2 + O 1 n3 + 1 nk−1

  • .

Clemens Heuberger Hamming Weight of the Non-Adjacent-Form

slide-66
SLIDE 66

Signed Digit Expansions in Cryptography Given Input Weight Binary and NAF Weight as Random Vector Quasi-Power Theorem Fixed Input Weight/Length Ratio Fixed Input Weight Large Input Weight

Comments

Fixed input weight k: k − k(k2 − 3k + 2) n2 + O 1 n3 + 1 nk−1

  • ,

i.e., the main term corresponds to just keeping the input expansion untouched.

Clemens Heuberger Hamming Weight of the Non-Adjacent-Form

slide-67
SLIDE 67

Signed Digit Expansions in Cryptography Given Input Weight Binary and NAF Weight as Random Vector Quasi-Power Theorem Fixed Input Weight/Length Ratio Fixed Input Weight Large Input Weight

Comments

Fixed input weight k: k − k(k2 − 3k + 2) n2 + O 1 n3 + 1 nk−1

  • ,

i.e., the main term corresponds to just keeping the input expansion untouched. Fixed input weight n − k: (k + 2) − 2k n − (k − 1)k(k + 2) n2 + O 1 n3 + 1 nk−1

  • ,

i.e., the main term corresponds passing to the one’s complement and two additional repairing operations.

Clemens Heuberger Hamming Weight of the Non-Adjacent-Form

slide-68
SLIDE 68

Signed Digit Expansions in Cryptography Given Input Weight Binary and NAF Weight as Random Vector Quasi-Power Theorem Fixed Input Weight/Length Ratio Fixed Input Weight Large Input Weight

Large Input Weight

Theorem The expected Hamming weight of the NAF of an integer with unsigned binary expansion of length ≤ n and weight ≥ n/2 equals n 3 + 4 9 + 2 √ 2 (7 + (−1)n) 9π · 1 √n − 16 (1 + (−1)n) 9π · 1 n + O 1 n3/2

  • .

Clemens Heuberger Hamming Weight of the Non-Adjacent-Form

slide-69
SLIDE 69

Signed Digit Expansions in Cryptography Given Input Weight Binary and NAF Weight as Random Vector Quasi-Power Theorem Fixed Input Weight/Length Ratio Fixed Input Weight Large Input Weight

Large Input Weight

Theorem The expected Hamming weight of the NAF of an integer with unsigned binary expansion of length ≤ n and weight ≥ n/2 equals n 3 + 4 9 + 2 √ 2 (7 + (−1)n) 9π · 1 √n − 16 (1 + (−1)n) 9π · 1 n + O 1 n3/2

  • .

The expected Hamming weight of the NAF of an integer with unsigned binary expansion of length ≤ n and weight ≤ n/2 equals n 3 − (1 + (−1)n) √ 2 3√π √n + 4 9 + 2 + 2(−1)n 3π − 8 + 8(−1)n + 23π + 7(−1)nπ 6 √ 2√nπ3/2 + O 1 n

  • .

Clemens Heuberger Hamming Weight of the Non-Adjacent-Form

slide-70
SLIDE 70

Signed Digit Expansions in Cryptography Given Input Weight Binary and NAF Weight as Random Vector Quasi-Power Theorem Fixed Input Weight/Length Ratio Fixed Input Weight Large Input Weight

Idea of the Proof

Apply MacMahon’s Ω-operator.

Clemens Heuberger Hamming Weight of the Non-Adjacent-Form

slide-71
SLIDE 71

Signed Digit Expansions in Cryptography Given Input Weight Binary and NAF Weight as Random Vector Quasi-Power Theorem Fixed Input Weight/Length Ratio Fixed Input Weight Large Input Weight

Idea of the Proof

Apply MacMahon’s Ω-operator. Consider ∂ ∂y G(λ2, 1, z/λ)

  • y=1

=

  • k,n≥0

bknλ2k−nzn = λ3z(λ2z2 + z2 − 1) (z − 1)(z + 1)(zλ2 − λ + z)2 .

Clemens Heuberger Hamming Weight of the Non-Adjacent-Form

slide-72
SLIDE 72

Signed Digit Expansions in Cryptography Given Input Weight Binary and NAF Weight as Random Vector Quasi-Power Theorem Fixed Input Weight/Length Ratio Fixed Input Weight Large Input Weight

Idea of the Proof

Apply MacMahon’s Ω-operator. Consider ∂ ∂y G(λ2, 1, z/λ)

  • y=1

=

  • k,n≥0

bknλ2k−nzn = λ3z(λ2z2 + z2 − 1) (z − 1)(z + 1)(zλ2 − λ + z)2 . We are interested in the cases with 2k − n ≥ 0.

Clemens Heuberger Hamming Weight of the Non-Adjacent-Form

slide-73
SLIDE 73

Signed Digit Expansions in Cryptography Given Input Weight Binary and NAF Weight as Random Vector Quasi-Power Theorem Fixed Input Weight/Length Ratio Fixed Input Weight Large Input Weight

Idea of the Proof

Apply MacMahon’s Ω-operator. Consider ∂ ∂y G(λ2, 1, z/λ)

  • y=1

=

  • k,n≥0

bknλ2k−nzn = λ3z(λ2z2 + z2 − 1) (z − 1)(z + 1)(zλ2 − λ + z)2 . We are interested in the cases with 2k − n ≥ 0. Thus all negative powers of λ have to be eliminated by looking at the partial fraction decomposition.

Clemens Heuberger Hamming Weight of the Non-Adjacent-Form

slide-74
SLIDE 74

Signed Digit Expansions in Cryptography Given Input Weight Binary and NAF Weight as Random Vector Quasi-Power Theorem Fixed Input Weight/Length Ratio Fixed Input Weight Large Input Weight

Idea of the Proof

Apply MacMahon’s Ω-operator. Consider ∂ ∂y G(λ2, 1, z/λ)

  • y=1

=

  • k,n≥0

bknλ2k−nzn = λ3z(λ2z2 + z2 − 1) (z − 1)(z + 1)(zλ2 − λ + z)2 . We are interested in the cases with 2k − n ≥ 0. Thus all negative powers of λ have to be eliminated by looking at the partial fraction

  • decomposition. Afterwards, we set λ = 1 and extract the

coefficient of zn.

Clemens Heuberger Hamming Weight of the Non-Adjacent-Form

slide-75
SLIDE 75

Signed Digit Expansions in Cryptography Given Input Weight Binary and NAF Weight as Random Vector Quasi-Power Theorem Fixed Input Weight/Length Ratio Fixed Input Weight Large Input Weight

Idea of the Proof — Partial Fraction Decomposition

Gy(λ2, 1, z/λ) = λz + 2 (z − 1)(z + 1) + 16z6 − 24wz4 − 40z4 + 13wz2 + 17z2 − 2w − 2 (z − 1)(z + 1)(2z − 1)2(2z + 1)2(w − 2λz + 1) − 2

  • 2z2 − w − 1
  • z2

(z − 1)(z + 1)(2z − 1)(2z + 1)(w − 2λz + 1)2 − 16z6 + 24wz4 − 40z4 − 13wz2 + 17z2 + 2w − 2 (z − 1)(z + 1)(2z − 1)2(2z + 1)2(w + 2λz − 1) − 2

  • 2z2 + w − 1
  • z2

(z − 1)(z + 1)(2z − 1)(2z + 1)(w + 2λz − 1)2 , where the abbreviation w := √ 1 − 4z2 has been used.

Clemens Heuberger Hamming Weight of the Non-Adjacent-Form

slide-76
SLIDE 76

Signed Digit Expansions in Cryptography Given Input Weight Binary and NAF Weight as Random Vector Quasi-Power Theorem Fixed Input Weight/Length Ratio Fixed Input Weight Large Input Weight

Applying MacMahon’s Operator

We have 1 w − 2λz + 1 = 1 (1 + w)

  • 1 − 2λz

1+w

=

  • m≥0

(2λz)m (1 + w)m+1 , keeping in mind that 2λz 1 + w ∼ z, for z → 0 and λ → 1, thus the former survives MacMahon’s Ω

Clemens Heuberger Hamming Weight of the Non-Adjacent-Form

slide-77
SLIDE 77

Signed Digit Expansions in Cryptography Given Input Weight Binary and NAF Weight as Random Vector Quasi-Power Theorem Fixed Input Weight/Length Ratio Fixed Input Weight Large Input Weight

Applying MacMahon’s Operator

We have 1 w − 2λz + 1 = 1 (1 + w)

  • 1 − 2λz

1+w

=

  • m≥0

(2λz)m (1 + w)m+1 , 1 w + 2λz − 1 = 1 2λz

  • 1 − 1−w

2λz

=

  • m≥0

(1 − w)m (2λz)m+1 , keeping in mind that 2λz 1 + w ∼ z, 1 − w 2λz ∼ 2z2 2z = z for z → 0 and λ → 1, thus the former survives MacMahon’s Ω, while the latter does not.

Clemens Heuberger Hamming Weight of the Non-Adjacent-Form

slide-78
SLIDE 78

Signed Digit Expansions in Cryptography Given Input Weight Binary and NAF Weight as Random Vector Quasi-Power Theorem Fixed Input Weight/Length Ratio Fixed Input Weight Large Input Weight

Applying MacMahon’s Operator

We have 1 w − 2λz + 1 = 1 (1 + w)

  • 1 − 2λz

1+w

=

  • m≥0

(2λz)m (1 + w)m+1 , 1 w + 2λz − 1 = 1 2λz

  • 1 − 1−w

2λz

=

  • m≥0

(1 − w)m (2λz)m+1 , keeping in mind that 2λz 1 + w ∼ z, 1 − w 2λz ∼ 2z2 2z = z for z → 0 and λ → 1, thus the former survives MacMahon’s Ω, while the latter does not. Singularity analysis does the rest.

Clemens Heuberger Hamming Weight of the Non-Adjacent-Form

slide-79
SLIDE 79

Signed Digit Expansions in Cryptography Given Input Weight Binary and NAF Weight as Random Vector Quasi-Power Theorem Covariance Limiting Distribution

1

Signed Digit Expansions in Cryptography

2

Given Input Weight

3

Binary and NAF Weight as Random Vector Covariance Limiting Distribution

4

Quasi-Power Theorem

Clemens Heuberger Hamming Weight of the Non-Adjacent-Form

slide-80
SLIDE 80

Signed Digit Expansions in Cryptography Given Input Weight Binary and NAF Weight as Random Vector Quasi-Power Theorem Covariance Limiting Distribution

Binary and NAF Weight As a Random Vector

Up to now, we always had the input weight k as a parameter.

Clemens Heuberger Hamming Weight of the Non-Adjacent-Form

slide-81
SLIDE 81

Signed Digit Expansions in Cryptography Given Input Weight Binary and NAF Weight as Random Vector Quasi-Power Theorem Covariance Limiting Distribution

Binary and NAF Weight As a Random Vector

Up to now, we always had the input weight k as a parameter. Now: n is the only parameter. Study the random variables H(Binary(Xn)) and H(NAF(Xn)), where

Clemens Heuberger Hamming Weight of the Non-Adjacent-Form

slide-82
SLIDE 82

Signed Digit Expansions in Cryptography Given Input Weight Binary and NAF Weight as Random Vector Quasi-Power Theorem Covariance Limiting Distribution

Binary and NAF Weight As a Random Vector

Up to now, we always had the input weight k as a parameter. Now: n is the only parameter. Study the random variables H(Binary(Xn)) and H(NAF(Xn)), where Xn . . . random nonnegative integer with standard binary expansion of length ≤ n,

Clemens Heuberger Hamming Weight of the Non-Adjacent-Form

slide-83
SLIDE 83

Signed Digit Expansions in Cryptography Given Input Weight Binary and NAF Weight as Random Vector Quasi-Power Theorem Covariance Limiting Distribution

Binary and NAF Weight As a Random Vector

Up to now, we always had the input weight k as a parameter. Now: n is the only parameter. Study the random variables H(Binary(Xn)) and H(NAF(Xn)), where Xn . . . random nonnegative integer with standard binary expansion of length ≤ n, Binary(m) . . . standard binary expansion of m,

Clemens Heuberger Hamming Weight of the Non-Adjacent-Form

slide-84
SLIDE 84

Signed Digit Expansions in Cryptography Given Input Weight Binary and NAF Weight as Random Vector Quasi-Power Theorem Covariance Limiting Distribution

Binary and NAF Weight As a Random Vector

Up to now, we always had the input weight k as a parameter. Now: n is the only parameter. Study the random variables H(Binary(Xn)) and H(NAF(Xn)), where Xn . . . random nonnegative integer with standard binary expansion of length ≤ n, Binary(m) . . . standard binary expansion of m, NAF(m) . . . NAF of m,

Clemens Heuberger Hamming Weight of the Non-Adjacent-Form

slide-85
SLIDE 85

Signed Digit Expansions in Cryptography Given Input Weight Binary and NAF Weight as Random Vector Quasi-Power Theorem Covariance Limiting Distribution

Binary and NAF Weight As a Random Vector

Up to now, we always had the input weight k as a parameter. Now: n is the only parameter. Study the random variables H(Binary(Xn)) and H(NAF(Xn)), where Xn . . . random nonnegative integer with standard binary expansion of length ≤ n, Binary(m) . . . standard binary expansion of m, NAF(m) . . . NAF of m, H( · ) . . . Hamming weight of an expansion.

Clemens Heuberger Hamming Weight of the Non-Adjacent-Form

slide-86
SLIDE 86

Signed Digit Expansions in Cryptography Given Input Weight Binary and NAF Weight as Random Vector Quasi-Power Theorem Covariance Limiting Distribution

Covariance

Theorem We have E(H(Binary(Xn))) = n 2, E(H(NAF(Xn))) = n 3 + 4 9 + O(2−n), Var(H(Binary(Xn))) = n 4, Var(H(NAF(Xn))) = 2n 27 + 14 81 + O(n2−n), Cov(H(Binary(Xn)), H(NAF(Xn))) = 2 3 + O(n2−n).

Clemens Heuberger Hamming Weight of the Non-Adjacent-Form

slide-87
SLIDE 87

Signed Digit Expansions in Cryptography Given Input Weight Binary and NAF Weight as Random Vector Quasi-Power Theorem Covariance Limiting Distribution

Limiting Distribution

Theorem The random vector Vn := (H(Binary(Xn)), H(NAF(Xn))) is asymptotically normal, i.e., P Vn − 1/2

1/3

  • n

√n ≤ x

  • = 1

54Φ(2x1)Φ

  • 3

√ 3 √ 2 x2

  • + O

1 √n

  • ,

where Φ(x) = 1 √ 2π x

−∞

e−t2/2 dt.

Clemens Heuberger Hamming Weight of the Non-Adjacent-Form

slide-88
SLIDE 88

Signed Digit Expansions in Cryptography Given Input Weight Binary and NAF Weight as Random Vector Quasi-Power Theorem Covariance Limiting Distribution

Limiting Distribution

Theorem The random vector Vn := (H(Binary(Xn)), H(NAF(Xn))) is asymptotically normal, i.e., P Vn − 1/2

1/3

  • n

√n ≤ x

  • = 1

54Φ(2x1)Φ

  • 3

√ 3 √ 2 x2

  • + O

1 √n

  • ,

where Φ(x) = 1 √ 2π x

−∞

e−t2/2 dt. This means that although H(Binary(Xn)) and H(NAF(Xn)) are correlated, they are asymptotically independent. Their limiting distribution is the product of two normal distributions.

Clemens Heuberger Hamming Weight of the Non-Adjacent-Form

slide-89
SLIDE 89

Signed Digit Expansions in Cryptography Given Input Weight Binary and NAF Weight as Random Vector Quasi-Power Theorem Covariance Limiting Distribution

Limiting Distribution

Theorem The random vector Vn := (H(Binary(Xn)), H(NAF(Xn))) is asymptotically normal, i.e., P Vn − 1/2

1/3

  • n

√n ≤ x

  • = 1

54Φ(2x1)Φ

  • 3

√ 3 √ 2 x2

  • + O

1 √n

  • ,

where Φ(x) = 1 √ 2π x

−∞

e−t2/2 dt. This means that although H(Binary(Xn)) and H(NAF(Xn)) are correlated, they are asymptotically independent. Their limiting distribution is the product of two normal distributions. This is proved via a 2-dimensional version of Hwang’s Quasi-Power Thm.

Clemens Heuberger Hamming Weight of the Non-Adjacent-Form

slide-90
SLIDE 90

Signed Digit Expansions in Cryptography Given Input Weight Binary and NAF Weight as Random Vector Quasi-Power Theorem Dimension 1 Dimension 2 2-dimensional Berry-Esseen-Inequality

1

Signed Digit Expansions in Cryptography

2

Given Input Weight

3

Binary and NAF Weight as Random Vector

4

Quasi-Power Theorem Dimension 1 Dimension 2 2-dimensional Berry-Esseen-Inequality

Clemens Heuberger Hamming Weight of the Non-Adjacent-Form

slide-91
SLIDE 91

Signed Digit Expansions in Cryptography Given Input Weight Binary and NAF Weight as Random Vector Quasi-Power Theorem Dimension 1 Dimension 2 2-dimensional Berry-Esseen-Inequality

Quasi-Power Theorem, Dimension 1

Theorem (Hwang) Let {Ωn}n≥1 be a sequence of integral random variables. Suppose that the moment generating function satisfies the asymptotic expression E(eΩns) =

  • m≥0

P(Ωn = m)ems = eu(s)φ(n)+v(s)(1 + O(κ−1

n )),

the O-term being uniform for |s| ≤ τ, s ∈ C, τ > 0, where

Clemens Heuberger Hamming Weight of the Non-Adjacent-Form

slide-92
SLIDE 92

Signed Digit Expansions in Cryptography Given Input Weight Binary and NAF Weight as Random Vector Quasi-Power Theorem Dimension 1 Dimension 2 2-dimensional Berry-Esseen-Inequality

Quasi-Power Theorem, Dimension 1

Theorem (Hwang) Let {Ωn}n≥1 be a sequence of integral random variables. Suppose that the moment generating function satisfies the asymptotic expression E(eΩns) =

  • m≥0

P(Ωn = m)ems = eu(s)φ(n)+v(s)(1 + O(κ−1

n )),

the O-term being uniform for |s| ≤ τ, s ∈ C, τ > 0, where

1 u(s) and v(s) are analytic for |s| ≤ τ and independent of n;

and u′′(0) = 0;

Clemens Heuberger Hamming Weight of the Non-Adjacent-Form

slide-93
SLIDE 93

Signed Digit Expansions in Cryptography Given Input Weight Binary and NAF Weight as Random Vector Quasi-Power Theorem Dimension 1 Dimension 2 2-dimensional Berry-Esseen-Inequality

Quasi-Power Theorem, Dimension 1

Theorem (Hwang) Let {Ωn}n≥1 be a sequence of integral random variables. Suppose that the moment generating function satisfies the asymptotic expression E(eΩns) =

  • m≥0

P(Ωn = m)ems = eu(s)φ(n)+v(s)(1 + O(κ−1

n )),

the O-term being uniform for |s| ≤ τ, s ∈ C, τ > 0, where

1 u(s) and v(s) are analytic for |s| ≤ τ and independent of n;

and u′′(0) = 0;

2 limn→∞ φ(n) = ∞; Clemens Heuberger Hamming Weight of the Non-Adjacent-Form

slide-94
SLIDE 94

Signed Digit Expansions in Cryptography Given Input Weight Binary and NAF Weight as Random Vector Quasi-Power Theorem Dimension 1 Dimension 2 2-dimensional Berry-Esseen-Inequality

Quasi-Power Theorem, Dimension 1

Theorem (Hwang) Let {Ωn}n≥1 be a sequence of integral random variables. Suppose that the moment generating function satisfies the asymptotic expression E(eΩns) =

  • m≥0

P(Ωn = m)ems = eu(s)φ(n)+v(s)(1 + O(κ−1

n )),

the O-term being uniform for |s| ≤ τ, s ∈ C, τ > 0, where

1 u(s) and v(s) are analytic for |s| ≤ τ and independent of n;

and u′′(0) = 0;

2 limn→∞ φ(n) = ∞; 3 limn→∞ κn = ∞. Clemens Heuberger Hamming Weight of the Non-Adjacent-Form

slide-95
SLIDE 95

Signed Digit Expansions in Cryptography Given Input Weight Binary and NAF Weight as Random Vector Quasi-Power Theorem Dimension 1 Dimension 2 2-dimensional Berry-Esseen-Inequality

Quasi-Power Theorem, Dimension 1, continued

E(eΩns) =

  • m≥0

P(Ωn = m)ems = eu(s)φ(n)+v(s)(1 + O(κ−1

n )),

Clemens Heuberger Hamming Weight of the Non-Adjacent-Form

slide-96
SLIDE 96

Signed Digit Expansions in Cryptography Given Input Weight Binary and NAF Weight as Random Vector Quasi-Power Theorem Dimension 1 Dimension 2 2-dimensional Berry-Esseen-Inequality

Quasi-Power Theorem, Dimension 1, continued

E(eΩns) =

  • m≥0

P(Ωn = m)ems = eu(s)φ(n)+v(s)(1 + O(κ−1

n )),

Theorem (Hwang, cont.) Then the distribution of Ωn is asymptotically normal, i.e., P

  • Ωn − u′(0)φ(n)
  • u′′(0)φ(n)

< x

  • = Φ(x) + O
  • 1
  • φ(n)

+ 1 κn

  • ,

uniformly with respect to x, x ∈ R, where Φ denotes the standard normal distribution Φ(x) = 1 √ 2π x

−∞

exp

  • −1

2y2

  • dy.

Clemens Heuberger Hamming Weight of the Non-Adjacent-Form

slide-97
SLIDE 97

Signed Digit Expansions in Cryptography Given Input Weight Binary and NAF Weight as Random Vector Quasi-Power Theorem Dimension 1 Dimension 2 2-dimensional Berry-Esseen-Inequality

Quasi-Power Theorem, Dimension 2

Theorem Let {Ωn}n≥1 be a sequence of two dimensional integral random vectors.

Clemens Heuberger Hamming Weight of the Non-Adjacent-Form

slide-98
SLIDE 98

Signed Digit Expansions in Cryptography Given Input Weight Binary and NAF Weight as Random Vector Quasi-Power Theorem Dimension 1 Dimension 2 2-dimensional Berry-Esseen-Inequality

Quasi-Power Theorem, Dimension 2

Theorem Let {Ωn}n≥1 be a sequence of two dimensional integral random

  • vectors. Suppose that the moment generating function satisfies the

asymptotic expression E(eΩn,s) =

  • m≥0

P(Ωn = m)em,s = eu(s)φ(n)+v(s)(1 + O(κ−1

n )),

the O-term being uniform for s∞ ≤ τ, s ∈ C2, τ > 0, where

Clemens Heuberger Hamming Weight of the Non-Adjacent-Form

slide-99
SLIDE 99

Signed Digit Expansions in Cryptography Given Input Weight Binary and NAF Weight as Random Vector Quasi-Power Theorem Dimension 1 Dimension 2 2-dimensional Berry-Esseen-Inequality

Quasi-Power Theorem, Dimension 2

Theorem Let {Ωn}n≥1 be a sequence of two dimensional integral random

  • vectors. Suppose that the moment generating function satisfies the

asymptotic expression E(eΩn,s) =

  • m≥0

P(Ωn = m)em,s = eu(s)φ(n)+v(s)(1 + O(κ−1

n )),

the O-term being uniform for s∞ ≤ τ, s ∈ C2, τ > 0, where

1 u(s) and v(s) analytic for s ≤ τ and independent of n; and

the Hessian Hu(0) of u at the origin is nonsingular;

Clemens Heuberger Hamming Weight of the Non-Adjacent-Form

slide-100
SLIDE 100

Signed Digit Expansions in Cryptography Given Input Weight Binary and NAF Weight as Random Vector Quasi-Power Theorem Dimension 1 Dimension 2 2-dimensional Berry-Esseen-Inequality

Quasi-Power Theorem, Dimension 2

Theorem Let {Ωn}n≥1 be a sequence of two dimensional integral random

  • vectors. Suppose that the moment generating function satisfies the

asymptotic expression E(eΩn,s) =

  • m≥0

P(Ωn = m)em,s = eu(s)φ(n)+v(s)(1 + O(κ−1

n )),

the O-term being uniform for s∞ ≤ τ, s ∈ C2, τ > 0, where

1 u(s) and v(s) analytic for s ≤ τ and independent of n; and

the Hessian Hu(0) of u at the origin is nonsingular;

2 limn→∞ φ(n) = ∞; Clemens Heuberger Hamming Weight of the Non-Adjacent-Form

slide-101
SLIDE 101

Signed Digit Expansions in Cryptography Given Input Weight Binary and NAF Weight as Random Vector Quasi-Power Theorem Dimension 1 Dimension 2 2-dimensional Berry-Esseen-Inequality

Quasi-Power Theorem, Dimension 2

Theorem Let {Ωn}n≥1 be a sequence of two dimensional integral random

  • vectors. Suppose that the moment generating function satisfies the

asymptotic expression E(eΩn,s) =

  • m≥0

P(Ωn = m)em,s = eu(s)φ(n)+v(s)(1 + O(κ−1

n )),

the O-term being uniform for s∞ ≤ τ, s ∈ C2, τ > 0, where

1 u(s) and v(s) analytic for s ≤ τ and independent of n; and

the Hessian Hu(0) of u at the origin is nonsingular;

2 limn→∞ φ(n) = ∞; 3 limn→∞ κn = ∞. Clemens Heuberger Hamming Weight of the Non-Adjacent-Form

slide-102
SLIDE 102

Signed Digit Expansions in Cryptography Given Input Weight Binary and NAF Weight as Random Vector Quasi-Power Theorem Dimension 1 Dimension 2 2-dimensional Berry-Esseen-Inequality

Quasi-Power Theorem, Dimension 2, continued

E(eΩn,s) = eu(s)φ(n)+v(s)(1 + O(κ−1

n )),

Clemens Heuberger Hamming Weight of the Non-Adjacent-Form

slide-103
SLIDE 103

Signed Digit Expansions in Cryptography Given Input Weight Binary and NAF Weight as Random Vector Quasi-Power Theorem Dimension 1 Dimension 2 2-dimensional Berry-Esseen-Inequality

Quasi-Power Theorem, Dimension 2, continued

E(eΩn,s) = eu(s)φ(n)+v(s)(1 + O(κ−1

n )),

Theorem (cont.) Then, the distribution of Ωn is asymptotically normal, i.e., P

  • Ωn − grad u(0)φ(n)
  • φ(n)

≤ x

  • = ΦHu(0)(x) + O
  • 1
  • φ(n)

+ 1 κn

  • ,

where ΦΣ is the distribution function of the two dimensional normal distribution with mean 0 and variance-covariance matrix Σ: ΦΣ(x) = 1 2π √ det Σ

  • y1≤x1

y2≤x2

exp

  • −1

2ytΣ−1y

  • dy.

Clemens Heuberger Hamming Weight of the Non-Adjacent-Form

slide-104
SLIDE 104

Signed Digit Expansions in Cryptography Given Input Weight Binary and NAF Weight as Random Vector Quasi-Power Theorem Dimension 1 Dimension 2 2-dimensional Berry-Esseen-Inequality

Lemma (Sadikova) Let X and Y be two-dimensional random vectors with distribution functions F and G and characteristic functions f and g, ˆ f (s1, s2) = f (s1, s2) − f (s1, 0)f (0, s2), ˆ g(s1, s2) = g(s1, s2) − g(s1, 0)g(0, s2), A1 = sup

x1,x2

∂G(x1, x2) ∂x1 , A2 = sup

x1,x2

∂G(x1, x2) ∂x2 . Then for any T > 0, we have 1 2 sup

x,y |F(x, y) − G(x, y)| ≤

1 (2π)2

  • s≤T
  • ˆ

f (s1, s2) − ˆ g(s1, s2) s1s2

  • ds

+sup

x |F(x, ∞)−G(x, ∞)|+sup y |F(∞, y)−G(∞, y)|+12(A1 + A2)

T .

Clemens Heuberger Hamming Weight of the Non-Adjacent-Form