JavaScript stream encryption implementation?

Are there any free streaming cipher options available for JavaScript?

Particularly interested in HC-128, Salsa20 / 12 or SOSEMANUK, as they are recommended by the eSTREAM Project

+4
source share
3 answers

Section D Symmetric cryptography in Javascript refers to the โ€œJavascript implementation of Salsa20 / 12,โ€ but I cannot find an implementation on their github repo .

We compared Javascript AES to the Javascript Salsa20 / 12 implementation [20], one of the fastest eSTREAM ciphers. The native x86 implementation of Salsa20 / 12 is about 5 times faster than the native implementation of 128-bit AES. Surprisingly, Table VII shows that when both algorithms are implemented in Javascript, Salsa 20/12 is comparable in speed to AES. We believe that this discrepancy is mainly due to the lack of Javascripts of 128-bit SIMD instructions or 64-bit registers, and, secondly, due to the larger state of the Salsa20 / 12s spilling into memory.

+1
source

This version of Kevin Hackanson had in mind: https://gist.github.com/dchest/4126510 . It has pretty decent I / O bandwidth (110 MB / s) and seems to fit the letter specification. However, I did not test it, since I do not have a link to check it, except that we look at ops and compare them with RFC ... so use at your own risk!

+1
source

I'm not sure about any JavaScript implementations, but if you have an implementation on the server, you might consider sending it to your server through an ajax request (via https) and get the result as an answer. :)

0
source

Source: https://habr.com/ru/post/1305525/


All Articles