JavaScript and Crypto

For many budding cryptographers or even seasoned veterans of the
crypto struggles of recent decades, putting ideas into simple practice
remains daunting. I've used several programming languages that allow
reasonable looking applications however many do not encourage
appearance excellence.

For current studies, I recommend JavaScript because of several
reasons: Open Source, Universality, Moderate Power, and Immediate
Use. JS has certain limitations at this writing that should be
understood. A few of them are worth mentioning: First, external files
cannot be automatically stored but JS has easily incorporated
clipboard access that can facilitate moving information into or out of
the browser page with the application; second, an existing JavaScript
can be carefully customized; third, just saving a page can make it
usable offline; and fourth, JS implementations can be easily spread to
others via web pages which can also serve as instructional examples.

Doing an application with no errors and/or known limitations is still
somewhat of an art but good results can be their own reward. See what
others have done, learn by example and get a good reference book or
two on JavaScript. Know that many examples on the web are faulty and/
or use hidden information to work; do not be disturbed when finding
sneaky abuses in examples; you should try to be better than that
yourself. Write code that might be understood with some helpful
comments included. Be ready to correct mistakes and answer questions.
Save backup developing versions of you work for reference. If you have
programmed before, some of these reminders are old but if new to this
type of thing, you can do it if you try and learn to write simple
browser pages as well for a multitude of other reasons.

There are important handicaps with JavaScript: The language syntax can
be elusive if you are insufficiently dedicated, misleading to the
uninformed, and not forgiving; as mentioned before, there is the
external file problem; also, page display and some capabilities may be
slightly different with different browsers and user page settings;
and, many good algorithms are not yet written in JavaScript. There
are limitations but I see the positives outweigh the negatives for
putting some crypto ideas quickly into a working and fun format.

Relevant Pages

  • Re: form field/spreadsheet question
    ... There is no compiler for Javascript, ... This is why it is important to know where implementations differ ... which is used with programming languages. ...
  • Re: Should I learn C before Java ?
    ... Should I jump right into Java, or is it better to learn ... You're right about JavaScript and Java being completely different ... whatever opinions you have on programming languages. ... discharging that responsibility. ...
  • Re: S/KEY alternative
    ... Obvious ways with no public-key crypto in the javascript include: ... TLS ... Finally I don't see what the big deal is about public key. ...
  • Re: Javascript error
    ... This is the general group for .NET programming languages, however if you're having problems browsing webpages due to javascript errors - just turn off javascript debugging in your browser. ... nothing to do with the Windows OS. ...
  • Re: S/KEY alternative
    ... Kent Briggs writes: ... Whenever someone says they want to do crypto in javascript, ... interactivity. ...