Opened 14 years ago

Last modified 12 years ago

#5310 closed task

Integrate jsbn BigInteger library — at Initial Version

Reported by: guest Owned by: anonymous
Priority: high Milestone: 1.4
Component: Dojox Version: 0.9
Keywords: Cc: [email protected]
Blocked By: Blocking:

Description

This ticket tracks the progress of the integration of the jsbn large-integer JavaScript math library. The BigInteger portion consists of the following source files:

This code was originally split into two pieces because the first part contained just enough code to perform RSA encryption with small exponents. The second part contains most of the operations one expects from a general-purpose large number math library.

Other source files that may be of interest:

RSA (encryption only), only requires "jsbn.js" for minimal download time. Supports pkcs1 padding. Uses "SecureRandom" from "rng.js" to generate the random pad.

RSA (remaining portions, including decryption and keygen). Also uses "SecureRandom" from "rng.js" for randomness in keygen. No signing support, since that requires hashing, but it wouldn't be too hard to add if needed.

Simple entropy collector and RNG frontend. Gathers a bunch of entropy from various sources like event timing and native sources (this needs some review and improvement), puts it in a pool, and seeds the RNG backend. Afterwards, it calls into the backend to get the actual random bytes. This way it is algorithm-independent - one can use ARC4 for small size or maybe SHA1-based if your application already needs it and you want to reuse algorithms.

A simple, small implementation of the "ARC4" algorithm to serve as a backend for "rng.js". Not sure if Dojo has this already in its crypto toolkit.

Base64 implementation. I would guess Dojo already has one of these but I thought I'd mention it anyway for completeness.

Change History (0)

Note: See TracTickets for help on using tickets.