Valid

MZ/T 093-2017Specification for welfare-lottery system lottery-random-number-test (English PDF)

中国福利彩票系统彩票随机数检验规范

Preview PDF

This is a limited preview

Buy now to download the full PDF (7 pages)

Need quotation for your management?

Get a formal quotation for MZ/T 093-2017 in 30 minutes.

Issued by

Ministry of Civil Affairs

Level / Type

National · Recommended

Issue date

October 18, 2017

Implementation date

October 18, 2017

Scope

MZ/T 093-2017 is the English-translated version of 中国福利彩票系统彩票随机数检验规范.

MZ/T 093-2017 — This standard specifies the test method, test process and test results of the randomness of the random number sequence of the lottery in the China Welfare Lottery System. set.

This standard is applicable to test institutions and testers for the random number sequence inspection of lottery in the China Welfare Lottery System.

Found what you need?

Document preview — MZ/T 093-2017

National Standard of the People's Republic of China

ICS
35.240
Classification
A 79

Issued by: Ministry of Civil Affairs

Contents

  • Foreword
  • 1 Scope
  • 2 Normative references
  • 3 Terms and definitions
  • 4 Lottery random number sequence randomness test method set
  • 4.1 Overview
  • 4.2 Proportional inspection
  • 4.3 Proportional Inspection in Blocks
  • 4.4 Total number of runs
  • 4.5 Run length distribution test
  • 4.6 Longest Run Inspection in Block
  • 4.7 Binary matrix test
  • 4.8 Discrete Fourier Transform Test
  • 4.9 Poker Inspection
  • 4.10 Overlapping template matching test
  • 4.11 General statistical tests
  • 4.12 Linear Complexity Test
  • 4.13 Approximate Entropy Test
  • 4.14 Accumulation and inspection
  • 4.15 Binary Derivation Test
  • 4.16 Autocorrelation test
  • 5 Process of randomness test of lottery random number sequence
  • 5.1 Sample preparation
  • 5.2 Plan
  • 5.3 Design
  • 5.4 Implementation
  • 5.5 Summary
  • 6 Judgment of randomness of lottery random number sequence

Foreword

This standard was drafted in accordance with the rules given in GB/T 1.1-2009.

This standard is proposed by the China Welfare Lottery Issuance Management Center.

This standard is under the administration of the Department of Social Welfare and Charity Promotion of the Ministry of Civil Affairs.

This standard was drafted. China Welfare Lottery Issuing Management Center.

1 Scope

This standard specifies the test method, test process and test results of the randomness of the random number sequence of the lottery in the China Welfare Lottery System.

set.

This standard is applicable to test institutions and testers for the random number sequence inspection of lottery in the China Welfare Lottery System.

2 Normative references

The clauses in the following documents become the clauses of this specification after being referenced. For dated references, all subsequent documents the amendments (excluding the content of errata) or revisions are not applicable to this specification, but parties who use this specification are encouraged to explore the use of the possibility of a new version. For undated references, the latest version applies to this specification.

MZ/T 079-2017 China Welfare Lottery System Software Test Specification GM/T 0005-2012 Randomness Test Specification

3 Terms and definitions

Lottery random number sequence A binary random number sequence used in the Chinese welfare lottery system. The natural numbers that make up the sequence are composed of 0 and 1 and are arranged continuously.

Column.

Randomness of lottery random number sequence the randomness of the lottery random number sequence indicates that it has unpredictability, uniformity, and measurability.

Unpredictability

No matter how many digits the lottery random number sequence has, and what number has been generated, the next number generated should be unpredictable.

At the same time, it is not possible to deduce the seed using the numbers that have been generated.

Uniformity

On any single bit of the lottery random number sequence, the probability of appearing 0 or 1 is equal to 1/2.

Scalability

The test passed on the random number sequence of the lottery should get the same verification in the subsequence of the sequence.

Block

A continuous binary number in a lottery random number sequence starting from a certain digit.

Run

A sequence of consecutive bits with the same value, the bits before and after the run are different values or have no content.

Template

A sequence of binary numbers with a certain length established according to certain rules.

Linear feedback shift register, LFSR is a fixed-length sequence of numbers, where each digit is shifted right by the left or right digit of the number or it is shifted to the left, and the first or last digit is cycled to the last or first digit.

3.10

Significance level

Probability that a random sequence is incorrectly judged to be a non-random sequence in a randomness test.

4 Lottery random number sequence randomness test method set

4.1 Overview

Lottery random number sequence randomness test methods include ratio test, block-in-block ratio test, total runs test, run distribution test, Intra-block longest run test, binary matrix test, discrete Fourier transform test, poker test, overlapping template matching test, general system There are a total of fifteen test methods including calculation test, linear complexity test, approximate entropy test, cumulative sum test, binary derivation test and autocorrelation test.

4.2 Proportional inspection

Check the proportion of the sum of the number of occurrences of 0 and 1 in the random number sequence of the lottery. The purpose of the test is to determine the random number sequence under test in the column, the proportion of the number of occurrences of each number should be close to 1/2.

The test method is to convert the 0 and 1 of the measured random number sequence into -1 and 1, respectively, and then calculate the result and compare it with the significance level.

4.3 Proportional Inspection in Blocks

Check the proportion of the number of occurrences of 0 and 1 in each block of the lottery random number sequence. The purpose of the test is to determine the random number under test in a subsequence of a word sequence, the ratio of the number of occurrences of 0 and 1 should be close to 1/2.

The test method is to divide the measured random number sequence into multiple non-overlapping subsequences, and count the proportion of 1 in each subsequence to calculate the result.

Results were compared with significance levels.

4.4 Total number of runs

Check whether the total number of runs in the random number sequence of the lottery obeys the randomness requirement.

The test method is to count the total number of runs of the random number sequence under test, and to count the proportion of the number of occurrences of 1 in the number sequence.

Compare with significance level.

4.5 Run length distribution test

Check the number of occurrences of each run in the random number sequence of the lottery. The purpose of the test is to determine the different lengths in the sequence of random numbers under test.

The degree to which the total number of runs corresponds to the expected value of the random sequence.

The test method is to count the length of each run in the measured random number sequence, record the number of runs, and calculate the sum of significance Compare levels.

4.6 Longest Run Inspection in Block

The longest run of "1" in the M-bit region block in the lottery random number sequence is checked. The purpose of the test is to determine the random number sequence under test the length of the longest run of "1" in the column and the expected value of the longest run of "1" in a random sequence.

The test method is to divide the measured random number sequence into multiple subsequences, and count the length of the largest "1" run in each subsequence.

Calculate results and compare with significance level.

4.7 Binary matrix test

Check the rank of the sub-matrix of the lottery random number sequence. The purpose of the test is to determine the firmness of the original sequence in the sequence of random numbers under test.

Linear correlation of fixed length substrings.

The test method is to divide the sequence of random numbers under test into subsequences, compose each subsequence into a matrix, and count the statistics of each matrix.

Rank, calculation results and comparison with significance level.

4.8 Discrete Fourier Transform Test

Check the peak size of the discrete Fourier transform of the lottery random number sequence. The purpose of the test is to determine the the degree to which periodic features (that is, adjacent repeating patterns) match the expected features of the random number sequence.

The test method is to convert the 0 and 1 of the measured random number sequence into -1 and 1, respectively, and perform a Fourier transform on the obtained new sequence to calculate the results were compared with significance levels.

4.9 Poker Inspection

Check the number of times a pre-specified target template appears in the random number sequence of the lottery. The purpose of the test is to determine the random number sequence under test the degree to which the specified non-periodic template can appear multiple times in a column is consistent with the characteristic value of the expected random number sequence. Should be counted in the inspection Search for the specified m-bit template in the word sequence. If this template is not found, it will move down one place to continue searching;

This template will continue to search from the position after the template is found.

The test method is to divide the measured random number sequence into multiple non-overlapping subsequences, count the frequency of occurrence of the subsequence template and calculate the result Results were compared with significance levels.

4.10 Overlapping template matching test

Check the number of times a pre-specified target template appears in the random number sequence of the lottery. The purpose of the test is to determine the random number sequence under test the degree to which the specified non-periodic template can appear multiple times in a column is consistent with the characteristic value of the expected random number sequence. Should be counted in the inspection Search for the specified m-bit template in the word sequence. If this template is not found, it will move down one bit to continue the search; if it finds this this template will also move down one place to continue searching.

The test method is to add some bit data at the beginning of the tested random number sequence to the end of the sequence to obtain a new sequence, and count each seed sequence.

The frequency of column template appearances, and the results are compared with the significance level.

4.11 General statistical tests

Examine the number of digits spaced between matching templates in a random number sequence of a lottery (this is a measure related to the compressed sequence length).

The purpose of the test is to determine the extent to which the random number sequence under test can be compressed without loss of information.

The test method is to divide the measured random number sequence into an initial sequence and a test sequence, and create a table for the initial sequence.

The value of the element is calculated and compared with the significance level.

4.12 Linear Complexity Test

Check the length of the LFSR in the random number sequence of the lottery. The purpose of the test is to determine the randomness of the measured random number sequence according to its complexity.

The good random sequence has a longer LFSR, and a shorter LFSR indicates non-randomness.

The test method is to divide the measured random number sequence into multiple non-overlapping subsequences, and calculate the linear complexity of each subsequence.

