https://github.com/dcousens/habanero
An attempt-limiting, remote pepper provisioning protocol with a bundled Javascript implementation.
https://github.com/dcousens/habanero
crypto cryptograph derivation hmac javascript kdf key node pepper salt
Last synced: 17 days ago
JSON representation
An attempt-limiting, remote pepper provisioning protocol with a bundled Javascript implementation.
- Host: GitHub
- URL: https://github.com/dcousens/habanero
- Owner: dcousens
- License: mit
- Created: 2017-10-17T01:55:56.000Z (over 8 years ago)
- Default Branch: main
- Last Pushed: 2023-10-21T09:07:44.000Z (over 2 years ago)
- Last Synced: 2025-02-26T17:23:07.495Z (over 1 year ago)
- Topics: crypto, cryptograph, derivation, hmac, javascript, kdf, key, node, pepper, salt
- Language: JavaScript
- Homepage:
- Size: 41 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# habanero
[](http://travis-ci.org/dcousens/habanero)
[](https://www.npmjs.org/package/habanero)
An experimental attempt-limiting, remote pepper provisioning protocol with a bundled Javascript implementation.
### WARNING: This protocol has not been peer reviewed - use at your own risk.
## [Protocol](PROTOCOL.md)
## Example
``` javascript
```
``` javascript
let hb = require('habanero/server')
let e = Buffer.from(process.env.HABANERO_SECRET, 'ascii')
// ...
hb.get(e, commitment, P, queryCb, limitCb, (err, result) => {
if (err) return res.status(500).end()
if (result.limited) return res.status(403).end() // optional (information leak)
if (!result.pepper) return res.status(401).end()
res.status(200).json(result)
})
```
## LICENSE [MIT](LICENSE)