GithubHelp home page GithubHelp logo

Replacing libsodium-wrappers about paseto HOT 3 CLOSED

panva avatar panva commented on June 18, 2024
Replacing libsodium-wrappers

from paseto.

Comments (3)

panva avatar panva commented on June 18, 2024 1

@javisantos it’s important to use a performing, reputable, recognized crypto implementations.

Ideally, this missing cipher will be added to openssl and therefore also node’s crypto module. Since that’s not the case (yet), libsodium is the second best thing.

from paseto.

panva avatar panva commented on June 18, 2024

Furthermore, testing the bundle size of your fork it's actually higher and has more module dependencies. The crypto implementations of stablelib are pure javascript, as opposed to libsodium's native modules, ergo its slower as well, albeit sometimes within a margin of error.

❯ du -hs pasetowithstablelib 
1.6M	pasetowithstablelib

❯ du -hs paseto 
1.1M	paseto
libsodium V2.encrypt x 10,261 ops/sec ±3.53% (74 runs sampled)
stablelib V2.encrypt x 9,704 ops/sec ±3.11% (78 runs sampled)
libsodium V2.decrypt x 15,632 ops/sec ±2.76% (78 runs sampled)
stablelib V2.decrypt x 14,928 ops/sec ±3.04% (77 runs sampled)

from paseto.

javisantos avatar javisantos commented on June 18, 2024

I was just going to verify my expectation, but you did before :) I'll take into consideration, but then i'll have libsodium-wrappers and stablelib if i import paseto to my stack 🤔 . Thanks for the benchmarks

from paseto.

Related Issues (17)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.