p -Adic Dynamical Systems and Cryptography Non-Archimedean View on T - - PowerPoint PPT Presentation

p adic dynamical systems and cryptography
SMART_READER_LITE
LIVE PREVIEW

p -Adic Dynamical Systems and Cryptography Non-Archimedean View on T - - PowerPoint PPT Presentation

p -Adic Dynamical Systems and Cryptography Non-Archimedean View on T -functions Vladimir Anashin Russian State University for the Humanities Faculty of Information Security p -Adic Dynamical Systems and Cryptography p. 1/65 T -functions:


slide-1
SLIDE 1

p-Adic Dynamical Systems and Cryptography

Non-Archimedean View on T-functions

Vladimir Anashin Russian State University for the Humanities Faculty of Information Security

p-Adic Dynamical Systems and Cryptography – p. 1/65

slide-2
SLIDE 2

T-functions: Where they come from?

In 2002 Klimov and Shamir introduced to crypto community a class of mappings they called T-functions: (α↓

0, α↓ 1, α↓ 2, . . .) → (Φ0(α↓ 0), Φ1(α↓ 0, α↓ 1), Φ2(α↓ 0, α↓ 1, α↓ 2), . . .).

Here α↓

i ∈ Bm is a Boolean columnar m-dimensional

vector; B = {0, 1}; Φi: (Bm)(i+1) → Bn maps (i + 1) Boolean columnar m-dimensional vectors α↓

0, . . . , α↓ i to

n-dimensional Boolean vector Φi(α↓

0, . . . , α↓ i).

These mappings are of interest for software-oriented ciphers, since both arithmetic and bitwise logical

  • perations, which are basic instructions for most

processors, are obviously T-functions.

p-Adic Dynamical Systems and Cryptography – p. 2/65

slide-3
SLIDE 3

T-functions: Where they come from?

In 2002 Klimov and Shamir introduced to crypto community a class of mappings they called T-functions: In mathematics these mappings are known more than 30

  • years. The mathematical theory of these mappings is

well developed. In different areas of mathematics these mappings were studied under different names, for instance: Triangle mappings, in the theory of Boolean functions;

p-Adic Dynamical Systems and Cryptography – p. 2/65

slide-4
SLIDE 4

T-functions: Where they come from?

In 2002 Klimov and Shamir introduced to crypto community a class of mappings they called T-functions: In mathematics these mappings are known more than 30

  • years. The mathematical theory of these mappings is

well developed. In different areas of mathematics these mappings were studied under different names, for instance: Triangle mappings, in the theory of Boolean functions; Determined functions, in automata theory;

p-Adic Dynamical Systems and Cryptography – p. 2/65

slide-5
SLIDE 5

T-functions: Where they come from?

In 2002 Klimov and Shamir introduced to crypto community a class of mappings they called T-functions: In mathematics these mappings are known more than 30

  • years. The mathematical theory of these mappings is

well developed. In different areas of mathematics these mappings were studied under different names, for instance: Triangle mappings, in the theory of Boolean functions; Determined functions, in automata theory; Compatible functions on the residue ring Z/2n, in algebra, etc.

p-Adic Dynamical Systems and Cryptography – p. 2/65

slide-6
SLIDE 6

T-functions: Where they come from?

In early 90-th the non-Archimedean theory of T-functions started, which treated T-functions as continuous mappings of the space Z2 of 2-adic integers.

p-Adic Dynamical Systems and Cryptography – p. 3/65

slide-7
SLIDE 7

T-functions: Where they come from?

In early 90-th the non-Archimedean theory of T-functions started, which treated T-functions as continuous mappings of the space Z2 of 2-adic integers. In our talk we introduce some methods and results from this theory. These methods are of use for the design of fast and flexible stream ciphers based

  • n T-functions, and for

the study of important properties of these ciphers.

p-Adic Dynamical Systems and Cryptography – p. 3/65

slide-8
SLIDE 8

Stream encryption is easy!

Take a plain text α0 α1 α2 . . .

p-Adic Dynamical Systems and Cryptography – p. 4/65

slide-9
SLIDE 9

Stream encryption is easy!

Take a plain text α0 α1 α2 . . . add it modulo 2 ⊕

p-Adic Dynamical Systems and Cryptography – p. 4/65

slide-10
SLIDE 10

Stream encryption is easy!

Take a plain text α0 α1 α2 . . . add it modulo 2 ⊕ to a key stream γ0 γ1 γ2 . . .

p-Adic Dynamical Systems and Cryptography – p. 4/65

slide-11
SLIDE 11

Stream encryption is easy!

Take a plain text α0 α1 α2 . . . add it modulo 2 ⊕ to a key stream γ0 γ1 γ2 . . . and get

p-Adic Dynamical Systems and Cryptography – p. 4/65

slide-12
SLIDE 12

Stream encryption is easy!

Take a plain text α0 α1 α2 . . . add it modulo 2 ⊕ to a key stream γ0 γ1 γ2 . . . and get encrypted text ζ0 ζ1 ζ2 . . .

p-Adic Dynamical Systems and Cryptography – p. 4/65

slide-13
SLIDE 13

Stream encryption is easy!

To decrypt, take the encrypted text ζ0 ζ1 ζ2 . . .

p-Adic Dynamical Systems and Cryptography – p. 5/65

slide-14
SLIDE 14

Stream encryption is easy!

To decrypt, take the encrypted text ζ0 ζ1 ζ2 . . . add it modulo 2 ⊕

p-Adic Dynamical Systems and Cryptography – p. 5/65

slide-15
SLIDE 15

Stream encryption is easy!

To decrypt, take the encrypted text ζ0 ζ1 ζ2 . . . add it modulo 2 ⊕ to the key stream γ0 γ1 γ2 . . .

p-Adic Dynamical Systems and Cryptography – p. 5/65

slide-16
SLIDE 16

Stream encryption is easy!

To decrypt, take the encrypted text ζ0 ζ1 ζ2 . . . add it modulo 2 ⊕ to the key stream γ0 γ1 γ2 . . . and get

p-Adic Dynamical Systems and Cryptography – p. 5/65

slide-17
SLIDE 17

Stream encryption is easy!

To decrypt, take the encrypted text ζ0 ζ1 ζ2 . . . add it modulo 2 ⊕ to the key stream γ0 γ1 γ2 . . . and get the plain text α0 α1 α2 . . .

p-Adic Dynamical Systems and Cryptography – p. 5/65

slide-18
SLIDE 18

Shannon’s Theorem yields that the encryption is secure whenever one chooses key stream at random.

p-Adic Dynamical Systems and Cryptography – p. 6/65

slide-19
SLIDE 19

Shannon’s Theorem yields that the encryption is secure whenever one chooses key stream at random. And Kolmogorov’s complexity theory says that it is impossible to produce a random sequence by a deterministic algorithm.

p-Adic Dynamical Systems and Cryptography – p. 6/65

slide-20
SLIDE 20

Shannon’s Theorem yields that the encryption is secure whenever one chooses key stream at random. And Kolmogorov’s complexity theory says that it is impossible to produce a random sequence by a deterministic algorithm.

Could we use stream encryption on computers in a way other than to store huge amounts of key stream bits on hard drives?

p-Adic Dynamical Systems and Cryptography – p. 6/65

slide-21
SLIDE 21

We could.

p-Adic Dynamical Systems and Cryptography – p. 7/65

slide-22
SLIDE 22

We could.

Given a family T of statistical tests, a pseudorandom sequence (with respect to T ) is the one that passes all the tests of T .

p-Adic Dynamical Systems and Cryptography – p. 7/65

slide-23
SLIDE 23

We could.

Given a family T of statistical tests, a pseudorandom sequence (with respect to T ) is the one that passes all the tests of T . Assuming an adversary can use only the tests of T , he can not distinguish a pseudorandom sequence from a truly random one.

p-Adic Dynamical Systems and Cryptography – p. 7/65

slide-24
SLIDE 24

We could.

Given a family T of statistical tests, a pseudorandom sequence (with respect to T ) is the one that passes all the tests of T . Assuming an adversary can use only the tests of T , he can not distinguish a pseudorandom sequence from a truly random one. That is, an adversary can not decrypt the message whenever a key stream is pseudorandom.

p-Adic Dynamical Systems and Cryptography – p. 7/65

slide-25
SLIDE 25

We could.

Given a family T of statistical tests, a pseudorandom sequence (with respect to T ) is the one that passes all the tests of T . Assuming an adversary can use only the tests of T , he can not distinguish a pseudorandom sequence from a truly random one. That is, an adversary can not decrypt the message whenever a key stream is pseudorandom.

It is possible to produce a pseudorandom sequence by an algorithm, under some reasonable choices of T .

p-Adic Dynamical Systems and Cryptography – p. 7/65

slide-26
SLIDE 26

Pseudorandom number generator

PRNG produces a key stream. xi

p-Adic Dynamical Systems and Cryptography – p. 8/65

slide-27
SLIDE 27

Pseudorandom number generator

PRNG produces a key stream. xi f xi+1 = f(xi)

state update

f : A → A is the state update function,

p-Adic Dynamical Systems and Cryptography – p. 8/65

slide-28
SLIDE 28

Pseudorandom number generator

PRNG produces a key stream. xi f G xi+1 = f(xi)

state update

yi = G(xi)

  • utput

f : A → A is the state update function, G: A → B is the output function.

p-Adic Dynamical Systems and Cryptography – p. 8/65

slide-29
SLIDE 29

The sequence of internal states {xi ∈ A} of the PRNG is the sequence x0, x1 = f(x0), . . . , xi+1 = f(xi) = f i+1(x0), . . . The output sequence {yi ∈ B} satisfies the law yi = G(xi), (i = 0, 1, 2, . . .). In classical stream ciphers a key is the initial state x0. A key is the only information that is not known to an adversary.

p-Adic Dynamical Systems and Cryptography – p. 9/65

slide-30
SLIDE 30

Most often the set of internal states (the internal alphabet) A is the set Bn of all n-bit words; the output alphabet B is the set Bk of all k-bit words. It is convenient to associate the set Bn to the residue ring Z/2n up to the natural one-to-one correspondence: To each z ∈ Z/2n = {0, 1, 2, . . . , 2n − 1} there corresponds one and the only n-bit word of Bn, which is a base-2 expansion of z. Z/2n ∋ z = ζ0 + ζ1 ∙ 2 + ζ2 ∙ 22 + ∙ ∙ ∙ ← → ζ0ζ1ζ2 . . . ∈ Bn

p-Adic Dynamical Systems and Cryptography – p. 10/65

slide-31
SLIDE 31

Why dynamical systems?

An autonomous dynamical system is a suite X, μ, f, where X is a phase space (usually a metric space), μ is a measure on X (e.g., probabilistic one); f : X → X is a measurable mapping (usually, continuous). A trajectory of the point x0 is a sequence x0, x1 = f(x0), . . . , xi+1 = f(xi) = fi+1(x0), . . . .

  • Dynamical systems theory prompts a very natural

approach: Let X, μ, f be a dynamical system with discrete time. Take a point x0 ∈ X as a key, and use the trajectory as a source of pseudorandomness.

