The local ring-based cryptosystem is built upon the core mathematical operations of the algebraic structure of local rings, which provides a significant advantage in ensuring security against advanced cryptanalysis. However, using the entire set of units within this structure would be computationally impractical in practical applications. Thus, we present a novel approach for designing 16Ă16 and 32Ă32 substitution boxes over chain and non-chain Galois ring respectively, by utilizing subgroups of local rings in a computationally feasible manner. Our proposed scheme significantly reduces memory usage by integrating both chain and non-chain rings. Specifically, the 16Ă16 and 32Ă32 S-boxes require only 16Ă28and 32Ă28 memory cells, respectively, whereas S-boxes of these dimensions over fields have been shown to be highly inefficient due to their extensive memory requirements (16Ă216and 32Ă232,respectively). The proposed method offers a more efficient solution for constructing S-boxes over large Galois fields and integrates chain and non-chain local Galois rings, as well as finite fields, for efficient transmission designs in smart devices. The algebraic structures used in this approach are used to establish the most vital aspect of a block cipher, the substitution box. We use each of these algebraic structures, each with a different bit size, to construct three distinct S-boxes. We discuss the performance and sensitivity of the proposed S-boxes to demonstrate their effectiveness in data protection. In this technique, the substitution boxes established by the non-chain ring, maximal cyclic subgroup of the Galois ring, and Galois field are applied for the processes of substitution, exclusive-or function, and diffusion in image encryption, respectively. Furthermore, we have performed numerous standard analyses on the encrypted image, including statistical analysis, differential analysis, and NIST tests. The results of these tests demonstrate the effectiveness of the proposed approach for various cryptographic purposes. Overall, this work provides a valuable contribution to the field of cryptography, particularly in constructing efficient S-boxes over large Galois fields.