A difficult NP-hard optimization problem, designing cryptographically robust substitution-boxes (S-boxes) necessitates a careful balancing act between several conflicting properties, such as differential uniformity and nonlinearity. Genetic Algorithms (GAs) have been widely used for this task; however, their performance is often limited by premature convergence and insufficient diversity during crossover operations. This primarily occurs because genetic algorithms commence with limited a priori knowledge. This sort of “blindness” and failure to utilize local knowledge results in diminished performance. In GA, the crossover operations facilitate the dissemination of robust candidates within the population. Conventionally, GA implements crossover for each pair of parents for diversity and a robust solution. However, this is not invariably the situation. To enhance children’s candidacy, parental diversity is quite crucial. This paper proposes a similarity-aware crossover strategy, integrated with a Siamese learning framework, to guide the genetic algorithm for improved S-box optimization with better diversity and faster convergence by utilizing parental local information. The proposed model is similarity-aware to guarantee that the GA improves parental diversity. When the parents exhibit excessive similarity, a “regressive” crossover is opted, which ensures the propagation of a parental couple with sufficient diversity to produce superior offspring. The proposed similarity-aware GA model is applied and evaluated to generate cryptographically robust and optimized S-boxes. To verify the robustness in terms of diversity, the model has been tested using three different loss functions: contrastive loss, KL divergence loss, and the suggested method of combining both loss functions to form a hybrid loss function. The effectiveness of the proposed approach is demonstrated through the generation of high-quality S-boxes with strong cryptographic properties.
Khaja et al. (2026) studied this question.