Testing D-Sequences for their Randomness

This paper examines the randomness of d-sequences, which are decimal sequences to an arbitrary base. Our motivation is to check their suitability for application to cryptography, spread-spectrum systems and use as pseudorandom sequence.

Authors: Sumanth Kumar Reddy Gangasani

1 Testing D-S equences for their Ra ndo mness Sumanth Kumar Reddy G angas ani Oklahoma State Universit y, Stillwater Abstract: This paper ex amines the randomness of d-sequences, which are “decimal sequences” to an arbitrary base. Our moti vation is to check their suitabilit y for application to cr y ptograph y, spread-spectrum systems, and use as pseudo random sequence. Introduction There exist two approaches to randomness [1]: one takes the path of probabilit y , the other that of complexit y [2]. From the point of view of probabili ty, all binary sequences of length n are equivalent, b ut from the point of view of compl exity, the sequence 01001011…110 is more random than the all-z ero sequence 00000000…000 Ritter [1] summ arizes several methods to measure algorithmic complex ity that includes the application of suitable transforms [3] . In this paper, we consider a new me asure, due to Kak, to quanti fy randomness. It is based on the idea of how much the autocorrelati on departs from the ideal that i s true for white noise. Kak defines the random ness, R(x), of a discrete sequence x b y the expression below: 1 ) ( 1 ) ( 1 1 − − = ∑ − = n k C x R n k where C(k) is the autocor relation value for k and n is the period of sequen ce. The value of the autocorrelation is defi ned as in the equation below: k j n j j a a n k C + = ∑ = 0 1 ) ( Since the randomness measure of disc rete-time white noi se sequence is 1 whereas that of a constant sequence is 0, t his measure conforms to our intui tive expectations. L ikewise, 2 the value of randomness for a binary shift register max imum-length sequence is close to 1, in accord with our exp ectations. This measure will be tried on t he class of d-sequences [4-12] , that are “decimal sequences” in an arbitrary base, althou gh binary (base-2) sequences will be th e only ones that will be considered in t his paper. D-sequences have found sev eral applications in cryptography, watermark ing, spread-spectrum [5-12] , and as generator of random numbers [13]. They constitute a very versatile source of random sequ ences, since, unlike maximum -length shift-register sequences [14], they are not constrained to only a limited number of period values. They have the additional virtue that other periodic sequences (including maximum-length shift re gister sequences) can be seen as special cases of d- sequences. The motivation for this st udy is the search of new classes of random sequences for applications to cr yptography and spread spectrum s y stems. Basic properties of d-sequences We begin with a quick revi ew of d-sequences [4-12], obtained when a number is represented in a “decimal form” in a bas e r, and it ma y terminate, repeat or be aperiodic. For maximum-length d-sequenc es of 1/ q, where q is a prime num ber, the digits spaced half a period apart add u p to r-1 , where r is the bas e in which the sequence is ex pressed. Ex: 142857 . 0 7 1 = Here q is 7, r is 10, the se quence is 142857 and 6 i s the period. It can be clearly seen that digits that are half the pe riod apart add up to r-1 (1+8, 4+5 and 2+7). D-sequences are known t o have good c ross-correlation and auto-correlation properties and the y c an be used in a pplications in volving pseudorandom sequences. W hen the binary d-sequence is of maxim um length, then bits in the second h alf of the period are the complements of tho se in the first half. We begin with some st andard results [ 13]: Theorem 1: Any positive num ber x may be expressed as a decimal in the base r A 1 A 2 ...A s+1 .a 1 a 2 … where 0 A i r, 0 a i r, not all A and a are zero, and an infinity of the a i are less t han (r-1). There exists a one-to-one correspondence between the numbers and the decimals and x = A 1 r s + A 2 r s-1 +…+ A s+1 + r a 1 +….. 3 That the decimal sequences of rational and irrational numbers may be used to generate pseudo-random sequences is suggested by the following theorem s of decimals of real numbers. Theorem 2: Almost all d ecimals, in an y base, contain all possible digits. The ex pression almost all im plies that the propert y applies ever ywhere except to a set of measure zero. Theorem 3: Almost all d ecimals, in an y base, contain all possible sequences of any number of digits. Theorems 2 and 3 guarantee that a decimal s equence missing an y digit is exceptional. Autocorrelation and cros s-correlation properti es of d-sequences a re given in [ 4] and [5]. It is easy to generate d-s equences, whic h makes them attractive for man y engineering applications. For a m aximum-l ength d-sequence, 1/q , the digits of a/q , where a < q , are permutations of the di gits of 1/q , which makes it pos sible to use them for error -correction coding applications [ 5]. We are concerned prim arily with max imum-length binary d-sequ ences (which are generated b y prime numbers) because, as we will sho w later, the randomne ss measure for such sequences is g enerall y be tter than for non -maxi mum-length d-sequences. The bina ry d-sequence is generated by means of the al gorithm [ 6]: a(i) = 2 i mod q mod 2 where q is a prim e number. The maxim um length (q-1) sequ ences are generated when 2 is a primitiv e root of q . When the bin ary d-sequence is of maxi mum length, then bits in the second half of th e period are the compl ements of thos e in the first half. Any periodic sequ ence can be represent ed as a generaliz ed d-sequence m/n , where m and n are suitable natural nu mbers, i.e., posi tive integers. For example, consider th e maxim um-length shift register [14 ] or PN sequence 0011101, of periods 7: (.0011101) 2 = 10 128 1 32 1 16 1 8 1       + + + Hence ( ) 2 0011101 . =       + + + 128 1 32 1 16 1 8 1 + 7 2 1       + + + 128 1 32 1 16 1 8 1 + 14 2 1       + + + 128 1 32 1 16 1 8 1 + …… =       + + + 128 1 32 1 16 1 8 1       + + + ...... 2 1 2 1 1 14 7 4 =             −       + + + 7 2 1 1 1 128 1 4 8 16 =       127 128 128 29 = 127 29 Therefore, all PN sequen ces ma y be represented as suitable d-sequenc es, as shown in Figure 1. Figure 1: Maximum-length shift register sequences as a subset of d-sequences Randomness study of d-sequences We apply the randomnes s measure 1 ) ( 1 ) ( 1 1 − − = ∑ − = n k C x R n k , where C(k) is the autocorrelation value fo r k and n is the period of s equence, to determine how i t varies for different values of q. We first consider the general d-sequence 1/n , where n is an odd number. For doing so we The randomness measure has its minima for n = 2 k -1 , since for such a case t he sequence would be k -1 0s followed by 1, which is a highl y non-random sequence. Ho wever, multipl y ing such a seque nce with an appropriate int eger could generate a P N sequence as given by the previous ex ample. PN sequence d-sequences 5 0 0.2 0.4 0.6 0.8 1 1.2 9 989 19 69 29 49 39 29 49 09 58 89 68 69 78 49 88 29 98 09 10 789 11 769 12 749 13 729 14 709 15 689 16 669 17 649 18 629 19 609 20 589 21 569 22 549 23 529 24 509 25 489 26 469 27 449 28 429 29 409 Odd nu mbe rs Randomness m eas ure Figure 2. Variation of rando mness measure, R, wit h odd numbers < 30,000 Now we consider prime numbers q < 63,180 (Fi gure 3). 0 0.2 0.4 0.6 0.8 1 1.2 5 13 07 29 53 47 21 65 53 84 61 10 337 12 401 14 423 16 417 18 443 20 611 22 697 24 841 26 953 29 147 31 337 33 533 35 771 37 963 40 193 42 407 44 687 47 059 49 307 51 577 53 887 56 179 58 391 60 733 63 179 Pri me N um be r Ra ndomn ess Measure Figure 3. Variation of rando mness measure, R, wit h prime numbers We find that the random ness measure quite qui ckly (b y q in the ran ge of 4000 or so) climbs to a value close to 1 for maxim um-length d-sequences. This increase s our confidence in the use of d-sequences in cr y ptogra phy applications. Many of the primes in Fi gure 3 do not correspond to maxim um-length sequences. As expected, the randomnes s measure has its minima for the Mers enne prime (8191) in Figure 3. In Figure 4, we plot the randomness mea sure only for maxim um-length d- sequences. 6 Maxi mum l eng th seq uenc es 0 0.2 0.4 0.6 0.8 1 1.2 5 15 31 34 99 55 63 75 73 98 03 12 251 14 797 17 077 19 739 22 157 24 709 27 299 29 723 32 237 34 651 37 013 39 869 42 403 44 939 47 507 50 227 53 147 55 813 58 427 61 331 Pri m e num b e r Ra ndom ness m ea sure Figure 4. Variation of rando mness measure, R, for max imum-length-sequences with prime numbers The results are nearl y equally impressive when ha lf-length sequences are con sidered as in Figure 5. H alf l ength sequ enc es 0 0.2 0.4 0.6 0.8 1 1.2 7 12 79 27 53 46 39 62 87 82 97 102 23 120 97 138 79 159 91 180 89 204 79 224 09 244 39 266 81 286 63 307 27 329 99 351 59 375 61 397 91 419 59 443 51 466 63 488 57 513 43 534 41 559 03 577 91 598 33 623 11 Pri me num be rs Randomness m easure Figure 5. Variation of rando mness measure, R, for half the max imum-length-sequenc es with prime numbers 7 Conclusions This note has shown th at the randomness measure R(x) has excellent characteristics since it accords with our intuit ive ideas of randomness. The application of this measure to d- sequences has shown tha t these have good rando mness properties and, the refore, their use in cryptographic applicat ions ma y be appropriate in many situations. References 1. T. Ritter, Randomn ess tests: a literature surve y. http://www.ciphersb yritter.com/RES/RANDTES T.HTM 2. Kolmogorov, Three appr oaches to the quantitative definition of information. Problems of I nformation Transmission . 1, 1-17, 1965. 3. S. Kak, Classification o f random binary sequences usi ng Walsh-Fourier anal ysis. Proceedings of Applicati ons of Walsh Functions . Pp. 74-77. W ashington, 1971. 4. S. Kak and A. Chatterjee , On decimal sequences. IEEE Transactions on Information Theor y, IT-27: 647 – 652, 1981. 5. S. Kak, Encr y ption and error- correction coding us ing D sequences. IEEE Transactions on Comput ers, C-34: 803-809, 1985 . 6. S. Kak, New results o n d-sequences. Electronics Letters, 23: 617, 1987. 7. D. Mandelbaum, On sub sequences of arithmetic s equences. IEEE Trans on Computers, vol. 3 7, pp 1314-1315, 1988. 8. S. Kak, A new method fo r coin flipping b y telepho ne. Cryptologia, vol. 13, pp. 73-78, 1989. 9. N. Mandhani and S. Kak, Watermarking using dec imal sequences. Cr yptologia, vol 29, pp. 50-58, 200 5; arXiv: cs.CR/06020 03 10. R. Vaddiraja, Generaliz ed d-sequences and their a pplications in C DMA Systems. MS Thesis, Louisiana State University, 2003. 11. K. Penumarthi and S. Ka k, Augmented watermark ing. Cryptologia, vol. 30, pp 173-180, 2006. 12. S. Kak, Joint encr yption and error-correction coding, Proc eedings of the 1983 IEEE Symposium on S ecurity and Privac y, pp. 55-60 1983. 8 13. G.H. Hardy and E.M. W right, An Introduction to the Theory of Numbers. Oxford University Press, 1954. 14. S.W. Golo mb, Shift Register Sequences. Aegean Park Press, 1982.

Original Paper

Loading high-quality paper...

Comments & Academic Discussion

Loading comments...

Leave a Comment