p-Adic Dynamical Systems and Cryptography – p. 11/65

slide-32
SLIDE 32

To make this approach to stream cipher design meaningful, the following questions must be answered: How one could evaluate the trajectory on a digital computer?

p-Adic Dynamical Systems and Cryptography – p. 12/65

slide-33
SLIDE 33

To make this approach to stream cipher design meaningful, the following questions must be answered: How one could evaluate the trajectory on a digital computer? What will be the performance?

p-Adic Dynamical Systems and Cryptography – p. 12/65

slide-34
SLIDE 34

To make this approach to stream cipher design meaningful, the following questions must be answered: How one could evaluate the trajectory on a digital computer? What will be the performance? How pseudorandom is the so produced sequence?

p-Adic Dynamical Systems and Cryptography – p. 12/65

slide-35
SLIDE 35

To make this approach to stream cipher design meaningful, the following questions must be answered: How one could evaluate the trajectory on a digital computer? What will be the performance? How pseudorandom is the so produced sequence? Is the corresponding generator secure?

p-Adic Dynamical Systems and Cryptography – p. 12/65

slide-36
SLIDE 36

Any use of chaos?

Since early 90th intensive studies were undertaken in the chaos-based cryptography. The leading idea of the latter is quite natural: Take a chaotic map f and make it discrete! The trajectory will hopefully look like random since the mapping is chaotic (that is, sensitive to small perturbations of the initial state).

p-Adic Dynamical Systems and Cryptography – p. 13/65

slide-37
SLIDE 37

Bad news

Results of such a straightforward approach turned out to be rather disappointing:

p-Adic Dynamical Systems and Cryptography – p. 14/65

slide-38
SLIDE 38

Bad news

Results of such a straightforward approach turned out to be rather disappointing:

  • Example. A discrete version of the doubling map

(Bernoulli shift) f(x) = (2 ∙ x) mod 1 is xi+1 ≡ 2 ∙ xi (mod 2n) becomes 0 after at most n iterations!!!

p-Adic Dynamical Systems and Cryptography – p. 14/65

slide-39
SLIDE 39

Bad news

Results of such a straightforward approach turned out to be rather disappointing:

  • Example. A discrete version of the doubling map

(Bernoulli shift) becomes 0 after at most n iterations!!! One more example. A discrete version of the tent map f(x) = 1 − 2 ∙ |x − 1

2| on [0, 1] always falls in very short

cycles, of length n at most!!!

p-Adic Dynamical Systems and Cryptography – p. 14/65

slide-40
SLIDE 40

Bad news

Results of such a straightforward approach turned out to be rather disappointing:

  • Example. A discrete version of the doubling map

(Bernoulli shift) becomes 0 after at most n iterations!!! One more example. A discrete version of the tent map always falls in very short cycles, of length n at most!!! Yet another example. A discrete version of the logistic map f(x) = 4 ∙ x ∙ (1 − x) mod 1 becomes 0 after at most n

2 iterations!!!

p-Adic Dynamical Systems and Cryptography – p. 14/65

slide-41
SLIDE 41
  • L. Kocarev. Chaos-Based Cryptography: A Brief Overview (2001):

Despite a huge number of papers published in the field of chaos-based cryptography, the impact that this research has made on conventional cryptography is rather

  • marginal. This is due to two reasons:

First, almost all chaos-based cryptographic algorithms use dynamical systems defined on the set

  • f real numbers, and therefore are difficult for

practical realization and circuit implementation.

p-Adic Dynamical Systems and Cryptography – p. 15/65

slide-42
SLIDE 42
  • L. Kocarev. Chaos-Based Cryptography: A Brief Overview (2001):

Despite a huge number of papers published in the field of chaos-based cryptography, the impact that this research has made on conventional cryptography is rather marginal. First, almost all chaos-based cryptographic algorithms are difficult for practical realization and circuit implementation. Second, security and performance of almost all proposed chaos-based methods are not analyzed in terms of the techniques developed in cryptography. Moreover, most of the proposed methods generate cryptographically weak and slow algorithms.

p-Adic Dynamical Systems and Cryptography – p. 15/65

slide-43
SLIDE 43

Shujun Li. When Chaos Meets Computers (2004):

Digital computers are absolutely incapable of showing true long-time dynamics of some chaotic systems, including the tent map, the Bernoulli shift map and their analogues, even in a high-precision floating-point

  • arithmetic. Although the results cannot directly

generalized to most chaotic systems, the risk of using digital computers to numerically study continuous dynamical systems is shown clearly. As a result, we reach the old saying that “it is impossible to do everything with computers only”.

p-Adic Dynamical Systems and Cryptography – p. 16/65

slide-44
SLIDE 44

Despite these pessimistic conclusions of the two of key researchers of chaos-based cryptography, there are very promising developments in stream cipher design related to dynamical systems theory.

p-Adic Dynamical Systems and Cryptography – p. 17/65

slide-45
SLIDE 45

Despite these pessimistic conclusions of the two of key researchers of chaos-based cryptography, there are very promising developments in stream cipher design related to dynamical systems theory.

Surprisingly, these developments are related neither to real nor to complex, but to the non-Archimedean dynamical systems theory!

p-Adic Dynamical Systems and Cryptography – p. 17/65

slide-46
SLIDE 46

What is a good PRNG?

A cryptographic PRNG must meet the following conditions: For (almost) all keys the output sequences must be pseudorandom (i.e., undistinguishable from a truly random sequence up to the tests of T ).

p-Adic Dynamical Systems and Cryptography – p. 18/65

slide-47
SLIDE 47

What is a good PRNG?

A cryptographic PRNG must meet the following conditions: For (almost) all keys the output sequences must be pseudorandom (i.e., undistinguishable from a truly random sequence up to the tests of T ). Given a segment yj, yj+1, . . . , yj+s−1 of the output sequence, finding the corresponding key must be infeasible (in some properly defined sense).

p-Adic Dynamical Systems and Cryptography – p. 18/65

slide-48
SLIDE 48

What is a good PRNG?

A cryptographic PRNG must meet the following conditions: For (almost) all keys the output sequences must be pseudorandom (i.e., undistinguishable from a truly random sequence up to the tests of T ). Given a segment yj, yj+1, . . . , yj+s−1 of the output sequence, finding the corresponding key must be infeasible (in some properly defined sense). The PRNG must be suitable for software (or hardware) implementation; the performance must be sufficiently fast.

p-Adic Dynamical Systems and Cryptography – p. 18/65

slide-49
SLIDE 49

In other words: The state update function f must provide pseudorandomness; in particular, it must guarantee uniform distribution and long period of the state update sequence {xi}.

p-Adic Dynamical Systems and Cryptography – p. 19/65

slide-50
SLIDE 50

In other words: The state update function f must provide pseudorandomness The output function G must not spoil the pseudorandomness (in particular, the output sequence {yi} must be uniformly distributed and must have long period); and moreover, G must make the PRNG secure (in particular, given yi, it must be difficult to find xi from the equation yi = G(xi)).

p-Adic Dynamical Systems and Cryptography – p. 19/65

slide-51
SLIDE 51

In other words: The state update function f must provide pseudorandomness The output function G must not spoil the pseudorandomness ; and moreover, G must make the PRNG secure To make the PRNG suitable for software/hardware implementations, both f and G must be compositions of basic microprocessor instructions.

p-Adic Dynamical Systems and Cryptography – p. 19/65

slide-52
SLIDE 52

Designing PRNG

To satisfy condition 1 (of 3) a good secure PRNG must meet, one could take the state update function f : Z/2n → Z/2n with a single cycle property; that is, f permutes elements of Z/2n cyclically. The state update sequence x0, x1 = f(x0), . . . , xi+1 = f(xi) = f i+1(x0), . . .

  • f n-bit words will have then the longest possible period

(of length 2n), and strict uniform distribution; that is, each n-bit word will occur at the period exactly once.

p-Adic Dynamical Systems and Cryptography – p. 20/65

slide-53
SLIDE 53

Designing PRNG

To satisfy the first part of condition 2 one could take a balanced mapping G: Z/2n → Z/2k. That is, to each k-bit word the mapping G maps the same number of n-bit words (hence; k ≤ n). For k = n balanced mappings are just invertible (that is, bijective,

  • ne-to-one) mappings.

For k ≪ n balanced functions could be of use to satisfy the second part of the condition 2, since the equation yi = G(xi) has too many solutions then, 2n−k.

p-Adic Dynamical Systems and Cryptography – p. 20/65

slide-54
SLIDE 54

Designing PRNG

To satisfy condition 3, one must know how to construct single cycle (respectively, balanced) mappings out of basic microprocessor instructions, which include: integer arithmetic operations (addition, multiplication,...) bitwise logical operations (OR, XOR, AND, NOT) machine operations (shifts, masking, sometimes cyclic shifts).

p-Adic Dynamical Systems and Cryptography – p. 20/65

slide-55
SLIDE 55

Designing PRNG

To satisfy condition 3, one must know how to construct single cycle (respectively, balanced) mappings out of basic microprocessor instructions, which include: integer arithmetic operations (addition, multiplication,...) bitwise logical operations (OR, XOR, AND, NOT) machine operations (shifts, masking, sometimes cyclic shifts).

This could be done with the use of 2-adic analysis!

p-Adic Dynamical Systems and Cryptography – p. 20/65

slide-56
SLIDE 56

More attentive look ...

Let z = δ0(z) + δ1(z) ∙ 2 + δ2(z) ∙ 22 + δ3(z) ∙ 23 + ∙ ∙ ∙ be a base-2 expansion for z ∈ N0; then: y XOR z = y ⊕ z is a bitwise addition modulo 2: δj(y XOR z) ≡ δj(y) + δj(z) (mod 2); y AND z is a bitwise multiplication modulo 2: δj(y AND z) ≡ δj(y) ∙ δj(z) (mod 2); ⌊z

2⌋ is a shift towards less significant bits;

2 ∙ z is a shift towards more significant bits; y AND z is the masking of z with the mask y; z (mod 2k) = z AND(2k − 1) is a reduction of z modulo 2k

p-Adic Dynamical Systems and Cryptography – p. 21/65

slide-57
SLIDE 57

... and tiny observations

All basic chip operations, with the only exception of cyclic shifts, are well defined on the space Z2 of all 2-adic integers.

p-Adic Dynamical Systems and Cryptography – p. 22/65

slide-58
SLIDE 58

... and tiny observations

All basic chip operations, with the only exception of cyclic shifts, are well defined on the space Z2 of all 2-adic integers. The space Z2 could be thought of as a set of all countable infinite binary sequences.

p-Adic Dynamical Systems and Cryptography – p. 22/65

slide-59
SLIDE 59

... and tiny observations

All basic chip operations, with the only exception of cyclic shifts, are well defined on the space Z2 of all 2-adic integers. The following example proves that . . . 11111 = −1.

. . . 1 1 1 1 + . . . 0 1 . . . 0

p-Adic Dynamical Systems and Cryptography – p. 22/65

slide-60
SLIDE 60

Do you know that . . . 1010101 = −1

