ESP32-Based Hardware Key for Software Application Protection
Source abstract
Abstract
In the current context, classic software licensing and protection mechanisms based exclusively on host application checks can be circumvented by patching, emulation and replay attacks in user-controlled environments. This paper presents an adaptive hardware key implemented on the ESP32-S3 platform, which externalizes sensitive decisions and cryptographic operations from the host application to a dedicated device. The solution combines a device-anchored root of trust (secure boot and flash memory encryption), a PKI-verifiable identity (Public Key Infrastructure X.509 certificate and digital signatures as proof of ownership), hierarchical key derivation to avoid static secrets and the establishment of an authenticated encrypted session for all essential data exchanges. User access is conditioned by three-factor authentication (PIN—Personal Identification Number, TOTP—Time based One Time Password and USB physical presence) and a “code-in-dongle” mechanism, in which the important logic runs on the device and the application receives tokens with limited duration. Experimental validation demonstrates correct provisioning, secure session establishment, negative brute-force testing, as well as lifecycle support via signed OTA (Over-The-Air) with anti-rollback and encrypted backup/recovery. Build reports indicate a balanced flash distribution and available DIRAM (Data/Instruction RAM) margin, while IRAM (Instruction RAM) saturation (99.99%) reflects a normal architectural behavior of the ESP32-S3 unified memory model rather than a capacity constraint.
Source: crossref · Quality: baseline
Research context
OpenAlex topics: Security and Verification in Computing · Advanced Malware Detection Techniques · Embedded Systems and FPGA Applications
SciVX discovery tags are terminology-based. OpenAlex topics are source-provided classifications.
Affiliations
Department of Automatic Control and Industrial Informatics, Faculty of Automatic Control and Computers, National University of Science and Technology POLITEHNICA Bucharest, RO060042 Bucharest, Romania
References (28)
Show source-provided references
1. Katz, J., and Lindell, Y. (2025). Introduction to Modern Cryptography Revised Third Edition, CRC Press.10.1201/9781003398134 ↗
2. Stallings, W. (2024). Cryptography and Network Security: Principles and Practice, Global Edition, Pearson. [8th ed.].
3. Hu, G. (2010). Study of file encryption and decryption system using security key. 2010 2nd International Conference on Computer Engineering and Technology, Chengdu, China, IEEE.
4. A Security Analysis of Public Key Cryptohraphic Systems Used for Electronic Signature
5. Li, M.H., and Liu, J.Q. (2009, January 15–16). USB Key-Based Approach for Software Protection. Proceedings of the 2009 International Conference on Industrial Mechatronics and Automation, Chengdu, China.
6. Wang, C. (2012). The Solution Design Using USB Key for Network Security Authentication. 2012 Fourth International Conference on Computational Intelligence and Communication Networks, Mathura, India, IEEE.10.1109/CICN.2012.200 ↗
7. Design and Implementation of USB Key System Based on Dual-Factor Identity Authentication Protocol
8. Applied Cryptography and Practical Scenarios for Cyber Security Defense
9. Li, G., and Chen, H. (2010). A new high-level security portable system based on USB Key with fingerprint. 2010 International Conference On Computer Design and Applications, Qinhuangdao, China, IEEE.
10. An, Y., Zhao, B., and Li, Y. (2013). Research on Software Protection Method Based on USBKey. 2013 International Conference on Computer Sciences and Applications, Wuhan, China, IEEE.10.1109/CSA.2013.56 ↗
11. Assessment of Dongle-based Software Copy Protection Combined with Additional Protection Methods
12. A 3D Memristive Cubic Map With Dual Discrete Memristors: Design, Implementation, and Application in Image Encryption10.1109/TCSVT.2025.3545868 ↗
13. Encrypt a Story: A Video Segment Encryption Method Based on the Discrete Sinusoidal Memristive Rulkov Neuron10.1109/TDSC.2025.3603570 ↗
14. Lin, Y., Liao, Y., Zeng, W., Wei, Y., Chen, D., Yuan, X., Li, Y., Erkan, U., Toktas, A., and Zhang, C. (2026). 3D Non-degenerate Hyperchaos: Design, Analysis, and Application in Image Encryption. IEEE Transactions on Consumer Electronics, IEEE.10.1109/TCE.2026.3672135 ↗
15. Thomas, G., Jamaludheen K, J., Sibi, L., Maneesh, P. (2015). A novel mathematical model for group communication with trusted key generation and distribution using shamir’s secret key and USB security. 2015 International Conference on Communications and Signal Processing (ICCSP), Melmaruvathur, India, IEEE.10.1109/ICCSP.2015.7322925 ↗
16. Wang, F., Wang, H., and Chen, X. (2023, January 26–28). Research on access control technology of big data cloud computing. Proceedings of the 2023 IEEE 3rd International Conference on Information Technology, Big Data and Artificial Intelligence (ICIBA), Chongqing, China.10.1109/ICIBA56860.2023.10165326 ↗
17. Electronic User Authentication Key for Access to HMI/SCADA via Unsecured Internet Networks
18. (2018). Platform Firmware Resiliency Guidelines (Standard No. NIST SP 800-193).
19. Rose, S., Borchert, O., Mitchell, S., and Connelly, S. (2020). Zero Trust Architecture.10.6028/NIST.SP.800-207-draft2 ↗
20. Kügler, R. (2026, April 20). CodeMeter® in Virtual Environments. White Paper. 2014. Available online: https://support.buildsoft.eu/wp-content/uploads/2018/07/Wibu-Systems_White_Paper_CodeMeter_in_Virtual_Environments.pdf.
21. (2007). Recommendation for Block Cipher Modes of Operation: Galois/Counter Mode (GCM) and GMAC (Standard No. NIST SP 800-38D). Available online: https://csrc.nist.gov/pubs/sp/800/38/d/final.
22. Krawczyk, H., and Eronen, P. (2026, April 20). HMAC-based Extract-and-Expand Key Derivation Function (HKDF); RFC5869; RFC Editor, 2010. Available online: https://www.rfc-editor.org/rfc/rfc5869.html.10.17487/rfc5869 ↗
23. M’Raihi, D., Machani, S., Pei, M., and Rydell, J. (2026, April 20). TOTP: Time-Based One-Time Password Algorithm; RFC6238; RFC Editor, 2011. Available online: https://www.rfc-editor.org/rfc/rfc6238.html.10.17487/rfc6238 ↗
24. (2026, April 20). Secure Boot v2. Espressif ESP-IDF (ESP32-S3). Available online: https://docs.espressif.com/projects/esp-idf/en/stable/esp32s3/security/secure-boot-v2.html#secure-boot-v2.
25. (2026, April 20). Flash Encryption. Espressif ESP-IDF (ESP32-S3). Available online: https://docs.espressif.com/projects/esp-idf/en/stable/esp32s3/security/flash-encryption.html.
26. Chen, L., Moody, D., Regenscheid, A., Robinson, A., and Randall, K. (2023). Recommendations for Discrete Logarithm-based Cryptography: Elliptic Curve Domain Parameters.10.6028/NIST.SP.800-186 ↗
27. Kong, Y., and Tian, J. (2025). An ECC-Based Anonymous and Fast Handover Authentication Protocol for Internet of Vehicles. Appl. Sci., 15.10.3390/app15115894 ↗
28. Nielsen, J. (1993). Usability Engineering, Academic Press, Inc.10.1016/B978-0-08-052029-2.50007-3 ↗