Coder Social home page Coder Social logo

Cryptography best practices about vapor HOT 5 CLOSED

vapor avatar vapor commented on May 4, 2024
Cryptography best practices

from vapor.

Comments (5)

tanner0101 avatar tanner0101 commented on May 4, 2024

These are all very valid points. Would you have time to submit a PR that addresses them?

from vapor.

elithrar avatar elithrar commented on May 4, 2024

In addition, something like https://github.com/krzyzanowskim/CryptoSwift may help reduce some maintenance/implementation burden.

Boiling it down into two actions:

  • As @comex touches on, HMAC-SHA-256 would be the way to go for signing cookies
  • Pull 256 bits (32 bytes) from /dev/urandom when you need random bytes. Don't hash it or combine with a timestamp (unless sorting/ordering is a feature you need). base64'ing the output should be enough.

If @comex doesn't have time to pick up the PR I'd be interested, but haven't authored Swift before (plenty of Go, though) so would need to get a dev env. up first.

from vapor.

tanner0101 avatar tanner0101 commented on May 4, 2024

CryptoSwift seems like a great option. I'd be very interested to see a PR implementing this.

Also if you need help setting up a dev environment, we have a lot of smart guys in the Vapor Slack that could help you out wit that.

from vapor.

shnhrrsn avatar shnhrrsn commented on May 4, 2024

+1 for CryptoSwift, using it in a different project and it's solid

from vapor.

tanner0101 avatar tanner0101 commented on May 4, 2024

Added CryptoSwift to the roadmap https://github.com/qutheory/vapor/wiki/Roadmap

from vapor.

Related Issues (20)

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.