The persistent security challenges in Industry 4.0 due to resource-constrained IoT devices necessitate innovative solutions. Addressing this, a study introduces the ASCON algorithm for lightweight Authenticated Encryption with Associated Data, enhancing confidentiality, integrity, and authenticity within IoT limitations. By integrating Digital Twins, the framework emphasizes the need for robust security in Industry 4.0, with ASCON ensuring secure data transmission, bolstering system resilience against cyber threats. Practical validation using MQTT protocol confirms ASCON’s efficacy over AES-GCM, highlighting its potential for enhanced security in Industry 4.0. Future research should focus on optimizing ASCON for microprocessors and developing secure remote access tailored to resource-constrained devices, ensuring adaptability in the digital era