Home > Published Issues > 2025 > Volume 20, No. 6, 2025 >
JCM 2025 Vol.20(6): 681-693
Doi: 10.12720/jcm.20.6.681-693

Evaluating Legacy and Modern Cryptography on the Web: RSA, Hybrid AES and Ed25519 in Wasm and JavaScript

Imad Buljić1, Esad Kadušić2, Nataša Živić3,*, and Elmin Marevac1
1Polytechnic Faculty, University of Zenica, Bosnia and Herzegovina
2Faculty of Educational Sciences, University of Sarajevo, Bosnia and Herzegovina
3Faculty of Digital Transformation, Leipzig University of Applied Sciences, Germany
Email: imad.buljic.22@size.ba (I.B.); natasa.zivic@htwk-leipzig.de (N.Z.); ekadusic@pf.unsa.ba (E.K.); elmin.marevac@unze.ba (E.M.)
*Corresponding author

Manuscript received May 10, 2025; revised August 5, 2025; accepted August 13, 2025; published November 11, 2025.

Abstract—This paper presents an extended performance comparison of browser-side cryptographic primitives implemented in WebAssembly (Wasm) and JavaScript. Building on our original RSA PKCS #1 v1.5 benchmark, we introduce two widely deployed patterns: a hybrid Advanced Encryption Standard-Rivest-Shamir-Adleman (AES–RSA) model reflecting real-world handshake-plus-bulk encryption workflows, and the Ed25519 elliptic-curve signature scheme evaluated across four variants (pure JavaScript, WebCrypto, Wasm non-batch, and Wasm batch). Metrics including single-operation latency, 1 000-iteration throughput, signing time, and verification time were measured under identical Docker-isolated conditions. Results confirm that Wasm consistently outperforms JavaScript in raw computational tasks, particularly decryption and signing, due to its pre-compiled binary format and low memory overhead. However, JavaScript leverages Just-In-Time optimisations to achieve comparable performance during long iterative workloads, making it a viable option for general-purpose applications. Extending the study to Ed25519 reveals that Wasm batch verification delivers the highest throughput, while WebCrypto provides a balanced compromise between ease of use and speed. The hybrid RSA–AES experiment demonstrates that asymmetric cost is amortised once AES-GCM secures the data channel, shifting the performance bottleneck to symmetric operations. These results underscore the applicability of Wasm in latency-critical or resource-constrained environments and provide actionable guidance on when to prioritise native-speed Wasm modules, JavaScript WebCrypto APIs, or mixed pipelines. The dataset and benchmarking framework are released as an open benchmark to support further research into secure, energy-aware web-application design.


Keywords—WebAssembly (Wasm), JavaScript, RSA PKCS#1 v1.5, Ed25519, Advanced Encryption Standard (AES), cryptography, encryption, decryption, performance comparison, cybersecurity, real-time threat analysis, cross-platform security


Cite: Imad Buljić, Esad Kadušić, Nataša Živić, and Elmin Marevac, “Evaluating Legacy and Modern Cryptography on the Web: RSA, Hybrid AES and Ed25519 in Wasm and JavaScript," Journal of Communications, vol. 20, no. 6, pp. 681-693, 2025.


Copyright © 2025 by the authors. This is an open access article distributed under the Creative Commons Attribution License which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited (CC BY 4.0).

Article Metrics in Dimensions