CN101674102B - Randomness detecting method based on pseudo-random sequence of sample - Google Patents
Randomness detecting method based on pseudo-random sequence of sample Download PDFInfo
- Publication number
- CN101674102B CN101674102B CN200910024379A CN200910024379A CN101674102B CN 101674102 B CN101674102 B CN 101674102B CN 200910024379 A CN200910024379 A CN 200910024379A CN 200910024379 A CN200910024379 A CN 200910024379A CN 101674102 B CN101674102 B CN 101674102B
- Authority
- CN
- China
- Prior art keywords
- sequence
- centerdot
- sum
- sequences
- measured
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Expired - Fee Related
Links
Images
Landscapes
- Test And Diagnosis Of Digital Computers (AREA)
Abstract
The invention discloses a random detecting method based on a pseudo-random sequence, belonging to the technical field of signal detection and mainly solving the problems of limitation and one-sidedness existing in the prior randomness detecting method. The method comprises the following detecting steps: carrying out pretreatment of sampling or sampling modulo 2 addition on sequences to be detected, and carrying out transformation point detection on the sequences obtained after the pretreatment; selecting a standard pseudo-random sequence, and arranging the standard pseudo-random sequence in front of the pretreated sequences to form new sequences; grouping the new sequences, and calculating the accumulative sum of bits in the groups to obtain the difference values of the accumulative sums of the adjacent groups; selecting fractiles and determining critical values; comparing all the difference values with the critical values, if all the difference values are less than or equal to the critical values, confirming that the sequences satisfy the random characteristic, otherwise, confirming that the sequences do not satisfy the random characteristic. The method has the advantages of overall detection result, high reliability and good effectiveness, and can be used in the fields of random simulation, spreading code generation in a CDMA system and key stream generation in a stream cipher system.
Description
Technical field
The invention belongs to the signal detection technique field; Be particularly related to the randomness detecting method of pseudo random sequence, can be used for stochastic simulation, the pseudo-code in the pseudo-random code ranging generates; Spreading code in the cdma system generates, and the key stream in various noise sources generations and the stream cipher system generates.
Background technology
Pseudo random sequence through the randomizer generation; Its randomness directly has influence on the fail safe of application; Therefore to judge this and whether use safety; Must guarantee earlier that the randomness of this pseudo random sequence is functional, and the randomness of pseudo random sequence is detected the difficult point that always is in the detection of sequence randomness.Detecting the characteristic whether a sequence have the true random sequence can consider from several aspects:
1) periodic feature;
2) ratio that symbol " 0 " and " 1 " occur in the sequence;
3) distribution situation of the distance of swimming in the sequence;
4) the out of phase autocorrelation function of sequence;
5) complexity of sequence, for example linear complexity;
6) the compressible situation of sequence;
In order to test a sequence whether to satisfy these character of random sequence multiple pointed randomness detecting method has been proposed, the cyclophysis that for example binary matrix order test and spectrum measurement can cycle testss; Frequency test and piecemeal frequency test can cycle tests in the ratio that occurs of symbol " 0 " and " 1 "; Linear complexity test, the test of maximum order complexity and the test of second order complexity can cycle tests complexity.
There is kind more than 60 in corresponding test; Like frequency test, add up and check, runs test etc.; They all can only be tested to some character of randomness, that is to say each test pass through can only explain that this sequence satisfies certain stochastic behaviour, but can not guarantee that it also meets other characteristic; Promptly all there are limitation and one-sidedness, the accuracy rate that influence detects.
Summary of the invention
The objective of the invention is to overcome the deficiency of above-mentioned prior art; A kind of randomness detecting method of pseudo random sequence is proposed; On the basis that does not influence former randomicity of sequences,, new sequence is tested once more through changing some alignment properties of former sequence; To reach former sequence is more comprehensively tested effect, improve the accuracy rate that detects.
For realizing above-mentioned purpose, the present invention proposes following two kinds of technical schemes:
Technical scheme 1: the randomness detecting method based on the pseudo random sequence of direct sampling comprises following process:
(1) establishing binary sequence to be measured is a
0, a
1..., a
n, length is n+1;
(2) treat the order-checking row and sample, establishing the sampling interval is positive integer d, and obtaining sampled sequence is a
0..., a
Md, a
1..., a
Md+1..., a
D-1..., a
Md+ (d-1), m=(n+1)/d-1;
(3) add up with the change point method of testing, selected one has been proved to be pseudorandom sequence s
0, s
1..., s
lAs standard sequence, place the sampled sequence front, form a new sequence s
0, s
1..., s
l, a
0..., a
Md, a
1..., a
Md+1..., a
D-1..., a
Md+ (d-1), new sequence is divided into the K group, calculate adding up and Sum of each grouping Nepit position
i(1≤i≤K), obtain one group of statistical value Diff of new sequence
i=(Sum
I+1-Sum
i)/σ
0(1≤i≤K-1), σ
0Be sequence Sum
1, Sum
2..., Sum
KThe overall standard deviation of corresponding normal random variable sequence;
(4) through the change point method of testing, selected quantile α
0(0<α
0<1), by α
0Confirm critical value c with packet count K
0
(5) with statistical value sequence D iff
1, Diff
2..., Diff
K-1In all value and critical value c
0Compare, if all statistical values all are less than or equal to critical value c
0, sequence then to be measured satisfies stochastic behaviour; Otherwise sequence to be measured does not have stochastic behaviour.
Technical scheme 2. comprises following process based on the randomness detecting method of the pseudo random sequence that adds of sampling mould 2:
1) establishing binary sequence to be measured is a
0, a
1..., a
n, length is n+1;
2) treat the order-checking row and sample, establishing the sampling interval is positive integer d, and obtaining sampled sequence is a
0..., a
Md, a
1..., a
Md+1..., a
D-1..., a
Md+ (d-1), m=(n+1)/d-1;
3) to above sampled sequence a
0..., a
Md, a
1..., a
Md+1..., a
D-1..., a
Md+ (d-1)Carrying out mould 2 by turn adds:
0≤i≤m, it is b that the mould 2 that obtains sampling adds sequence
0, b
1..., b
m
4) add up with the change point method of testing, selected one has been proved to be pseudorandom sequence s
0, s
1..., s
lAs standard sequence, place the sampled sequence front, form a new sequence s
0, s
1..., s
l, b
0, b
1..., b
m, new sequence is divided into K ' group, calculate adding up and CSum of each grouping Nepit position
i(1≤i≤K ') obtains one group of statistical value CDiff of new sequence
i=(CSum
I+1-CSum
i)/σ
1(1≤i≤K '-1), σ
1Be sequence C Sum
1, CSum
2..., CSum
K 'The overall standard deviation of corresponding normal random variable sequence;
5) through the change point method of testing, selected quantile α
1(0<α
1<1), by α
1Confirm critical value c with packet count K '
1
6) with statistical value sequence C Diff
1, CDiff
2..., CDiff
K '-1In all value and critical value c
1Compare, if all statistical values all are less than or equal to critical value c
1, sequence then to be measured satisfies stochastic behaviour; Otherwise sequence to be measured does not have stochastic behaviour.
The present invention has following advantage:
A. the present invention treats to check order to be listed as and carries out preliminary treatment earlier; Add like the mould 2 of sampling or sample afterwards again, obtain new sequence, because new sequence has changed sequence to be measured unicity in the order; The stochastic behaviour that embodies is more; New sequence is tested, can solve previous methods and treat limitation and the one-sidedness that the order-checking row are tested, assay is more comprehensive;
B. the present invention tests to the sequence that obtains after handling, and can avoid the situation of previous methods erroneous judgement, has improved the accuracy rate of assay.
Description of drawings
Fig. 1 the present invention is based on the randomness testing process figure of the pseudo random sequence of sampling
Fig. 2 the present invention preliminary treatment sub-process figure that samples
Fig. 3 the present invention mould 2 of sampling adds preliminary treatment sub-process figure
Embodiment
Embodiment one, realizes that through treating the sampling of order-checking row the randomness of pseudo random sequence detects,
See figures.1.and.2, the concrete performing step of this instance is following:
Step 1 is imported sequence a to be measured
0, a
1..., a
n, n=10
6
Step 2 is treated the order-checking row and is sampled, and establishing the sampling interval is positive integer d, and obtaining sampled sequence is a
0..., a
Md, a
1..., a
Md+1..., a
D-1..., a
Md+ (d-1), m=(n+1)/(d-1).
Step 3 is to sampled sequence a
0..., a
Md, a
1..., a
Md+1..., a
D-1..., a
Md+ (d-1)Add up with the change point method of testing:
(3a) get one and be proved to be pseudorandom sequence s
0, s
1..., s
l(l=10
6) as standard sequence, place a
0..., a
Md, a
1..., a
Md+1..., a
D-1..., a
Md+ (d-1)A new sequence s is formed in the front
0, s
1..., s
l, a
0..., a
Md, a
1..., a
Md+1..., a
D-1..., a
Md+ (d-1)
(3b) with all 0 becoming-1 in the new sequence, the sequence after the conversion is c
1, c
2..., c
k, k=n+l+2;
(3c) with sequence c
1, c
2..., c
kBe divided into N grouping B
1, B
2..., B
N, the length of each grouping is B_length=k/N;
(3d) calculate B
iIn all bits add up with, be designated as S
i, obtain and sequence S
1, S
2..., S
N
(3e) calculate B
iThe overall N of the corresponding stochastic variable normal random variable of institute (0, σ
2 2) variances sigma
2 2,
At sequence S
1, S
2..., S
NIn, calculate adjacent S
iNormalization difference D
i=(S
I+1-S
i)/σ
2(1≤i≤N-1), obtain sequence of differences D
1, D
2..., D
N-1
Step 4, selected quantile α
2, utilize following formula to confirm critical value c
2:
f
N-1(D
N-1) be normal distribution N (0, C
N-1) probability density.For example, selected α
2=0.05, N=5, then critical value c
2=3.50.
Step 5 is with D
iWith critical value c
2Compare, if at D
1, D
2... D
N-1The middle existence | D
i|>c
2, explain that sequence to be measured does not satisfy stochastic behaviour; Otherwise sequence to be measured has stochastic behaviour.
Embodiment two, add the randomness detection that realizes pseudo random sequence through treating order-checking row sampling mould 2,
With reference to Fig. 1 and Fig. 3, the concrete performing step of this instance is following:
Step 1 is imported sequence a to be measured
0, a
1..., a
n, n=10
6
Step 2 is treated the order-checking row and is sampled, and establishing the sampling interval is positive integer d, and obtaining sampled sequence is a
0..., a
Md, a
1..., a
Md+1..., a
D-1..., a
Md+ (d-1), m=(n+1)/(d-1).
Step 3 is to above sampled sequence a
0..., a
Md, a
1..., a
Md+1..., a
D-1..., a
Md+ (d-1)Carrying out mould 2 by turn adds:
0≤i≤m, it is b that the mould 2 that obtains sampling adds sequence
0, b
1..., b
m
Step 4 adds sequence b to sampling mould 2
0, b
1..., b
mAdd up with the change point method of testing:
(4a) get one and be proved to be pseudorandom sequence s
0, s
1..., s
l(l=10
6) as standard sequence, place b
0, b
1..., b
mA new sequence s is formed in the front
0, s
1..., s
l, b
0, b
1..., b
m
(4b) in the new sequence all 0 are become-1, the sequence after the conversion is c
1, c
2..., c
K ', k '=l+m+1;
(4c) with sequence c
1, c
2..., c
K 'Be divided into the individual grouping CB of N '
1, CB
2..., CB
N ', the length C B_length=k ' of each grouping/N ';
(4d) calculate CB
iIn the adding up and (linear with) of all bits, be designated as CS
i, obtain and sequence C S
1, CS
2..., CS
N '
(4e) calculate CB
iThe overall N of the corresponding stochastic variable normal random variable of institute (0, σ
3 2) variances sigma
3 2,
At sequence C S
1, CS
2..., CS
N 'In, calculate adjacent C S
iNormalization difference CD
i=(CS
I+1-CS
i)/σ
3(1≤i≤N '-1) obtains sequence of differences CD
1, CD
2..., CD
N '-1
Step 5, selected quantile α
3, utilize following formula to confirm critical value c
3:
Step 6 is with CD
iWith critical value c
3Compare, if at CD
1, CD
2..., CD
N '-1The middle existence | CD
i|>c
3, explain that sequence to be measured does not satisfy stochastic behaviour; Otherwise sequence to be measured has stochastic behaviour.
Claims (2)
1. randomness detecting method of pseudo random sequence based on sampling comprises following process:
(1) establishing binary sequence to be measured is a
0, a
1..., a
n, length is n+1;
(2) treat the order-checking row and sample, establishing the sampling interval is positive integer d, and obtaining sampled sequence is a
0..., a
Md, a
1..., a
Md+1..., a
D-1..., a
Md+ (d-1), m=(n+1)/d-1;
(3) add up with the change point method of testing, selected one has been proved to be pseudorandom sequence s
0, s
1..., s
lAs standard sequence, place the sampled sequence front, form a new sequence s
0, s
1..., s
l, a
0..., a
Md, a
1..., a
Md+1..., a
D-1..., a
Md+ (d-1), new sequence is divided into the K group, calculate adding up and Sum of each grouping Nepit position
i(1≤i≤K), obtain one group of statistical value Diff of new sequence
i=(Sum
I+1-Sum
i)/σ
0(1≤i≤K-1), σ
0Be sequence Sum
1, Sum
2..., Sum
KThe overall standard deviation of pairing normal random variable sequence;
(4) through the change point method of testing, selected quantile α
0(0<α
0<1), by α
0Confirm critical value c with packet count K
0
(5) with statistical value sequence D iff
1, Diff
2..., Diff
K-1In all value and critical value c
0Compare, if all statistical values all are less than or equal to critical value c
0, sequence then to be measured satisfies stochastic behaviour; Otherwise sequence to be measured does not have stochastic behaviour.
2. randomness detecting method of pseudo random sequence based on sampling comprises following process:
1) establishing binary sequence to be measured is a
0, a
1..., a
n, length is n+1;
2) treat the order-checking row and sample, establishing the sampling interval is positive integer d, and obtaining sampled sequence is a
0..., a
Md, a
1..., a
Md+1..., a
D-1..., a
Md+ (d-1), m=(n+1)/d-1;
3) to above sampled sequence a
0..., a
Md, a
1..., a
Md+1..., a
D-1..., a
Md+ (d-1)Carrying out mould 2 by turn adds:
0≤i≤m, it is b that the mould 2 that obtains sampling adds sequence
0, b
1..., b
m
4) add up with the change point method of testing, selected one has been proved to be pseudorandom sequence s
0, s
1..., s
lAs standard sequence, place the sampled sequence front, form a new sequence s
0, s
1..., s
l, b
0, b
1..., b
m, new sequence is divided into K ' group, calculate adding up and CSum of each grouping Nepit position
i(1≤i≤K ') obtains one group of statistical value CDiff of new sequence
i=(CSum
I+1-CSum
i)/σ
1(1≤i≤K '-1), σ
1Be sequence C Sum
1, CSum
2..., CSum
KThe overall standard deviation of ' pairing normal random variable sequence;
5) through the change point method of testing, selected quantile α
1(0<α
1<1), by α
1Confirm critical value c with packet count K '
1
6) with statistical value sequence C Diff
1, CDiff
2..., CDiff
K '-1In all value and critical value c
1Compare, if all statistical values all are less than or equal to critical value c
1, sequence then to be measured satisfies stochastic behaviour; Otherwise sequence to be measured does not have stochastic behaviour.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN200910024379A CN101674102B (en) | 2009-10-16 | 2009-10-16 | Randomness detecting method based on pseudo-random sequence of sample |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN200910024379A CN101674102B (en) | 2009-10-16 | 2009-10-16 | Randomness detecting method based on pseudo-random sequence of sample |
Publications (2)
Publication Number | Publication Date |
---|---|
CN101674102A CN101674102A (en) | 2010-03-17 |
CN101674102B true CN101674102B (en) | 2012-09-05 |
Family
ID=42021129
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN200910024379A Expired - Fee Related CN101674102B (en) | 2009-10-16 | 2009-10-16 | Randomness detecting method based on pseudo-random sequence of sample |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN101674102B (en) |
Families Citing this family (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101888282B (en) * | 2010-04-22 | 2012-11-14 | 北京邮电大学 | Randomness analysis-based data encryption function detection method |
CN106652151B (en) * | 2015-11-03 | 2019-01-04 | 彩富宝科技(北京)有限公司 | randomness detecting method and device |
CN110413256B (en) * | 2019-07-23 | 2021-10-22 | 江苏芯盛智能科技有限公司 | Binary random sequence detection method, system, equipment and computer medium |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6697300B1 (en) * | 2002-09-13 | 2004-02-24 | General Dynamics Advanced Information Systems, Inc. | Method and apparatus for determining the positioning of volumetric sensor array lines |
CN1575450A (en) * | 2001-07-25 | 2005-02-02 | 皇家菲利浦电子有限公司 | Method and apparatus for decorrelating a random number generator using a pseudo-random sequence |
CN1879079A (en) * | 2003-11-18 | 2006-12-13 | Atmel格勒诺布尔公司 | Random binary sequence generator |
US7352704B1 (en) * | 2003-08-29 | 2008-04-01 | National Semiconductor Corporation | Method and apparatus for multi-path delay spread detection in wideband CDMA systems |
-
2009
- 2009-10-16 CN CN200910024379A patent/CN101674102B/en not_active Expired - Fee Related
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1575450A (en) * | 2001-07-25 | 2005-02-02 | 皇家菲利浦电子有限公司 | Method and apparatus for decorrelating a random number generator using a pseudo-random sequence |
US6697300B1 (en) * | 2002-09-13 | 2004-02-24 | General Dynamics Advanced Information Systems, Inc. | Method and apparatus for determining the positioning of volumetric sensor array lines |
US7352704B1 (en) * | 2003-08-29 | 2008-04-01 | National Semiconductor Corporation | Method and apparatus for multi-path delay spread detection in wideband CDMA systems |
CN1879079A (en) * | 2003-11-18 | 2006-12-13 | Atmel格勒诺布尔公司 | Random binary sequence generator |
Non-Patent Citations (1)
Title |
---|
米德忠等.基于FPGA实现的伪随机序列快速同步.《新特器件应用》.2007, * |
Also Published As
Publication number | Publication date |
---|---|
CN101674102A (en) | 2010-03-17 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN101888282B (en) | Randomness analysis-based data encryption function detection method | |
CN103713879A (en) | Unbiased high-speed quantum random number generator based on photon arrival time | |
CN103197230B (en) | Integrated circuit fault detection method based on feature extraction | |
CN101674102B (en) | Randomness detecting method based on pseudo-random sequence of sample | |
CN103457719A (en) | Side channel energy analysis method for SM3 cryptographic algorithm HMAC mode | |
CN103530474A (en) | AES (advanced encryption standard) algorithm circuit oriented method for testing differential power attack | |
CN103679008A (en) | Efficient secure chip power consumption attack test method | |
CN106030605A (en) | Apparatus and method for processing digital value | |
CN104717054B (en) | A kind of password realizes side channel safety quick determination method | |
CN104954117B (en) | Stream cipher based on the judgement of Logistic chaotic maps transfer orbit generates system | |
CN101813768A (en) | Method for designing quadrature phase-coded signal based on hyperchaos mapping | |
CN103560863A (en) | Method for identifying pseudorandom scrambling codes | |
Feiten et al. | # SAT-based vulnerability analysis of security components—A case study | |
CN101692616A (en) | Randomness testing method of pseudorandom sequence based on packet handling | |
CN105912834A (en) | An apparatus and method for checking the entropy of a sequence of random numbers | |
Park et al. | Analysis of entropy estimator of true random number generation using beta source | |
CN101697533B (en) | Method for detecting randomicity of pseudorandom sequence based on random permutation | |
CN103178954B (en) | A kind of method measuring confidence level for improving half-wave voltage of phase modulator | |
CN110601818B (en) | Method for detecting SMS4 cryptographic algorithm to resist statistical fault attack | |
CN109885960A (en) | A kind of embedded chip hardware Trojan horse design method based on electromagnetism bypass analysis | |
Yang et al. | Application of symbolic techniques in detecting determinism in time series [and EMG signal] | |
Arai et al. | Analysis of error-masking and X-masking probabilities for convolutional compactors | |
CN108710561B (en) | Power burr fault attack evaluation platform for true random number generator | |
Huang et al. | Measuring random tests by conditional entropy and optimal execution order | |
Guo et al. | Generation of a chaos-based PN sequence and its quality analysis |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C14 | Grant of patent or utility model | ||
GR01 | Patent grant | ||
CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20120905 Termination date: 20181016 |
|
CF01 | Termination of patent right due to non-payment of annual fee |