3?

. . . 0 1 1 1 × . . . 0 1 1 . . . 0 1 1 1 + . . . 1 1 1 . . . 1 1 1 1 1 1

p-Adic Dynamical Systems and Cryptography – p. 23/65

slide-61
SLIDE 61

Do you know that . . . 1010101 = −1

3?

A calculator knows that either!

p-Adic Dynamical Systems and Cryptography – p. 23/65

slide-62
SLIDE 62

A short 2-adic tour

Sequences with only finite number of 1’s correspond to non-negative rational integers in their base-2 expansions: . . . 00011 = 3

p-Adic Dynamical Systems and Cryptography – p. 24/65

slide-63
SLIDE 63

A short 2-adic tour

Sequences with only finite number of 0’s correspond to negative rational integers: . . . 111100 = −4

p-Adic Dynamical Systems and Cryptography – p. 24/65

slide-64
SLIDE 64

A short 2-adic tour

Eventually periodic sequences correspond to rational numbers represented by irreducible fractions with odd denominators: . . . 1010101 = −1 3

p-Adic Dynamical Systems and Cryptography – p. 24/65

slide-65
SLIDE 65

A short 2-adic tour

Sequences that are not (eventually) periodic correspond to no rational number: . . . 01111011101101

p-Adic Dynamical Systems and Cryptography – p. 24/65

slide-66
SLIDE 66

A short 2-adic tour

Distance: d2(u, v) = 2−k iff u ≡ v (mod 2k); u ≡ v (mod 2k+1)

The longer are common initial segments of sequences the closer are the points!

The space Z2 is complete with respect to the 2-adic distance (metric) d2, and compact.

p-Adic Dynamical Systems and Cryptography – p. 24/65

slide-67
SLIDE 67

A short 2-adic tour

As usual, the norm is u2 = d2(u, 0).

The higher power of 2 is a factor of a 2-adic integer the smaller the integer is!

p-Adic Dynamical Systems and Cryptography – p. 24/65

slide-68
SLIDE 68

A short 2-adic tour

Once distance and norm are defined, notions of limits, convergent series, continuous functions, derivatives, etc., become meaningful: d2(−1, 3) = (−1) − 32 = − 42 = 1

22 = 1 4; d2

lim

n→∞ 2n = 0;

ln(−3) = −

  • i=1

4i i is a 2-adic integer!

p-Adic Dynamical Systems and Cryptography – p. 24/65

slide-69
SLIDE 69

More observations

Basic chip operations (with the exception of cyclic shifts) are well defined continuous Z2-valued functions

  • f 2-adic integer arguments.

p-Adic Dynamical Systems and Cryptography – p. 25/65

slide-70
SLIDE 70

More observations

Basic chip operations (with the exception of cyclic shifts) are well defined continuous Z2-valued functions

  • f 2-adic integer arguments.

Moreover, all mentioned functions (with the exception of those defined by shifts towards less significant bits) satisfy Lipschitz condition with coefficient 1 with respect to the 2-adic metric.

p-Adic Dynamical Systems and Cryptography – p. 25/65

slide-71
SLIDE 71

More observations

Basic chip operations (with the exception of cyclic shifts) are well defined continuous Z2-valued functions

  • f 2-adic integer arguments.

All compositions F of basic chip instructions (with the exceptions of cyclic shifts, and shifts towards less significant bits) satisfy Lipschitz condition with coefficient 1: F(a) − F(b)2 ≤ a − b2

p-Adic Dynamical Systems and Cryptography – p. 25/65

slide-72
SLIDE 72

Terminology notes

The condition F(a) ≡ F(b) (mod 2k) whenever a ≡ b (mod 2k) is equivalent to the condition F(a) − F(b)2 ≤ a − b2 That is, F satisfy Lipschitz condition with coefficient 1 iff F is a compatible mapping of the ring Z2 into itself.

p-Adic Dynamical Systems and Cryptography – p. 26/65

slide-73
SLIDE 73

Terminology notes

The condition F(a) ≡ F(b) (mod 2k) whenever a ≡ b (mod 2k) is equivalent to the condition F(a) − F(b)2 ≤ a − b2 That is, F satisfy Lipschitz condition with coefficient 1 iff F is a compatible mapping of the ring Z2 into itself. ‘Compatible’ is an algebraic term. In cryptography they used to speak of ‘T-functions on n-bit words’ instead of ‘compatible mappings of the residue ring Z/2n into itself’.

p-Adic Dynamical Systems and Cryptography – p. 26/65

slide-74
SLIDE 74

Terminology notes

This is a univariate T-function F: (χ0, χ1, χ2, . . .)

F

→ (ψ0(χ0); ψ1(χ0, χ1); ψ2(χ0, χ1, χ2); . . .). Here χj ∈ {0, 1}, and each ψj(χ0, . . . , χj) is a Boolean function in Boolean variables χ0, . . . , χj. Thus, F sends a number with the base-2 expansion χ0 + χ1 ∙ 2 + χ2 ∙ 22 + ∙ ∙ ∙ to the number with the base-2 expansion ψ0(χ0) + ψ1(χ0, χ1) ∙ 2 + ψ2(χ0, χ1, χ2) ∙ 22 + ∙ ∙ ∙

p-Adic Dynamical Systems and Cryptography – p. 26/65

slide-75
SLIDE 75

Yet another observation

We conclude: T-functions on n-bit words are just approximations

  • f 2-adic compatible functions (i.e., functions that

satisfy Lipschitz condition with coefficient 1) up to a precision 2−n w. r. t. the 2-adic metric. That is, a T-function on n-bit words is just a reduction modulo 2n of a 2-adic function that satisfy Lipschitz condition with coefficient 1

p-Adic Dynamical Systems and Cryptography – p. 27/65

slide-76
SLIDE 76

Yet another observation

We conclude: T-functions on n-bit words are just approximations

  • f 2-adic compatible functions

To study properties of compatible functions (hence, properties of T-functions) one may use 2-adic analysis, since compatible functions are continuous.

p-Adic Dynamical Systems and Cryptography – p. 27/65

slide-77
SLIDE 77

Yet another observation

We conclude: T-functions on n-bit words are just approximations

  • f 2-adic compatible functions

To study properties of compatible functions (hence, properties of T-functions) one may use 2-adic analysis In addition to the basic ship operations, to construct compatible functions one may use also subtraction, division by an odd integer, exponentiation of an odd integer

p-Adic Dynamical Systems and Cryptography – p. 27/65

slide-78
SLIDE 78

Wild functions

For instance, a computer evaluates the following wild-looking function correctly, up to the best 2-adic precision he can achieve:

p-Adic Dynamical Systems and Cryptography – p. 28/65

slide-79
SLIDE 79

Wild functions

For instance, a computer evaluates the following wild-looking function correctly, up to the best 2-adic precision he can achieve: g(x) =

  • 1 − 2 ∙

x AND x2 + x3 OR x4 3 − 4 ∙ (5 + 6x5)x6 XOR x7 7−

8x8 9+10x9

p-Adic Dynamical Systems and Cryptography – p. 28/65

slide-80
SLIDE 80

The virtual world is the non-Archimedean world!

p-Adic Dynamical Systems and Cryptography – p. 29/65

slide-81
SLIDE 81

The virtual world is the non-Archimedean world! All triangles are isosceles!

p-Adic Dynamical Systems and Cryptography – p. 29/65

slide-82
SLIDE 82

The virtual world is the non-Archimedean world! All triangles are isosceles! Every point inside a circle is a center of the circle!

p-Adic Dynamical Systems and Cryptography – p. 29/65

slide-83
SLIDE 83

Important:

There is a tight connection between the invertibility property/single cycle property of T-functions and metric properties of the corresponding 2-adic functions

p-Adic Dynamical Systems and Cryptography – p. 30/65

slide-84
SLIDE 84

More 2-adic analysis

The space Z2 is a measurable space, which is endowed with a natural probabilistic measure, the normalized Haar measure μ2.

p-Adic Dynamical Systems and Cryptography – p. 31/65

slide-85
SLIDE 85

More 2-adic analysis

The space Z2 is a measurable space, which is endowed with a natural probabilistic measure, the normalized Haar measure μ2. Namely, the set a + 2kZ2, i.e., the set

  • f all 2-adic integers that are congruent to a modulo 2k,

is a ball of radius 2−k. By the definition, the volume of this ball is μ2(a + 2kZ2) = 2−k.

p-Adic Dynamical Systems and Cryptography – p. 31/65

slide-86
SLIDE 86

More 2-adic analysis

The space Z2 is a measurable space, which is endowed with a natural probabilistic measure, the normalized Haar measure μ2. The mapping F : S → S of the measurable space S with a probabilistic measure μ is said to preserve measure μ (or to be μ-preserving) iff μ(F −1(S)) = μ(S) for every measurable subset S ⊂ S.

p-Adic Dynamical Systems and Cryptography – p. 31/65

slide-87
SLIDE 87

More 2-adic analysis

The space Z2 is a measurable space, which is endowed with a natural probabilistic measure, the normalized Haar measure μ2. The mapping F : S → S of the measurable space S with a probabilistic measure μ is said to preserve measure μ (or to be μ-preserving) iff μ(F −1(S)) = μ(S) for every measurable subset S ⊂ S. A μ-preserving mapping F is said to be ergodic iff μ(S) = 1 or μ(s) = 0 for every measurable S such that F −1(S) ⊂ S.

p-Adic Dynamical Systems and Cryptography – p. 31/65

slide-88
SLIDE 88

More 2-adic analysis

The space Z2 is a measurable space, which is endowed with a natural probabilistic measure, the normalized Haar measure μ2. The mapping F : S → S of the measurable space S with a probabilistic measure μ is said to preserve measure μ (or to be μ-preserving) iff μ(F −1(S)) = μ(S) for every measurable subset S ⊂ S. A μ-preserving mapping F is said to be ergodic iff μ(S) = 1 or μ(s) = 0 for every measurable S such that F −1(S) ⊂ S. Loosely speaking, the invariant set of the ergodic mapping is either nothing, or everything.

p-Adic Dynamical Systems and Cryptography – p. 31/65

slide-89
SLIDE 89

Using 2-adic analysis

A compatible mapping F : Z2 → Z2 is said to be bijective (resp., transitive) modulo 2k iff the induced mapping x → F(x) (mod 2k) is a permutation (resp., a permutation with a single cycle) on Z/2k.

p-Adic Dynamical Systems and Cryptography – p. 32/65

slide-90
SLIDE 90

Using 2-adic analysis

A compatible mapping F : Z2 → Z2 is said to be bijective (resp., transitive) modulo 2k iff the induced mapping x → F(x) (mod 2k) is a permutation (resp., a permutation with a single cycle) on Z/2k. Theorem 1. (Anashin, 2002) A compatible mapping F : Z2 → Z2 is bijective (accordingly, transitive ) modulo 2k for all k = 1, 2, 3, . . . iff it is measure-preserving (or, accordingly, ergodic ) with respect to the normalized Haar measure μ2 on Z2

p-Adic Dynamical Systems and Cryptography – p. 32/65

