JScriptEncrypt

This article was contributed by Tomislav Šereg ( tsereg@net.hr ).

Environment: JavaScript 1.2

Introduction

I appologize for not-so-good English displayed in this text, especially for my "the's" and my "a's" which I still haven't quite figured out. And anything else I was not aware of.

This JavaScript library provides encryption for Web pages using simple, text-oriented method called column transposition. The idea is to write the plain text in block on the row-first bases. The text is then read column-first. The trick is in that the columns are not read from left to right, but in the order specified by the encryption key.

Possibly, some very clever individual familiar with the context of the text being encrypted might guess the original content or, at least, some parts of it. This is why simple transliteration is applied first.

If one is not concerned with goverement spying on them, this method may provide enough secrecy.

This implementation is solely textual, so encrypted text can be easily manipulated and nicely fits inside the page.  Further more, one can change the character encoding of the web page with embedded encrypted text just as any other page. Those that use several charsets (like Windows-1250 and ISO-8859-2) may find this usefull.

If You'll be using this code, please email a link to tsereg@net.hr if appropriate. I would like to see how did You use it.

Contents

Procceed to the Simple Example first.

Then look at the User's Guide so you could understand...

the advanced Address Book Example.

If you want to know how this whole thing was implemented, look at the Technical Specification.

If you prefer to see the source, open security.js file.

Finaly, there is a Practical Guide with comments, problems and solutions I was contacted with.

History

Date Posted: Jun 20, 2000

Aug 4, 2000 - Added answer regarding e-mailing of encrypted text.

Posted to...

This document: http://www.inet.hr/~tsereg/jse/index.html