• Nenhum resultado encontrado

Maresias,AofA2008,April16 ,2008 ClemensHeuberger HammingWeightoftheNon-Adjacent-FormunderVariousInputStatisticsandaTwo-DimensionalVersionofHwang’sQuasi-Power-Theorem

N/A
N/A
Protected

Academic year: 2022

Share "Maresias,AofA2008,April16 ,2008 ClemensHeuberger HammingWeightoftheNon-Adjacent-FormunderVariousInputStatisticsandaTwo-DimensionalVersionofHwang’sQuasi-Power-Theorem"

Copied!
104
0
0

Texto

(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

(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 andn∈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

(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 andn∈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

(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

Calculating27P via a doubling and adding scheme using the standard binary expansionof 27:

27=(11011)2,

27P =2(2(2(2(P) +P) +0) +P) +P.

Number of additions∼ Hamming weightof the binary expansion (Number of nonzero digits)

Number of multiplications∼length of the expansion

(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

Calculating27P via a doubling and adding scheme using the standard binary expansionof 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

(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

Calculating27P via a doubling and adding scheme using the standard binary expansionof 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

(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)

=⇒ 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) manysigned binary

expansions of an integer (Redundancy)=⇒ find expansion of minimalHamming weight.

P Q

P+Q

−P R

2R E

Clemens Heuberger Hamming Weight of the Non-Adjacent-Form

(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

Number of additions/subtractions ∼Hamming weight of the binary expansion

Number of multiplications ∼length of the expansion

There are (infinitely) manysigned binary

expansions of an integer (Redundancy)=⇒ find expansion of minimalHamming weight.

P Q

P+Q

−P R

2R E

(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

Number of multiplications ∼length of the expansion

There are (infinitely) manysigned binary

expansions of an integer (Redundancy)=⇒ find expansion of minimalHamming weight.

P Q

P+Q

−P R

2R E

Clemens Heuberger Hamming Weight of the Non-Adjacent-Form

(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

There are (infinitely) manysigned binary

expansions of an integer (Redundancy)=⇒ find expansion of minimalHamming weight.

P Q

P+Q

−P R

2R E

(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) manysigned binary expansions of an integer (Redundancy)

=⇒ find expansion of minimalHamming weight.

P Q

P+Q

−P R

2R E

Clemens Heuberger Hamming Weight of the Non-Adjacent-Form

(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) manysigned binary

expansions of an integer (Redundancy)=⇒ find

P Q

P+Q

−P R

2R E

(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 integern.

Ifn is even, we have to take0 as least significant digitand continue with n/2.

Ifn ≡1 (mod 4), we take1 asleast significant digit and continue with (n−1)/2. This isevenandguarantees a zeroin the next step.

Ifn ≡3≡ −1 (mod 4), we take−1as least significant digit and continue with (n+ 1)/2. This isevenand guarantees a zero in the next step.

This procedure yields a zero after every non-zero, which should yield a low weight expansion. There areno adjacent non-zeros.

Clemens Heuberger Hamming Weight of the Non-Adjacent-Form

(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 integern.

Ifn is even, we have to take0 asleast significant digit and continue with n/2.

Ifn ≡1 (mod 4), we take1 asleast significant digit and continue with (n−1)/2. This isevenandguarantees a zeroin the next step.

Ifn ≡3≡ −1 (mod 4), we take−1as least significant digit and continue with (n+ 1)/2. This isevenand guarantees a zero in the next step.

This procedure yields a zero after every non-zero, which should yield a low weight expansion. There areno adjacent non-zeros.

(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 integern.

Ifn is even, we have to take0 asleast significant digit and continue with n/2.

Ifn ≡1 (mod 4), we take1 asleast significant digit and continue with (n−1)/2. This is evenandguarantees a zeroin the next step.

Ifn ≡3≡ −1 (mod 4), we take−1as least significant digit and continue with (n+ 1)/2. This isevenand guarantees a zero in the next step.

This procedure yields a zero after every non-zero, which should yield a low weight expansion. There areno adjacent non-zeros.

Clemens Heuberger Hamming Weight of the Non-Adjacent-Form

(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 integern.

Ifn is even, we have to take0 asleast significant digit and continue with n/2.

Ifn ≡1 (mod 4), we take1 asleast significant digit and continue with (n−1)/2. This is evenandguarantees a zeroin the next step.

Ifn ≡3≡ −1 (mod 4), we take−1as least significant digit and continue with (n+ 1)/2. This isevenand guarantees a zero in the next step.

This procedure yields a zero after every non-zero, which should yield a low weight expansion. There areno adjacent non-zeros.

(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 integern.

Ifn is even, we have to take0 asleast significant digit and continue with n/2.

Ifn ≡1 (mod 4), we take1 asleast significant digit and continue with (n−1)/2. This is evenandguarantees a zeroin the next step.

Ifn ≡3≡ −1 (mod 4), we take−1as least significant digit and continue with (n+ 1)/2. This isevenand 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

(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 integern.

Ifn is even, we have to take0 asleast significant digit and continue with n/2.

Ifn ≡1 (mod 4), we take1 asleast significant digit and continue with (n−1)/2. This is evenandguarantees a zeroin the next step.

Ifn ≡3≡ −1 (mod 4), we take−1as least significant digit and continue with (n+ 1)/2. This isevenand guarantees a zero in the next step.

This procedure yields a zero after every non-zero, which should yield a low weight expansion. There areno adjacent non-zeros.

(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 isexactly onesigned binary expansion ε∈ {−1,0,1}N0 of n such that

n=X

j≥0

εj2j, (εis a binary expansion of n),

εjεj+1= 0 for all j ≥0.

It is called theNon-Adjacent Form (NAF) of n.

Itminimises theHamming weightamongst all signed binary expansions with digits{0,±1} of n.

Clemens Heuberger Hamming Weight of the Non-Adjacent-Form

(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 isexactly onesigned binary expansion ε∈ {−1,0,1}N0 of n such that

n=X

j≥0

εj2j, (εis a binary expansion of n),

εjεj+1= 0 for all j ≥0.

It is called theNon-Adjacent Form (NAF) of n.

Itminimises theHamming weightamongst all signed binary expansions with digits{0,±1} of n.

(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)

Coding Theory

Elliptic Curve Cryptography (Morain and Olivos 1990)

Clemens Heuberger Hamming Weight of the Non-Adjacent-Form

(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

Elliptic Curve Cryptography (Morain and Olivos 1990)

(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

(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−`),

V(H`) = 2 27`+ 8

81 +O(`2−`),

`→∞lim P

H`≤ ` 3+h

r2` 27

= 1

√ 2π

Z h

0

e−t2/2dt,

whereH` is theHamming weight of a random NAF of length ≤` (all NAFs of length≤`are considered to be equally likely).

(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−`),

`→∞lim P

H`≤ ` 3+h

r2` 27

= 1

√ 2π

Z h

0

e−t2/2dt,

whereH` is theHamming 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

(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

r2`

27

= 1

√ 2π

Z h

0

e−t2/2dt,

whereH` is theHamming weight of a random NAF of length ≤` (all NAFs of length≤`are considered to be equally likely).

(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 otherprobabilistic models:

Random NAF whose corresponding standard binary expansion haslength ≤`,

Random NAF of length ≤`where all residue classesmodulo 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

(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 otherprobabilistic models:

Random NAF whose corresponding standard binary expansion haslength ≤`,

Random NAF of length ≤`where all residue classesmodulo 2` have the same probability.

For instance, 101 and ¯101 represent the same residue class modulo 23.

(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 otherprobabilistic models:

Random NAF whose corresponding standard binary expansion haslength ≤`,

Random NAF of length ≤`where all residue classesmodulo 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

(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 otherprobabilistic models:

Random NAF whose corresponding standard binary expansion haslength ≤`,

Random NAF of length ≤`where all residue classesmodulo 2` have the same probability.

For instance, 101 and ¯101 represent the same residue class modulo 23.

(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

Letb= (br−1, . . . ,b0)6=0be anadmissible block, (. . . ε2(n)ε1(n)ε0(n))the NAF ofn.

We consider

Sb(N) := X

n<N

X

k=0

[(εk+r−1(n), . . . , εk(n)) =b],

i.e. thenumber of occurrences of the blockb in the NAFs of the positiveintegers less than N.

Clemens Heuberger Hamming Weight of the Non-Adjacent-Form

(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

Letb= (br−1, . . . ,b0)6=0be anadmissible block, (. . . ε2(n)ε1(n)ε0(n))the NAF ofn.

We consider

Sb(N) := X

n<N

X

k=0

[(εk+r−1(n), . . . , εk(n)) =b],

i.e. thenumber of occurrences of the blockb in the NAFs of the positiveintegers less than N.

(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 Nlog2N+Nh0(b) +NHb(log2N) +o(N),

where

Q(η) =2 + 2 [η = 0] Hb(x) = X

kZ\{0}

hk(b)e2kπix

for explicitly known constants hk(b), k ∈Z. Hb(x) is a1-periodic continuous function.

Clemens Heuberger Hamming Weight of the Non-Adjacent-Form

(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 Nlog2N+Nh0(b) +NHb(log2N) +o(N), where

Q(η) =2 + 2 [η = 0]

Hb(x) = X

kZ\{0}

hk(b)e2kπix

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

Hb(x) is a1-periodic continuous function.

(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 Nlog2N+Nh0(b) +NHb(log2N) +o(N), where

Q(η) =2 + 2 [η = 0]

Hb(x) = X

kZ\{0}

hk(b)e2kπix

for explicitly known constants hk(b), k ∈Z. Hb(x) is a1-periodic continuous function.

Clemens Heuberger Hamming Weight of the Non-Adjacent-Form

(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πilog 2) for k 6= 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

The caser = 1 is contained in Thuswaldner (1999).

(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πilog 2) for k 6= 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 caser = 1 is contained inThuswaldner (1999).

Clemens Heuberger Hamming Weight of the Non-Adjacent-Form

(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 haslow 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 veryhigh Hamming weight, theones’ complementof n has low Hamming weight and could be used:

n=

`−1

X

j=0

εj2j = 2`

`−1

X

j=0

(1−εj)2j −1

The weight of this new expansion is `+ 2−h, whereh is the weight of the standard binary expansion.

(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 haslow 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 veryhigh Hamming weight,

theones’ complementof n has low Hamming weight and could be used:

n=

`−1

X

j=0

εj2j = 2`

`−1

X

j=0

(1−εj)2j −1

The weight of this new expansion is `+ 2−h, whereh is the weight of the standard binary expansion.

Clemens Heuberger Hamming Weight of the Non-Adjacent-Form

(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 haslow 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 veryhigh Hamming weight,

theones’ complementof n has low Hamming weight and could be used:

n =

`−1

X

j=0

εj2j = 2`

`−1

X

j=0

(1−εj)2j −1

The weight of this new expansion is `+ 2−h, whereh is the weight of the standard binary expansion.

(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 haslow 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 veryhigh Hamming weight, theones’

complementof n has low Hamming weight and could be used:

n =

`−1

X

j=0

εj2j = 2`

`−1

X

j=0

(1−εj)2j −1

The weight of this new expansion is `+ 2−h, whereh is the weight of the standard binary expansion.

Clemens Heuberger Hamming Weight of the Non-Adjacent-Form

(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, forgiven 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 of the NAF related?

(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, forgiven 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 of the NAF related?

Clemens Heuberger Hamming Weight of the Non-Adjacent-Form

(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

2 Given Input Weight

3 Binary and NAF Weight as Random Vector

4 Quasi-Power Theorem

(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

3 Binary and NAF Weight as Random Vector

4 Quasi-Power Theorem

Clemens Heuberger Hamming Weight of the Non-Adjacent-Form

(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

4 Quasi-Power Theorem

(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

(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

(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

Let0<c <d <1be real numbers. Then the expected Hamming weightof the NAF of a nonnegative integer less than 2n with unsigned binary digit expansion of Hammingweight k is asymptotically

∼ 1−4 kn122

3 + 4 kn122n, 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− 122

3 + 4 x− 122

Clemens Heuberger Hamming Weight of the Non-Adjacent-Form

(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

Let0<c <d <1be real numbers. Then the expected Hamming weightof the NAF of a nonnegative integer less than 2n with unsigned binary digit expansion of Hammingweight k is asymptotically

∼ 1−4 kn122

3 + 4 kn122n,

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− 122

3 + 4 x− 122

(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 atk/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 expansionsof length≤n of weight ≈n/2,namely bn/2cn

. 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− 122

3 + 4 x− 122

Clemens Heuberger Hamming Weight of the Non-Adjacent-Form

(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 atk/n = 1/2:

Density 1/3.

This is also the average density without any restrictionon the input weight.

Reason: There are especially many standard binary expansionsof length≤n of weight ≈n/2,namely bn/2cn

. 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− 122

3 + 4 x− 122

(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 atk/n = 1/2:

Density 1/3.

This is also the average density without any restrictionon the input weight.

Reason: There are especially many standard binary expansionsof length≤n of weight ≈n/2,namely bn/2cn

.

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− 122

3 + 4 x− 122

Clemens Heuberger Hamming Weight of the Non-Adjacent-Form

(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 atk/n = 1/2:

Density 1/3.

This is also the average density without any restrictionon the input weight.

Reason: There are especially many standard binary expansionsof length≤n of weight ≈n/2,namely bn/2cn

. 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− 122

3 + 4 x− 122

(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)

Letak`n be the number of nonnegative integers whose unsigned binary expansion has length≤n and Hamming weightk and whose NAF has Hamming weight`.

We consider the generating function G(x,y,z) = X

k,`,n≥0

ak,`,nxky`zn. Consider thetransducer automaton

0 .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

(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)

Letak`n be the number of nonnegative integers whose unsigned binary expansion has length≤n and Hamming weightk and whose NAF has Hamming weight`. We consider the generating function

G(x,y,z) = X

k,`,n≥0

ak,`,nxky`zn.

Consider thetransducer automaton

0 .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.

(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)

Letak`n be the number of nonnegative integers whose unsigned binary expansion has length≤n and Hamming weightk and whose NAF has Hamming weight`. We consider the generating function

G(x,y,z) = X

k,`,n≥0

ak,`,nxky`zn. Consider thetransducer automaton

0 .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

(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)

Letak`n be the number of nonnegative integers whose unsigned binary expansion has length≤n and Hamming weightk and whose NAF has Hamming weight`. We consider the generating function

G(x,y,z) = X

k,`,n≥0

ak,`,nxky`zn. Consider thetransducer automaton

0 .1 1

0|0

1|ε 0|01

1|0¯1 0|ε

1|0

converting the standard binary expansion to the NAF. This yields x2y2z2−x2yz2−xyz2−xz+xyz+ 1

(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) = X

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

∂yG(x,y,z) y=1

= X

k,`,n≥0

`ak,`,nxkzn= xz x2z2+xz2−1 (xz+z−1)2(xz2−1). Dividing the coefficient ofxkzn by the number nk

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

Using methods ofmultivariate asymptoticsgives the result: Bender and Richmond’s method is used.

Clemens Heuberger Hamming Weight of the Non-Adjacent-Form

(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) = X

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

∂yG(x,y,z) y=1

= X

k,`,n≥0

`ak,`,nxkzn= xz x2z2+xz2−1 (xz+z−1)2(xz2−1).

Dividing the coefficient ofxkzn by the number nk

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

Using methods ofmultivariate asymptoticsgives the result: Bender and Richmond’s method is used.

(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) = X

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

∂yG(x,y,z) y=1

= X

k,`,n≥0

`ak,`,nxkzn= xz x2z2+xz2−1 (xz+z−1)2(xz2−1). Dividing the coefficient ofxkzn by the number nk

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

Using methods ofmultivariate asymptoticsgives the result: Bender and Richmond’s method is used.

Clemens Heuberger Hamming Weight of the Non-Adjacent-Form

(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) = X

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

∂yG(x,y,z) y=1

= X

k,`,n≥0

`ak,`,nxkzn= xz x2z2+xz2−1 (xz+z−1)2(xz2−1). Dividing the coefficient ofxkzn by the number nk

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

(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, lengthn→ ∞.

Theorem

Let k be a fixed integer. Then theexpected Hamming weightof the NAF of an integer with standard binary digit expansion of Hammingweight k and length ≤n is asymptotically

k−k(k2−3k+ 2)

n2 +O

1 n3 + 1

nk−1

,

whereas theexpected 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

(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, lengthn→ ∞.

Theorem

Let k be a fixed integer. Then theexpected Hamming weightof the NAF of an integer with standard binary digit expansion of Hammingweight k and length ≤n is asymptotically

k−k(k2−3k+ 2)

n2 +O

1 n3 + 1

nk−1

,

whereas theexpected 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

.

(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, lengthn→ ∞.

Theorem

Let k be a fixed integer. Then theexpected Hamming weightof the NAF of an integer with standard binary digit expansion of Hammingweight k and length ≤n is asymptotically

k−k(k2−3k+ 2)

n2 +O

1 n3 + 1

nk−1

,

whereas theexpected 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

(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 weightk:

k−k(k2−3k+ 2)

n2 +O

1 n3 + 1

nk−1

,

i.e., themain term corresponds to justkeeping theinput expansion untouched.

Fixed input weightn−k:

(k+ 2)−2k

n −(k−1)k(k+ 2)

n2 +O

1 n3 + 1

nk−1

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

Referências

Documentos relacionados

In 2013, these variables included the polar diameter, fresh weight of the fruit, fresh weight of the peel, fresh weight of seeds, fresh weight of pulp, total titratable

The performance variables (weight, weight gain, daily weight gain, feed conversion and feed intake) during the 7 - 42 days period, the fasting weight and the warm carcass weight

Table 6 - Means of fresh marketable weight (FMW, in g) and non-marketable (FNMW, in g), total fresh weight (TFW, in g), dry marketable weight (DMW, in g), non-marketable (DNMW,

De seguida apresenta-se a colecção, e é de referir que as cores apresentadas nas ilustrações podem não corresponder na totalidade às cores escolhidas que estão referidas no

Figure 4.3: 0.5% NvPLA tensile test graphic results, from left to right: general graphic representing the full behaviour of the specimen, 0.5% NvPLA elastic behaviour within the

Si les notions de territoire et de développement territorial se répandent actuellement dans le discours social comme dans le discours scientifique, c’est peut- -être parce que

Supondo que o VP é decomponível em até três níveis – o do sintagma raiz (que pode ser uma estrutura de predicação envolvendo um adjetivo e o complemento do verbo,

A Educação Física (EF) no 1.º Ciclo de Ensino Básico (CEB) em Portugal, apesar de integrar o cur‑ rículo obrigatório, enfrenta muitas dificuldades para se afirmar como área