DEKART Random Run’s Tests
Data Security Section of Smart Card Technology, DEKART S.R.L.
Moldova, Kishinev                                                             February 8, 1999


K
Dekart S.R.L,                                            Tel. +3732 24-14-30, 24-55-80
                                            Fax. +3732 24-25-08
                                          E-mail: valera@dekart.com
 D-2012,                                                  http://www.dekart.com
!
#
$ %Dekart S.R.L.»
            	
		,
E-mail: petrova@dekart.com)
E-mail: owl@dekart.com)
!
_______________________                               2
Copyright © DEKART S.R.L.
Data Security Section of Smart Card Technology, DEKART S.R.L.
Moldova, Kishinev                                                             February 8, 1999




        
       

 
  
 !  # 
!
    !    !     
  $
!% #  2.
                              # 
 
 %
#$   '()*+, +-./01 +2.34 ,5464    7
#	




_______________________                       3
Copyright © DEKART S.R.L.
Data Security Section of Smart Card Technology, DEKART S.R.L.
Moldova, Kishinev                                                             February 8, 1999
1    '()*(+ ,-( ..............................................................................5
2    '()*(+ . '(!(-+)(/ 0+)0 .............................................6
    2.1      

......................................................................... 6
    2.2       ........................................................................................ 6
    2.3      
 ............................................................................... 6
    2.4     8 ................................................................................................ 6
    2.5     9 :# 
 ......................................................................... 7
    2.6      
 ........................................................................... 7
    2.7      
 


 ...................................................................... 7
    2.8     9 ;
: 7 = ........................................................................... 7
    2.9     9  0?5@A-BBC.D 1862BA5 6546E ............................................. 7

3    (*0+!'!+01(2 !+,34500.......................................................8
4     	
	 DEKART RANDOM RUN’S TESTS ........................9
    4.1     F@5G25.HI J  

  !E ........................ 9
    4.2     45@C-A J  H............................................................................. 9
    4.3     D-B J  
 .................................................................... 10
    4.4     B0K5@ J  J   :
LE ........................................ 10
    4.5     02B0. J  :# 
 ........................................................ 11
    4.6     B5@1265 J  
 .......................................................... 11
    4.7     B5@1 J !
 M
L #  
.................... 12
    4.8     @2.4 J  
 


 .......................................................... 12
    4.9     1-NC121 J  O
: 7 =P ...................................................... 13
    4.10    162BA5 J   ............................................................. 13
    4.11    QRS J !
 #
 ............................................................. 14
    4.12    .QRS J !
 #
 % ! 
 :
            : TU .............................................................................................. 14
    4.13    D-11- J !
 7
!
# %M V8M
L ................ 15
    4.14    5@F J !
 7
!
# 
% #
 .............................. 15
    W	XT     H0115.6 J 
L# 7 
#  Y 216
    W	XZ     B[?-A25 J !
 #
 Bs #  :# 
 16
    W	X     46C@] J !
 ! ^
% %  .............................. 17
    W	X=     F-H6 J !
 M .............................................................. 17

5
DEKART RANDOM RUN’S TESTS ..............................................................19
...............................................................................................23



_______________________                                   4
Copyright © DEKART S.R.L.
Data Security Section of Smart Card Technology, DEKART S.R.L.
Moldova, Kishinev                                                             February 8, 1999

1
! 
 !
 ! 7

7!    
#    
       
    !
	
^!# #  
 !

  !

7  
: 


 ###  2 [1, 2].
7#  
# ! !   7# 
 

# !% 
#  %!% 


 
 M


                                 2
                                          
                                          1 s  k
                                                     (Ys    n  ps ) 2
                                                           n  ps
%
       Ys - ! 
    %Y s;
      ps - #
 % ! 7 
#   %Y s;
       k - ! %_
       n – :$ ! 
	
        7
!
Y 2  ! 
 :  = k – 1 !## p -
#
 

# :# 		  7

 %7	
` 
 n 
 :  !: # Y: ps 7
 .  ps
: 
 
 T	 a p   7
 U JX b  cc J XUU b 
7 :Y#  
!
 !
	 a p   cc  cT
b   T  X b  7 !Y# ;7
_ 
7
!
# p, 7Y!

  cT  cU b  XU  T b 7 ;%
7
 [1].

    (  6$ 

                                         !7
           0 – 1 %, 99 – 100 %                                      d

           1 – 5 %, 95 – 99 %                                          7

           5 – 10 %, 90 – 95 %                                      ^% 7

                10 – 90 %                                            e



        
 % DEKART Random Run’s Tests 7
 !  #  !
 !
L
 7#  $Y # 2  
#L  %
! 
	




_______________________                                5
Copyright © DEKART S.R.L.
Data Security Section of Smart Card Technology, DEKART S.R.L.
Moldova, Kishinev                                                             February 8, 1999




2
2.1     '
^!
 ! 
 
 : 



  U  d–1 (d = 256  M
 M  $Y
!
  d = 10 8 % 
#Y# #!
 LM)	  #

# !#  7   

 !	  
##  
  k=d  #
# ps =
1 / d.


2.2     ' $

      

  # 
 !
  
7

 Y$ % 7 % n !
 !	 # %
!# !  # 
	 

##  
  k= dn  #
# ps = 1 / dn.


2.3     ' 

          ## 
 
  #
#
7
!
 
$ 
 7

 7 [, f	 # %
## ! 
 
 U X ]				XT  
 ! 

: 
 15)	 !

 7
!
# ::Y# H $Y
# 
  KgXZhX  #
# B0=p, p1=p(1-p), p2=p(1-p)2,...,
p16=p(1-p)16 .



2.4     '8

       i! 8  n % 7 # Y$ %
7 % !
 !	   % # ! 
Y$
!	 ` %   
 T
       T 7
 J  7
_
       W 7
 J 
 _
       j 7
 J    j 
% _
       ] 7
 J 
 :  W 
% _
       
 7
 J # 
% 	
         !# ! %   # T8W8j8]8U
7
 !  7 
##  2.
       d# ML#  7Y!#  Y$   7 m
% Y$ % 7 % ! !
 ! ## !
Y$  J 
 
 
     !	 k



_______________________                       6
Copyright © DEKART S.R.L.
Data Security Section of Smart Card Technology, DEKART S.R.L.
Moldova, Kishinev                                                             February 8, 1999

!#  %   % U8X8]8j8W
E  !% 
##  2.



2.5     0 # 


       
 
 !
 ! #Y# 
 n

 %
 
: # % !: : ;


: L !  U  d8X	 

 % !  7
 # 
 %
  
#  
	


2.6     ' 


      l
# 
 # 
 n %  T 
 
	   % 7
 % T 
 

%

# !	 !#  7  


 
  !% 
##  
  k=5 
#
# p=1/5!


2.7     '

Chi2 10b

  • 1.
  • 2.
    Data Security Sectionof Smart Card Technology, DEKART S.R.L. Moldova, Kishinev February 8, 1999 K
  • 3.
    Dekart S.R.L, Tel. +3732 24-14-30, 24-55-80 Fax. +3732 24-25-08 E-mail: valera@dekart.com D-2012, http://www.dekart.com !
  • 4.
  • 5.
  • 6.
  • 7.
  • 10.
  • 11.
    _______________________ 2 Copyright © DEKART S.R.L.
  • 12.
    Data Security Sectionof Smart Card Technology, DEKART S.R.L. Moldova, Kishinev February 8, 1999 ! # ! ! ! $ !% # 2. # % #$ '()*+, +-./01 +2.34 ,5464 7 # _______________________ 3 Copyright © DEKART S.R.L.
  • 13.
    Data Security Sectionof Smart Card Technology, DEKART S.R.L. Moldova, Kishinev February 8, 1999
  • 14.
    1 '()*(+ ,-( ..............................................................................5 2 '()*(+ . '(!(-+)(/ 0+)0 .............................................6 2.1 ......................................................................... 6 2.2 ........................................................................................ 6 2.3 ............................................................................... 6 2.4 8 ................................................................................................ 6 2.5 9 :# ......................................................................... 7 2.6 ........................................................................... 7 2.7 ...................................................................... 7 2.8 9 ; : 7 = ........................................................................... 7 2.9 9 0?5@A-BBC.D 1862BA5 6546E ............................................. 7 3 (*0+!'!+01(2 !+,34500.......................................................8 4 DEKART RANDOM RUN’S TESTS ........................9 4.1 F@5G25.HI J !E ........................ 9 4.2 45@C-A J H............................................................................. 9 4.3 D-B J .................................................................... 10 4.4 B0K5@ J J : LE ........................................ 10 4.5 02B0. J :# ........................................................ 11 4.6 B5@1265 J .......................................................... 11 4.7 B5@1 J ! M L # .................... 12 4.8 @2.4 J .......................................................... 12 4.9 1-NC121 J O : 7 =P ...................................................... 13 4.10 162BA5 J ............................................................. 13 4.11 QRS J ! # ............................................................. 14 4.12 .QRS J ! # % ! : : TU .............................................................................................. 14 4.13 D-11- J ! 7 ! # %M V8M L ................ 15 4.14 5@F J ! 7 ! # % # .............................. 15 W XT H0115.6 J L# 7 # Y 216 W XZ B[?-A25 J ! # Bs # :# 16 W X 46C@] J ! ! ^ % % .............................. 17 W X= F-H6 J ! M .............................................................. 17 5
  • 15.
    DEKART RANDOM RUN’STESTS ..............................................................19
  • 16.
  • 17.
    Data Security Sectionof Smart Card Technology, DEKART S.R.L. Moldova, Kishinev February 8, 1999 1
  • 18.
    ! ! ! 7 7! # ! ^!# # ! ! 7 : ### 2 [1, 2].
  • 19.
    7# #! ! 7# # !% # %!% M 2 1 s k (Ys n ps ) 2 n ps % Ys - ! %Y s; ps - # % ! 7 # %Y s; k - ! %_ n – :$ ! 7 ! Y 2 ! : = k – 1 !## p - # # :# 7 %7 ` n : !: # Y: ps 7 . ps : T a p 7 U JX b cc J XUU b 7 :Y# ! ! a p cc cT b T X b 7 !Y# ;7 _ 7 ! # p, 7Y! cT cU b XU T b 7 ;% 7 [1]. ( 6$ !7 0 – 1 %, 99 – 100 % d 1 – 5 %, 95 – 99 % 7 5 – 10 %, 90 – 95 % ^% 7 10 – 90 % e % DEKART Random Run’s Tests 7 ! # ! !
  • 20.
    L 7# $Y # 2 #L % ! _______________________ 5 Copyright © DEKART S.R.L.
  • 21.
    Data Security Sectionof Smart Card Technology, DEKART S.R.L. Moldova, Kishinev February 8, 1999 2
  • 22.
  • 23.
    ^! ! : U d–1 (d = 256 M M $Y ! d = 10 8 % #Y# #! LM) # # !# 7 ! ## k=d # # ps = 1 / d. 2.2 ' $ # ! 7 Y$ % 7 % n ! ! # % !# ! # ## k= dn # # ps = 1 / dn. 2.3 ' ## # # 7 ! $ 7 7 [, f # % ## ! U X ] XT ! : 15) ! 7 ! # ::Y# H $Y # KgXZhX # # B0=p, p1=p(1-p), p2=p(1-p)2,..., p16=p(1-p)16 . 2.4 '8 i! 8 n % 7 # Y$ % 7 % ! ! % # ! Y$ ! ` % T T 7 J 7 _ W 7 J _ j 7 J j % _ ] 7 J : W % _ 7 J # % !# ! % # T8W8j8]8U 7 ! 7 ## 2. d# ML# 7Y!# Y$ 7 m % Y$ % 7 % ! ! ! ## ! Y$ J ! k _______________________ 6 Copyright © DEKART S.R.L.
  • 24.
    Data Security Sectionof Smart Card Technology, DEKART S.R.L. Moldova, Kishinev February 8, 1999 !# % % U8X8]8j8W E !% ## 2. 2.5 0 # ! ! #Y# n % : # % !: : ; : L ! U d8X % ! 7 # % # 2.6 ' l # # n % T % 7 % T % # ! !# 7 !% ## k=5 # # p=1/5! 2.7 '
  • 25.
    7 m 7 :Y$ ! ! 2.8 0 %#7 9 l # ! ! # % 7 = Y$ % 7 % ! % ### : k !# 7 7 ! ## 2 2.9 0 6$ :overlapping m-tuple test) ### ML l # ! ! # % j % 7 7 : V2) ( V3) % fjn 7# ! ME :: %Y# 7 V2) ojE #! LM _______________________ 7 Copyright © DEKART S.R.L.
  • 26.
    Data Security Sectionof Smart Card Technology, DEKART S.R.L. Moldova, Kishinev February 8, 1999 3 ! #$ '
  • 27.
    e 7 # % 7 ! ! ! ! U ]TT # ! E U XU # #! LME 7 # ' $ a 7 % !E Y$ % 7 % ! ! 7 % % # YE ' l7 % 7 % ! # # # ! ! Uj , $ 7 7 [, [ ( Uj ), !# ! Y$ 7 # '8 e 7 % 7 ! ! ! # # 7! : L ! Y$ % 7 % ! 7 E Y # # 0 # 8 #7 : ! ! % 7 :# ! # % ! :# # : ; % : !# ! Y$ # ' a 7 # ! !# ! '
  • 28.
    7 l7 %7 % ! 7 % 7 # ! Y 7 # # 0 %#7 9 e 7 % ! ! 7 = Y$ % 7 % ! !# # Y p = 1/i8. 0 6$ a # 7 7 V3-V2 2 d3-d2E # :E ( Y! E Y$ % 7 % ! ! 7 _______________________ 8 Copyright © DEKART S.R.L.
  • 29.
    Data Security Sectionof Smart Card Technology, DEKART S.R.L. Moldova, Kishinev February 8, 1999 4 7 # M L M L 7 #7 C . 7 Borland C 3.02. p L L MS DOS. M L 7Y$ ! % M L 7 ! # ! !% # i ## ! ! ! 7 M 7 % : X q 7 # :L 7 ! 2 , # ## M 7 # 7# 7 ! # # 7 ## yy[9] %: # #E a %8: # # ! # 7 (c 1 ) 7 : Y$ :$ Name of test (not enough statistics).
  • 30.
    M L # # :: #7 C. 4.1 frequency ;
  • 31.
    : p L# void frequency(FILE *stream) frequency.c
  • 32.
    $# ! # % !# 7 # 7 7 ! M LM J #! LME k !## stream. 7$ 7 ! yy[i] %: # #E
  • 33.
    % ! # d 4.2 serial ; =$ p L# void serial(FILE *stream) serial.c _______________________ 9 Copyright © DEKART S.R.L.
  • 34.
    Data Security Sectionof Smart Card Technology, DEKART S.R.L. Moldova, Kishinev February 8, 1999
  • 35.
    # 7 ! ! E ! # #! E Y$ % 7 % ! ! !
  • 36.
    ## ! 7 : L 7 #Y# pcount, 7# - % !# :$ ! npairsE !% ## stream. 7$ 7 ! yy[i] %: # #E
  • 37.
    % ! # d 4.3 gap ; p L# void gap(FILE *stream) gap.c
  • 38.
    ## # ! ! Uj , $ 7 7 [, [ : Uj . count[0]...count[15] ## ! # # % U XT X8 J ! : XT ## stream. 7$ 7 ! 9 yy[i] %: # #E
  • 39.
    % ! # d 4.4 poker ; ; :
  • 40.
    #$ p L# void poker(void) poker.c
  • 41.
    i ! 7 U dn %# :: J 7## W a, b, c, d. _______________________ 10 Copyright © DEKART S.R.L.
  • 42.
    Data Security Sectionof Smart Card Technology, DEKART S.R.L. Moldova, Kishinev February 8, 1999 !# ! Y$ ! Y$ % 7 % ! c $Y pcount, ! % M L % serial, ## ! : L # # 5N65@. /02rA5 s2D5 BH02.6 fZTTjZtn # ! ! #E_ 5N65@. /02rA5 s2D5 BH02.6 fXUUUUn # #! ! #E_ extern double npairs; # M L serial. 7$ 7 ! ` yy[i] %: # #E
  • 43.
    % ! # M L 7 :7 % 7 # M L serial. 4.5 ?@A?B ; # p L# void coupon(FILE *stream) coupon.c
  • 44.
    # % ! ! : # % !: : P :P L ! U / ! ! # # % % 7 # Y$ count, 7 9hX ! 9gWU_ count[T] c ! % 9E ## # ps # ! # !#Y# $Y % p_value). stream. 7$ 7 ! # yy[i] %: # #E
  • 45.
    % ! # d 4.6 permute ; p L# void permute(FILE *stream) _______________________ 11 Copyright © DEKART S.R.L.
  • 46.
    Data Security Sectionof Smart Card Technology, DEKART S.R.L. Moldova, Kishinev February 8, 1999 permute.c
  • 47.
    l # ! ! 7## % T !# 7 !# ! % 7 7# $Y # . stream. 7$ 7 ! u yy[i] %: # #E
  • 48.
    % ! # d ! 9: % int perm(int a, int b, int c, int d, int e) 4.7 perm ; 6 C p L# int perm(int a, int b, int c, int d, int e) permute.c
  • 49.
    !# ! : # #! # ! ! a, b, c, d, e L Y M LY F # 7 :7 % fXn . . V 7 # ! # 7 int a, int b, int c, int d, int e. 7$ 7 ! k ! M L :7 7Y$ # # ! %
  • 50.
    % ! # d 4.8 runs ;
  • 51.
    7 p L# void runs(FILE *stream) runs.c _______________________ 12 Copyright © DEKART S.R.L.
  • 52.
    Data Security Sectionof Smart Card Technology, DEKART S.R.L. Moldova, Kishinev February 8, 1999
  • 53.
    7Y# :Y$ ! $Y # . stream. 7$ 7 ! ^ yy[i] %: # #E
  • 54.
    % ! # d 4.9 maximum ; “#7 ” p L# void maximum(FILE *stream) maximum.c
  • 55.
    l # ! ! 7:# = ! k 7Y# 7 ! # # . stream. 7$ 7 ! yy[i] %: # #E
  • 56.
    % ! # d 4.10 mtuple ; 6$ p L# void mtuple(FILE *stream) mtuple.c
  • 57.
    l # ! ! 7:# % j k 7Y# : E : ! ! #E : # #$ LM #! # ! #E ^ LY MY# triples # ;E B-C@4 # OPE ### ! # : L OP OP # : _______________________ 13 Copyright © DEKART S.R.L.
  • 58.
    Data Security Sectionof Smart Card Technology, DEKART S.R.L. Moldova, Kishinev February 8, 1999 O P ! Hvvrvv- rvv-E1 % a, b, c – ! 7 E ! 7 Y# $Y # stream. 7$ 7 ! # yy[i] %: # #E
  • 59.
    % ! # d 4.11 CHI ; 6 p L# double CHI(double x, int n) chi.c
  • 60.
    !# # $ # 2 7 # : ` : n 2 – x. 7$ 7 ! # :#
  • 61.
    % ! # d ! 7 M L $# 7% : - double CHI(double x, int n) double chi(double x, int n) 4.12 nCHI ; 6 D $ #6 #7 E p L# double nCHI(double x, int n) chi.c 1 || - L _______________________ 14 Copyright © DEKART S.R.L.
  • 62.
    Data Security Sectionof Smart Card Technology, DEKART S.R.L. Moldova, Kishinev February 8, 1999
  • 63.
    !# # $ # 2 , % ! : : TU # M L# ### : # CHI. ` : n 2 - x. 7$ 7 ! # :# a # % %: # # ier 1, nCHI 7$ 7 !
  • 64.
    % ! # d 4.13 gamma ; 6 DC
  • 66.
    8C p L# double gamma(double arg) chi.c
  • 67.
    !# 7 ! %MV8M L 7 % % k ! % arg. 7$ 7 ! %M V8M L
  • 68.
    % ! # d ! p L# 7 : % static double pos (double arg), static double asym (double arg), static double neg(double arg) . 4.14 erf ; 6 D p L# double erf(double x) chi.c
  • 69.
    !# 7 ! %# M L :E c $Y L [5]. k ! % % # 7$ 7 ! k ! % #
  • 70.
    % ! # d _______________________ 15 Copyright © DEKART S.R.L.
  • 71.
    Data Security Sectionof Smart Card Technology, DEKART S.R.L. Moldova, Kishinev February 8, 1999 ! ! # 7# %: ier # 7 ! X 4.15 comment ; 7 F 2 p L# void comment(void) comment.c
  • 72.
    7 7 # ! X :$ 7Y ! # 7# ier=1, yy[i]0 IIfCnwX E # :$ O(@@0@ 0F 6546P Result of test is : A. Frequency Test - Satisfactory B. Serial Test - Satisfactory C. Gap Test - Satisfactory D. Poker Test - Faintly suspicious E. Coupon Test - Satisfactory F. Permutation Test - Satisfactory G. Runs Up Test - Satisfactory H. Maxi-of-8 Test - Satisfactory I. Lapped M-Tuple Test - Satisfactory k ! # # H:: extern double yy[9]. 7$ 7 ! d
  • 73.
    % ! # d 4.16 p_value ; 6 ps # p L# void p_value(void) p_value.c
  • 74.
    % p_value (# : :7 M LYE !# 7 ! # # ps # :# (# % !# d, # ps YE ! # M ZE fX 7 j j ]]. _______________________ 16 Copyright © DEKART S.R.L.
  • 75.
    Data Security Sectionof Smart Card Technology, DEKART S.R.L. Moldova, Kishinev February 8, 1999 7 B[?-A25 : 7 M! 7 ! # 9 / 7L 9gWU_ /g= # ! : /gXU J # #! E a p_value : :7 M LY T d : ! . 7$ 7 ! 7 ! # : : M
  • 76.
    % ! # d ! p L# 7 : % float stir2 (int, int), double fact(int). 4.17 stir2 ; 6 )D D p L# float p_value(int n, int k) p_value.c
  • 77.
    !# ! ^ %% M [4]: n, k 1 k 1) kj k j n! j 0 ( j n ! 7Y# L ! n k. 7$ 7 ! ` ^ % %
  • 78.
    % ! # d ! p L# 7 : Y % double fact(int). 4.18 fact ; 6 C p L# double fact(int n) p_value.c
  • 79.
    !# M % ! n. d ! n. 7$ 7 ! p n!. _______________________ 17 Copyright © DEKART S.R.L.
  • 80.
    Data Security Sectionof Smart Card Technology, DEKART S.R.L. Moldova, Kishinev February 8, 1999
  • 81.
    % ! # d _______________________ 18 Copyright © DEKART S.R.L.
  • 82.
    Data Security Sectionof Smart Card Technology, DEKART S.R.L. Moldova, Kishinev February 8, 1999 5 ! #$% #'() * !! DEKART Random Run’s Tests d M L % DEKART Random Run’s Tests : 7: % # # ! ! – main2.exeE #! LM (main10.exe) # : L %# 7 bat8M CHI_TEST.BAT: @echo off REM 1 - number system (2 or 10) REM 2 - input_file_name REM 3 - output_file_name (NULL==CON) if %1 ==/? goto er1 if %1 .==. goto er1 if %2 .==. goto er1 if %1 == 2 goto m2 if %1 == 10 goto m10 goto err :m2 if %3 .==. goto m22 main2 %1 %2 %3 goto exit :m22 main2 %1 %2 goto exit :m10 if %3 .==. goto m12 main10 %1 %2 %3 goto exit :m12 main10 %1 %2 goto exit :err echo Number system must be decimal (10) or binary (2) goto exit :er1 echo ***************************************************************** echo * Tests for randomness on characters of a file * echo * Copyright (c) Dekart SRL * echo * * echo * * _______________________ 19 Copyright © DEKART S.R.L.
  • 83.
    Data Security Sectionof Smart Card Technology, DEKART S.R.L. Moldova, Kishinev February 8, 1999 echo * Usage: * echo * 1. CHI_TEST number_system input_file_name * echo * 2. CHI_TEST number_system input_file_name output_file_name * echo * * echo * * echo * File should contain at least 1 Mbyte of random data * echo ***************************************************************** :exit 6 D
  • 85.
    6 k % Hhi_test $ # : path chi_test.bat n_s path input_file_name (a) path chi_test.bat n_s path input_file_name path output_file_name (b)
  • 86.
    ! 7Y!# : 7 # EE M (b)). G6 6G6 6 ! 7Y# ! # n_s ! ! 7 # M input_file_name, 7 % : X q ! # # : ! 7 # 7 ## :L x d7 # ! ` :# 2 : :L # L# 7 7 7 ! Y # # % ( 6$ !7 0 – 1 %, 99 – 100 % d 1 – 5 %, 95 – 99 % 7 5 – 10 %, 90 – 95 % ^% 7 10 – 90 % e 7 # 7 M b1: 1000000 characters in file: b1 A. Frequency Test CHI = 0.659510 x2 = 263.715328 n = 255 _______________________ 20 Copyright © DEKART S.R.L.
  • 87.
    Data Security Sectionof Smart Card Technology, DEKART S.R.L. Moldova, Kishinev February 8, 1999 B. Serial Test CHI = 0.367744 x2 = 65412.102144 n = 65535 C. Gap Test CHI = 0.571380 x2 = 16.352818 n = 16 D. Poker Test CHI = 0.073851 x2 = 0.888890 n = 4 E. Coupon Test CHI = 0.284641 x2 = 27.051418 n = 32 F. Permutations Test CHI = 0.351198 x2 = 112.558610 n = 119 G. Runs Up Test CHI = 0.288077 x2 = 2.922561 n = 5 H. Max-of-8 Test CHI = 0.534920 x2 = 55.252936 n = 55 I. Lapped M-Tuple Test CHI = 0.695418 x2 = 462.797214 n = 448 Result of test is : A. Frequency Test - Satisfactory B. Serial Test - Satisfactory C. Gap Test - Satisfactory D. Poker Test - Faintly suspicious E. Coupon Test - Satisfactory F. Permutation Test - Satisfactory G. Runs Up Test - Satisfactory H. Maxi-of-8 Test - Satisfactory I. Lapped M-Tuple Test - Satisfactory ! CHI J ! # _ n J ! :_ x2 J 7 ! 2. a %8: 7 7# Y CHI # U # :$ : “Error of test”. # ML# 7 : % # 7 E 7E 7# M output_file_name. )#H 7F a 7 % chi_test : 7 # % M input_file_name, : ! # : 7 Y! /? - # :$ Tests for randomness on characters of a file Copyright (c) Dekart SRL Usage: 1. CHI_TEST number_system input_file_name 2. CHI_TEST number_system input_file_name output_file_name File should contain at least 1 Mbyte of random data !% % 7 Y : a ! % : 7 # $Y$% M ### :$ ***: no such file or directory _______________________ 21 Copyright © DEKART S.R.L.
  • 88.
    Data Security Sectionof Smart Card Technology, DEKART S.R.L. Moldova, Kishinev February 8, 1999 % 7 !# a %8: # # ! # 7 , 7 : Y$ :$ Name of test (not enough statistics). _______________________ 22 Copyright © DEKART S.R.L.
  • 89.
    Data Security Sectionof Smart Card Technology, DEKART S.R.L. Moldova, Kishinev February 8, 1999 + 1. i l % # # m y 9 ] ! % 8 Xc 8 ] 2. 9 d! p d! d p ! 8 u Xc=W 8 T] 3. Wegentkittl S. Empirical testing of pseudorandom number generator/ Master’s thesis, University of Salzburg, Austria, 1995. 4. ! L! y V z J ^ L# Xc== J =W 5. # ^! % % #7 : # m ^! 8 d Xc=c J ]WU _______________________ 23 Copyright © DEKART S.R.L.
  • 90.
    Data Security Sectionof Smart Card Technology, DEKART S.R.L. Moldova, Kishinev February 8, 1999 _______________________ 24 Copyright © DEKART S.R.L.