Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: bitwiseshiftleft/sjcl
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: master
Choose a base ref
...
head repository: reardencode/sjcl
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref
  • 5 commits
  • 5 files changed
  • 1 contributor

Commits on Feb 6, 2012

  1. Add MD5 hash algorithm

    This implementation is pretty cleanroom based on the spec.  I focused
    more on code size than on speed and even with needing to byteswap it's
    still noticeably faster than SHA1.  It should be noted that I knew
    nothing about hash algorithms before starting this, I just didn't like
    the existing implementations of MD5 in JS and none of them fit into SJCL
    neatly.
    reardencode authored and Brandon Smith committed Feb 6, 2012
    Configuration menu
    Copy the full SHA
    3b32366 View commit details
    Browse the repository at this point in the history
  2. MD5: Incorporate feedback from bitwiseshiftleft

    Inline rotate left (_RL).
    Forget about safe_add (_A).
    Move looping inside _BS.
    Don't swap and then unswap length bytes.
    Cut out 12 array lookups per block.
    Total speedup 56->39ms for the test.
    reardencode authored and Brandon Smith committed Feb 6, 2012
    Configuration menu
    Copy the full SHA
    3dac54d View commit details
    Browse the repository at this point in the history
  3. MD5: Compute rather than store constants

    Turns out javascript's math functions can quickly make most of the MD5
    constants rather than having the table in there.
    reardencode authored and Brandon Smith committed Feb 6, 2012
    Configuration menu
    Copy the full SHA
    8d46817 View commit details
    Browse the repository at this point in the history
  4. MD5: Bug fixes and speedups

    Found a bug with inputs > 1316 characters, fixed with an |0
    Inlined the outer MD5 function.
    reardencode authored and Brandon Smith committed Feb 6, 2012
    Configuration menu
    Copy the full SHA
    f9bf6e7 View commit details
    Browse the repository at this point in the history
  5. MD5: Improve speed and size

    Thanks to
    https://github.com/valums/V.Framework/blob/master/V.Security.js
    
    Precalculate less, use less function calls and less array lookups.
    
    25% smaller, 10-15% faster.
    reardencode authored and Brandon Smith committed Feb 6, 2012
    Configuration menu
    Copy the full SHA
    487b8b0 View commit details
    Browse the repository at this point in the history
Loading