<?xml version="1.0" encoding="UTF-8"?>
<rfc xmlns:xi="http://www.w3.org/2001/XInclude"
     ipr="trust200902"
     docName="draft-arroyo-gap32-sponge1024-00"
     category="info"
     submissionType="IETF"
     version="3">

  <front>
    <title abbrev="GAP-32 / Sponge-1024">GAP-32 / Sponge-1024: Constant-Time Table-Free Cryptographic Sponge, XMSS-D1024 Stateful Signatures, and Blok AEAD (V6)</title>
    <seriesInfo name="Internet-Draft" value="draft-arroyo-gap32-sponge1024-00"/>

    <author fullname="Junior Enrique Arroyo Carmona" initials="J. E." surname="Arroyo Carmona">
      <organization abbrev="ART SpA">Arroyo Riemann Technologies SpA</organization>
      <address>
        <postal>
          <city>Rancagua</city>
          <country>CL</country>
        </postal>
        <email>contacto@artriemann.com</email>
        <uri>https://artriemann.com</uri>
      </address>
    </author>

    <date year="2026" month="December" day="3"/>
    <area>Security</area>
    <workgroup>Network Working Group</workgroup>
    <keyword>Post-Quantum Cryptography</keyword>
    <keyword>Sponge-1024</keyword>
    <keyword>Constant-Time</keyword>
    <keyword>XMSS</keyword>
    <keyword>AEAD</keyword>
    <keyword>OT/SCADA</keyword>

    <abstract>
      <t>This document specifies the Sponge-1024 bijective 1024-bit cryptographic permutation (rate r = 512 bits, capacity c = 512 bits, 24 rounds) and its derived Layer-Zero primitives: the constant-time 64-block leveled GAP32-V5 keyed-first MAC, the R58A Encrypt-then-MAC authenticated encryption container, the Blok AEAD V6 construction with an exact unimodular integer pre-diffusion layer (W20) over Z/2^64Z, and the XMSS-D1024 stateful hash-based post-quantum signature scheme. All primitives are strictly table-free (zero S-boxes, zero lookup-table BRAM) to eliminate cache-timing and memory side-channel vectors in financial messaging, critical OT/SCADA infrastructure, and bare-metal hardware deployments.</t>
    </abstract>
  </front>

  <middle>
    <section anchor="intro">
      <name>Introduction</name>
      <t>Financial messaging rails (ISO 20022, SWIFT) and operational technology environments (OT/SCADA) require post-quantum authentication, integrity, and authenticated encryption primitives that execute in strict constant time without secret-dependent table lookups or variable-time rejection sampling.</t>
      <t>Sponge-1024 defines a single self-contained 1024-bit ARX-multiplicative permutation over sixteen 64-bit unsigned words that unifies hashing, keyed-first message authentication, authenticated encryption, and stateful hash-based signatures without relying on integer factorization, discrete logarithms, or structured linear lattice assumptions.</t>
      <t>In accordance with Kerckhoffs's Principle, the full mathematical specification, minimal C11 reference verifiers (-Wall -Wextra -Werror -Wpedantic), formal structural proofs, empirical statistical audit logs, and a reproducible 5-tier open cryptanalysis challenge are archived at <xref target="ZENODO-GAP32"/> and <eref target="https://github.com/Arroyo-Riemann-tecnologies/art-riemann-monorepo"/>. Production system engines, hardened OS daemons, and hardware RTL implementations remain proprietary to Arroyo Riemann Technologies SpA under commercial licensing. No security claim in this specification depends on unresolved mathematical conjectures.</t>
    </section>

    <section anchor="conventions">
      <name>Conventions and Definitions</name>
      <t>The key words "<bcp14>MUST</bcp14>", "<bcp14>MUST NOT</bcp14>", "<bcp14>REQUIRED</bcp14>", "<bcp14>SHALL</bcp14>", "<bcp14>SHALL NOT</bcp14>", "<bcp14>SHOULD</bcp14>", "<bcp14>SHOULD NOT</bcp14>", "<bcp14>RECOMMENDED</bcp14>", "<bcp14>NOT RECOMMENDED</bcp14>", "<bcp14>MAY</bcp14>", and "<bcp14>OPTIONAL</bcp14>" in this document are to be interpreted as described in BCP 14 <xref target="RFC2119"/> <xref target="RFC8174"/> when, and only when, they appear in all capitals, as shown here.</t>
      <t>All lane additions (+) and multiplications (*) operate modulo 2^64 on unsigned 64-bit little-endian integers. Bitwise XOR is denoted by "^", logical right shift by "&gt;&gt;", and k-bit left cyclic rotation on 64-bit words by "rotl64(x, k)". "LE64(n)" denotes the 8-byte little-endian encoding of unsigned 64-bit integer n, and "||" denotes byte-string concatenation.</t>
    </section>

    <section anchor="sponge1024">
      <name>The Sponge-1024 Permutation and Sponge Construction</name>

      <section anchor="state_iv">
        <name>Internal State, Constants, and Domain Initialization</name>
        <t>The internal state S consists of 16 unsigned 64-bit lanes s[0]..s[15] arranged in row-major order as a 4x4 matrix. Lanes s[0]..s[7] form the 512-bit bitrate (64 bytes), and lanes s[8]..s[15] form the 512-bit hidden capacity.</t>
        <t>The permutation uses four fixed 64-bit constants:</t>
        <artwork type="ascii-art"><![CDATA[
GOLDEN_HEX   = 0x9e3779b97f4a7c15  (floor(2^64 * frac(phi^-1)))
PRIME_DISP_1 = 0xbf58476d1ce4e5b9  (Stafford Mix13 odd multiplier 1)
PRIME_DISP_2 = 0x94d049bb133111eb  (Stafford Mix13 odd multiplier 2)
C_SQ         = 0x53515545455a4500  (squeeze-phase tweak separator)
]]></artwork>
        <t>Sixteen nothing-up-my-sleeve initial vector lanes IV[0]..IV[15] are derived as floor(2^64 * frac(alpha_i)) from standard irrational constants:</t>
        <table anchor="tab_iv">
          <name>Sponge-1024 Initial Vector Constants (IV[0]..IV[15])</name>
          <thead>
            <tr><th>Lane</th><th>Generator</th><th>64-bit Hex Value</th></tr>
          </thead>
          <tbody>
            <tr><td>IV[0]</td><td>phi^-1</td><td>0x9e3779b97f4a7c15</td></tr>
            <tr><td>IV[1]</td><td>e</td><td>0xb7e151628aed2a6b</td></tr>
            <tr><td>IV[2]</td><td>pi</td><td>0x243f6a8885a308d3</td></tr>
            <tr><td>IV[3]</td><td>sqrt(2)</td><td>0x6a09e667f3bcc908</td></tr>
            <tr><td>IV[4]</td><td>sqrt(3)</td><td>0xbb67ae8584caa73b</td></tr>
            <tr><td>IV[5]</td><td>sqrt(5)</td><td>0x3c6ef372fe94f82b</td></tr>
            <tr><td>IV[6]</td><td>gamma</td><td>0x93c467e37db0c7a4</td></tr>
            <tr><td>IV[7]</td><td>ln(2)</td><td>0xb17217f7d1cf79ac</td></tr>
            <tr><td>IV[8]</td><td>sqrt(7)</td><td>0xa54ff53a5f1d36f1</td></tr>
            <tr><td>IV[9]</td><td>sqrt(11)</td><td>0x510e527fade682d1</td></tr>
            <tr><td>IV[10]</td><td>sqrt(13)</td><td>0x9b05688c2b3e6c1f</td></tr>
            <tr><td>IV[11]</td><td>sqrt(17)</td><td>0x1f83d9abfb41bd6b</td></tr>
            <tr><td>IV[12]</td><td>sqrt(19)</td><td>0x5be0cd19137e2179</td></tr>
            <tr><td>IV[13]</td><td>sqrt(23)</td><td>0xcbbb9d5dc1059ed8</td></tr>
            <tr><td>IV[14]</td><td>sqrt(29)</td><td>0x629a292a367cd507</td></tr>
            <tr><td>IV[15]</td><td>sqrt(31)</td><td>0x9159015a3070dd17</td></tr>
          </tbody>
        </table>
        <t>For a 64-bit domain separator D, initialization loads s[i] = IV[i] for i = 0..15 and binds D into the capacity:</t>
        <artwork type="ascii-art"><![CDATA[
s[12] = s[12] ^ D
s[15] = s[15] ^ rotl64(D, 31) ^ GOLDEN_HEX
]]></artwork>
      </section>

      <section anchor="round_fn">
        <name>Quarter-State Mixing and 24-Round Permutation</name>
        <t>Given four lanes (a, b, c, d) and a 64-bit round constant rc, the bijective quarter-state operator mix4(a, b, c, d, rc) executes sequentially:</t>
        <artwork type="ascii-art"><![CDATA[
a = a + (b ^ rc)
d = rotl64(d ^ a, 32)
c = c + d
b = rotl64(b ^ c, 24)
a = (a + b) * PRIME_DISP_1
a = a ^ (a >> 31)
d = rotl64(d ^ a, 16)
c = (c + d) * PRIME_DISP_2
c = c ^ (c >> 29)
b = rotl64(b ^ c, 7)
]]></artwork>
        <t>For tweak parameter rc_dom in Z/2^64Z, the full permutation Pi_1024(S, rc_dom) executes 24 rounds (r = 0..23). Defining rc_{r,j} = rc_dom ^ (GOLDEN_HEX * (4*r + j + 1)) for j in {0, 1, 2, 3} and diagonal rotation offsets rho = (19, 29, 37, 47), each round performs:</t>
        <ol>
          <li>Column layer: mix4 on (s[j], s[j+4], s[j+8], s[j+12]) with rc_{r,j} for j = 0..3.</li>
          <li>Diagonal layer: mix4 on (s[j], s[((j+1) mod 4)+4], s[((j+2) mod 4)+8], s[((j+3) mod 4)+12]) with rotl64(rc_{r,j}, rho[j]) for j = 0..3.</li>
          <li>Cyclic row shift: (R0, R1, R2, R3) &lt;- (R1, R2, R3, R0), where Rk = (s[4k], s[4k+1], s[4k+2], s[4k+3]).</li>
        </ol>
        <t>Because PRIME_DISP_1 and PRIME_DISP_2 are odd modulo 2^64 and x -&gt; x ^ (x &gt;&gt; k) is an invertible linear map over GF(2)^64, every step of Pi_1024 is strictly bijective. Any single-lane perturbation propagates causally to all 16 lanes within Round 0.</t>
      </section>

      <section anchor="absorb_squeeze">
        <name>Framing, Absorption, Padding, and Squeezing</name>
        <t>Structured tuples F = (F_1, ..., F_m) are injectively encoded as Enc(F) = LE64(|F_1|) || F_1 || ... || LE64(|F_m|) || F_m. The byte stream is partitioned into 64-byte blocks m_0..m_{B-1} with final pad10*1 padding (appending 0x80, zero-padding to 64 bytes, and XORing 0x01 into byte 63 of m_{B-1}). For each block j = 0..B-1, the rate is XORed with m_j (with total byte length folded via s[13] ^= (L_total * GOLDEN_HEX) prior to the final permutation j = B-1), and Pi_1024(S, D ^ j) is applied.</t>
        <t>Each 64-byte output block w^(t) (t = 0, 1, ...) is extracted via capacity-mixed squeezing:</t>
        <artwork type="ascii-art"><![CDATA[
w[i] = s[i] ^ rotl64(s[i+8], 29)   for i = 0..7
]]></artwork>
        <t>Between consecutive output blocks, the state advances via S &lt;- Pi_1024(S, D ^ C_SQ ^ (t + 1)). Because bit 62 of C_SQ is 1, absorption tweaks (j &lt; 2^62) and squeeze tweaks (t &lt; 2^62) are strictly disjoint. Under the conjugacy involution T(s_rate, s_cap) = (s_rate ^ R_29(s_cap), s_cap), this output map is bijectively equivalent to standard rate-only sponge squeezing <xref target="SPONGE"/>.</t>
      </section>
    </section>

    <section anchor="derived">
      <name>Derived Primitives and Wire Formats</name>

      <section anchor="gap32v5">
        <name>GAP32-V5 Constant-Time Keyed-First MAC (128 Bytes)</name>
        <t>GAP32-V5 uses domain tag D = 0x47415033325F5635 and absorbs Enc(key, nonce, message) keyed-first. To eliminate length-dependent timing leakage on payloads up to 4,031 framed bytes, implementations <bcp14>MUST</bcp14> run isolated dummy permutations whenever B &lt; 64 until exactly 64 permutations have been evaluated, enforcing T(B) = max(64, B). Output length is 128 bytes (two 64-byte squeeze blocks).</t>
      </section>

      <section anchor="r58a_blok">
        <name>R58A Container, Blok AEAD V6, and Unimodular Layer W20</name>
        <t>The R58A Encrypt-then-MAC container formats sealed ratchet state and out-of-band credential envelopes as:</t>
        <artwork type="ascii-art"><![CDATA[
Packet = "R58A" (4 B) || Nonce (16 B) || Tag (32 B) || Ciphertext
]]></artwork>
        <t>Keystream generation uses DOM_ENC = 0x5241545F454E4335 over (K, A, Nonce); authentication uses DOM_MAC = 0x5241545F4D414335 over (K, A, Nonce, Ciphertext). Decryption <bcp14>MUST</bcp14> validate Tag in constant time prior to releasing plaintext and <bcp14>MUST</bcp14> fail closed on mismatch.</t>
        <t>Blok AEAD V6 applies the unimodular lower-unitriangular pre-diffusion matrix L_16 in SL_16(Z/2^64Z) (layer W20, with entries (L_16)_{m,k} = floor(m/k) for 1 &lt;= k &lt;= m &lt;= 16, det(L_16) = 1, and exact integer Mobius inverse U_16) per 128-byte sub-block using shift-add arithmetic (zero hardware multipliers), followed by Encrypt-then-MAC under domain tags 0x424C4F4B5636454E (encryption) and 0x424C4F4B56364D41 (authentication).</t>
      </section>

      <section anchor="xmss_d1024">
        <name>XMSS-D1024 Stateful Hash-Based Post-Quantum Signatures</name>
        <t>XMSS-D1024 instantiates a Merkle-WOTS+ stateful signature scheme aligned with <xref target="RFC8391"/> solely over Sponge-1024 (256-bit internal hashes, Winternitz parameter w = 16, 67 chains of length 15, branchless constant-time selection ct_cmov_32) for tree heights H in [1..12].</t>
        <t>The public key format is strictly 49 bytes: height (1 B) || pub_seed (16 B) || merkle_root (32 B). Signature length is 4 + 2144 + 32*H bytes (2,276 bytes for H = 4; 2,340 bytes for H = 6). Implementations <bcp14>MUST</bcp14> enforce monotonic atomic one-time signature (OTS) leaf reservation committed to durable storage prior to releasing a signature, and <bcp14>MUST NOT</bcp14> restore an active signing tree from backup after compromise or rollback.</t>
      </section>

      <section anchor="hw_notes">
        <name>Hardware Implementation Profile (Zero-BRAM Artix-7 Metrics)</name>
        <t>Because Sponge-1024 and W20 use zero lookup tables, hardware realizations require zero block RAM. A proprietary 64-bit AXI4-Stream SystemVerilog implementation evaluated on AMD/Xilinx Artix-7 via Yosys xc7 completes in 50 deterministic clock cycles end-to-end (bit-exact with C11) using 176 DSP48E1 slices (0 DSPs in W20 via shift-add decomposition), 2,720 flip-flops, 26,902 LUTs, and 0 BRAM / 0 memory bits, fitting within an XC7A100T device.</t>
      </section>
    </section>

    <section anchor="security">
      <name>Security Considerations</name>
      <t>Under the ideal tweakable permutation model with capacity c = 512 bits <xref target="SPONGE"/>:</t>
      <ul>
        <li>1024-bit GAP32-V5 MACs target 2^256 classical collision resistance, 2^512 classical preimage resistance, Omega(2^256) quantum preimage resistance (Grover), and Omega(2^170.67) quantum inner-collision resistance (BHT).</li>
        <li>256-bit digests target 2^128 classical collision resistance, 2^256 classical preimage resistance, and Omega(2^128) quantum preimage resistance.</li>
        <li>R58A and Blok AEAD achieve IND-CCA2 security up to the 128-bit nonce birthday bound and 256-bit tag forgery bound. Nonces <bcp14>MUST NOT</bcp14> be reused under the same key.</li>
        <li>XMSS-D1024 EUF-CMA unforgeability reduces strictly to collision resistance, second-preimage resistance, and PRF security of Sponge-1024, contingent on strict OTS leaf non-reuse.</li>
      </ul>
      <t>Implementations <bcp14>MUST</bcp14> execute all secret-dependent comparisons, WOTS+ chain steps, and key-handling paths in constant time without secret-dependent branches or memory indexing, and <bcp14>SHOULD</bcp14> pin sensitive key material in non-swappable memory (mlock) with explicit zeroization on release.</t>
      <t>Sponge-1024 is a recently specified permutation whose concrete resistance against structural distinguishers (differential, linear, rotational-XOR, integral, cube, and algebraic MILP/SAT attacks) requires independent public cryptanalysis. A reproducible 5-tier open cryptanalysis challenge covering reduced rounds (R = 1, 2, 4, 8, 12), full 24 rounds, Blok AEAD, XMSS-D1024, and constant-time Dudect evaluation is archived at <xref target="ZENODO-GAP32"/>.</t>
      <t>Intellectual Property Disclosure (BCP 79): Patent applications covering solid-state hardware, deterministic entropy, and cryptographic control embodiments (PCT/CL2026/050192, INAPI 202601451, INAPI 202601456; exclusively licensed to Arroyo Riemann Technologies SpA) are disclosed under BCP 79 via the IETF IPR database. Non-commercial evaluation and cryptanalysis are explicitly authorized.</t>
    </section>

    <section anchor="iana">
      <name>IANA Considerations</name>
      <t>This document has no IANA actions.</t>
    </section>

    <section anchor="vectors">
      <name>Reference Test Vectors</name>
      <t>The following Known Answer Tests (KATs) enable independent verification of bit-exact interoperability.</t>
      <t>Test Vector Set 1: Reduced-round and full 24-round Sponge-1024 256-bit hash digests (domain 0x47415033325F5635, raw byte absorption with pad10*1) over the 44-byte ASCII string "ART_SPA_GAP32_SPONGE1024_OPEN_CHALLENGE_2026":</t>
      <artwork type="ascii-art"><![CDATA[
R=01:
  f09b9e0ef71cde1de26268fd49513a45152370e64ee1e57299842e1dbb9555a2
R=02:
  805f09ffd9635315a8634d2a8e7bc3f18c356cffca493865d975eb3c9ec16397
R=04:
  67d0e8cf4d824e21d5dfc93f961f51cd991670ea13e13d7645e547cc13a43eaa
R=08:
  d26b56379d8b849630a102329086f9fb45f14aa1978b89a19c0752db74ce8467
R=12:
  4b00ced70379b5552cc6f4417aa3a547f3d205c576a176952a522e65b7abe11d
R=24:
  ecd6f9e3215950982379ebe263e0ffab2dd310ffbff6727d02a4299e82dc56df
]]></artwork>
      <t>Test Vector Set 2 (KAT-01): GAP32-V5 128-byte constant-time MAC (D = 0x47415033325F5635, 64-block minimum leveling, framed Enc(key, nonce, msg)):</t>
      <artwork type="ascii-art"><![CDATA[
key (64 ASCII bytes):
  LLAVE_PRUEBA_64_HEX_0123456789ABCDEF0123456789ABCDEF0123456789AB
nonce:
  1763850000000-0123456789abcdef
msg:
  VECTOR_PARIDAD_8_SDKS_ART_SPA_V59
tag[0..15] (128-bit prefix of 256-hex tag):
  0464c71e0805875e600c31ad4eb55998
]]></artwork>
    </section>
    <section anchor="acks" numbered="false">
      <name>Acknowledgements</name>
      <t>The author acknowledges Paola Alexandra Sanabria Arroyo (CEO, Arroyo Riemann Technologies SpA) for corporate governance, intellectual property stewardship, and industrial deployment coordination.</t>
    </section>
  </middle>

  <back>
    <references>
      <name>References</name>
      <references>
        <name>Normative References</name>
        <reference anchor="RFC2119" target="https://www.rfc-editor.org/info/rfc2119">
          <front>
            <title>Key words for use in RFCs to Indicate Requirement Levels</title>
            <author initials="S." surname="Bradner" fullname="S. Bradner"/>
            <date year="1997" month="March"/>
          </front>
          <seriesInfo name="BCP" value="14"/>
          <seriesInfo name="RFC" value="2119"/>
        </reference>
        <reference anchor="RFC8174" target="https://www.rfc-editor.org/info/rfc8174">
          <front>
            <title>Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words</title>
            <author initials="B." surname="Leiba" fullname="B. Leiba"/>
            <date year="2017" month="May"/>
          </front>
          <seriesInfo name="BCP" value="14"/>
          <seriesInfo name="RFC" value="8174"/>
        </reference>
      </references>

      <references>
        <name>Informative References</name>
        <reference anchor="RFC8391" target="https://www.rfc-editor.org/info/rfc8391">
          <front>
            <title>XMSS: eXtended Merkle Signature Scheme</title>
            <author initials="A." surname="Huelsing" fullname="A. Huelsing"/>
            <author initials="D." surname="Butin" fullname="D. Butin"/>
            <author initials="S." surname="Gazdag" fullname="S. Gazdag"/>
            <author initials="J." surname="Rijneveld" fullname="J. Rijneveld"/>
            <author initials="A." surname="Mohaisen" fullname="A. Mohaisen"/>
            <date year="2018" month="May"/>
          </front>
          <seriesInfo name="RFC" value="8391"/>
        </reference>
        <reference anchor="SPONGE">
          <front>
            <title>On the Indifferentiability of the Sponge Construction</title>
            <author initials="G." surname="Bertoni" fullname="G. Bertoni"/>
            <author initials="J." surname="Daemen" fullname="J. Daemen"/>
            <author initials="M." surname="Peeters" fullname="M. Peeters"/>
            <author initials="G." surname="Van Assche" fullname="G. Van Assche"/>
            <date year="2008"/>
          </front>
          <seriesInfo name="EUROCRYPT 2008, LNCS" value="4965"/>
        </reference>
        <reference anchor="ZENODO-GAP32" target="https://doi.org/10.5281/zenodo.24571813">
          <front>
            <title>GAP-32 V6.6: Constant-Time Sovereign Post-Quantum Cryptographic Architecture (Sponge-1024, XMSS-D1024, Blok AEAD) and Fail-Closed Linux Kernel SCADA Enforcement</title>
            <author initials="J. E." surname="Arroyo Carmona" fullname="J. E. Arroyo Carmona"/>
            <date year="2026" month="December"/>
          </front>
          <seriesInfo name="DOI" value="10.5281/zenodo.24571813"/>
        </reference>
      </references>
    </references>
  </back>
</rfc>
