Logo

dev-resources.site

for different kinds of informations.

Introduction to the Principles of JavaScript Encryption and JavaScript Obfuscation

Published at
10/8/2023
Categories
javascript
obfuscate
encrypt
Author
wangliwen
Categories
3 categories in total
javascript
open
obfuscate
open
encrypt
open
Author
9 person written this
wangliwen
open
Introduction to the Principles of JavaScript Encryption and JavaScript Obfuscation

Introduction to the Principles of JavaScript Encryption and JavaScript Obfuscation

JavaScript encryption, JavaScript obfuscation, and JavaScript obfuscation encryption all refer to the process of encrypting JavaScript code to make it unreadable and thereby protect its integrity.

The principles can be roughly divided into two categories, as outlined below.

The first involves direct character replacement, such as Eval encryption or JJEncode encryption. This approach involves directly processing JavaScript code and is reversible. When executed, encrypted code undergoes decryption algorithms to restore the original code for execution. This is a simple form of encryption obfuscation that is reversible and easy to decrypt, resulting in low security.

The second category differs greatly from the first in that it does not directly analyze and encrypt JavaScript code, but instead performs low-level processing. It first performs lexical analysis and syntax analysis of JavaScript code to convert it into an AST (Abstract Syntax Tree). After obtaining the AST, obfuscation and encryption operations are performed within the AST, and after completing the encrypted AST, the original code is regenerated based on the AST to create a new ciphertext JavaScript code. Professional JavaScript code encryption obfuscation tools, such as JShaman and JScrambler, fall into this category. Obfuscated JavaScript code cannot be understood by humans but can be recognized and executed by machines without undergoing decryption. Therefore, there is no issue with reversing the code through decryption, resulting in high security. This method is widely recognized and used in the industry.

encrypt Article's
25 articles in total
Favicon
Encrypt/Decrypt Data between Python 3 and JavaScript (AES algorithm)
Favicon
HideIPVPN: Unblock, Encrypt, & Explore Freely
Favicon
Encrypt Password Laravel
Favicon
Introduction to the Principles of JavaScript Encryption and JavaScript Obfuscation
Favicon
What is the secure way to store environment variables?
Favicon
Java 01 - Jasypt: Protegendo dados sensรญveis com criptografia.
Favicon
How to encrypt a text using Python (key and text) and decrypt that cipher in JavaScript using the same key.
Favicon
Differences Between HTTP and HTTPS?
Favicon
Managing and sharing secrets in a Git repository with Keybase
Favicon
How To Encrypt And Decrypt String In Laravel 9
Favicon
PGP - Create a Public/Private Key Pair(Part 2)
Favicon
PGP - Introduction Encryption and Decryption (Part 1)
Favicon
๐Ÿ”How to encrypt variables in NodeJS
Favicon
Java - How to Encrypt or Decrypt PDF Documents
Favicon
backup the .env files to git/gist/dropbox in old school way!
Favicon
Protect Python Source Code
Favicon
Python Encrypt Source Code Online
Favicon
Top 15 Modules 2022: Encrypt and Decrypt String Python
Favicon
Email Encryption: What it is, How Does It Work, and How to Encrypt an Email
Favicon
Add Https to Azure Web App with Let's Encrypt
Favicon
Ansible Vault Quick Start
Favicon
Nginx configures free SSL certificate in Windows environment (Letโ€™s Encrypt)
Favicon
Encrypt/ Decrypt PDF Files in Java Application
Favicon
How to use GnuPG for encrypting files on MacOS
Favicon
Protect presentation slides in Java

Featured ones: