Giter Site home page Giter Site logo

crypto-password's Introduction

crypto-password

Build Status

A Clojure library for securing user passwords using a key derivation function. Supports the following algorithms:

Installation

Add the following dependency to your project.clj file:

[crypto-password "0.3.0"]

Usage

Pick an encryption algorithm, either pbkdf2, bcrypt or scrypt:

(require '[crypto.password.<algorithm> :as password])

Then use the encrypt function to apply a secure, one-way encryption algorithm to a password:

(def encrypted (password/encrypt "foobar"))

And the check function to check the encrypted password against a plaintext password:

(password/check "foobar" encrypted) ;; => true

Defaults

The default options for the key derivation algorithms were chosen based on benchmarks carried on on a AWS t1.micro server running Ubuntu 13.10 (ami-35dbde5c), in March 2014.

On this hardware, the key derivation functions take approximately 200ms to complete with their default options. This is a short enough time to not be an inconvenience for a human being, but long enough to make brute forcing encrypted passwords very costly.

Documentation

License

Copyright © 2021 James Reeves

Distributed under the Eclipse Public License, the same as Clojure.

crypto-password's People

Contributors

ghoseb avatar jdslavin avatar johannesloetzsch avatar meamuri avatar s33dunda avatar vemv avatar weavejester avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

crypto-password's Issues

Salt Support

Do you plan on including salt support?

Correct me if I am wrong, but I believe somebody using this to encrypt user passwords would be vulnerable to a rainbow table attack.

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.