2.2. Strengthening the Hill Cipher: Prior Variants
Within the Hill-cipher lineage, Saeednia [
24] addressed the cipher’s defining weakness of linearity that exposes it to known-plaintext recovery of the key by generating a fresh per-message key from a single shared matrix. For each message, a random vector selects a permutation applied simultaneously to the rows and columns of the secret matrix H, producing a conjugated session matrix H
t = P
t−1HP
t; because conjugation commutes with inversion, decryption requires only a permutation of a precomputed H
−1 rather than a fresh matrix inversion. The construction is, however, entirely linear over the underlying modular ring: it supplies a keyed diffusion layer in the spirit of an SPN mixing step but contains no substitution stage and no round iteration, and its security rests on the secrecy of the permutation together with a counting argument over candidate matrices rather than on nonlinear confusion. Saeednia thus represents a diffusion-side ancestor of the present design and identifies the gap it is intended to fill.
Toorani & Falahati [
17] introduced the Affine Hill cipher (TFHC), a two-protocol variant based on affine transformation which is still vulnerable to zero-plaintext attack: when the plaintext is the zero vector, the ciphertext directly reveals the auxiliary vector V, yielding a system of linear equations in the key matrix entries.
Valizadeh [
25] addressed this zero-plaintext vulnerability in TFHC by introducing Arnold Cat Map (ACM) scrambling applied to both the key matrix K and the auxiliary matrix V before encryption. While effective against the specific zero-plaintext attack, this scheme retains the affine (degree-1) structure of TFHC and introduces no genuine nonlinear substitution layer; the ACM is a linear permutation, not a cryptographic S-box. Key derivation relies on a SHA/HMAC hash chain without memory hardness, leaving it vulnerable to GPU-accelerated brute force. No branch number, avalanche, differential, or linear bias metrics are reported. As developed in
Section 2.5, the present design addresses these limitations: the AES S-box provides genuine nonlinearity (degree 7, NL = 112), Argon2id provides memory-hard key protection, and the zero-plaintext attack is structurally precluded by round-key injection prior to the matrix layer.
Paragas, Sison & Medina [
14] proposed a Hill cipher variant using SHA-256 for key derivation and a modified S-box. However, the scheme operates over mod-64 arithmetic (not a proper field), uses a static key schedule, and operates without iterative composition across multiple transformation stages. No differential or linear bias metrics are reported beyond a basic avalanche measurement.
Several further variants combine permutation and iteration with the Hill core. Ismail, Amin & Diab [
26] proposed repairing the Hill cipher by modifying the key matrix per block with an initial vector; Sastry, Shankar & Bhavani [
27] introduced interweaving and iteration stages between successive matrix multiplications; Farmanbar & Chefranov [
28] investigated Hill cipher modifications based on permutation and iteration; and Gutik, Popadiuk & Sulym [
29] presented a recent algebraic generalization of the Hill construction. These designs reinforce a consistent pattern in the lineage: permutation and iteration strengthen the classical cipher, but none of these schemes combines a cryptographically vetted S-box with provable diffusion bounds and memory-hard key derivation.
2.3. Substitution–Permutation Networks and the Wide-Trail Strategy
The substitution–permutation paradigm that frames the present work originates with Shannon’s principles of confusion and diffusion [
1] and their embodiment in practical cipher design. Feistel [
2] translated these principles into a concrete architecture, alternating key-controlled substitution with permutation so that local nonlinearity is propagated into global statistical complexity across successive stages. It is this substitution–permutation philosophy, rather than any single primitive, that is the structural ancestor of the design developed here.
Kam and Davida [
3] placed this architecture on a more formal footing, giving a structured method for constructing substitution–permutation networks that guarantee completeness, the property that every output bit depends on every input bit, and thereby linking S-box placement and interconnection to a verifiable diffusion criterion. Their treatment anticipates the wide-trail concerns [
18] that later governed AES and motivate the branch-number analysis of
Section 3.
Turning to SPN theory (a full review of the AES candidates is beyond our scope), the wide-trail design strategy of Daemen & Rijmen [
18] provides the foundational framework for bounding differential and linear attack complexity in terms of active S-box counts. The AES (Rijndael) S-box, based on inversion in GF(2
8) followed by an affine transformation, achieves optimal differential uniformity (DU) DU = 4 and nonlinearity (NL) NL = 112 [
21,
22]. Hill-Enigma-SPN (HESPN) adopts the AES S-box directly, inheriting these properties for its substitution layer.
The SAFER family [
30,
31,
32] and SHARK [
22] are classical SPN designs that form part of the lineage leading to AES. Serpent [
33], an AES finalist, is a 128-bit SPN with 32 rounds and conservative security margins, providing a useful comparison point for the present work. PRESENT [
34] is a lightweight bit-oriented SPN with 4×4 S-boxes. More recent work generalizes the substitution–permutation paradigm itself, as in the HADES design strategy [
35]. The remaining AES finalists MARS, RC6, and Twofish all employ Feistel-based rather than SPN structures [
12] and are therefore outside the direct scope of this comparison.
2.5. Closest Prior Work and the Gap Addressed
The closest prior work is the multidimensional Hill substitution–permutation network of Coggins [
19], which integrates Hill-style matrix diffusion with matrices of several dimensions within an iterated SPN framework and demonstrates how a multidimensional matrix-based diffusion can be carried inside a full substitution–permutation structure. Hill-Enigma-SPN departs from that design in its diffusion strategy: in place of global MDS-based mixing over GF(2
8), it embeds a key-dependent, rotor-scheduled GF(2) matrix layer with a proven branch-number floor (
Section 3), combined with AES S-box confusion, a routing permutation for inter-byte diffusion, and Argon2id memory-hard key derivation. This shift changes both the diffusion profile and the structural diversity of the cipher, offering an alternative route for integrating Hill-type mechanisms into SPN design.
Following a thorough review of the literature, prior Hill-based constructions address these properties in isolation. The present design reorganizes these elements into a unified architecture while emphasizing different diffusion tradeoffs than earlier SPN-style variants: (i) GF(2) admissible matrix diffusion with formally verified branch number; (ii) rotor scheduling inspired by the Enigma Encoding Machine; (iii) AES S-box substitution; and (iv) Argon2id memory-hard key derivation, within a principled SPN framework with empirical statistical evaluation.
Table 1.
Structural parameters of representative SPN block ciphers. HESPN row highlighted in green.
Table 1.
Structural parameters of representative SPN block ciphers. HESPN row highlighted in green.
| Cipher |
Block (bits) |
Key (bits) |
Rounds |
|
HESPN(this work)
|
128 |
256 |
16 1
|
|
MD-Hill-SPN [19] |
128 |
256 |
12 |
|
AES(Rijndael) [21,36] |
128 |
128–256 |
10–14 |
|
Serpent [33] |
128 |
128–256 |
32 |
|
PRESENT [34] |
64 |
80/128 |
31 |
|
SAFER+ [30,31,37] |
128 |
128–256 |
8–16 |
|
SHARK [22] |
64 |
128 |
6 |
Table 2.
Substitution, diffusion, and throughput parameters of representative SPN block ciphers. HESPN row highlighted in green. SW = software implementation. DU = differential uniformity; NL = nonlinearity. Branch number field denotes the algebraic structure over which it is defined. Throughput figures are estimates from published sources or implementation reports; direct comparison is indicative only due to platform variation.
Table 2.
Substitution, diffusion, and throughput parameters of representative SPN block ciphers. HESPN row highlighted in green. SW = software implementation. DU = differential uniformity; NL = nonlinearity. Branch number field denotes the algebraic structure over which it is defined. Throughput figures are estimates from published sources or implementation reports; direct comparison is indicative only due to platform variation.
| Cipher |
S-box type |
DU/NL |
Branch number |
SW throughput (est.) |
|
HESPN(this work)
|
AES S-box 8-bit, GF(28) |
4/112 |
4 (GF(2), proved)1
|
~60 MB/s (C, projected; not benchmarked)2
|
|
MD-Hill-SPN [19] |
AES S-box 8-bit, GF(28), ×2/rnd |
4/112 |
5/9/17 (GF(28), MDS)5
|
Not reported 6
|
|
AES(Rijndael) [21,36] |
GF(28) inv. + affine |
4/112 |
5 (GF(28), MDS)3
|
460–1,900 MB/s2
|
|
Serpent [28] |
Eight 4×4 S-boxes/round |
4/4 |
none (bit permut. layer) |
~40–100 MB/s2
|
|
PRESENT [29] |
4×4 nibble S-box ×16 |
4/4 |
none (bit permut. layer) |
~20–50 MB/s2
|
|
SAFER+ [25,26,31] |
Exp/log over ℤ256
|
N/A4 |
none (PHT/Had. diffusion) |
~100–200 MB/s2
|
|
SHARK [21] |
GF(28) inv. + affine |
4/112 |
9 (GF(28), MDS)3
|
~150–300 MB/s2
|
Remarks
1 Branch number (HESPN): B ≥ 4 is formally proved for all 64 (seed, orientation) pairs over GF(2) via the admissibility filter and R(M) = MᵀJ (
Section 3.4/Definition 3.3). Branch number is defined per-byte over GF(2), not across bytes as in the GF(2
8) MDS sense. AES MixColumns achieves B = 5 as an MDS code over GF(2
8) across four bytes simultaneously, which is a stronger inter-byte claim.
2 Throughput: HESPN: ~60 MB/s is a projected C figure for the 16-round cipher, extrapolated from the NumPy implementation's operation profile (12-round measurements scaled by 12/16); no optimized C implementation has yet been benchmarked. The pure Python prototype achieves ~27 bytes/s at 16 rounds (36 bytes/s measured at 12 rounds); NumPy vectorized ~6 MB/s (scaled from ~8 MB/s measured at 12 rounds; this work). AES: 460–1,900 MB/s includes AES-NI hardware acceleration; pure software AES ~200–500 MB/s. Serpent 40–100 MB/s from [
12,
33]. PRESENT: ~20–50 MB/s software estimate. SAFER+: ~100–200 MB/s estimate. SHARK: ~150–300 MB/s estimate; no modern benchmarks available.
3 Branch number (AES/SHARK): AES MixColumns is an MDS code over GF(2
8) with branch number B = 5 across four bytes; SHARK’s linear layer is an MDS (Reed–Solomon) code over GF(2
8) with branch number B = 9 across all eight bytes of its 64-bit block [
21,
22]. Both provide stronger inter-byte diffusion guarantees than HESPN’s per-byte GF(2) branch number, but operate over an extension field rather than GF(2) directly.
4 SAFER+ S-box DU/NL: SAFER+ uses exponential and logarithmic S-boxes based on the map x ↦ 45ˣ mod 257 (with the convention that the value 256 is represented as 0), together with its logarithmic inverse, rather than S-boxes over a binary field GF(2ⁿ). The standard differential uniformity and nonlinearity metrics as defined for GF(2ⁿ) S-boxes do not directly apply. SAFER’s diffusion layer uses the Pseudo-Hadamard Transform (PHT) rather than a matrix-based branch number construction.
5 Branch number (MD-Hill-SPN [
19]
): MD-Hill-SPN uses a three-tier MDS diffusion hierarchy over GF(2
8): 4×4 (B = 5), 8×8 (B = 9), and 16×16 (B = 17) Cauchy matrices, each meeting the Singleton bound B = n + 1. Unlike HESPN’s per-byte GF(2) branch number, this is cross-byte GF(2
8) MDS diffusion, with the 16×16 tier providing full-state mixing in a single round.
6 Throughput (MD-Hill-SPN [
19]
): No software throughput figure is reported; the multi-tier mix layer, particularly the full-state 16×16 GF(2
8) matrix is deliberately heavier than a single MDS layer and is not benchmarked.
HESPN occupies a distinct position in this comparison: among the designs surveyed, it appears to be the only one combining a GF(2) rotor-scheduled matrix diffusion layer with formally verified branch number, AES S-box nonlinearity (DU = 4, NL = 112), and Argon2id memory-hard key derivation. The author is not aware of a prior Hill cipher variant achieving this combination. The closest prior design is the multidimensional Hill SPN of Coggins [
19], which likewise pairs the AES S-box with Argon2id key derivation; it differs in its diffusion layer, using a three-tier GF(2
8) MDS hierarchy (branch numbers 5, 9, and 17 for its 4×4, 8×8, and 16×16 matrices) rather than the key-dependent, rotor-scheduled GF(2) matrices used here, and reports no throughput benchmark. The general scheme diagram is represented in
Figure 1 below.
The branch number comparison requires care: AES achieves B = 5 across four bytes and SHARK B = 9 across all eight bytes, both as MDS codes over GF(28), which is a stronger inter-byte guarantee than HESPN’s B ≥ 4 over GF(2) per byte. However, HESPN compensates with 16 independent key-dependent matrices per round (versus AES’s single shared MixColumns), providing structural richness at the cost of approximately 3.5× more bit-level operations per block.
The throughput gap relative to AES is primarily due to the absence of dedicated hardware acceleration (AES-NI). An optimized C implementation of HESPN is projected at ~60 MB/s (
Section 3.9), comparable to Serpent in software and substantially faster than PRESENT. Settings without AES-NI are, however, already well served by standardized software-oriented ciphers such as ChaCha20 [
38]; the practical niche claimed here is accordingly modest, and the contribution of the present work is primarily architectural (
Section 2.5).