slide-91
SLIDE 91

Using 2-adic analysis

A compatible mapping F : Z2 → Z2 is said to be bijective (resp., transitive) modulo 2k iff the induced mapping x → F(x) (mod 2k) is a permutation (resp., a permutation with a single cycle) on Z/2k. measure preservation=invertibility (mod 2k) for all k ∈ N ergodicity=single cycle property (mod 2k) for all k ∈ N

p-Adic Dynamical Systems and Cryptography – p. 32/65

slide-92
SLIDE 92

Important:

Thus, ergodic functions could serve as state update functions, whereas measure preserving functions could serve as output functions of the PRNG.

p-Adic Dynamical Systems and Cryptography – p. 33/65

slide-93
SLIDE 93

Important:

We must know how to construct ergodic/measure-preserving functions out of basic chip instructions

p-Adic Dynamical Systems and Cryptography – p. 33/65

slide-94
SLIDE 94

Using 2-adic analysis once again

To construct measure-preserving/ergodic functions, very

  • ften we could use the following effect, which is due to

the ‘2-adic smoothness’ of compatible functions: A compatible function F : Z2 → Z2 is measure-preserving/ergodic iff the corresponding T-function F (mod 2n) on n-bit words (which is merely an approximation of F with precision 1

2n) is

invertible/with a single cycle property!

p-Adic Dynamical Systems and Cryptography – p. 34/65

slide-95
SLIDE 95

Using 2-adic analysis once again

For crypto matters this gives: To verify whether a T-function is invertible/with a single cycle property on N-bit words (where N is big)

  • ne should check whether it is invertible/with a single

cycle property on n-bit words, where n is often rather small!

p-Adic Dynamical Systems and Cryptography – p. 34/65

slide-96
SLIDE 96

Using 2-adic derivations

Theorem 2. (Anashin, 1993) Let a compatible function F : Z2 → Z2 be uniformly differentiable on Z2. Then F is ergodic if and only if it is transitive modulo 2N2(F)+2 Here N2(F) is such that

  • F(x + h) − F(x)

h − F ′(x)

  • 2

≤ 1 4 whenever h2 ≤ 2−N2(F).

p-Adic Dynamical Systems and Cryptography – p. 35/65

slide-97
SLIDE 97

Using 2-adic derivations

Theorem 2. (Anashin, 1993) Let a compatible function F : Z2 → Z2 be uniformly differentiable on Z2. Then F is ergodic if and only if it is transitive modulo 2N2(F)+2

  • Example. (Klimov and Shamir, 2002) The function

x + (x2 OR 5) is ergodic.

p-Adic Dynamical Systems and Cryptography – p. 35/65

slide-98
SLIDE 98

Using 2-adic derivations

Theorem 2. (Anashin, 1993) Let a compatible function F : Z2 → Z2 be uniformly differentiable on Z2. Then F is ergodic if and only if it is transitive modulo 2N2(F)+2

  • Example. (Klimov and Shamir, 2002) The function

x + (x2 OR 5) is ergodic. Note: In their publication Klimov and Shamir write that “...neither the invertibility nor the cycle structure of x + (x2 OR 5) could be determined by his (i.e., Anashin’s) techniques.” Quite the opposite, this could be easily determined by these techniques:

p-Adic Dynamical Systems and Cryptography – p. 35/65

slide-99
SLIDE 99

Using 2-adic derivations

Theorem 2. (Anashin, 1993) Let a compatible function F : Z2 → Z2 be uniformly differentiable on Z2. Then F is ergodic if and only if it is transitive modulo 2N2(F)+2

  • Example. (Klimov and Shamir, 2002) The function

x + (x2 OR 5) is ergodic.

  • Proof. The function F(x) = x + (x2 OR 5) is uniformly

differentiable on Z2: F ′(x) = 1 + 2x ∙ (x OR 5)′ = 1 + 2x, and N2(F) = 3 since obviously (x + h) OR 5 = (x OR 5) + h whenever h ≡ 0 (mod 8). Now to prove that F is ergodic, in view

  • f the above theorem it suffices to demonstrate that F

induces a permutation with a single cycle on Z/32. One verifies this by direct calculations.

p-Adic Dynamical Systems and Cryptography – p. 35/65

slide-100
SLIDE 100

How to determine ergodic functions?

The following results, as well as the preceding ones, remain true (with some minor exceptions) for arbitrary prime p. Any function F : Zp → Zp could be represented by Mahler’s interpolation series: F(x) = ∞

j=0 cj

x

j

  • for

suitable cj ∈ Zp. Recall x i

  • =

   x(x − 1) ∙ ∙ ∙ (x − i + 1) i! , for i = 1, 2, . . .; 1, for i = 0. An attempt to find an answer in terms of Mahler’s interpolation series looks quite natural!

p-Adic Dynamical Systems and Cryptography – p. 36/65

slide-101
SLIDE 101

How to determine ergodic functions?

Theorem 3. (Anashin, 1993) For p = 2 the function F : Zp → Zp is compatible and ergodic iff F(x) = 1 + x +

  • i=1

ci ∙ p⌊logp(i+1)⌋+1 x i

  • ,

for suitable ci ∈ Zp. (Note: For p = 2 remain sufficient, and not necessary).

p-Adic Dynamical Systems and Cryptography – p. 36/65

slide-102
SLIDE 102

Examples

For p = 2 the following is true: (Larin, early 80th; published 2002) A polynomial with integer coefficients is ergodic iff it is transitive modulo 8.

p-Adic Dynamical Systems and Cryptography – p. 37/65

slide-103
SLIDE 103

Examples

For p = 2 the following is true: (Anashin, 1993) The function F(x) = a0 + b1 ∙ (x ⊕ a1) + b2 ∙ (x ⊕ a2) + ∙ ∙ ∙ is ergodic iff it is transitive modulo 4.

p-Adic Dynamical Systems and Cryptography – p. 37/65

slide-104
SLIDE 104

Examples

For p = 2 the following is true: (Anashin, 1993) The function F(x) = a + a0 ∙ δ0(x) + a1 ∙ δ1(x) + ∙ ∙ ∙ is compatible and ergodic iff a2 = 1, a0 ≡ 1 (mod 4), and aj2 = 1 for j = 1, 2, . . . Here, we recall, δj(x) = 1

2j(x AND 2j) is the j-th bit

in the base-2 expansion of x (we start enumeration with j = 0). In other words, a compatible function b+b0 ∙(x AND 1)+b1 ∙(x AND 2)+b2 ∙(x AND 22)+∙ ∙ ∙ is ergodic iff b ≡ 1 (mod 2), b0 ≡ 1 (mod 4), and bj ≡ 1 (mod 2) for all j = 1, 2, 3, . . ..

p-Adic Dynamical Systems and Cryptography – p. 37/65

slide-105
SLIDE 105

Examples

For p = 2 the following is true: (Anashin, 1993) For arbitrary polynomials u(x), v(x) ∈ Z2[x] the entire function F(x) = v(x) 2 ∙ u(x) + 1 is ergodic iff it is transitive modulo 8

p-Adic Dynamical Systems and Cryptography – p. 37/65

slide-106
SLIDE 106

Examples

For p = 2 the following is true: (Kotomina, 1999) The function f(x) = (. . . ((((x+c0)⊕d0)+c1)⊕d1)+∙ ∙ ∙+cm)⊕dm, is ergodic iff f is transitive modulo 4

p-Adic Dynamical Systems and Cryptography – p. 37/65

slide-107
SLIDE 107

Examples

For p = 2 the following is true: (Anashin, 2002) The function F(x) = a ∙ x + ax is ergodic iff a is odd

p-Adic Dynamical Systems and Cryptography – p. 37/65

slide-108
SLIDE 108

Examples

For p = 2 the following is true: (Anashin, 2002) A polynomial f(x) ∈ Q[x] of degree d with rational (and not necessarily integral) coefficients is integer-valued (i.e., f(Z2) ⊂ Z2)) compatible, and ergodic iff f takes integral values at the points 0, 1, . . . , 2⌊log2(deg f)⌋+3 − 1, and the mapping z → f(z) mod 2⌊log2(deg f)⌋+3, is compatible and transitive on Z

  • 2⌊log2 d⌋+3 (i.e.,

modulo the biggest power of 2 not exceeding 8d); i.e., to verify whether all three properties hold simultaneously, one has to make approximately 8d evaluations of f(x)

p-Adic Dynamical Systems and Cryptography – p. 37/65

slide-109
SLIDE 109

Explicit formulae

The following theorem gives a general construction that enables one to build all ergodic mappings out of compatible ones. Theorem 4. (Anashin, 2002) Denote ∆U(x) = U(x + 1) − U(x). For p = 2 the function F : Zp → Zp is compatible and ergodic ⇔ F(x) = 1 + x + p ∙ ∆U(x), where U : Zp → Zp is arbitrary compatible function.

  • Note. For p = 2 only ⇐ is true.
  • Note. Recall that any composition of basic microchip
  • perations (without cyclic shifts, and shifts towards less

significant bits) is a compatible function on Z2!

p-Adic Dynamical Systems and Cryptography – p. 38/65

slide-110
SLIDE 110

Usage

The presented results concern non-Archimedean autonomous dynamical systems on Z2, which are not chaotic, only ergodic. In fact, these systems are not sensitive to minor perturbations of the initial position; moreover, they are isometries of the space Z2.

p-Adic Dynamical Systems and Cryptography – p. 39/65

slide-111
SLIDE 111

Usage

The presented results concern non-Archimedean autonomous dynamical systems on Z2, which are not chaotic, only ergodic. Yet these dynamical systems are good for state update functions of the PRNG, since they satisfy the conditions we mentioned before.

p-Adic Dynamical Systems and Cryptography – p. 39/65

slide-112
SLIDE 112

Usage

The presented results concern non-Archimedean autonomous dynamical systems on Z2, which are not chaotic, only ergodic. Yet these dynamical systems are good for state update functions of the PRNG, since they satisfy the conditions we mentioned before. Moreover, with the use of state update functions of this kind one could design flexible PRNG’s, where not only the initial state, but also the state update function depends on key.

p-Adic Dynamical Systems and Cryptography – p. 39/65

slide-113
SLIDE 113

Usage

The presented results concern non-Archimedean autonomous dynamical systems on Z2, which are not chaotic, only ergodic. Yet these dynamical systems are good for state update functions of the PRNG, since they satisfy the conditions we mentioned before. Similar theory is developed for measure-preserving mappings, which are good for output functions (we have to omit details due to the time constraints). In whole, these ideas lead to fast and flexible stream ciphers.

p-Adic Dynamical Systems and Cryptography – p. 39/65

slide-114
SLIDE 114

Adding flexibility... and security

A counter-dependent PRNG also produces pseudorandom sequences. See the difference with

  • rdinary PRNG?

xi fi Gi xi+1 = fi(xi)

state update

yi = Gi(xi)

  • utput

p-Adic Dynamical Systems and Cryptography – p. 40/65

slide-115
SLIDE 115

Adding flexibility... and security

