Tag Archives: encryption

Demonstrating the RSA Algorithm in JavaScript

The JavaScript code below picks two random two-digit primes, uses them to generate a RSA keypair, then uses that keypair to encrypt and decrypt a simple message. It uses the LargeInteger class introduced in a previous post to handle the … Continue reading

Posted in Uncategorized | Tagged , , , , , | Leave a comment

Concealing a Message in an Image with Steghide

Follow the steps below to embed a concealed steganographic message within an image file and extract it again using Steghide. 1. In any convenient location, create a new directory named “SteghideTest”. 2. Download Steghide. Steghide is a free and open-source … Continue reading

Posted in Uncategorized | Tagged , , | Leave a comment

A Feistel Network Encryption Algorithm in JavaScript

The JavaScript code below implements a Feistel network algorithm, and uses it to encrypt and decrypt some data using a randomly generated key. To see the code in action, copy it into an .html file, and open that file in … Continue reading

Posted in Uncategorized | Tagged , , , , | Leave a comment

Arithmetic with Large Numbers in JavaScript

Most programming languages store very large numerical values using a maximum of 64 bits, which is enough to represent 18 quintillion unique values, which in turn uses about 20 decimal digits of precision. This is obviously plenty for most applications. … Continue reading

Posted in Uncategorized | Tagged , , , | Leave a comment