Sequence randomness detection method and device, electronic equipment and storage medium
By dividing the sample set into multiple sample groups and grouping and sorting the detection items according to the average processing speed, and prioritizing the detection of the fastest item groups, the problem of low detection efficiency in existing technologies is solved, and efficient randomness detection is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- GUANGDONG SOUTHERN INFORMATION SECURITY RES INST
- Filing Date
- 2022-10-20
- Publication Date
- 2026-05-01
AI Technical Summary
Existing randomness detection methods require multiple tests for each sample, resulting in low detection efficiency.
The sample set is divided into multiple sample groups, and the detection items are grouped and sorted according to the average processing speed. The groups with faster processing speeds are used for detection first. Detection is stopped as soon as a group of items that cannot pass the test is encountered, so as to reduce the number of tests.
It improved testing efficiency, reduced testing time, and ensured the accuracy and efficiency of test results.
Smart Images

Figure CN115576520B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of encryption technology, and more specifically, to a method, apparatus, electronic device, and storage medium for detecting the randomness of a sequence. Background Technology
[0002] Random sequences are widely used in computer encryption technology, primarily for key generation, digital signatures, and authentication protocols. However, flawed random sequences can pose significant security risks. Typical random sequences are generated using random sequence generators, which are often pseudo-random sequence generators. The sequences they generate are actually periodic, which can easily lead to security vulnerabilities, thus requiring randomness testing.
[0003] Currently, the commonly used randomness detection method is the NIST (National Institute of Standards and Technology) method, which includes multiple detection items such as frequency, summation, run length, longest run length, matrix rank, discrete Fourier transform of the spectrum, random walk, random walk state frequency, intra-block frequency, overlapping module matching, non-overlapping module matching, approximate entropy, linear complexity, sequence, and generality. It is necessary to complete the detection of all the above items for each sample, and then make an overall randomness judgment based on the detection results of all samples. However, in order to ensure the reliability of the detection results, the sample size must be large enough, and the time required to perform the detection of all the above items for each sample is very long, resulting in low detection efficiency. Summary of the Invention
[0004] The purpose of this application is to provide a method, apparatus, electronic device and storage medium for detecting sequence randomness, which is beneficial to improving detection efficiency.
[0005] In a first aspect, this application provides a method for detecting the randomness of sequences, used to detect randomness in a sample set consisting of multiple sequence samples generated by the same random sequence generator, comprising the following steps:
[0006] A1. Divide the sample set into multiple sample groups;
[0007] A2. Select a portion of the sequence samples from each of the sample groups to perform detection on all detection items, and calculate the average processing speed of each sample group corresponding to each detection item;
[0008] A3. For each of the sample groups, the detection items are grouped according to the average processing speed to obtain multiple item groups, and the item groups are sorted in descending order according to the average processing speed.
[0009] A4. For each of the sample groups, the sample groups are tested sequentially using each item group according to the sorting result in descending order, until the sample group passes the test of all the item groups, or until the sample group fails the test of any item group, then the testing process for the sample group is stopped.
[0010] A5. Based on the test results of each sample group corresponding to each item group, determine whether the randomness of the sample set is qualified.
[0011] This sequence randomness detection method first uses the project group with the fastest average processing speed to detect the sample group, thus prioritizing the detection of the fastest processing items. As soon as a project group fails, the detection of that sample group is stopped. In this case, it is not necessary to perform all detection items on every sequence sample to obtain the final detection result, which helps to reduce the number of detections and thus improve detection efficiency.
[0012] Preferably, step A1 includes:
[0013] The sample set is divided into multiple sample groups based on the length of the sequence samples.
[0014] Generally, the longer the sequence sample is, the longer the time required for each test. By grouping sequence samples of similar length into the same sample group, the shorter sample group can be tested first when testing each sample group. Thus, when the number of sample groups that cannot pass all test items exceeds the limit, the testing of the untested sample groups can be stopped. In this case, the number of tests can be further reduced and the testing time of the completed tests is shorter, which is conducive to further improving the testing efficiency.
[0015] Preferably, step A2 includes:
[0016] Randomly select a portion of the sequence samples from each of the sample groups to perform detection on all detection items, so as to obtain the detection time of each of the selected sequence samples corresponding to each of the detection items;
[0017] The average processing speed for each of the aforementioned sample groups corresponding to each of the aforementioned detection items is calculated using the following formula:
[0018] ;
[0019] in, For the first The sample group corresponds to the first The average processing speed of the aforementioned detection items For the first The number of sequence samples selected from each of the sample groups. For the first The first of the selected sample groups The sequence sample corresponds to the first... The detection time for each of the aforementioned detection items. The number of groups in the sample group. The number of items in the test.
[0020] Preferably, step A4 includes:
[0021] A401. Based on the sorting results in descending order, take each project group as the target project group, generate a two-dimensional matrix according to the number of sequence samples in the sample group and the number of detection items in the target project group, and initialize the two-dimensional matrix as a zero matrix; the number of rows in the two-dimensional matrix is equal to the number of sequence samples in the sample group, and the number of columns in the two-dimensional matrix is equal to the number of detection items in the target project group.
[0022] A402. Taking each sequence sample of the sample group as the target sample in sequence, perform the detection of each item of the target item group on the target sample in sequence to update the corresponding element value in the two-dimensional matrix, until the number of the first preset value in the row corresponding to the target sample reaches the first preset threshold, or until the target sample completes all detections of the target item group, then stop the detection of the target sample; the first preset value indicates that the target sample has not passed the corresponding single detection item;
[0023] A403. Determine whether the sample group passes the detection of the target project group based on the first proportion of the number of rows containing the first preset value in the total number of rows in the two-dimensional matrix.
[0024] For the same target sample, if the number of tests that fail reaches a first preset threshold, the testing of that target sample will be stopped, thereby further reducing the number of tests and improving testing efficiency.
[0025] Preferably, step A403 includes:
[0026] If the first proportion is greater than the preset first proportion threshold, then it is determined that the sample group has not passed the detection of the target project group;
[0027] If the first proportion is not greater than the preset first proportion threshold, then the detection items of the target project group that have not been completed in each sequence sample in the sample group are supplemented for detection, so as to update the corresponding element values in the two-dimensional matrix, and further determine whether the sample group has passed the detection of the target project group based on the element values of the two-dimensional matrix.
[0028] Preferably, step A5 includes:
[0029] If the number of sample groups that have not completed the testing of all the aforementioned project groups accounts for a second proportion of the total number of sample groups that is greater than a preset second proportion threshold, then the randomness of the sample set is deemed unqualified; otherwise, the randomness of the sample set is deemed qualified.
[0030] Preferably, after step A5, the method further includes:
[0031] A6. If the sample set is deemed to be random enough because the second proportion is not greater than the preset second proportion threshold, then the randomness of the sample set is re-evaluated based on the detection results of each sequence sample for each detection item.
[0032] Secondly, this application provides a sequence randomness detection device for detecting randomness in a sample set consisting of multiple sequence samples generated by the same random sequence generator, including:
[0033] A partitioning module is used to divide the sample set into multiple sample groups;
[0034] The calculation module is used to select a portion of the sequence samples from each of the sample groups to perform detection on all detection items, so as to calculate the average processing speed of each sample group corresponding to each detection item;
[0035] A grouping module is used to group the detection items for each sample group according to the average processing speed to obtain multiple item groups, and to sort each item group in descending order according to the average processing speed.
[0036] The detection module is used to detect each of the sample groups in descending order using each item group until the sample group passes the detection of all the item groups, or until the sample group fails the detection of any item group, then the detection process of the sample group is stopped.
[0037] The judgment module is used to determine whether the randomness of the sample set is qualified based on the detection results of each sample group corresponding to each project group.
[0038] This sequence randomness detection device first tests the sample group with the items that have the fastest average processing speed, thus prioritizing the testing of items with fast processing speed. As soon as an item group fails, the testing of that sample group is stopped. In this case, it is not necessary to test all items for every sequence sample to obtain the final test result, which helps to reduce the number of tests and thus improve the testing efficiency.
[0039] Thirdly, this application provides an electronic device including a processor and a memory, the memory storing a computer program executable by the processor, wherein when the processor executes the computer program, it performs the steps in the sequence randomness detection method described above.
[0040] Fourthly, this application provides a storage medium having a computer program stored thereon, which, when executed by a processor, performs the steps of the sequence randomness detection method described above.
[0041] Beneficial effects:
[0042] The sequence randomness detection method, apparatus, electronic device, and storage medium provided in this application divide the sample set into sample groups, and further divide the detection items into item groups based on the average processing speed of each sample group. The sample group is first tested using the item group with the fastest average processing speed, thus prioritizing the detection of fast-processing items. As soon as an item group fails to pass the test, the testing of that sample group is stopped. In this case, it is not necessary to perform all detection items on every sequence sample to obtain the final detection result, which helps to reduce the number of tests and thus improve detection efficiency. Attached Figure Description
[0043] Figure 1 This is a flowchart of a sequence randomness detection method provided in an embodiment of this application.
[0044] Figure 2 This is a schematic diagram of the sequence randomness detection device provided in the embodiments of this application.
[0045] Figure 3 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation
[0046] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of the embodiments. The components of the embodiments of this application described and shown in the accompanying drawings can generally be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of this application provided in the accompanying drawings is not intended to limit the scope of the claimed application, but merely represents selected embodiments of this application. All other embodiments obtained by those skilled in the art based on the embodiments of this application without inventive effort are within the scope of protection of this application.
[0047] It should be noted that similar reference numerals and letters in the following figures indicate similar items; therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures. Furthermore, in the description of this application, terms such as "first," "second," etc., are used only to distinguish descriptions and should not be construed as indicating or implying relative importance.
[0048] Please refer to Figure 1 , Figure 1 This application discloses a sequence randomness detection method in some embodiments, used to perform randomness detection on a sample set consisting of multiple sequence samples generated by the same random sequence generator, including the following steps:
[0049] A1. Divide the sample set into multiple sample groups;
[0050] A2. Select a portion of sequence samples from each sample group to perform all detection items, and calculate the average processing speed of each sample group for each detection item;
[0051] A3. For each sample group, the detection items are grouped according to the average processing speed to obtain multiple item groups, and the item groups are sorted in descending order according to the average processing speed.
[0052] A4. For each sample group, the sorting results in descending order (referring to the sorting results of each item group in descending order) are used to test the sample group in turn until the sample group passes the test of all item groups, or until the sample group fails the test of any item group, then the testing process of the sample group is stopped.
[0053] A5. Based on the test results of each sample group corresponding to each project group, determine whether the randomness of the sample set is qualified.
[0054] This sequence randomness detection method first uses the project group with the fastest average processing speed to detect the sample group, thus prioritizing the detection of the fastest detection projects. As soon as a project group fails, the detection of that sample group is stopped. In this case, it is not necessary to perform all detection projects on every sequence sample to obtain the final detection result, which helps to reduce the number of detections (and the detection time required for the already performed detection projects is shorter than the detection time for the unperformed detection projects), thereby improving detection efficiency.
[0055] The sample set can be randomly divided into multiple sample groups to ensure that each sample group has an equal sample size. The number of sample groups can be set according to actual needs.
[0056] The sequence samples in the sample set may have the same length or different lengths (i.e., not all of them are the same). For the case where the sequence samples in the sample set have different lengths, preferably, step A1 includes:
[0057] The sample set is divided into multiple sample groups based on the length of the sequence samples.
[0058] Generally, the longer the sequence sample, the longer the time required for each test. Grouping sequence samples of similar length into the same sample group allows for prior testing of shorter sample groups. This way, when the number of sample groups failing all tests exceeds the limit, testing of the remaining sample groups can be stopped. This further reduces the number of tests and shortens the testing time for completed tests, thus improving overall efficiency. The number of sample groups can be set according to actual needs.
[0059] Specifically, based on the length of the sequence samples, the sample set is divided into multiple sample groups, including: obtaining the minimum and maximum lengths of each sequence sample; dividing the length range from the minimum to the maximum length into multiple sub-ranges; each sub-range corresponds to a sample group, and each sequence sample is assigned to the corresponding sample group based on the sub-range in which the length of each sequence sample is located.
[0060] In some implementations, step A2 includes:
[0061] A201. Randomly select a portion of sequence samples from each sample group to perform all detection items, so as to obtain the detection time of each detection item corresponding to each selected sequence sample;
[0062] A202. Calculate the average processing speed for each sample group corresponding to each detection item using the following formula:
[0063] ;
[0064] in, For the first The sample group corresponds to the first... Average processing speed of each testing item For the first The number of sequence samples selected from each sample group. For the first The selected sample group is the first The sequence sample corresponds to the first... The testing time for each testing item The number of sample groups. This represents the number of items tested.
[0065] This system allows for the selection of a preset proportion of sequence samples from each sample group for testing all required items. The preset proportion can be set according to actual needs, such as 10%, but is not limited to this. Alternatively, a preset number of sequence samples can be selected from each sample group for testing all required items; the preset number can be set according to actual needs. In this case, each... All values are equal to the preset quantity.
[0066] Among them, all detection items may include, but are not limited to, frequency, summation, run length, longest run length, matrix rank, discrete Fourier transform of spectrum, random walk, random walk state frequency, intra-block frequency, overlapping module matching, non-overlapping module matching, approximate entropy, linear complexity, sequence, and some or all of the general terms.
[0067] In this embodiment, step A3 includes performing the following for each sample group:
[0068] Based on the average processing speed of each test item in the sample group, the test items are sorted in descending order (i.e., the test items with the higher average processing speed are ranked first).
[0069] For each test item after descending sorting, from front to back, every N test items are divided into a project group. If there are less than N test items left at the end, the remaining test items are taken as the last project group; N is a preset positive integer, which can be set according to actual needs.
[0070] The project groups are sorted according to their division order (for example, the project group consisting of the 1st to the Nth test items is the first group, the project group consisting of the N+1st to the 2Nth test items is the second group, the project group consisting of the 2N+1st to the 3Nth test items is the third group, and so on).
[0071] Preferably, step A4 includes:
[0072] A401. The sorting results in descending order are used as target project groups for each project group. A two-dimensional matrix is generated based on the number of sequence samples in the sample group and the number of detection items in the target project group. The two-dimensional matrix is initialized to a zero matrix. The number of rows in the two-dimensional matrix is equal to the number of sequence samples in the sample group, and the number of columns in the two-dimensional matrix is equal to the number of detection items in the target project group.
[0073] A402. Taking each sequence sample of the sample group as the target sample in turn, perform the detection of each item of the target item group on the target sample in turn to update the corresponding element value in the two-dimensional matrix, until the number of the first preset value in the row corresponding to the target sample reaches the first preset threshold, or until the target sample completes all detections of the target item group, then stop the detection of the target sample; the first preset value indicates that the target sample has not passed the corresponding single detection item.
[0074] A403. Determine whether the sample group passes the detection of the target project group based on the first proportion of the number of rows containing the first preset value in the total number of rows in the two-dimensional matrix (to distinguish it from other proportions, the proportion of the number of rows containing the first preset value in the total number of rows in the two-dimensional matrix is called the first proportion).
[0075] For the same target sample, if the number of tests that fail reaches a first preset threshold, the testing of that target sample will be stopped, thereby further reducing the number of tests and improving testing efficiency.
[0076] For example, suppose a sample group contains M sequence samples and a target item group contains N detection items. Then, the two-dimensional matrix corresponding to the sample group and the target item group is an M-row, N-column matrix. Each row of this two-dimensional matrix corresponds to the detection result of each detection item for one sequence sample.
[0077] Specifically, when updating the element values of the two-dimensional matrix, the element value is updated to a first preset value or a second preset value based on the single detection result. The first preset value indicates that the target sample has not passed the corresponding single detection item, and the second preset value indicates that the target sample has passed the corresponding single detection item. The first and second preset values can be set according to actual needs, for example, the first preset value is 1 and the second preset value is 2, but not limited to this.
[0078] For a target sample, each detection item of the target item group is tested sequentially. For each detection item passed, the corresponding element value in the corresponding row of data is updated to the second preset value (for example, if the target sample is the 3rd sequence sample in the sample group and the currently passed detection item is the 2nd detection item in the target item group, then the element value in the 3rd row and 2nd column of the two-dimensional matrix is updated to the second preset value). When a detection item fails, the corresponding element value in the corresponding row of data is first updated to the first preset value (for example, if the target sample is the 3rd sequence sample in the sample group and the currently failed detection item is the 3rd detection item in the target item group, then the element value in the 3rd row and 3rd column of the two-dimensional matrix is updated to the first preset value). The number of the first preset values in the corresponding row of data is counted to see if it reaches the first preset threshold. If it does not reach the threshold and the testing of all detection items in the target item group has not been completed, the testing of the next detection item continues. If it reaches the threshold, the testing of the target sample is stopped, and the above process is repeated for the next target sample.
[0079] When performing various tests on a sequence sample, the P-value for each test item can be obtained. The P-value is a numerical value that characterizes the significance of the difference between the sequence sample and the random sequence. The P-value can be calculated using existing methods (not detailed here), or obtained directly using existing testing tools (e.g., inputting the sequence sample into the NIST testing tool to perform the corresponding test item and obtaining the P-value output by the NIST testing tool). When the P-value of the sequence sample for a test item is greater than or equal to the preset significance level α, it indicates that the difference between the sequence sample and the random sequence is not significant, and the sequence sample is determined to have passed the test item; otherwise, the sequence sample is determined to have failed the test item. The significance level α can be set according to implementation needs, for example, α=0.01, but is not limited to this.
[0080] In some implementations, step A403 includes:
[0081] If the first proportion is greater than the preset first proportion threshold, the sample group is determined to have failed the detection of the target project group; otherwise, the sample group is determined to have passed the detection of the target project group.
[0082] In other embodiments, step A403 includes:
[0083] If the first proportion is greater than the preset first proportion threshold, the sample group is determined to have failed the detection of the target project group.
[0084] If the first proportion is not greater than the preset first proportion threshold, then the detection items of the target project group that have not been completed in each sequence sample in the sample group are supplemented for detection, so as to update the corresponding element values in the two-dimensional matrix, and further determine whether the sample group has passed the detection of the target project group based on the element values of the two-dimensional matrix.
[0085] In a two-dimensional matrix, if a row contains a first preset value, it means that the corresponding sequence sample has not passed all the detection items of the corresponding target item group, and thus the randomness of the sequence sample is considered unqualified. When a sample group contains too many unqualified random sequence samples, the sample group is considered to have failed the detection of the target item group. The first proportion threshold can be set according to actual needs.
[0086] In practical applications, when the first proportion is not greater than a preset first proportion threshold, there may be a situation where the failed test items are concentrated in one or a few test items, meaning that too many sequence samples fail the same test item. This indicates that the pass rate of that sample group for that test item is low, representing random non-compliance. Therefore, when the first proportion is not greater than the preset first proportion threshold, the test items of the target item group that each sequence sample has not completed are further supplemented with tests. This updates all elements of the two-dimensional matrix, and then the values of each element in the two-dimensional matrix are used to further determine whether the sample group has passed the test of the target item group. This can further determine whether there is an excessive number of sequence samples that fail the same test item, thus improving the accuracy of the test results.
[0087] Specifically, the steps for further determining whether a sample group passes the detection of the target item group based on the values of each element of the two-dimensional matrix include:
[0088] The number of first preset values contained in each column of the data in the two-dimensional matrix is counted and denoted as the first quantity value;
[0089] If at least one first quantity value is greater than the preset first quantity threshold (which can be set according to actual needs), it is determined that the sample group has not passed the detection of the target item group; otherwise, it is determined that the sample group has passed the detection of the target item group.
[0090] Preferably, in step A4, the sample groups are sorted in ascending order based on the average length of the sequence samples (i.e., the smaller the average length, the higher the ranking). Then, based on the ascending order, the following steps are performed sequentially on each sample group: The sample group is then tested sequentially using the descending order of the item groups, until the sample group passes the tests of all item groups, or until the sample group fails the test of any item group. At this point, the testing process stops. Since a smaller average length results in a shorter average testing time, testing sample groups with smaller average lengths first allows for stopping the testing of untested sample groups when the number of sample groups failing the tests of all item groups exceeds the limit. This shortens the testing time for completed tests, further improving testing efficiency, especially when the sample groups are divided based on the length of the sequence samples.
[0091] In step A4, for a sample group, if any item in the test fails, it means that the randomness of the sample group is not qualified. At this time, there is no need to test the sample group again (that is, the test of the incomplete item group does not need to be performed), so as to reduce the number of tests.
[0092] In some implementations, step A5 includes:
[0093] If the second percentage of the number of sample groups that have not completed the testing of all project groups in the total number of sample groups (to distinguish it from other percentages, the second percentage is referred to here as the second percentage) is greater than the preset second percentage threshold, then the randomness of the sample set is deemed unqualified; otherwise, the randomness of the sample set is deemed qualified.
[0094] The second percentage threshold can be set according to actual needs.
[0095] In step A4, each time the testing process for a sample group is stopped, the third percentage of the number of sample groups that have not yet completed testing of all item groups is calculated (to distinguish it from other percentages, this percentage is referred to as the third percentage). If this third percentage is greater than a preset second percentage threshold, the testing process for the untested sample groups is stopped. This is because it is sufficient to determine that the randomness of the sample set is unacceptable, which helps to further reduce the number of tests and improve testing efficiency.
[0096] When the second proportion is not greater than the second proportion threshold, there may be a situation where the number of sequence samples that fail the test for a certain test item is too large. In this case, the randomness of the sample set should not be judged as qualified. Therefore, in order to improve the accuracy of the judgment result, in some preferred embodiments, after step A5, the following is also included:
[0097] A6. If the sample set is deemed to be random enough because the second proportion is not greater than the preset second proportion threshold, then the randomness of the sample set shall be re-evaluated based on the test results of each sequence sample for each test item.
[0098] In this case, the randomness of the sample set can be reassessed based solely on the results of the completed tests; in this case, step A6 includes:
[0099] Obtain the P-value for each sequence sample for each completed detection item (the P-value is obtained in step A4);
[0100] Based on the P-values of each sequence sample for each completed test item, the number of sequence samples that passed each test item is obtained (specifically, the number of sequence samples that passed the test item is obtained by counting the number of P-values greater than or equal to the preset significance level a for the same test item).
[0101] Calculate the first pass rate for each test item using the following formula:
[0102] ;
[0103] in, For the first The first pass rate for each testing item For the first time passed The number of sequence samples for each detection item For the completed first The number of sequence samples tested for each testing item;
[0104] If the first pass rate of at least one test item is lower than the preset first pass rate threshold (which can be set according to actual needs), the randomness of the sample set will be re-determined as unqualified; otherwise, the randomness of the sample set will be re-determined as qualified.
[0105] Alternatively, the incomplete testing items can be performed on each sequence sample first, and then the randomness of the sample set can be reassessed based on the test results of each sequence sample for all testing items; in this case, step A6 includes:
[0106] Perform tests on the incomplete test items for each sequence sample to ensure that all test items are completed for each sequence sample, so as to obtain the P value of each sequence sample for all test items;
[0107] Based on the P-value of each sequence sample for all detection items, obtain the number of sequence samples that passed each detection item (see the previous text for details).
[0108] The second pass rate for each test item is calculated using the following formula:
[0109] ;
[0110] in, No. The second pass rate for each testing item For the first time passed The number of sequence samples for each detection item This represents the total number of sequence samples;
[0111] If the second pass rate of at least one test item is lower than the preset second pass rate threshold (which can be set according to actual needs), the randomness of the sample set is re-determined as unqualified; otherwise, the randomness of the sample set is re-determined as qualified.
[0112] As shown above, this randomness detection method divides the sample set into multiple sample groups; selects a portion of sequence samples from each sample group to perform detection on all detection items, and calculates the average processing speed for each sample group corresponding to each detection item; for each sample group, the detection items are grouped according to the average processing speed to obtain multiple item groups, and the item groups are sorted in descending order according to the average processing speed; for each sample group, the item groups are used to detect the sample group in descending order until the sample group passes the detection of all item groups, or until the sample group fails the detection of no item group, at which point the detection process for the sample group stops; based on the detection results of each item group corresponding to each sample group, it is determined whether the randomness of the sample set is acceptable; thus, it is beneficial to reduce the number of detections when the randomness of the sample set is poor, thereby improving detection efficiency.
[0113] refer to Figure 2 This application provides a sequence randomness detection device for detecting randomness in a sample set consisting of multiple sequence samples generated by the same random sequence generator, comprising:
[0114] Partitioning module 1 is used to divide the sample set into multiple sample groups;
[0115] Calculation module 2 is used to select a portion of sequence samples from each sample group for detection of all detection items, so as to calculate the average processing speed of each sample group for each detection item.
[0116] Grouping module 3 is used to group the detection items for each sample group according to the average processing speed to obtain multiple item groups, and sort each item group in descending order according to the average processing speed.
[0117] The detection module 4 is used to detect each sample group in descending order of the sorting results (referring to the sorting results of each item group in descending order) until the sample group passes the detection of all item groups, or until the sample group fails the detection of any item group, then the detection process of the sample group stops.
[0118] The judgment module 5 is used to determine whether the randomness of the sample set is qualified based on the test results of each sample group corresponding to each project group.
[0119] This sequence randomness detection device first tests the sample group with the items that have the fastest average processing speed, thus prioritizing the testing of items with fast processing speed. As soon as an item group fails, the testing of that sample group is stopped. In this case, it is not necessary to test all items for every sequence sample to obtain the final test result, which helps to reduce the number of tests (and the testing time required for the tested items is shorter than the testing time for the untested items), thereby improving the testing efficiency.
[0120] The sample set can be randomly divided into multiple sample groups to ensure that each sample group has an equal sample size. The number of sample groups can be set according to actual needs.
[0121] The sequence samples in the sample set can have the same length or different lengths (i.e., not all are the same). For the case where the sequence samples in the sample set have different lengths, preferably, when dividing the sample set into multiple sample groups, the partitioning module 1 performs the following:
[0122] The sample set is divided into multiple sample groups based on the length of the sequence samples.
[0123] Generally, the longer the sequence sample, the longer the time required for each test. Grouping sequence samples of similar length into the same sample group allows for prior testing of shorter sample groups. This way, when the number of sample groups failing all tests exceeds the limit, testing of the remaining sample groups can be stopped. This further reduces the number of tests and shortens the testing time for completed tests, thus improving overall efficiency. The number of sample groups can be set according to actual needs.
[0124] Specifically, based on the length of the sequence samples, the sample set is divided into multiple sample groups, including: obtaining the minimum and maximum lengths of each sequence sample; dividing the length range from the minimum to the maximum length into multiple sub-ranges; each sub-range corresponds to a sample group, and each sequence sample is assigned to the corresponding sample group based on the sub-range in which the length of each sequence sample is located.
[0125] In some implementations, when the calculation module 2 selects a subset of sequence samples from each sample group to perform detection on all detection items, and calculates the average processing speed for each sample group corresponding to each detection item, it performs the following:
[0126] A subset of sequence samples are randomly selected from each sample group to perform all detection items, so as to obtain the detection time for each detection item corresponding to each selected sequence sample.
[0127] The average processing speed for each sample group corresponding to each detection item is calculated using the following formula:
[0128] ;
[0129] in, For the first The sample group corresponds to the first... Average processing speed of each testing item For the first The number of sequence samples selected from each sample group. For the first The selected sample group is the first The sequence sample corresponds to the first... The testing time for each testing item The number of sample groups. This represents the number of items tested.
[0130] This system allows for the selection of a preset proportion of sequence samples from each sample group for testing all required items. The preset proportion can be set according to actual needs, such as 10%, but is not limited to this. Alternatively, a preset number of sequence samples can be selected from each sample group for testing all required items; the preset number can be set according to actual needs. In this case, each... All values are equal to the preset quantity.
[0131] Among them, all detection items may include, but are not limited to, frequency, summation, run length, longest run length, matrix rank, discrete Fourier transform of spectrum, random walk, random walk state frequency, intra-block frequency, overlapping module matching, non-overlapping module matching, approximate entropy, linear complexity, sequence, and some or all of the general terms.
[0132] In this embodiment, the grouping module 3 is used to group the detection items for each sample group according to the average processing speed to obtain multiple item groups, and sort each item group in descending order according to the average processing speed. Specifically, this includes performing the following for each sample group:
[0133] Based on the average processing speed of each test item in the sample group, the test items are sorted in descending order (i.e., the test items with the higher average processing speed are ranked first).
[0134] For each test item after descending sorting, from front to back, every N test items are divided into a project group. If there are less than N test items left at the end, the remaining test items are taken as the last project group; N is a preset positive integer, which can be set according to actual needs.
[0135] The project groups are sorted according to their division order (for example, the project group consisting of the 1st to the Nth test items is the first group, the project group consisting of the N+1st to the 2Nth test items is the second group, the project group consisting of the 2N+1st to the 3Nth test items is the third group, and so on).
[0136] Preferably, the detection module 4 is used to sequentially detect each sample group using each item group according to the descending sorting results, until the sample group passes the detection of all item groups, or until the sample group fails the detection of any item group, then the detection process for the sample group stops, specifically including:
[0137] The sorting results in descending order are used as target project groups for each project group. A two-dimensional matrix is generated based on the number of sequence samples in the sample group and the number of detection items in the target project group, and the two-dimensional matrix is initialized to a zero matrix. The number of rows in the two-dimensional matrix is equal to the number of sequence samples in the sample group, and the number of columns in the two-dimensional matrix is equal to the number of detection items in the target project group.
[0138] Each sequence sample in the sample group is taken as the target sample in turn. The detection of each item in the target item group is performed on the target sample in turn to update the corresponding element value in the two-dimensional matrix. The detection of the target sample is stopped when the number of the first preset value in the row corresponding to the target sample reaches the first preset threshold, or when the target sample completes all detections of the target item group. The first preset value indicates that the target sample has not passed the corresponding single detection item.
[0139] The sample group is judged to pass the detection of the target project group based on the first proportion of the number of rows containing the first preset value in the total number of rows in the two-dimensional matrix (to distinguish it from other proportions, the proportion of the number of rows containing the first preset value in the total number of rows in the two-dimensional matrix is called the first proportion).
[0140] For the same target sample, if the number of tests that fail reaches a first preset threshold, the testing of that target sample will be stopped, thereby further reducing the number of tests and improving testing efficiency.
[0141] For example, suppose a sample group contains M sequence samples and a target item group contains N detection items. Then, the two-dimensional matrix corresponding to the sample group and the target item group is an M-row, N-column matrix. Each row of this two-dimensional matrix corresponds to the detection result of each detection item for one sequence sample.
[0142] Specifically, when updating the element values of the two-dimensional matrix, the element value is updated to a first preset value or a second preset value based on the single detection result. The first preset value indicates that the target sample has not passed the corresponding single detection item, and the second preset value indicates that the target sample has passed the corresponding single detection item. The first and second preset values can be set according to actual needs, for example, the first preset value is 1 and the second preset value is 2, but not limited to this.
[0143] For a target sample, each detection item of the target item group is tested sequentially. For each detection item passed, the corresponding element value in the corresponding row of data is updated to the second preset value (for example, if the target sample is the 3rd sequence sample in the sample group and the currently passed detection item is the 2nd detection item in the target item group, then the element value in the 3rd row and 2nd column of the two-dimensional matrix is updated to the second preset value). When a detection item fails, the corresponding element value in the corresponding row of data is first updated to the first preset value (for example, if the target sample is the 3rd sequence sample in the sample group and the currently failed detection item is the 3rd detection item in the target item group, then the element value in the 3rd row and 3rd column of the two-dimensional matrix is updated to the first preset value). The number of the first preset values in the corresponding row of data is counted to see if it reaches the first preset threshold. If it does not reach the threshold and the testing of all detection items in the target item group has not been completed, the testing of the next detection item continues. If it reaches the threshold, the testing of the target sample is stopped, and the above process is repeated for the next target sample.
[0144] When performing various tests on a sequence sample, the P-value for each test item can be obtained. The P-value is a numerical value that characterizes the significance of the difference between the sequence sample and the random sequence. The P-value can be calculated using existing methods (not detailed here), or obtained directly using existing testing tools (e.g., inputting the sequence sample into the NIST testing tool to perform the corresponding test item and obtaining the P-value output by the NIST testing tool). When the P-value of the sequence sample for a test item is greater than or equal to the preset significance level α, it indicates that the difference between the sequence sample and the random sequence is not significant, and the sequence sample is determined to have passed the test item; otherwise, the sequence sample is determined to have failed the test item. The significance level α can be set according to implementation needs, for example, α=0.01, but is not limited to this.
[0145] In some implementations, when the detection module 4 determines whether the sample group passes the detection of the target item group based on the first proportion of the number of rows containing the first preset value in the total number of rows in the two-dimensional matrix, it performs the following:
[0146] If the first proportion is greater than the preset first proportion threshold, the sample group is determined to have failed the detection of the target project group; otherwise, the sample group is determined to have passed the detection of the target project group.
[0147] In other embodiments, when the detection module 4 determines whether the sample group passes the detection of the target item group based on the first proportion of the number of rows containing the first preset value in the total number of rows in the two-dimensional matrix, it performs the following:
[0148] If the first proportion is greater than the preset first proportion threshold, the sample group is determined to have failed the detection of the target project group.
[0149] If the first proportion is not greater than the preset first proportion threshold, then the detection items of the target project group that have not been completed in each sequence sample in the sample group are supplemented for detection, so as to update the corresponding element values in the two-dimensional matrix, and further determine whether the sample group has passed the detection of the target project group based on the element values of the two-dimensional matrix.
[0150] In a two-dimensional matrix, if a row contains a first preset value, it means that the corresponding sequence sample has not passed all the detection items of the corresponding target item group, and thus the randomness of the sequence sample is considered unqualified. When a sample group contains too many unqualified random sequence samples, the sample group is considered to have failed the detection of the target item group. The first proportion threshold can be set according to actual needs.
[0151] In practical applications, when the first proportion is not greater than a preset first proportion threshold, there may be a situation where the failed test items are concentrated in one or a few test items, meaning that too many sequence samples fail the same test item. This indicates that the pass rate of that sample group for that test item is low, representing random non-compliance. Therefore, when the first proportion is not greater than the preset first proportion threshold, the test items of the target item group that each sequence sample has not completed are further supplemented with tests. This updates all elements of the two-dimensional matrix, and then the values of each element in the two-dimensional matrix are used to further determine whether the sample group has passed the test of the target item group. This can further determine whether there is an excessive number of sequence samples that fail the same test item, thus improving the accuracy of the test results.
[0152] Specifically, based on the values of each element in the two-dimensional matrix, it is further determined whether the sample group passes the detection of the target item group, including:
[0153] The number of first preset values contained in each column of the data in the two-dimensional matrix is counted and denoted as the first quantity value;
[0154] If at least one first quantity value is greater than the preset first quantity threshold (which can be set according to actual needs), it is determined that the sample group has not passed the detection of the target item group; otherwise, it is determined that the sample group has passed the detection of the target item group.
[0155] Preferably, the detection module 4 sorts the sample groups in ascending order based on the average length of the sequence samples (i.e., the smaller the average length, the higher the ranking). Then, based on the ascending order, it sequentially performs detection on each sample group using the descending order of the item groups. This process continues until a sample group passes the detection of all item groups, or until it fails the detection of any item group, at which point the detection process stops. Since a smaller average length results in a shorter average detection time, detecting sample groups with smaller average lengths first allows the detection of undetected sample groups to stop when the number of sample groups failing the detection of all item groups exceeds the limit. This shortens the detection time for completed tests, further improving detection efficiency, especially when the sample groups are divided based on the length of the sequence samples.
[0156] If any item in a sample group fails the test, it means that the randomness of that sample group is not up to standard. In this case, there is no need to test that sample group again (i.e., the test of incomplete item groups does not need to be carried out), so as to reduce the number of tests.
[0157] In some implementations, when determining whether the randomness of the sample set is acceptable based on the test results of each sample group corresponding to each item group, the judgment module 5 performs the following:
[0158] If the second percentage of the number of sample groups that have not completed the testing of all project groups in the total number of sample groups (to distinguish it from other percentages, the second percentage is referred to here as the second percentage) is greater than the preset second percentage threshold, then the randomness of the sample set is deemed unqualified; otherwise, the randomness of the sample set is deemed qualified.
[0159] The second percentage threshold can be set according to actual needs.
[0160] The detection module 4 can calculate the third percentage of the total number of sample groups that have not completed testing of all item groups in the current sample set whenever the testing process of a sample group is stopped. (To distinguish it from other percentages, this percentage is referred to as the third percentage.) If this third percentage is greater than a preset second percentage threshold, the testing process for the untested sample groups is stopped. This is because it is sufficient to determine that the randomness of the sample set is unqualified, which helps to further reduce the number of tests and improve testing efficiency.
[0161] When the second proportion is not greater than the second proportion threshold, there may be a situation where the number of sequence samples that fail the test for a certain test item is too large. In this case, the randomness of the sample set should not be judged as qualified. Therefore, in order to improve the accuracy of the judgment result, in some preferred embodiments, the randomness detection device further includes:
[0162] The re-judgment module is used to re-judge whether the randomness of the sample set is qualified when the sample set is judged to be qualified because the second proportion is not greater than the preset second proportion threshold. This is based on the test results of each sequence sample for each test item.
[0163] Specifically, the randomness of the sample set can be reassessed based solely on the results of completed tests. In this case, the reassessment module is used when the sample set is deemed random due to its second proportion not exceeding a preset second proportion threshold. It then reassesses the randomness of the sample set based on the test results of each sequence sample for each test item. This includes:
[0164] Obtain the P-value of each sequence sample for each completed detection item (this P-value is obtained when the detection module 4 performs its functional steps);
[0165] Based on the P-values of each sequence sample for each completed test item, the number of sequence samples that passed each test item is obtained (specifically, the number of sequence samples that passed the test item is obtained by counting the number of P-values greater than or equal to the preset significance level a for the same test item).
[0166] Calculate the first pass rate for each test item using the following formula:
[0167] ;
[0168] in, For the first The first pass rate for each testing item For the first time passed The number of sequence samples for each detection item For the completed first The number of sequence samples tested for each testing item;
[0169] If the first pass rate of at least one test item is lower than the preset first pass rate threshold (which can be set according to actual needs), the randomness of the sample set will be re-determined as unqualified; otherwise, the randomness of the sample set will be re-determined as qualified.
[0170] Alternatively, the system can first perform tests on the incomplete test items for each sequence sample, and then re-evaluate the randomness of the sample set based on the test results of each sequence sample for all test items. In this case, the re-evaluation module is used to re-evaluate the randomness of the sample set based on the test results of each sequence sample for each test item when the sample set is determined to be random because the second proportion is not greater than the preset second proportion threshold. Specifically, this includes:
[0171] Perform tests on the incomplete test items for each sequence sample to ensure that all test items are completed for each sequence sample, so as to obtain the P value of each sequence sample for all test items;
[0172] Based on the P-value of each sequence sample for all detection items, obtain the number of sequence samples that passed each detection item (see the previous text for details).
[0173] The second pass rate for each test item is calculated using the following formula:
[0174] ;
[0175] in, No. The second pass rate for each testing item For the first time passed The number of sequence samples for each detection item This represents the total number of sequence samples;
[0176] If the second pass rate of at least one test item is lower than the preset second pass rate threshold (which can be set according to actual needs), the randomness of the sample set is re-determined as unqualified; otherwise, the randomness of the sample set is re-determined as qualified.
[0177] As shown above, this randomness detection device divides the sample set into multiple sample groups; selects a portion of sequence samples from each sample group to perform detection on all detection items, and calculates the average processing speed of each sample group for each detection item; for each sample group, the detection items are grouped according to the average processing speed to obtain multiple item groups, and the item groups are sorted in descending order according to the average processing speed; for each sample group, the item groups are used to detect the sample group in descending order until the sample group passes the detection of all item groups, or until the sample group fails the detection of any item group, at which point the detection process of the sample group stops; based on the detection results of each sample group for each item group, it is determined whether the randomness of the sample set is qualified; thus, it is beneficial to reduce the number of detections when the randomness of the sample set is poor, thereby improving detection efficiency.
[0178] Please refer to Figure 3 , Figure 3This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. The electronic device includes a processor 301 and a memory 302. The processor 301 and the memory 302 are interconnected and communicate with each other via a communication bus 303 and / or other connection mechanisms (not shown). The memory 302 stores a computer program executable by the processor 301. When the electronic device is running, the processor 301 executes the computer program to perform a sequence randomness detection method in any optional implementation of the above embodiments, to achieve the following functions: selecting a portion of sequence samples from each sample group for detection of all detection items, calculating the average processing speed of each sample group corresponding to each detection item; for each sample group, grouping detection items according to the average processing speed to obtain multiple item groups, and sorting each item group in descending order according to the average processing speed; for each sample group, sequentially using each item group to detect the sample group according to the descending sorting result, until the sample group passes the detection of all item groups, or until the sample group fails the detection of any item group, then stopping the detection process of the sample group; and determining whether the randomness of the sample set is qualified based on the detection results of each sample group corresponding to each item group.
[0179] This application provides a storage medium storing a computer program. When the computer program is executed by a processor, it executes the sequence randomness detection method in any optional implementation of the above embodiments to achieve the following functions: selecting a portion of sequence samples from each sample group to perform detection on all detection items, and calculating the average processing speed of each sample group corresponding to each detection item; for each sample group, grouping the detection items according to the average processing speed to obtain multiple item groups, and sorting each item group in descending order according to the average processing speed; for each sample group, sequentially using each item group to detect the sample group according to the descending sorting results, until the sample group passes the detection of all item groups, or until the sample group fails the detection of any item group, then stopping the detection process of the sample group; and determining whether the randomness of the sample set is qualified based on the detection results of each sample group corresponding to each item group. The storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as Static Random Access Memory (SRAM), Electrically Erasable Programmable Read-Only Memory (EEPROM), Erasable Programmable Read Only Memory (EPROM), Programmable Red-Only Memory (PROM), Read-Only Memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk.
[0180] In the embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. The apparatus embodiments described above are merely illustrative. For example, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. Furthermore, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Additionally, the displayed or discussed mutual couplings, direct couplings, or communication connections may be through some communication interfaces; indirect couplings or communication connections between devices or units may be electrical, mechanical, or other forms.
[0181] Furthermore, the units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment, depending on actual needs.
[0182] Furthermore, the functional modules in the various embodiments of this application can be integrated together to form an independent part, or each module can exist independently, or two or more modules can be integrated to form an independent part.
[0183] In this document, relational terms such as first and second are used only to distinguish one entity or operation from another entity or operation, without necessarily requiring or implying any such actual relationship or order between these entities or operations.
[0184] The above description is merely an embodiment of this application and is not intended to limit the scope of protection of this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of protection of this application.
Claims
1. A method for detecting the randomness of sequences, used to detect the randomness of a sample set consisting of multiple sequence samples generated by the same random sequence generator, characterized in that, Including the following steps: A1. Divide the sample set into multiple sample groups; A2. Select a portion of the sequence samples from each of the sample groups to perform detection on all detection items, and calculate the average processing speed of each sample group corresponding to each detection item; A3. For each of the sample groups, the detection items are grouped according to the average processing speed to obtain multiple item groups, and the item groups are sorted in descending order according to the average processing speed. A4. For each of the sample groups, the sample groups are tested sequentially using each item group according to the sorting result in descending order, until the sample group passes the test of all the item groups, or until the sample group fails the test of any item group, then the testing process for the sample group is stopped. A5. Based on the test results of each sample group corresponding to each item group, determine whether the randomness of the sample set is qualified; Step A2 includes: Randomly select a portion of the sequence samples from each of the sample groups to perform detection on all detection items, so as to obtain the detection time of each of the selected sequence samples corresponding to each of the detection items; The average processing speed for each of the aforementioned sample groups corresponding to each of the aforementioned detection items is calculated using the following formula: ; in, For the first The sample group corresponds to the first The average processing speed of the aforementioned detection items For the first The number of sequence samples selected from each of the sample groups. For the first The first of the selected sample groups The sequence sample corresponds to the first... The detection time for each of the aforementioned detection items. The number of groups in the sample group. The number of items in the test; Step A5 includes: If the number of sample groups that have not completed the testing of all the aforementioned project groups accounts for a second proportion of the total number of sample groups that is greater than a preset second proportion threshold, then the randomness of the sample set is deemed unqualified; otherwise, the randomness of the sample set is deemed qualified.
2. The method for detecting sequence randomness according to claim 1, characterized in that, Step A1 includes: The sample set is divided into multiple sample groups based on the length of the sequence samples.
3. The method for detecting sequence randomness according to claim 1, characterized in that, Step A4 includes: A401. Based on the sorting results in descending order, take each project group as the target project group, generate a two-dimensional matrix according to the number of sequence samples in the sample group and the number of detection items in the target project group, and initialize the two-dimensional matrix as a zero matrix; the number of rows in the two-dimensional matrix is equal to the number of sequence samples in the sample group, and the number of columns in the two-dimensional matrix is equal to the number of detection items in the target project group. A402. Taking each sequence sample of the sample group as the target sample in sequence, perform the detection of each item of the target item group on the target sample in sequence to update the corresponding element value in the two-dimensional matrix, until the number of the first preset value in the row corresponding to the target sample reaches the first preset threshold, or until the target sample completes all detections of the target item group, then stop the detection of the target sample; the first preset value indicates that the target sample has not passed the corresponding single detection item; A403. Determine whether the sample group passes the detection of the target project group based on the first proportion of the number of rows containing the first preset value in the total number of rows in the two-dimensional matrix.
4. The method for detecting sequence randomness according to claim 3, characterized in that, Step A403 includes: If the first proportion is greater than the preset first proportion threshold, then it is determined that the sample group has not passed the detection of the target project group; If the first proportion is not greater than the preset first proportion threshold, then the detection items of the target project group that have not been completed in each sequence sample in the sample group are supplemented for detection, so as to update the corresponding element values in the two-dimensional matrix, and further determine whether the sample group has passed the detection of the target project group based on the element values of the two-dimensional matrix.
5. The method for detecting sequence randomness according to claim 1, characterized in that, After step A5, the following is also included: A6. If the sample set is deemed to be random enough because the second proportion is not greater than the preset second proportion threshold, then the randomness of the sample set is re-evaluated based on the detection results of each sequence sample for each detection item.
6. A sequence randomness detection device, used to perform randomness detection on a sample set consisting of multiple sequence samples generated by the same random sequence generator, characterized in that, include: A partitioning module is used to divide the sample set into multiple sample groups; The calculation module is used to select a portion of the sequence samples from each of the sample groups to perform detection on all detection items, so as to calculate the average processing speed of each sample group corresponding to each detection item; A grouping module is used to group the detection items for each sample group according to the average processing speed to obtain multiple item groups, and to sort each item group in descending order according to the average processing speed. The detection module is used to detect each of the sample groups in descending order using each item group until the sample group passes the detection of all the item groups, or until the sample group fails the detection of any item group, then the detection process of the sample group is stopped. The judgment module is used to determine whether the randomness of the sample set is qualified based on the detection results of each of the sample groups corresponding to each of the project groups; When the calculation module selects a portion of the sequence samples from each of the sample groups to perform detection on all detection items, and calculates the average processing speed for each sample group corresponding to each detection item, it executes the following: Randomly select a portion of the sequence samples from each of the sample groups to perform detection on all detection items, so as to obtain the detection time of each of the selected sequence samples corresponding to each of the detection items; The average processing speed for each of the aforementioned sample groups corresponding to each of the aforementioned detection items is calculated using the following formula: ; in, For the first The sample group corresponds to the first The average processing speed of the aforementioned detection items For the first The number of sequence samples selected from each of the sample groups. For the first The first of the selected sample groups The sequence sample corresponds to the first... The detection time for each of the aforementioned detection items. The number of groups in the sample group. The number of items in the test; When the judgment module determines whether the randomness of the sample set is qualified based on the detection results of each of the corresponding project groups for each sample group, it executes the following: If the number of sample groups that have not completed the testing of all the aforementioned project groups accounts for a second proportion of the total number of sample groups that is greater than a preset second proportion threshold, then the randomness of the sample set is deemed unqualified; otherwise, the randomness of the sample set is deemed qualified.
7. An electronic device, characterized in that, It includes a processor and a memory, the memory storing a computer program executable by the processor, which, when executed by the processor, performs the steps of the sequence randomness detection method as described in any one of claims 1-5.
8. A storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it performs the steps in the sequence randomness detection method as described in any one of claims 1-5.
Citation Information
Patent Citations
Randomness analysis-based data encryption function detection method
CN101888282A
Random detecting method and device
CN107577452A