9 releases

Uses old Rust 2015

0.1.2 May 29, 2021
0.1.1 Nov 29, 2020
0.1.0 Jan 21, 2019
0.1.0-rc2 Jul 9, 2018
0.0.4 Nov 8, 2017

#428 in Authentication

Download history 59/week @ 2024-04-01 33/week @ 2024-04-08 33/week @ 2024-04-15 20/week @ 2024-04-22 46/week @ 2024-04-29 13/week @ 2024-05-06 53/week @ 2024-05-13 128/week @ 2024-05-20 71/week @ 2024-05-27 90/week @ 2024-06-03 108/week @ 2024-06-10 97/week @ 2024-06-17 147/week @ 2024-06-24 115/week @ 2024-07-01 115/week @ 2024-07-08 60/week @ 2024-07-15

438 downloads per month

MIT license

92KB
2K SLoC

libpasta - Password Storage Algorithms

Development

Making Password Painless

This library aims to be a all-in-one solution for password storage. In particular, we aim to provide:

  • Easy-to-use password storage with sane defaults.
  • Tools to provide parameter tuning for different use cases.
  • Automatic migration of password hashes to new algorithms.

Introduction

libpasta is designed to be as simple to use as possible. Most users would rather not have to choose which password algorithm to use, nor understand what are the best parameter choices.

Therefore, we take great care to make this all opaque to the user:

    let password = "hunter2".owned();
    let hash = hash_password(password);
    // store hash in database
    // ... time passes, user returns ...
    let password = "hunter2".owned();
    if verify_password(password, &hash) {
        // do something
    }

Comparison

A brief comparison between libpasta and some alternatives can be found in the documentation.

Installation

To build the libpasta system library, simply run make. This outputs a build/libpasta.so file (or system-appropriate filename).

You can also try running make install to automatically move it to the correct location.

The library is generated as a result of building libpasta-capi, which is a C-API wrapper built around the Rust code.

The rest of this README is dedicated to developing the code. For more about the library, and examples, please see: https://libpasta.github.io/ or the documentation.

Roadmap

libpasta is still currently in maintenance mode. The current API is at 0.1.1 and is reasonably stable. But at this time no future improvements are planned.

Contributing

Please feel free to open new issues or pull requests for any bugs found, feature requests, or general suggestions.

We very much welcome any contributions, and simply ask for patience and civility when dealing with any disagreements or problems.

License

libpasta is licensed under the MIT license: License.

Dependencies

~12–16MB
~384K SLoC