Vincenzo Manto

Title: The convergence of SHA-256 digit-sum orbits to fixed-point attractors
Author: Vincenzo Manto
Date:
Keywords: mathDynamical SystemsCryptography

The convergence of SHA-256 digit-sum orbits to fixed-point attractors

Abstract:

An analysis of discrete dynamical systems generated by iterating the composition of the SHA-256 cryptographic hash function and the base-10 digit-sum function, demonstrating empirical convergence toward fixed-point attractors.

The convergence of SHA-256 digit-sum orbits to fixed-point attractors

Abstract

This paper examines the behavior of a discrete dynamical system generated by iterating a composite function consisting of the SHA-256 cryptographic hash algorithm and a base-10 arithmetic digit-sum reduction.

Empirical observations reveal that despite the pseudo-random distribution of cryptographic hash outputs, the state space quickly collapses into a highly restricted interval. This collapse drives the system toward specific fixed points—primarily 340 and 341—acting as gravitational sinks or “numerical black holes” for almost all positive integer seed values.


1. Mathematical formulation

Let H:NZ2256\mathcal{H}: \mathbb{N} \to \mathbb{Z}_{2^{256}} be a function that maps an integer xx to its SHA-256 hash representation, interpreted as a large base-10 integer:

H(x)=int(sha256(str(x)))\mathcal{H}(x) = \text{int}(\text{sha256}(\text{str}(x)))

Let S:NNS: \mathbb{N} \to \mathbb{N} denote the standard digit-sum function in base 10, which computes the sum of the individual digits of a given integer. We define the iterated map f:NNf: \mathbb{N} \to \mathbb{N} as the composition:

f(x)=S(H(x))f(x) = S(\mathcal{H}(x))

The trajectory (or orbit) of any initial seed x0x_0 is defined by the sequence:

O(x0)={x0,f(x0),f2(x0),,fk(x0),}\mathcal{O}(x_0) = \{x_0, f(x_0), f^2(x_0), \dots, f^k(x_0), \dots\}

A value xx^* is classified as a fixed point (or attractor) of the system if:

f(x)=xf(x^*) = x^*


2. Statistical drivers

The rapid collapse of the infinite state space N\mathbb{N} into a finite, predictable set of attractors is governed by the Central Limit Theorem and the architectural constraints of the SHA-256 protocol.

2.1 Bound restrictions on the state space

An output of the SHA-256 function yields a 256-bit integer. When converted to base-10 text notation, the resulting integer possesses a bounded length:

256×log10(2)+1=78 digits\lfloor 256 \times \log_{10}(2) \rfloor + 1 = 78 \text{ digits}

Consequently, the theoretical maximum value for the first iteration f(x0)f(x_0) occurs when an hash output yields 78 consecutive 9 digits:

fmax=78×9=702f_{max} = 78 \times 9 = 702

Therefore, regardless of how large the initial seed x0x_0 is, the second term in the orbit f(x0)f(x_0) is strictly bounded such that f(x0)[1,702]f(x_0) \in [1, 702]. This represents an immediate, massive reduction of the system’s operational phase space.

2.2 Probability density and expected value

Because SHA-256 satisfies robust avalanche criteria and acts as a cryptographically strong pseudo-random function, each digit d{0,1,,9}d \in \{0, 1, \dots, 9\} in the base-10 string appears with uniform probability P(d)=0.1P(d) = 0.1.

The expected value E[d]E[d] of a single random digit is:

E[d]=i=09iP(i)=4510=4.5E[d] = \sum_{i=0}^{9} i \cdot P(i) = \frac{45}{10} = 4.5

Assuming a typical hash length of 77 or 78 digits, the expected value of the total digit sum E[f(x)]E[f(x)] clusters precisely around the mean of a normal Gaussian distribution:

  • For a 77-digit integer: μ=77×4.5=346.5\mu = 77 \times 4.5 = \mathbf{346.5}
  • For a 78-digit integer: μ=78×4.5=351.0\mu = 78 \times 4.5 = \mathbf{351.0}

As a result, virtually all trajectories are forced into the high-density peak of this bell curve during the first few steps.


3. Fixed points

Once a trajectory enters the localized region [340,360][340, 360], it tests specific integer values until it encounters a stable fixed point. Computational verification confirms that 340 and 341 satisfy the exact criteria for algebraic attractors:

f(340)=340f(340) = 340

f(341)=341f(341) = 341

Any orbit hitting these values ceases to change, establishing an asymptotic terminal state.