Opened 15 years ago

Closed 15 years ago

Last modified 15 years ago

#1788 closed enhancement (duplicate)

dojo.crypto: huge functionality gaps

Reported by: guest Owned by: Tom Trenka
Priority: high Milestone:
Component: Crypto Version: 0.4
Keywords: Cc:
Blocked By: Blocking:


Good to see that crypto has at least been thought of for Dojo. However, there are huge gaps with the current implementation:

  1. hashing
    • dojo has MD5 and SHA1, but these are cracked and deprecated.
    • dojo.crypto.SHA256 is a stub, and needs to be implemented
  1. symmetric encryption
    • the only symmetric cipher is Rijndael, and this is only a stub. It really needs to be implementation
    • Blowfish would be good to add as well
  1. asymmetric encryption
    • there are presently no modules or even stubs for any of the well-known asymmetric ciphers
    • I would recommend RSA as a minimum, and Diffie-Hellman would be an added bonus
  1. signatures
    • the ability to generate a DSA or RSA keypair locally and publish the public key to the server would be a huge boost to server security. For instance, RPC calls could carry signatures, allowing for a level of added trust from the server (as long as MITM attack scenarios are allowed for)
  1. strong PRNG
    • I wouldn't trust browser javascript engines' pseudo-random number generation as far as I could kick it. IMHO, dojo.crypto needs a set of PRNG functions allowing the client programmer to source different types of entropy, such as mouse movements, keyboard input, date/time etc, and assert a level of control over the true randomness
  1. overall
    • a good minimal core of encryption capabilities in dojo would allow a level of security for non-https client server connections which could even exceed normal 128-bit SSL security. In situations where out-of-band key exchange is an option, dojo's crypto could offer adequate deterrence against all but the best resourced attackers
    • are there any other javascript crypto toolkits that are published with a license which would permit their code to be appropriated into Dojo?

Change History (2)

comment:1 Changed 15 years ago by Tom Trenka

Resolution: duplicate
Status: newclosed

Thank you for the filing of this, but if you'd looked at both the Dojo blog and other outstanding tickets for Trac, you'll see that I'm covering the majority of these enhancements for 0.5, with more planned for later releases.

Closing this in favor of the three other tasks I've already assigned myself.

comment:2 Changed 15 years ago by Tom Trenka

Sorry, a few other things to answer:

  1. Blowfish (both EBC and CBC modes) has been with Dojo since 0.2.
  1. There are no other full-blown JS crypto toolkits; there are examples in the ether of some specific algorithms, some of which have made it to Dojo already (both MD5 and SHA-1 are ported from Paul Johnstone's code).
  1. I would not trust JS's pseudo-random generator either, but I don't know that a browser environment is the best place to be creating keys using various methods of generating random noise. In particular I'm trying very hard to not make dojo.crypto dependant on a specific environment. So for now various methods of entropy generation will be on the back burner.
  1. There are some possible legal issues involved with creating strong crypto here; we're pretty sure it's not a real issue (U.S. Export rules and all that) but we're taking a closer look at it.
Note: See TracTickets for help on using tickets.