A counter-dependent PRNG also produces pseudorandom sequences. See the difference with

  • rdinary PRNG?

See? xi fi Gi xi+1 = fi(xi)

state update

yi = Gi(xi)

  • utput

p-Adic Dynamical Systems and Cryptography – p. 40/65

slide-116
SLIDE 116

Adding flexibility... and security

A counter-dependent PRNG also produces pseudorandom sequences. See the difference with

  • rdinary PRNG?

See? See? xi fi Gi xi+1 = fi(xi)

state update

yi = Gi(xi)

  • utput

p-Adic Dynamical Systems and Cryptography – p. 40/65

slide-117
SLIDE 117

Dynamical systems revisited

Recall that ordinary PRNG corresponds to an autonomous dynamical system.

p-Adic Dynamical Systems and Cryptography – p. 41/65

slide-118
SLIDE 118

Dynamical systems revisited

Recall that ordinary PRNG corresponds to an autonomous dynamical system. This is a non-autonomous dynamical system, which is a counterpart of a counter-dependent PRNG in dynamics. A non-autonomous dynamical system is a dynamical system driven by another dynamical system.

p-Adic Dynamical Systems and Cryptography – p. 41/65

slide-119
SLIDE 119

Dynamical systems revisited

Recall that ordinary PRNG corresponds to an autonomous dynamical system. This is a non-autonomous dynamical system, which is a counterpart of a counter-dependent PRNG in dynamics. A theory similar to that of the preceding is developed for counter-dependent PRNG.

p-Adic Dynamical Systems and Cryptography – p. 41/65

slide-120
SLIDE 120

Dynamical systems revisited

Recall that ordinary PRNG corresponds to an autonomous dynamical system. This is a non-autonomous dynamical system, which is a counterpart of a counter-dependent PRNG in dynamics. A theory similar to that of the preceding is developed for counter-dependent PRNG. The main tool to construct a counter-dependent PRNG that outputs a sequence of a maximum period length, is a skew shift.

p-Adic Dynamical Systems and Cryptography – p. 41/65

slide-121
SLIDE 121

Skew shifts, wreath products, etc.

What is a skew shift?

p-Adic Dynamical Systems and Cryptography – p. 42/65

slide-122
SLIDE 122

Skew shifts, wreath products, etc.

What is a skew shift? Given a mapping U : Z → Z , and a set of mappings V = {(Vz : X → X): z ∈ Z}, a skew shift (or, a skew product or, a wreath product) is a mapping U ⋌ V : (z, x) → (U(z), Vz(x))

  • f the Cartesian product Z × X into itself.

p-Adic Dynamical Systems and Cryptography – p. 42/65

slide-123
SLIDE 123

Skew shifts, wreath products, etc.

What is a skew shift? Given a mapping U : Z → Z , and a set of mappings V = {(Vz : X → X): z ∈ Z}, a skew shift (or, a skew product or, a wreath product) is a mapping U ⋌ V : (z, x) → (U(z), Vz(x))

  • f the Cartesian product Z × X into itself.

Obviously, the skew shift U ⋌ V is bijective whenever both U and all Vz are bijective.

p-Adic Dynamical Systems and Cryptography – p. 42/65

slide-124
SLIDE 124

Skew shifts, wreath products, etc.

What is a skew shift? Given a mapping U : Z → Z , and a set of mappings V = {(Vz : X → X): z ∈ Z}, a skew shift (or, a skew product or, a wreath product) is a mapping U ⋌ V : (z, x) → (U(z), Vz(x))

  • f the Cartesian product Z × X into itself.

Skew shifts are familiar to crypto community; recall Feistel network: The mapping it is based on is a skew shift (z, x) → (z, z ⊕ f(x)), where z, x ∈ Bn, f : Bn → Bn.

p-Adic Dynamical Systems and Cryptography – p. 42/65

slide-125
SLIDE 125

Skew shifts, wreath products, etc.

What is a skew shift? Given a mapping U : Z → Z , and a set of mappings V = {(Vz : X → X): z ∈ Z}, a skew shift (or, a skew product or, a wreath product) is a mapping U ⋌ V : (z, x) → (U(z), Vz(x))

  • f the Cartesian product Z × X into itself.

Skew shifts (in dynamical systems theory), which are also known under the name of wreath products (in group theory, in automata theory) are often used to obtain new

  • bjects with desirable properties out of given objects

with known properties.

p-Adic Dynamical Systems and Cryptography – p. 42/65

slide-126
SLIDE 126

Using the skew shifts

Theorem 5. (Anashin, 2004) Let F = {f0, . . . , fm−1} be a finite sequence of compatible measure preserving mappings of Z2 onto itself such that (i) the sequence {(fi mod m(0)) mod 2: i = 0, 1, 2, . . .} is purely periodic, its shortest period is of length m; (ii) m−1

i=0 fi(0) ≡ 1 (mod 2);

(iii) m−1

j=0

2t−1

z=0 fj(z) ≡ 2t (mod 2t+1) for all t = 1, 2, . . . .

Then the recurrence sequence Z defined by the relation xi+1 = fi mod m(xi) is strictly uniformly distributed modulo 2n for all n = 1, 2, . . . : That is, modulo each 2n the sequence Z is purely periodic, its shortest period is of length 2nm, and each element of Z/2n occurs at the period exactly m times.

p-Adic Dynamical Systems and Cryptography – p. 43/65

slide-127
SLIDE 127

Using the skew shifts

  • Example. Given 2-adic numbers c0, . . . , cm−1 ∈ Z2,

m > 1 odd, and compatible ergodic mappings (=T-functions with a single cycle property) h0, . . . , hm−1. (The latter either could be stored in memory, or could be produced on-fly out of basic chip instructions, see e.g. theorem 4) The sequence {xi+1 = fi mod m(xi)} of internal states of a counter-dependent PRNG is periodic modulo 2n and strictly uniformly distributed modulo 2n (that is, each a ∈ Z/2n occurs at the period the same number of times), and the length of its shortest period is m ∙ 2n (that is, maximum possible) , if

p-Adic Dynamical Systems and Cryptography – p. 43/65

slide-128
SLIDE 128

Using the skew shifts

  • Example. Given 2-adic numbers c0, . . . , cm−1 ∈ Z2,

m > 1 odd, and compatible ergodic mappings h0, . . . , hm−1. The sequence

  • f internal states of a

counter-dependent PRNG is periodic modulo 2n and strictly uniformly distributed modulo 2n , and the length

  • f its shortest period is m ∙ 2n , if

the sequence {ci mod m mod 2: i = 0, 1, 2, . . .} is periodic, and m is the length of its shortest period

p-Adic Dynamical Systems and Cryptography – p. 43/65

slide-129
SLIDE 129

Using the skew shifts

  • Example. Given 2-adic numbers c0, . . . , cm−1 ∈ Z2,

m > 1 odd, and compatible ergodic mappings h0, . . . , hm−1. The sequence

  • f internal states of a

counter-dependent PRNG is periodic modulo 2n and strictly uniformly distributed modulo 2n , and the length

  • f its shortest period is m ∙ 2n , if

the sequence {ci mod m mod 2: i = 0, 1, 2, . . .} is periodic, and m is the length of its shortest period m−1

j=0 cj ≡ 0 (mod 2)

p-Adic Dynamical Systems and Cryptography – p. 43/65

slide-130
SLIDE 130

Using the skew shifts

  • Example. Given 2-adic numbers c0, . . . , cm−1 ∈ Z2,

m > 1 odd, and compatible ergodic mappings h0, . . . , hm−1. The sequence

  • f internal states of a

counter-dependent PRNG is periodic modulo 2n and strictly uniformly distributed modulo 2n , and the length

  • f its shortest period is m ∙ 2n , if

the sequence {ci mod m mod 2: i = 0, 1, 2, . . .} is periodic, and m is the length of its shortest period m−1

j=0 cj ≡ 0 (mod 2)

fj(x) = cj ⊕ hj(x), or fj(x) = cj + hj(x)

p-Adic Dynamical Systems and Cryptography – p. 43/65

slide-131
SLIDE 131

Example circuit

xi hi L + Gi

xi+1 = ci + hi(xi) L(c) = 2 ∙ c ⊕ u ∙ δn−1(c); u agrees with coefficients of the polynomial u

hi(xi)

ci+1 = L(ci)

ci

state update

yi = Gi(xi)

  • utput

p-Adic Dynamical Systems and Cryptography – p. 44/65

slide-132
SLIDE 132

The ABC stream cipher: 6 Gbits/sec

xi h L + + + S

xi+1 = ci,r + h(xi)

h(x) = ((((x + a0) ⊕ b0) + a1) ⊕ b1) + a2

h(xi)

ci+1 = L(ci)

ci

ci = (ci,ℓ; ci,r)

ci,ℓ ci,r

S(x) = d + n−1

j=0 dj ∙ δn−j−1(x)

plain text stream encrypted text stream

p-Adic Dynamical Systems and Cryptography – p. 45/65

slide-133
SLIDE 133

The ABC stream cipher: 6 Gbits/sec

xi h L + + + ˆ S

xi+1 = ci,r + h(xi)

h(x) = a + b ∙ (x ⊕ a1)

h(xi)

ci+1 = L(ci)

ci

ci = (ci,ℓ; ci,r)

ci,ℓ ci,r

S(x) = d + n−1

j=0 dj ∙ δn−j−1(x)

ˆ S(x) = (S(x))

plain text stream encrypted text stream

p-Adic Dynamical Systems and Cryptography – p. 45/65

slide-134
SLIDE 134

The ABC stream cipher: Properties.

The following is proved: Length P of the period of the output sequence is (22n−1 − 1) ∙ 2n

p-Adic Dynamical Systems and Cryptography – p. 46/65

slide-135
SLIDE 135

The ABC stream cipher: Properties.

The following is proved: Length P of the period of the output sequence is (22n−1 − 1) ∙ 2n n-tuples of the output are uniformly distributed:

  • μ(a)

P − 1 2n

  • <

1 √ P , where μ(a) is the number of occurrences of an n-tuple a ∈ Z/2n at the period.

Note: For a truly random sequence of n-bit words of length P the above inequality holds with probability > 1 −

1 2n.

p-Adic Dynamical Systems and Cryptography – p. 46/65

slide-136
SLIDE 136

The ABC stream cipher: Properties.

The following is proved: Length P of the period of the output sequence is (22n−1 − 1) ∙ 2n n-tuples of the output are uniformly distributed:

  • μ(a)

P − 1 2n

  • <

1 √ P , where μ(a) is the number of occurrences of an n-tuple a ∈ Z/2n at the period. Linear complexity (over Z/2) of the output sequence exceeds 2n−1

p-Adic Dynamical Systems and Cryptography – p. 46/65

slide-137
SLIDE 137

How random is the output?

Frequency tests are those that consider occurrences of (overlapping) ℓ-tuples in a binary output.

p-Adic Dynamical Systems and Cryptography – p. 47/65

slide-138
SLIDE 138

How random is the output?

Frequency tests are those that consider occurrences of (overlapping) ℓ-tuples in a binary output. That is, given a sequence X = x0, x1, x2, . . . of non-negative rational integers, one represents xi mod 2n as an n-bit word xi mod 2n (base-2 expansion of xi mod 2n), considers a concatenation X ′

n = xi mod 2n xi+1 mod 2n xi+2 mod 2n . . .

and counts occurrences of patterns 0, 1, 00, 01, 10, 11, 000, 001, . . ..

p-Adic Dynamical Systems and Cryptography – p. 47/65

slide-139
SLIDE 139

How random is the output?

Frequency tests are those that consider occurrences of (overlapping) ℓ-tuples in a binary output. That is, given a sequence X = x0, x1, x2, . . . of non-negative rational integers, one represents xi mod 2n as an n-bit word xi mod 2n (base-2 expansion of xi mod 2n), considers a concatenation X ′

n = xi mod 2n xi+1 mod 2n xi+2 mod 2n . . .

and counts occurrences of patterns 0, 1, 00, 01, 10, 11, 000, 001, . . .. For a good sequence all the distributions must agree with the ones of a truly random sequence. Obviously, this never holds for a periodic sequence.

p-Adic Dynamical Systems and Cryptography – p. 47/65

slide-140
SLIDE 140

Randomness by Knuth

Donald Knuth in his “The Art of Computer Programming" calls a finite binary sequence of length T random, whenever it satisfies the following condition:

  • ν(β0 . . . βℓ−1)

T − 1 2ℓ

1 √ T for all 0 < ℓ ≤ log2 T, where ν(β0 . . . βℓ−1) is the number of occurrences of the pattern β0 . . . βℓ−1 in the sequence.

p-Adic Dynamical Systems and Cryptography – p. 48/65

slide-141
SLIDE 141

Randomness by Knuth

Donald Knuth in his “The Art of Computer Programming" calls a finite binary sequence of length T random, whenever it satisfies the following condition:

  • ν(β0 . . . βℓ−1)

T − 1 2ℓ

1 √ T for all 0 < ℓ ≤ log2 T, where ν(β0 . . . βℓ−1) is the number of occurrences of the pattern β0 . . . βℓ−1 in the

  • sequence. So its is quite natural to say that a periodic

sequence is random in the sense of Knuth iff its shortest period satisfy the above condition.

p-Adic Dynamical Systems and Cryptography – p. 48/65

slide-142
SLIDE 142

Randomness by Knuth

Donald Knuth in his “The Art of Computer Programming" calls a finite binary sequence of length T random, whenever it satisfies the following condition:

  • ν(β0 . . . βℓ−1)

T − 1 2ℓ

1 √ T for all 0 < ℓ ≤ log2 T, where ν(β0 . . . βℓ−1) is the number of occurrences of the pattern β0 . . . βℓ−1 in the sequence. Note that uniform distribution of the sequence X does not imply X ′

n is random in the sense of

Knuth!

p-Adic Dynamical Systems and Cryptography – p. 48/65

slide-143
SLIDE 143

Randomness by Knuth

The sequences produced by our generators of the (maximum possible) period length T are random in the sense of Knuth:

  • ν(β0 . . . βℓ−1)

T − 1 2ℓ

1 √ T for all 0 < ℓ ≤ log2 T, where ν(β0 . . . βℓ−1) is the number of occurrences of the pattern β0 . . . βℓ−1 in the sequence.

p-Adic Dynamical Systems and Cryptography – p. 48/65

slide-144
SLIDE 144

Linear complexity

Linearity tests are those that consider linear dependencies in the sequence.

p-Adic Dynamical Systems and Cryptography – p. 49/65

slide-145
SLIDE 145

Linear complexity

  • Definition. Let Z = {zi} be a sequence over a ring R.

The linear complexity λR(Z) of Z over R is the smallest r ∈ N0 such that there exist c, c0, c1, . . . , cr−1 ∈ R (not all equal to 0) such that for all i = 0, 1, 2, . . . holds c +

r−1

  • j=0

cj ∙ zi+j = 0.

p-Adic Dynamical Systems and Cryptography – p. 49/65

slide-146
SLIDE 146

Linear complexity

  • Definition. Let Z = {zi} be a sequence over a ring R.

The linear complexity λR(Z) of Z over R is the smallest r ∈ N0 such that there exist c, c0, c1, . . . , cr−1 ∈ R (not all equal to 0) such that for all i = 0, 1, 2, . . . holds c +

r−1

  • j=0

cj ∙ zi+j = 0. For instance, if R = Z/pn; then geometrically this equation means that all the points ( zi

pn, zi+1 pn , . . . , zi+r−1 pn ),

i = 0, 1, 2, . . ., of a unit r-dimensional Euclidean hypercube fall into parallel hyperplanes.

p-Adic Dynamical Systems and Cryptography – p. 49/65

slide-147
SLIDE 147

Linear complexity

In fact, linearity tests turn out to be ones of the most effective. For example, linear congruential generators xi+1 = a + b ∙ xi (mod 2n) do not pass these tests. Linear complexity over Z/2n of linear congruential generators is 2; hence, distribution of pairs in produced sequences is rather poor: All the points that correspond to pairs of consecutive numbers fall into a small number of parallel straight lines in a unit square.

p-Adic Dynamical Systems and Cryptography – p. 50/65

slide-148
SLIDE 148

Linear complexity

All T-functions with a single cycle property produce uniformly distributed sequences. However, some of these T-functions produce bad sequences, which have a number of linear dependencies modulo pn, and poor distribution of pairs

p-Adic Dynamical Systems and Cryptography – p. 50/65

slide-149
SLIDE 149

Linear complexity

All T-functions with a single cycle property produce uniformly distributed sequences. However, some of these T-functions produce bad sequences, which have a number of linear dependencies modulo pn, and poor distribution of pairs

  • Example. A T-function x + x2 OR C has a single cycle

property whenever C ≡ 5 (mod 8), or C ≡ 7 (mod 8) (Klimov and Shamir, 2002) However, the distribution of pairs of the sequence produced by this T-function varies from satisfactory (when there are few 1’s in more significant bit positions) to poor (when there are more 1’s).

p-Adic Dynamical Systems and Cryptography – p. 50/65

slide-150
SLIDE 150

Linear complexity

All T-functions with a single cycle property produce uniformly distributed sequences. However, some of these T-functions produce bad sequences, which have a number of linear dependencies modulo pn, and poor distribution of pairs This is not easy to find a T-function that guarantees good distribution of pairs. For instance, this problem is not completely solved even for quadratic generators with a single cycle property, despite a number of works in the area (see e.g. Emmerich, 1997; Eichenauer-Hermann, 1995-1997, et. al.).

p-Adic Dynamical Systems and Cryptography – p. 50/65

slide-151
SLIDE 151

Linear complexity

All T-functions with a single cycle property produce uniformly distributed sequences. However, some of these T-functions produce bad sequences, which have a number of linear dependencies modulo pn, and poor distribution of pairs However, we can prove that with respect to the linear complexity over residue ring the sequence Xn = {f i(x0) mod pn} over Z/pn, generated by compatible ergodic polynomial f(x) ∈ Qp[x] of degree ≥ 2, is ‘asymptotically good’.

p-Adic Dynamical Systems and Cryptography – p. 50/65

slide-152
SLIDE 152

Linear complexity

All T-functions with a single cycle property produce uniformly distributed sequences. However, some of these T-functions produce bad sequences, which have a number of linear dependencies modulo pn, and poor distribution of pairs However, we can prove that with respect to the linear complexity over residue ring the sequence Xn = {f i(x0) mod pn} over Z/pn, generated by compatible ergodic polynomial f(x) ∈ Qp[x] of degree ≥ 2, is ‘asymptotically good’.

  • Theorem. (Anashin, 2002) limn→∞ λZ/pn(Xn) = ∞ .

Moreover, λZ/pn(Xn) tends to ∞ not slower than log n.

p-Adic Dynamical Systems and Cryptography – p. 50/65

slide-153
SLIDE 153

Coordinate sequences: Bad news

The drawback of the sequence produced by a T-function F : Z/2k → Z/2k with the single cycle property is that the less significant is the bit, the shorter is the period of the sequence it outputs; that is: Despite the length of the period of the sequence S = {z0 = z, z1 = F(z0), z2 = F(z1), . . .}

  • f k-bit words is 2k, the length of the period of the jth bit

sequence (which is called the jthcoordinate sequence) Sj = {δj(z0), δj(z1), δj(z2), . . . , δj(zi+1), . . .} is only 2j+1, (j = 0, 1, . . . , k − 1).

p-Adic Dynamical Systems and Cryptography – p. 51/65

slide-154
SLIDE 154

Coordinate sequences: Bad news

Proposition (Anashin, 2004) The jth coordinate sequence Sj is purely periodic, and 2j+1 is the length of its shortest period. The second half of the period is a bitwise negation of the first half, i.e., ζi+2j ≡ ζi + 1 (mod 2) for each i = 0, 1, 2, . . .. The linear complexity λ2(Sj) of Sj over GF(2) is exactly 2j + 1.

p-Adic Dynamical Systems and Cryptography – p. 51/65

slide-155
SLIDE 155

Coordinate sequences: Bad news

Proposition (Anashin, 2004) The jth coordinate sequence Sj is purely periodic, and 2j+1 is the length of its shortest period. The second half of the period is a bitwise negation of the first half, i.e., ζi+2j ≡ ζi + 1 (mod 2) for each i = 0, 1, 2, . . .. The linear complexity λ2(Sj) of Sj over GF(2) is exactly 2j + 1.

  • Note. In fact, somewhat similar estimates hold for a

2-adic span, another measure of complexity of sequences, introduced by Klapper and Goresky. Similar results are true for coordinate sequences of the sequence of states of a counter-dependent PRNG.

p-Adic Dynamical Systems and Cryptography – p. 51/65

slide-156
SLIDE 156

Coordinate sequences: Bad news

Proposition (Anashin, 2004) The jth coordinate sequence Sj is purely periodic, and 2j+1 is the length of its shortest period. The second half of the period is a bitwise negation of the first half, i.e., ζi+2j ≡ ζi + 1 (mod 2) for each i = 0, 1, 2, . . .. The linear complexity λ2(Sj) of Sj over GF(2) is exactly 2j + 1. Note that the expectation of the linear complexity λ2(C)

  • f a random sequence C of length T is T

2 . Thus, the

coordinate sequences are rather good with respect to their linear complexities.

p-Adic Dynamical Systems and Cryptography – p. 51/65

slide-157
SLIDE 157

Coordinate sequences: Bad news

Proposition (Anashin, 2004) The jth coordinate sequence Sj is purely periodic, and 2j+1 is the length of its shortest period. The second half of the period is a bitwise negation of the first half, i.e., ζi+2j ≡ ζi + 1 (mod 2) for each i = 0, 1, 2, . . .. The linear complexity λ2(Sj) of Sj over GF(2) is exactly 2j + 1. However, from the proof of the proposition it follows that these good estimates holds only because the second half of the period of a coordinate sequence is a bitwise negation of the first half. In other words, the coordinate sequence is as ‘complex’ as the first half of its period

