S-box research code