The results are compared with the significance level.

4.13 Approximate Entropy Test

Check the probability of all possible overlapping m-bit templates of the entire sequence in the lottery random number sequence. The purpose of the test is to randomly test in a digital sequence, the probability of two consecutive adjacent overlapping data blocks of length (m and m 1) is compared with the expected result to determine the degree of coincidence between the discontinuity and the expected random number sequence eigenvalues.

The test method is to add a part of the bit data at the beginning of the measured random number sequence to the end of the sequence to obtain a new sequence, and to count the new sequence.

The frequency of occurrence of all 2m m-sequence patterns is calculated and compared with the significance level.

4.14 Accumulation and inspection

Check the random range of the random number sequence of the lottery which is obtained by cumulative summation of the adjusted (-1, 1) numbers in the sequence Machine run distance. The purpose of the test is to determine the cumulative sum of a part of the sequence of tested random numbers relative to the expected random the degree to which the results of cumulative summation of a part of a sequence match.

The test method is to convert the 0 and 1 of the measured random number sequence to -1 and 1, respectively, and calculate the sum of the results and the significance level.

Compare.

4.15 Binary Derivation Test

Test a new sequence generated from the binary derivation in the random number sequence of the lottery.

OR 1 XOR operation results. The purpose of the binary derivation test is to determine whether the number of 0 and 1 in the k-th binary derivation sequence is close to one.

The test method is to XOR the adjacent two digits 0 or 1 in the initial sequence in sequence to obtain a new sequence and repeat Operation. 0 and 1 in the new sequence are converted into -1 and 1 respectively, and then they are summed up, the result is calculated and compared with the significance level.

4.16 Autocorrelation test

Check the correlation between the random number sequence of the lottery and the new sequence obtained by shifting its logical left by d bits.

The test method is to statistically measure the sequence of random numbers to be tested, and calculate the result and compare it with the significance level.

5 Process of randomness test of lottery random number sequence

5.1 Sample preparation

The test sample is a binary random number sequence used in the China Welfare Lottery System. It should be collected and stored in binary files Save. The file name is named after the acquisition date and time.

5.2 Plan

Before inspection, an inspection plan shall be formulated and reviewed. The requirements for planning and review shall comply with MZ/T 079-2017 the requirements of the test plan in the Software Lottery Test Specification.

5.3 Design

The design for inspection shall be carried out and the design shall be reviewed. Design and review requirements shall comply with MZ/T 079-2017 "China Welfare Lottery Requirements for test design in System Software Test Specification.

5.4 Implementation

Use all the methods listed in Chapter 4 to test the random sample of lottery numbers according to the test design. Requirements for performing inspections it shall meet the requirements of test execution in MZ/T 079-2017 "China Welfare Lottery System Software Test Specification".

The calculation method of the inspection results shall meet the requirements of GM/T 0005-2012 "Specifications for Randomness Testing".

5.5 Summary

After the inspection is completed, the inspection shall be summarized and the summary shall be reviewed. The requirements for conclusion and review shall comply with MZ/T 079-2017 the requirements of the test summary in China Welfare Lottery System Software Test Specification.

6 Judgment of randomness of lottery random number sequence

For each randomness test method in Chapter 4 of this standard, if the calculation result of a sample is not less than the significance level, it means the sample is tested by this method.

If the number of samples is s and the significance level is alpha, the number of samples that pass the test should not be less than.

The significance level should be between [0.001, 0.01].

If the number of samples passed is not less than the above value, the random number sequence of the lottery passes this method; otherwise, it fails to pass this method.

Check.

references

[1] NIST SP800-22 rev1, A Statistical Test Suite for Random and Pseudorandom Number Generators for Cryptographic Applications

......
This preview omits tables, figures, formulas and parts of the technical clauses. The complete document — 7 pages — is available in the English PDF.

How to Download MZ/T 093-2017

  1. 1

    Add to cart

    Click "Download PDF" on this page and choose "Buy this standard". You can add more standards before checkout.

  2. 2

    Checkout

    Enter your email and billing details. Payment is processed securely by Stripe (cards or bank transfer). Prefer bank details? Request a quotation (min. order $300).

  3. 3

    Fast delivery

    After payment you'll receive an email confirmation. The English PDF is sent to the same address, usually within minutes and at the latest within 1 business day.

  4. 4

    Invoice included

    A tax invoice is attached to the confirmation email. Need a custom invoice? Contact us.

Related Standards

English PDF
7 pages
Fast delivery
Invoice included
View Cart

Secure payment via Stripe

Payments accepted

VisaMastercardAmerican ExpressApple PayGoogle PayStripe

MZ/T 093-2017

$218.00