﻿NPCR/UACI study started: 2026-11-02T22:08:17
Machine: Microsoft Windows NT 10.0.26300.0, cores = 12
NPCR/UACI/entropy/ACF study  N=65536 words, warm-up=0, trials=1000, acfTrials=1000
Note: the hardware ignores the warm-up register, so warm-up 0 is the hardware behaviour.
Theory for independent uniform 32-bit words:
  NPCR  = 100*(1-2^-32) = 99.99999998 % per word (expected equal words per pair = N/2^32 = 1.53E-005)
  UACI  = E|X-Y|/(2^32-1)*100 = 33.3333 %, per-word SD = sqrt(1/18) = 23.57 %
  SE(UACI, N=65536) = 0.0921 %   (assumes independent, uniform words; CLT)
  byte entropy of n=262144 ideal bytes: expected 7.999298 bits/byte (not 8)
  ACF 95 % bound = +-0.00766 ; expected exceedances = 5 % of lags (10 of 200)

=== E0 self-checks of the C model ===
xoshiro128** test vector [1,2,3,4]: 00002D00 00000000 005A7080  expected 00002D00 00000000 005A7080 -> OK
V3 zero key, warm-up 0 (words of Fig. 2 of the manuscript, from the RTL timing simulation): 0FFB6755 600B2072 66DB7A7D EBDB4A2E -> OK
published testbench key, warm-up 0, normal : F74AA527 5BDE2F8D 8F74C822 0286C4C9 F24B1332 294D67A7 CE04E32A A78D7116 
published testbench key, warm-up 0, flipped: F74AA527 5BDE410D 8F74E2A2 0173DD49 F3C21332 2F207127 29231C2A 42CA71E2 -> OK (same as earlier analysis)

=== E0b comparison with normal.bin / flipped.bin of the C simulation (tb_prng32.cpp) ===
  no normal.bin found in the searched folders (skipped)

=== E1 published dataset: fixed key, s0 bit0 flipped, warm-up 0, N=65536 ===
key words (s0,s1,s2,s3,w0,t0) = 12345678 9ABCDEF0 FEB97531 2468ACE0 61C88647 7F4A7C15
first 3 normal : F74AA527 5BDE2F8D 8F74C822
first 3 flipped: F74AA527 5BDE410D 8F74E2A2
NPCR = 99.998474 %  (equal words: 1, at indices: 0)
UACI = 33.242817 %  (z vs 33.3333 % = -0.98)
entropy normal = 7.999357 , flipped = 7.999348 bits/byte (ideal expectation 7.999298)
ACF lags 1..200: max|ACF| = 0.010682 (2.73 sigma), mean|ACF| = 0.003335, lags above 95 % bound = 13/200, P(X>=13 | Bin(200,0.05)) = 0.204

=== E2 warm-up dependence (fixed key, s0 bit0 flipped, N=65536) ===
  warm-up 0: NPCR = 99.998474 %, equal words = 1, first equal index = 0, UACI = 33.2428 %
  warm-up 1: NPCR = 100.000000 %, equal words = 0, first equal index = -1, UACI = 33.2437 %
  warm-up 2: NPCR = 100.000000 %, equal words = 0, first equal index = -1, UACI = 33.2442 %
  warm-up 3: NPCR = 100.000000 %, equal words = 0, first equal index = -1, UACI = 33.2447 %
  warm-up 4: NPCR = 100.000000 %, equal words = 0, first equal index = -1, UACI = 33.2447 %
  warm-up 5: NPCR = 100.000000 %, equal words = 0, first equal index = -1, UACI = 33.2452 %
  warm-up 6: NPCR = 100.000000 %, equal words = 0, first equal index = -1, UACI = 33.2459 %
  warm-up 7: NPCR = 100.000000 %, equal words = 0, first equal index = -1, UACI = 33.2456 %
  warm-up 8: NPCR = 100.000000 %, equal words = 0, first equal index = -1, UACI = 33.2450 %

