Nist statistical tests

class NISTStatisticalTests(cipher)

Bases: object

nist_statistical_tests(test_type, bits_in_one_sequence='default', number_of_sequences='default', input_index=0, round_start=0, round_end=0, nist_report_folder_prefix='nist_statistics_report', statistical_test_option_list='111111111111111')

Run the nist statistical tests.

INPUT:

  • test_type – string describing which test to run

  • bits_in_one_sequence – integer parameter used to run the nist tests

  • number_of_sequences – integer parameter used to run the nist tests

  • input_index – cipher input index

  • round_start – first round to be considered in the cipher

  • round_end – last round to be considered in the cipher

  • nist_report_folder_prefix - prefix for the unparsed nist tests output folder

OUTPUT:

  • The results are going to be saved in a dictionary format compatible with the Report class

EXAMPLE:

from claasp.cipher_modules.statistical_tests.nist_statistical_tests import NISTStatisticalTests from claasp.ciphers.block_ciphers.speck_block_cipher import SpeckBlockCipher speck = SpeckBlockCipher(number_of_rounds=5) nist_tests = NISTStatisticalTests(speck) nist_avalanche_test_results = nist_tests.nist_statistical_tests(‘avalanche’)