﻿Algebraic-degree study started: 2026-11-02T22:09:12
Machine: Microsoft Windows NT 10.0.26300.0, cores = 12

Algebraic-degree / affinity analysis of the design
Model cross-check against the published source: rng32.c sha256 164902b92bb55f05; gamma=True, wdef=True, tdef=True
Affinity triple test: f(a)^f(b)^f(c)^f(a^b^c) = 0 for all a,b,c  <=>  f is affine (degree <= 1).

=== A self-checks ===
  model == published design: OK

=== B component affinity (100000 random triples; 0 = affine) ===
  Tent step  Tent(x)             : 0  -> AFFINE
  Weyl mix   wmix(w)             : 100000  -> non-affine (carry-propagating add)
  ** scram   rotl(s1*5,7)*9      : 100000  -> non-affine (modular multiply)

=== C exact algebraic degree of the integer Tent step (toy widths, full ANF) ===
  width 8: 1-step degree 1, 2-step 1, 4-step 1
  width 10: 1-step degree 1, 2-step 1, 4-step 1
  width 12: 1-step degree 1, 2-step 1, 4-step 1
  width 14: 1-step degree 1, 2-step 1, 4-step 1
  width 16: 1-step degree 1, 2-step 1, 4-step 1
  (degree 1 at every width and iteration count: the integer Tent map is algebraically affine)

=== D degree of tent^n on a 12-bit cube of the 32-bit Tent state, vs n ===
  n = 0: max degree 1
  n = 2: max degree 1
  n = 4: max degree 1
  n = 6: max degree 1
  n = 8: max degree 1
  n = 10: max degree 1

=== E affinity of the FULL V3 output in each seed group, vs step ===
  t0 : step 0=affine  step 1=affine  step 2=affine  step 4=affine  
  w0 : step 0=non-affine  step 1=non-affine  step 2=non-affine  step 4=non-affine  
  s0 : step 0=affine  step 1=non-affine  step 2=non-affine  step 4=non-affine  
  -> the output is affine in the Tent key only; the Weyl add and the ** scrambler keep it
     non-linear in the Weyl key and in the xoshiro state, so the Tent affinity does NOT make
     the generator linear.

Conclusion: the integer Tent map is algebraically affine (degree 1). Its contribution is an
independent-key stream in the XOR fusion and a factor in the state-sequence period, not algebraic
non-linearity. This is a limitation, consistent with its short cycle spectrum (12 cycles, Tent(x)=Tent(~x)).