=== E3 1000 random keys x random single-bit flip of s0..s3 (same keys for all variants), warm-up 0 ===
  V0 xoshiro only: UACI mean = 33.3262, SD = 0.0942 (theory SD 0.0921), min = 32.986, max = 33.589 | |z|>1.96: 60/1000 (6.0 %, expected 5 %) | pairs with equal words: 833 (total equal words 1412)
     NPCR mean = 99.997845 %, min = 99.995422 %, max = 100.000000 % | largest index of an equal word = 3
     flips in s0: 251 pairs, equal words per pair = 1.000 | equal-word index patterns: [0] x251  
     flips in s1: 237 pairs, equal words per pair = 0.295 | equal-word index patterns: [none] x167  [2] x70  
     flips in s2: 251 pairs, equal words per pair = 2.267 | equal-word index patterns: [0,2] x184  [0,2,3] x67  
     flips in s3: 261 pairs, equal words per pair = 2.000 | equal-word index patterns: [0,1] x261  
  V1 +Weyl: UACI mean = 33.3258, SD = 0.0906 (theory SD 0.0921), min = 33.059, max = 33.631 | |z|>1.96: 53/1000 (5.3 %, expected 5 %) | pairs with equal words: 833 (total equal words 1412)
     NPCR mean = 99.997845 %, min = 99.995422 %, max = 100.000000 % | largest index of an equal word = 3
     flips in s0: 251 pairs, equal words per pair = 1.000 | equal-word index patterns: [0] x251  
     flips in s1: 237 pairs, equal words per pair = 0.295 | equal-word index patterns: [none] x167  [2] x70  
     flips in s2: 251 pairs, equal words per pair = 2.267 | equal-word index patterns: [0,2] x184  [0,2,3] x67  
     flips in s3: 261 pairs, equal words per pair = 2.000 | equal-word index patterns: [0,1] x261  
  V2 +Tent: UACI mean = 33.3253, SD = 0.0934 (theory SD 0.0921), min = 33.060, max = 33.603 | |z|>1.96: 59/1000 (5.9 %, expected 5 %) | pairs with equal words: 833 (total equal words 1412)
     NPCR mean = 99.997845 %, min = 99.995422 %, max = 100.000000 % | largest index of an equal word = 3
     flips in s0: 251 pairs, equal words per pair = 1.000 | equal-word index patterns: [0] x251  
     flips in s1: 237 pairs, equal words per pair = 0.295 | equal-word index patterns: [none] x167  [2] x70  
     flips in s2: 251 pairs, equal words per pair = 2.267 | equal-word index patterns: [0,2] x184  [0,2,3] x67  
     flips in s3: 261 pairs, equal words per pair = 2.000 | equal-word index patterns: [0,1] x261  
  V3 full: UACI mean = 33.3297, SD = 0.0937 (theory SD 0.0921), min = 33.025, max = 33.622 | |z|>1.96: 47/1000 (4.7 %, expected 5 %) | pairs with equal words: 833 (total equal words 1412)
     NPCR mean = 99.997845 %, min = 99.995422 %, max = 100.000000 % | largest index of an equal word = 3
     flips in s0: 251 pairs, equal words per pair = 1.000 | equal-word index patterns: [0] x251  
     flips in s1: 237 pairs, equal words per pair = 0.295 | equal-word index patterns: [none] x167  [2] x70  
     flips in s2: 251 pairs, equal words per pair = 2.267 | equal-word index patterns: [0,2] x184  [0,2,3] x67  
     flips in s3: 261 pairs, equal words per pair = 2.000 | equal-word index patterns: [0,1] x261  

=== E4 independent random baseline: 1000 pairs of independent uniform sequences (System.Security.Cryptography RNG) ===
  baseline: UACI mean = 33.3331, SD = 0.0950, min = 33.024, max = 33.698 | |z|>1.96: 57/1000 (5.7 %) | pairs with equal words: 0
  V0 xoshiro only minus baseline: mean difference = -0.0069 %, Welch z = -1.63
  V1 +Weyl minus baseline: mean difference = -0.0073 %, Welch z = -1.76
  V2 +Tent minus baseline: mean difference = -0.0077 %, Welch z = -1.83
  V3 full minus baseline: mean difference = -0.0034 %, Welch z = -0.81

=== E5 do the layers add diffusion for a flip of s? (200 random pairs, warm-up 0) ===
  (V0 out1 XOR V0 out2) == (V3 out1 XOR V3 out2): mismatching words = 0 of 13107200
  0 mismatches means the XOR difference of the outputs is exactly the xoshiro128** difference:
  Weyl and Tent do not depend on s, so they add no diffusion for flips of s.

=== E6 per-bit sensitivity of V3 (10 random base keys per bit, warm-up 0) ===
  flips of s0..s3 (128 bits): mean UACI = 33.324 %, mean fraction of output bits changed = 0.4999
  flips of w0     (32 bits) : mean UACI = 9.164 %, mean fraction of output bits changed = 0.1250
  flips of t0     (32 bits) : mean UACI = 33.290 %, mean fraction of output bits changed = 0.4999
  w0 per-bit UACI (bit 0..31): 0.00 0.00 0.01 0.01 0.02 0.05 0.09 0.16 0.30 0.54 0.99 1.78 3.17 5.52 9.46 15.76 25.18 37.69 49.61 5.47 9.37 15.61 24.98 37.47 50.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00
  (details per bit: per_bit_sensitivity.csv)

=== E7 entropy and autocorrelation over 1000 sequences: V3 (random keys, warm-up 0) versus independent baseline ===
  V3      : entropy mean = 7.999300, SD = 0.000063, min = 7.999049 | max|ACF| mean = 0.0117, 95th pct = 0.0144, max = 0.0196 | lags above bound: mean = 10.01, max = 23
     byte-uniformity statistic above the p=0.01 level (310.46): 17 of 1000 (expected 10.0); above the p=0.001 level (330.52): 2 (expected 1.0)
     V3 lowest-entropy sequence: trial 830, key (s0 s1 s2 s3 w0 t0) = 547D3C0C D9EC7D8C FF049FDE 048B5BD7 3F06DE5A 4C22FD94 , entropy = 7.999049
  baseline: entropy mean = 7.999296, SD = 0.000061, min = 7.999047 | max|ACF| mean = 0.0115, 95th pct = 0.0143, max = 0.0186 | lags above bound: mean = 9.80, max = 21
     byte-uniformity statistic above the p=0.01 level (310.46): 13 of 1000 (expected 10.0); above the p=0.001 level (330.52): 2 (expected 1.0)

=== E8 equal-word pattern for every bit of s0..s3 (fixed key, warm-up 0, first 64 words, V3) ===
  (Weyl and Tent do not depend on s, so the pattern is the same for V0..V3; it does not depend on the key, see E3)
  s0, all 32 bits: equal words at indices 0
  s1, bits 0..22 (23 bits): equal words at indices none
  s1, bits 23..31 (9 bits): equal words at indices 2
  s2, bits 0..22 (23 bits): equal words at indices 0,2
  s2, bits 23..31 (9 bits): equal words at indices 0,2,3
  s3, all 32 bits: equal words at indices 0,1

Files written to C:\Users\Noro\Desktop\second paper interval 1\dsp-free-prng-fpga-v1.0\reproduce_output\npcr_uaci_results

Finished: 2026-11-02T22:09:09

