Abstract
Offloading computing jobs to untrusted clouds poses significant risks to sensitive data processed in those jobs. We present EnCloak, a Trusted Execution Environment (TEE)–based framework that protects the confidentiality and integrity of sensitive data in Java programs executed in untrusted clouds. EnCloak automatically identifies sensitive statements in the program, transforms them into Enclave Instructions (EIs) for safe execution inside a secure enclave named Cloak Enclave, which supports secure execution of EIs and protects sensitive variables and their intermediate states. We implemented a prototype system based on the design of EnCloak and evaluated its feasibility and performance on both CPU-intensive and big-data computing jobs. Our results showed that EnCloak provides end-to-end sensitive data protection while reducing the Trust Computing Base by 360\(\times\), compared with existing works. Additionally, the design of EnCloak, including the sensitive statements transformation, EI design, and the EI runtime design, are language-agnostic and TEE-agnostic, making it transferable to applications implemented in other programming languages and executed on other TEE environments.









Data availability
No datasets were generated or analysed during the current study.
Notes
finalize function became deprecated since Java 9. However, alternative solutions, such as implementing AutoCloseable interface will achieve the same goal.
References
McKeen, F., Alexandrovich, I., Berenzon, A., Rozas, C.V., Shafi, H., Shanbhogue, V., Savagaonkar, U.R.: Innovative instructions and software model for isolated execution. Hasp@ isca 10(1) (2013)
Kaplan, D., Powell, J., Woller, T.: Amd memory encryption. White paper (2016)
Alves, T.: Trustzone: Integrated hardware and software security. Inform. Quar. 3, 18–24 (2004)
Corporation, I.: Intel Trust Domain Extensions. https://software.intel.com/content/www/us/en/develop/articles/intel-trust-domain-extensions.html. Accessed: 2024-07-22 (2021)
Amazon: AWS Nitro Enclaves. Website. https://aws.amazon.com/ec2/nitro/nitro-enclaves/
Microsoft: Azure Confidential Computing. Website. https://azure.microsoft.com/en-us/solutions/confidential-compute/
Cloud, A.: Alibaba Cloud Enclave. Website. https://www.alibabacloud.com/help/en/elastic-compute-service/latest/build-a-confidential-computing-environment-by-using-enclave
Google: Confidential Computing. Website. https://cloud.google.com/confidential-computing
Cheng, P.-C., Ozga, W., Valdez, E., Ahmed, S., Gu, Z., Jamjoom, H., Franke, H., Bottomley, J.: Intel tdx demystified: A top-down approach. ACM Comput. Surv. 56(9), 1–33 (2024)
Baumann, A., Peinado, M., Hunt, G.: Shielding applications from an untrusted cloud with haven. ACM Trans. Comput. Syst. 33(3), 1–26 (2015)
Arnautov, S., Trach, B., Gregor, F., Knauth, T., Martin, A., Priebe, C., Lind, J., Muthukumaran, D., O’keeffe, D., Stillwell, M., et al.: Scone: Secure linux containers with intel sgx. In: OSDI, vol. 16, pp. 689–703 (2016)
Tsai, C.-C., Porter, D.E., Vij, M.: Graphene-sgx: A practical library os for unmodified applications on sgx. In: USENIX Annual Technical Conference, pp. 645–658 (2017)
Priebe, C., Muthukumaran, D., Lind, J., Zhu, H., Cui, S., Sartakov, V.A., Pietzuch, P.: Sgx-lkl: Securing the host os interface for trusted execution. arXiv preprint arXiv:1908.11143 (2019)
Tsai, C.-C., Son, J., Jain, B., Popa, R.A., Porter, D.E.: Civet: An efficient java partitioning framework for hardware enclaves. In: Proceedings of the 29th USENIX Security Symposium (USENIX Security’20) (2020)
Jiang, J., Chen, X., Li, T., Wang, C., Shen, T., Zhao, S., Cui, H., Wang, C.-L., Zhang, F.: Uranus: Simple, efficient sgx programming and its applications. In: Proceedings of the 15th ACM Asia Conference on Computer and Communications Security, pp. 826–840 (2020)
Wang, H., Wang, P., Ding, Y., Sun, M., Jing, Y., Duan, R., Li, L., Zhang, Y., Wei, T., Lin, Z.: Towards memory safe enclave programming with rust-sgx. In: Proceedings of the 2019 ACM SIGSAC Conference on Computer and Communications Security, pp. 2333–2350 (2019)
Wang, H., Sun, M., Feng, Q., Wang, P., Li, T., Ding, Y.: Towards memory safe python enclave for security sensitive computation. arXiv preprint arXiv:2005.05996 (2020)
Ghosn, A., Larus, J., Bugnion, E.: Secured routines: Language-based construction of trusted execution environments. In: Proceedings of the 2019 Usenix Annual Technical Conference, pp. 571–585 (2019). USENIX ASSOC
Wang, H., Bauman, E., Karande, V., Lin, Z., Cheng, Y., Zhang, Y.: Running language interpreters inside sgx: A lightweight, legacy-compatible script code hardening approach. In: Proceedings of the 2019 ACM Asia Conference on Computer and Communications Security, pp. 114–121 (2019)
Anati, I., Gueron, S., Johnson, S., Scarlata, V.: Innovative technology for CPU based attestation and sealing. In: Proceedings of the 2nd International Workshop on Hardware and Architectural Support for Security and Privacy, vol. 13 (2013)
Sardar, M.U., Quoc, D.L., Fetzer, C.: Towards formalization of enhanced privacy id (epid)-based remote attestation in intel sgx. In: 2020 23rd Euromicro Conference on Digital System Design (DSD), pp. 604–607 (2020). https://doi.org/10.1109/DSD51259.2020.00099
Oleksenko, O., Trach, B., Krahn, R., Silberstein, M., Fetzer, C.: Varys: Protecting sgx enclaves from practical side-channel attacks. In: 2018 Usenix Annual Technical Conference (USENIX ATC 18), pp. 227–240 (2018)
Brasser, F., Capkun, S., Dmitrienko, A., Frassetto, T., Kostiainen, K., Sadeghi, A.-R.: Dr. sgx: Automated and adjustable side-channel protection for sgx using data location randomization. In: Proceedings of the 35th Annual Computer Security Applications Conference, pp. 788–800 (2019)
Oh, H., Ahmad, A., Park, S., Lee, B., Paek, Y.: Trustore: Side-channel resistant storage for sgx using intel hybrid cpu-fpga. In: Proceedings of the 2020 ACM SIGSAC Conference on Computer and Communications Security, pp. 1903–1918 (2020)
Lind, J., Priebe, C., Muthukumaran, D., O’Keeffe, D., Aublin, P., Kelbert, F., Reiher, T., Goltzsche, D., Eyers, D., Kapitza, R., et al.: Glamdring: Automatic application partitioning for intel sgx. (2017). USENIX
Ferrante, J., Ottenstein, K.J., Warren, J.D.: The program dependence graph and its use in optimization. ACM Trans. Program. Lang. Syst. 9(3), 319–349 (1987). https://doi.org/10.1145/24039.24041
Sridharan, M., Chandra, S., Dolby, J., Fink, S.J., Yahav, E.: Alias analysis for object-oriented programs. In: Aliasing in Object-Oriented Programming: Types. Analysis, and Verification, pp. 196–232. Springer, Berlin, Heidelberg (2013)
Lhoták, O.: Spark: A flexible points-to analysis framework for java (2003)
Andersen, L.O.: Program analysis and specialization for the c programming language. PhD thesis, Citeseer (1994)
Tripp, O., Pistoia, M., Fink, S.J., Sridharan, M., Weisman, O.: Taj: effective taint analysis of web applications. ACM Sigplan Notices 44(6), 87–97 (2009)
Keidel, S., Erdweg, S., Hombücher, T.: Combinator-based fixpoint algorithms for big-step abstract interpreters. Proceedings of the ACM on Programming Languages 7(ICFP), 955–981 (2023)
Ruf, E.: Context-insensitive alias analysis reconsidered. In: Proceedings of the ACM SIGPLAN 1995 Conference on Programming Language Design and Implementation. PLDI ’95, pp. 13–22. Association for Computing Machinery, New York, NY, USA (1995). https://doi.org/10.1145/207110.207112
LLVM Language Reference Manual; LLVM 22.0.0 git documentation — llvm.org. https://llvm.org/docs/LangRef.html. [Accessed 02-11-2025]
The LLVM Compiler Infrastructure Project — llvm.org. https://llvm.org. [Accessed 02-11-2025]
Debugging LLVM - Rust Compiler Development Guide — rustc-dev-guide.rust-lang.org. https://rustc-dev-guide.rust-lang.org/backend/debugging.html. [Accessed 02-11-2025]
GitHub - goplus/llgo: A Go compiler based on LLVM in order to better integrate Go with the C ecosystem including Python and JavaScript — github.com. https://github.com/goplus/llgo. [Accessed 02-11-2025]
Ye, M., Sherman, J., Srisa-An, W., Wei, S.: Tzslicer: Security-aware dynamic program slicing for hardware isolation. In: 2018 IEEE International Symposium on Hardware Oriented Security and Trust (HOST), pp. 17–24 (2018). IEEE
Hunt, T., Zhu, Z., Xu, Y., Peter, S., Witchel, E.: Ryoan: A distributed sandbox for untrusted computation on secret data. ACM Trans. Comput. Syst 35(4), 1–32 (2018)
Shinde, S., Le Tien, D., Tople, S., Saxena, P.: Panoply: Low-tcb linux applications with sgx enclaves. In: NDSS (2017)
Ménétrey, J., Pasin, M., Felber, P., Schiavoni, V., Mazzéo, G., Hollum, A., Vaydia, D.: A comprehensive trusted runtime for webassembly with intel sgx. IEEE Transactions on Dependable and Secure Computing 21(4), 3562–3579 (2024). https://doi.org/10.1109/TDSC.2023.3334516
Wu, M., Li, Z., Chen, H., Zang, B., Wang, S., Yu, L., Li, S., Song, H.: Towards an sgx-friendly java runtime. IEEE Transactions on Computers (2023)
Yuhala, P., Ménétrey, J., Felber, P., Schiavoni, V., Tchana, A., Thomas, G., Guiroux, H., Lozi, J.-P.: Montsalvat: Intel sgx shielding for graalvm native images. In: Proceedings of the 22nd International Middleware Conference, pp. 352–364 (2021)
Wang, Y., Shen, Y., Su, C., Cheng, K., Yang, Y., Faree, A., Liu, Y.: Cfhider: Control flow obfuscation with intel sgx. In: IEEE INFOCOM 2019-IEEE Conference on Computer Communications, pp. 541–549 (2019). IEEE
Wang, Y., Zou, Y., Shen, Y., Liu, Y.: Cfhider: Protecting control flow confidentiality with intel sgx. IEEE Trans. Comput. 71(9), 2128–2141 (2021)
Oak, A., Ahmadian, A.M., Balliu, M., Salvaneschi, G.: Language support for secure software development with enclaves. In: 2021 IEEE 34th Computer Security Foundations Symposium (CSF), pp. 1–16 (2021). IEEE
Sha, M., Li, J., Wang, S., Li, F., Tan, K.-L.: Tee-based general-purpose computational backend for secure delegated data processing. Proc. ACM Manag. Data (2023). https://doi.org/10.1145/3626757
Djoko, J.B., Lange, J., Lee, A.J.: Nexus: Practical and secure access control on untrusted storage platforms using client-side sgx. In: 2019 49th Annual IEEE/IFIP International Conference on Dependable Systems and Networks (DSN), pp. 401–413 (2019). IEEE
Le Quoc, D., Gregor, F., Singh, J., Fetzer, C.: Sgx-pyspark: Secure distributed data analytics. In: The World Wide Web Conference, pp. 3564–3563 (2019)
Priebe, C., Vaswani, K., Costa, M.: Enclavedb: A secure database using sgx. In: 2018 IEEE Symposium on Security and Privacy (SP), pp. 264–278 (2018). IEEE
Wang, Y., Shen, Y., Su, C., Ma, J., Liu, L., Dong, X.: Cryptsqlite: Sqlite with high data security. IEEE Trans. Comput. 69(5), 666–678 (2020). https://doi.org/10.1109/TC.2019.2963303
Schuster, F., Costa, M., Fournet, C., Gkantsidis, C., Peinado, M., Mainar-Ruiz, G., Russinovich, M.: Vc3: Trustworthy data analytics in the cloud using sgx. In: 2015 IEEE Symposium on Security and Privacy, pp. 38–54 (2015). IEEE
Bagher, K., Lai, S.: Sgx-stream: A secure stream analytics framework in sgx-enabled edge cloud. Journal of Information Security and Applications 72, 103403 (2023). https://doi.org/10.1016/j.jisa.2022.103403
Park, J., Kang, S., Lee, S., Kim, T., Park, J., Kwon, Y., Huh, J.: Hardware-hardened sandbox enclaves for trusted serverless computing. ACM Trans. Archit. Code Optim. (2024). https://doi.org/10.1145/3632954
Sun, Z., Sun, R., Liu, C., Chowdhury, A.R., Lu, L., Jha, S.: Shadownet: A secure and efficient on-device model inference system for convolutional neural networks. In: 2023 IEEE Symposium on Security and Privacy (SP), pp. 1596–1612 (2023). IEEE
Author information
Authors and Affiliations
Contributions
Y.W. contributed to the design and implementation of the research, as well as most of the manuscript writing. B.L. contributed to the formalization of taint analysis. All authors reviewed the manuscript.
Corresponding author
Ethics declarations
Conflict of interest
The authors declare no Conflict of interest.
Additional information
Publisher's Note
Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Rights and permissions
Springer Nature or its licensor (e.g. a society or other partner) holds exclusive rights to this article under a publishing agreement with the author(s) or other rightsholder(s); author self-archiving of the accepted manuscript version of this article is solely governed by the terms of such publishing agreement and applicable law.
About this article
Cite this article
Wang, Y., Liu, B. Encloak: protecting sensitive data in remote computing using trusted execution environments. Cluster Comput 29, 140 (2026). https://doi.org/10.1007/s10586-025-05880-2
Received:
Revised:
Accepted:
Published:
Version of record:
DOI: https://doi.org/10.1007/s10586-025-05880-2