p-Adic Dynamical Systems and Cryptography – p. 51/65

slide-158
SLIDE 158

Coordinate sequences: Bad news

Proposition (Anashin, 2004) The jth coordinate sequence Sj is purely periodic, and 2j+1 is the length of its shortest period. The second half of the period is a bitwise negation of the first half, i.e., ζi+2j ≡ ζi + 1 (mod 2) for each i = 0, 1, 2, . . .. The linear complexity λ2(Sj) of Sj over GF(2) is exactly 2j + 1. The important question is: Given a T-function with a single cycle property, what bit sequence of length 2j could be outputted as the first half of the period of the jth coordinate sequence?

p-Adic Dynamical Systems and Cryptography – p. 51/65

slide-159
SLIDE 159

Coordinate sequences: Bad news

Proposition (Anashin, 2004) The jth coordinate sequence Sj is purely periodic, and 2j+1 is the length of its shortest period. The second half of the period is a bitwise negation of the first half, i.e., ζi+2j ≡ ζi + 1 (mod 2) for each i = 0, 1, 2, . . .. The linear complexity λ2(Sj) of Sj over GF(2) is exactly 2j + 1. The important question is: Given a T-function with a single cycle property, what bit sequence of length 2j could be outputted as the first half of the period of the jth coordinate sequence? The answer is: ANY ONE, and independently of other coordinate sequences.

p-Adic Dynamical Systems and Cryptography – p. 51/65

slide-160
SLIDE 160

Coordinate sequences: Good news

Let γj(F, z) ∈ N0 be such a number that its base-2 expansion agrees with the first half of the period of the jth coordinate sequence produced by the T-function F with a single cycle property starting with the initial state z; that is, γj(F, z) = δj(F (0)(z)) + 2δj(F (1)(z)) + ∙ ∙ ∙ + 22j−1δj(F (2j−1)(z)). Obviously, 0 ≤ γj(F, z) ≤ 22j − 1. Theorem (Anashin, 2004) Let Γ = {γj ∈ N0 : j = 0, 1, 2, . . .} be an arbitrary sequence of non-negative rational integers such that 0 ≤ γj ≤ 22j − 1 for j = 0, 1, 2, . . .. There exists a compatible and ergodic mapping F : Z2 → Z2 and a 2-adic integer z ∈ Z2 such that γj ≡ γj(F, z) (mod 22j) (j = 0, 1, 2, . . .)

p-Adic Dynamical Systems and Cryptography – p. 52/65

slide-161
SLIDE 161

Coordinate sequences: Good news

Theorem (Anashin, 2004) Let Γ = {γj ∈ N0 : j = 0, 1, 2, . . .} be an arbitrary sequence of non-negative rational integers such that 0 ≤ γj ≤ 22j − 1 for j = 0, 1, 2, . . .. There exists a compatible and ergodic mapping F : Z2 → Z2 and a 2-adic integer z ∈ Z2 such that γj ≡ γj(F, z) (mod 22j) (j = 0, 1, 2, . . .) Note: A proof of this theorem also uses p-adic techniques. Note: A similar theorem holds for coordinate sequences of state sequences of counter-dependent PRNG of a maximum period length.

p-Adic Dynamical Systems and Cryptography – p. 52/65

slide-162
SLIDE 162

Coordinate sequences: A remedy

What output function G one should use? G must add security, G must be balanced (for not to spoil the uniform distribution), and G must cure the very unpleasant ‘low

  • rder bits effect’ of T-functions.

p-Adic Dynamical Systems and Cryptography – p. 53/65

slide-163
SLIDE 163

Coordinate sequences: A remedy

What output function G one should use? G must add security, G must be balanced (for not to spoil the uniform distribution), and G must cure the very unpleasant ‘low

  • rder bits effect’ of T-functions. One way (that might

be good) is to truncate low order bits. Are there other ways?

p-Adic Dynamical Systems and Cryptography – p. 53/65

slide-164
SLIDE 164

Coordinate sequences: A remedy

What output function G one should use? G must add security, G must be balanced (for not to spoil the uniform distribution), and G must cure the very unpleasant ‘low

  • rder bits effect’ of T-functions.

Since the ‘low order bits effect’ is an inherent property of T-functions, one should include in G some basic chip

  • perations other than T-functions. Thus, G will not be a

T-function any more. Could one construct G this way, yet not ‘spoil’ good properties of the sequence of states?

p-Adic Dynamical Systems and Cryptography – p. 53/65

slide-165
SLIDE 165

Coordinate sequences: A remedy

YES! This is how the solution looks schematically:

π xi fi Gi

xi+1 = fi(xi) π permutes bits so that δ0(π(xi)) = δn−1(xi); i.e., π sends the most significant bit of xi to the least significant bit position! state update yi = Gi(π(xi))

  • utput

p-Adic Dynamical Systems and Cryptography – p. 53/65

slide-166
SLIDE 166

Coordinate sequences: A remedy

And this is how all this sounds mathematically: Proposition 1. (Anashin, 2004) Let Gi : Z2 → Z2 (i = 0, 1, 2, . . . , m − 1) be compatible and ergodic mappings (=T-functions with a single cycle property). For x ∈ {0, 1, . . . , 2n − 1} let Hi(x) = (Gi(π(x))) mod 2n, where π is a permutation of bits of x ∈ Z/2n such that δ0(π(x)) = δn−1(x). Consider a sequence H = {Hi(xi)}, where {xi} is the state update sequence of our counter-dependent PRNG (see e.g. the example circuit).Then the shortest period of the jth coordinate sequence Hj = δj(H) (j = 0, 1, 2, . . . , n − 1) is of length 2nkj for a suitable 1 ≤ kj ≤ m. Moreover, linear complexity of the sequence Hj exceeds 2n−1, λ2(Hj) > 2n−1.

p-Adic Dynamical Systems and Cryptography – p. 53/65

slide-167
SLIDE 167

Three tools

Techniques that enable one to construct single cycle (resp., invertible, balanced) mappings out of basic chip

  • perations mainly utilize the following three approaches:

non-Archimedean (p-adic) analysis for p = 2; skew shifts (=wreath products); Boolean representations We already have discussed the first and the second of these approaches.

p-Adic Dynamical Systems and Cryptography – p. 54/65

slide-168
SLIDE 168

Boolean representations

The third of the three approaches, which is based on the theory of Boolean functions, is more straightforward, and could be applied directly only to relatively short and simple compositions of the basic chip instructions. However, on the one hand, this approach is tightly connected with the skew shift techniques and, on the

  • ther hand, it lies in a background of some results
  • btained within the non-Archimedean approach.

p-Adic Dynamical Systems and Cryptography – p. 55/65

slide-169
SLIDE 169

Boolean representations

By the definition, a univariate T-function F is the mapping (χ0, χ1, χ2, . . .)

F

→ (ψ0(χ0); ψ1(χ0, χ1); ψ2(χ0, χ1, χ2); . . .), where χj ∈ {0, 1}, and each ψj(χ0, . . . , χj) is a Boolean function in Boolean variables χ0, . . . , χj. It turns out that one could determine whether F is invertible/with a single cycle property by analyzing algebraic normal forms of Boolean functions ψj.

p-Adic Dynamical Systems and Cryptography – p. 55/65

slide-170
SLIDE 170

Boolean representations: ANF

Recall that the algebraic normal form, ANF, of the Boolean function ψj(χ0, . . . , χj) is the representation of this function via ⊕ (addition modulo 2= logical ‘exclusive or’) and ∙ (multiplication modulo 2 =logical ‘and’= conjunction).

p-Adic Dynamical Systems and Cryptography – p. 56/65

slide-171
SLIDE 171

Boolean representations: ANF

In other words, the ANF of the Boolean function ψ is its representation in the form ψ(χ0, . . . , χj) = β ⊕β0χ0 ⊕β1χ1 ⊕. . .⊕β0,1χ0χ1 ⊕. . . , where β, β0, . . . ∈ {0, 1}. Recall that the weight of the Boolean function ψj in (j + 1) variables is the number of (j + 1)-bit words that satisfy ψj; that is, weight is the cardinality of the truth set

  • f ψj.

p-Adic Dynamical Systems and Cryptography – p. 56/65

slide-172
SLIDE 172

A folklore

Theorem 6. (folklore, more than 30 years old.) A univariate T-function F (χ0, χ1, χ2, . . .)

F

→ (ψ0(χ0); ψ1(χ0, χ1); ψ2(χ0, χ1, χ2); . . .), is invertible iff for each j = 0, 1, . . . the Boolean function ψj in Boolean variables χ0, . . . , χj is linear with respect to the variable χj; that is, F is invertible ⇔ the ANF of each ψj is of the form ψj(χ0, . . . , χj) = χj ⊕ ϕj(χ0, . . . , χj−1), where ϕj is the Boolean function that does not depend on the variable χj.

p-Adic Dynamical Systems and Cryptography – p. 57/65

slide-173
SLIDE 173

A folklore

Theorem 7. (folklore, more than 30 years old.) The mapping F has a single cycle property iff, additionally, the Boolean function ϕj is of odd weight. The latter takes place if and only if ϕ0 = 1, and the full degree of the Boolean function ϕj for j ≥ 1 is exactly j, that is, the ANF of ϕj contains a monomial χ0 ∙ ∙ ∙ χj−1. Thus, F has a single cycle property ⇔ ψ0(χ0) = χ0 ⊕ 1, and for j ≥ 1 the ANF of each ψj is of the form ψj(χ0, . . . , χj) = χj ⊕ χ0 ∙ ∙ ∙ χj−1 ⊕ θj(χ0, . . . , χj−1), where the weight of θj is even; i.e., deg θj ≤ j − 1.

p-Adic Dynamical Systems and Cryptography – p. 57/65

slide-174
SLIDE 174

T-functions are also skew shifts!

Note: Theorem 5 is a generalization of these folklore theorems; the latter are special case of theorem 5 for m = 1. The proof of this theorem uses skew shift

  • technique. Important: a T-function

(χ0, χ1, χ2, . . .)

F

→ (ψ0(χ0); ψ1(χ0, χ1); ψ2(χ0, χ1, χ2); . . .), is just a composition of skew shifts: χ0 → ψ0(χ0) (χ0, χ1) → (ψ0(χ0), ψ1(χ0, χ1)) ((χ0, χ1), χ2) → ((ψ0(χ0), ψ1(χ0, χ1)), ψ2(χ0, χ1, χ2)) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

p-Adic Dynamical Systems and Cryptography – p. 58/65

slide-175
SLIDE 175

Using Boolean representations

As it was said, direct use of these folklore results to verify whether a composition of arithmetic operations and bitwise logical operations is invertible (or whether it has single cycle property), is possible, but mainly for rather simple compositions. Note: The bit-slice techniques of Klimov and Shamir, which they introduced in 2002, are just re-statements of the above mentioned folklore theorems.

p-Adic Dynamical Systems and Cryptography – p. 59/65

slide-176
SLIDE 176

Using Boolean representations

