[−][src]Function tink_tests::z_test_crosscorrelation_uniform_strings
pub fn z_test_crosscorrelation_uniform_strings(
bytes1: &[u8],
bytes2: &[u8]
) -> Result<(), TinkError>
Test that the cross-correlation of two byte strings of equal length points to independent and
uniformly distributed strings. Returns non Ok
status if the z test fails by more than 10
standard deviations.
With less statistics jargon: This xors two strings and then performs the z_test_uniform_string on the result. If the two strings are independent and uniformly distributed, the xor'ed string is as well. A cross correlation test will find whether two strings overlap more or less than it would be expected.
Note: Having a correlation of zero is only a necessary but not sufficient condition for independence.