For instance, with the use of these folklore theorems the following results (among others) were obtained: (Kotomina, 1999) The mapping f(x) = (. . . ((((x + c0) ⊕ d0) + c1) ⊕ d1) + ∙ ∙ ∙ has a single cycle property on n bit words (n ≥ 2) iff it has this property on 2-bit words; (Anashin, 2004) For any T-function f with a single cycle property and any T-function v the following functions have single cycle property: f(x + 4 ∙ v(x)), f((x) ⊕ (4 ∙ v(x))), f(x) + 4 ∙ v(x), and f(x) ⊕ (4 ∙ v(x)).

p-Adic Dynamical Systems and Cryptography – p. 59/65

slide-177
SLIDE 177

Using Boolean representations

The other use of these folklore results are constructions

  • f multivariate T-functions with a single cycle property.

p-Adic Dynamical Systems and Cryptography – p. 59/65

slide-178
SLIDE 178

Multivariate T-functions

In 2004 Klimov and Shamir introduced a multivariate T-function H with a single cycle property. The m-variate mapping H : (− → x 0, − → x 1, . . . , − → x m−1) → (h0, h1, . . . , hm−1)

  • ver n-bit words −

→ x 0, − → x 1, . . . , − → x m−1, defined by hs = − → x s ⊕ ((h(− → x 0 ∧ ∙ ∙ ∙ ∧ − → x m−1)⊕ (− → x 0 ∧ ∙ ∙ ∙ ∧ − → x m−1)) ∧ − → x 0 ∧ ∙ ∙ ∙ ∧ − → x s−1, s = 0, 1, . . . , m − 1, has a single cycle property whenever h is a univariate T-function with a single cycle property.

p-Adic Dynamical Systems and Cryptography – p. 60/65

slide-179
SLIDE 179

Multivariate T-functions

In 2004 Klimov and Shamir introduced a multivariate T-function H with a single cycle property. In fact, this is just a trick: The m-variate mapping H on n-bit words is a multivariate representation of a univariate T-function

  • ver mn-bit words.

p-Adic Dynamical Systems and Cryptography – p. 60/65

slide-180
SLIDE 180

Multivariate T-functions: A trick

Given a univariate T-function F,

x = (χ0, χ1, χ2, . . .)

F

→ (ψ0(χ0); ψ1(χ0, χ1); ψ2(χ0, χ1, χ2); . . .),

arrange this mapping in columns of height m, this way:

χ0 χm χ2m . . .

f0

→ ψ0(x) ψm(x) ψ2m(x) . . . χ1 χm+1 χ2m+1 . . .

f1

→ ψ1(x) ψm+1(x) ψ2m+1(x) . . . . . . . . . . . . . . . χm−1 χ2m−1 χ3m−1 . . .

fm−1

→ ψm−1(x) ψ2m−1(x) ψ3m−1(x) . . .

Now just assume the left-hand rows are new variables:

− → x j = (χj, χm+j, χ2m+j, . . .), (j = 0, 1, . . . , m − 1)

p-Adic Dynamical Systems and Cryptography – p. 61/65

slide-181
SLIDE 181

Multivariate T-functions: A trick

Consider the simplest example: F(x) = 1 + x. We have

δj(F(x)) ≡ δj(x) +

j−1

  • s=0

δs(x) (mod 2)

(we assume the product over the empty set is 1); then the m-variate representation F = (f0, f1, . . . , fm−1) of this mapping is

fk(− → x 0, . . . , − → x m−1) = − → x k⊕ k−1

  • s=0

− → x s

m−1

  • r=0

((− → x r+1)⊕− → x r)

  • =

− → x k ⊕ k−1

  • s=0

− → x s

m−1

  • r=0

− → x r

  • + 1

m−1

  • r=0

− → x r

  • p-Adic Dynamical Systems and Cryptography – p. 61/65
slide-182
SLIDE 182

Using a trick

Proposition 2. (Anashin, 2004) Let t, j ∈ {0, 1, . . . , m − 1}, let all f (t)

j

(resp., g(t)

j ) be univariate transitive (resp, bijective) modulo 2n

T-functions. Then the mapping F(x) = (f0(x), . . . , fm−1(x)) f0(x) = − → x 0 ⊞ m−1

  • r=0

(f (r)

0 (−

→ x r) ⊕ − → x r)

  • ;

f1(x) = − → x 1 ⊞

  • g(0)

1 (−

→ x 0) ∧ m−1

  • r=0

(f (r)

1 (−

→ x r) ⊕ − → x r)

  • ;

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . fm−1(x) = − → x m−1 ⊞ m−2

  • t=0

g(t)

m−1(−

→ x t)

m−1

  • r=0

(f (r)

m−1(−

→ x r) ⊕ − → x r)

  • ,

where x = (− → x 0, . . . , − → x m−1), ⊞ ∈ {+, ⊕}, has a single cycle pr-ty.

p-Adic Dynamical Systems and Cryptography – p. 62/65

slide-183
SLIDE 183

Coming back to p-adic analysis

Unfortunately, no T-functions with a single cycle property, which are REALLY multivariate, are known

  • today. Among ‘natural’ functions these ones do not

exist!

p-Adic Dynamical Systems and Cryptography – p. 63/65

slide-184
SLIDE 184

Coming back to p-adic analysis

Theorem 8. (Anashin, 1993) Let the function F = (f1, . . . , fn): Zn

p → Zn p be compatible, ergodic, and

uniformly differentiable modulo p on Zp. Then n = 1.

p-Adic Dynamical Systems and Cryptography – p. 63/65

slide-185
SLIDE 185

Coming back to p-adic analysis

Note: Compare to differentiability, the differentiability modulo pk is a weaker restriction. In fact, F(u + h) − F(u) h ≈ F ′

k(u)

≈ with arbitrarily high precision ⇒ differentiability ≈ with precision not worse than p−k ⇒ differentiability mod pk

p-Adic Dynamical Systems and Cryptography – p. 63/65

slide-186
SLIDE 186

Coming back to p-adic analysis

In fact we have already used uniform differentiability modulo pk when proving that some property holds modulo all pn whenever it holds modulo some pn0.

p-Adic Dynamical Systems and Cryptography – p. 63/65

slide-187
SLIDE 187

Coming back to p-adic analysis

  • Note. (Anashin, 1993) All univariate invertible

T-functions on n-bit words are just reductions modulo 2n

  • f some compatible functions on Z2, which are

uniformly differentiable modulo 2.

p-Adic Dynamical Systems and Cryptography – p. 63/65

slide-188
SLIDE 188

Coming back to p-adic analysis

  • Note. (Anashin, 2004) Any transitive m-variate mapping

U : (Z/2n)m → (Z/2n)m could be constructively (with the use of skew shifts) raised to continuous mapping ˜ U : (Z2)m → (Z2)m, which is transitive modulo 2N for all N ≥ n.

p-Adic Dynamical Systems and Cryptography – p. 63/65

slide-189
SLIDE 189

A ‘provable’ security

To prove a cipher is secure one makes a ‘polynomial-time’ reduction to one of plausible (but still unproven) conjectures of ‘intractability’ of a certain problem, which is ‘hard in average’. Within the class of our PRNG’s thus reduction (hence, a ‘conditional proof’ of their security) is also possible

p-Adic Dynamical Systems and Cryptography – p. 64/65

slide-190
SLIDE 190

A ‘provable’ security

First, we need a problem, which is plausibly hard in average. Consider a polynomial ψ(χ0, χ1, . . . , χn−1) over Z/2 in variables χ0, χ1, . . . , χn−1; for m ∈ N replace χm

j with

χj. Thus one obtains a Boolean polynomial, that is, an algebraic normal form, ANF, of a Boolean function. To determine whether k Boolean polynomials in n variables have a common zero is an NP-complete problem.

p-Adic Dynamical Systems and Cryptography – p. 64/65

slide-191
SLIDE 191

A ‘provable’ security

We conjecture: For k ≤ n it is intractable to find a solution of a system of k random Boolean equations in n indeterminates (under the assumption that the number

  • f monomials in each equation is polynomially

restricted).

p-Adic Dynamical Systems and Cryptography – p. 64/65

slide-192
SLIDE 192

A ‘provable’ security

Now, given Boolean polynomials ψi, we construct a T-function f with a single cycle property in the following way: For x ∈ Z2 let Ψi(x) = ψi(δ0(x), . . . , δn−1(x)) ∈ {0, 1} ⊂ Z2; put f(x) = (1+x)⊕2n+1∙Ψ0(x)⊕2n+2∙Ψ1(x)⊕∙ ∙ ∙⊕2n+k∙Ψk−1(x) In view of the above mentioned folklore result (see theorems 6 and 7) this function f is a T-function with a single cycle property.

p-Adic Dynamical Systems and Cryptography – p. 64/65

slide-193
SLIDE 193

A ‘provable’ security

Then we construct a PRNG. Take f mod 2n+k+1 as a state update function, G = ⌊

z 2n+1⌋ mod 2k (a truncation

  • f n + 1 low order bits) as an output function, and

x0 ∈ {0, 1, . . . , 2n − 1} as a key. The produced output sequence attains all the above mentioned properties (period of length 2n+k+1, uniform distribution, etc.)

p-Adic Dynamical Systems and Cryptography – p. 64/65

slide-194
SLIDE 194

A ‘provable’ security

However, it is not difficult to show that to find a state x = χ0 + χ1 ∙ 2 + ∙ ∙ ∙ χn−1 ∙ 2n−1 given an output, an adversary (with probability 1 − 1

2n) has to solve a

Boolean system ψi(χ0, χ1, . . . , χn−1) = εi (i = 1, 2, . . . , k), where εi ∈ {0, 1} are determined by the output.

p-Adic Dynamical Systems and Cryptography – p. 64/65

slide-195
SLIDE 195

A ‘provable’ security

Moreover, with the use of the above technique it is clear how to construct in a similar way a counter-dependent PRNG, which produces an output sequence that attains all the above mentioned properties. That is, at each new step an adversary will have to solve a new system of Boolean equations, i.e., the left hand part of a system will change from step to step.

p-Adic Dynamical Systems and Cryptography – p. 64/65

slide-196
SLIDE 196

Conclusions

On the one hand, it is possible to build fast and secure stream ciphers based on 2-adic ergodic functions: Our schemes attain performance 6 Gbit per second at 3 GHz Intel P4 processor. Use of these functions results in new cryptographic properties, which make the cipher more secure: First of all, this is a possibility of making the functions key-dependent, and changing them dynamically during the encryption.

p-Adic Dynamical Systems and Cryptography – p. 65/65

slide-197
SLIDE 197

Conclusions

On the other hand, one must be very careful when choosing T-functions for a stream cipher: Too many of these functions are fast, yet bad. One bad function among

  • thers good in a composition of a (counter-dependent)

PRNG is enough to spoil the whole cipher!

p-Adic Dynamical Systems and Cryptography – p. 65/65

slide-198
SLIDE 198

Conclusions

Cryptographic properties of T-functions are tightly connected with specific features of the corresponding non-Archimedean dynamics. These dynamics are rich, intriguing, and worth deeper study to develop new fast and secure ciphers.

p-Adic Dynamical Systems and Cryptography – p. 65/65