Comments (12)
If you can find a security flaw and prove it with reproducible tests, I'll give you a Lifetime Access Pass to my "Learn JavaScript with Eric Elliott" courses, including a free autographed copy of "Programming JavaScript Applictaions".
from credential.
Does your business depend on Node apps? Consider offering a cash bounty to add to the Credential prize. Make your apps more secure, and get some sponsorship exposure, as well. =)
from credential.
createSalt = function createSalt(keyLength, callback) {
crypto.randomBytes(keyLength, function (err, buff) {
if (err) {
return callback(err);
}
callback(null, buff.toString('base64'));
});
},
You will need to validate that crypto
's PRNG is also "secure"
from credential.
Thanks @matthiasak - any tips on how to do that? Is there a test suite we can run against it?
from credential.
@matthiasak Do you mean to say the RNG must be a CPRNG?
It'd help to have a link to the Node.js / io.js source.
from credential.
I'm not sure of a test suite, but I'm sure we can find some proof of both the code's existence, and proof that the PRNG is indeed cryptographically secure or sufficiently random enough.
We'd have to do some digging for that. :D
from credential.
I researched all of the libs I could find and found serious security flaws in all of them
Could you please describe the problems you found with the widely-used bcrypt
module? It's what I'm currently using and would like to evaluate switching to credential
, thanks.
Wondering as I also came across http://security.stackexchange.com/a/6415 which says bcrypt, while not perfect, is somewhat better than pbkdf2.
from credential.
I am not aware of any fatal flaw of Bcrypt.
The main reason I chose PBKDF2 over Bcrypt is that at the time, there was more security research available for PBKDF2.
However, the way that most people are using Bcrypt does not allow for a variable work function, which means that as the application ages, passwords become ever more vulnerable to brute force CPU attacks. If you use Bcrypt, make sure that you're including a way to grow work units over time.
from credential.
make sure that you're including a way to grow work units over time
Any standard or recommended way to go about this?
from credential.
Any standard or recommended way to go about this?
There is no standard that I'm aware of, but the time it takes to compute should double every two years to keep pace with Moore's law.
from credential.
@rightaway Here's an on point SO question – Recommended # of iterations when using PBKDF2-SHA256?, and parallel question on Security.SE Recommended # of iterations when using PKBDF2-SHA256?. Those questions have excellent answers, IMO.
The general advise is "as many as you can tolerate". You're probably looking at 300,000 plus nowadays to stay ahead of the curve.
Another alternative is passwordless authentication. The biggest player going down that road right now appears to be Yahoo.
from credential.
👍
Also, big vote for passwordless auth. If hackers manage to steal your db, they can distribute cracking work across hundreds of thousands of pwned server nodes, which would obviously put a bit of a damper on your keystretch strategy, even if you have a high work value. );
Even with the recommended 300,000 iterations, hackers with large botnets and direct access to your db could run half a million tests per second -- too slow to be a serious threat to truly secure passwords, but fast enough to mount a dictionary-aided tests against a huge majority of commonly used passwords.
from credential.
Related Issues (20)
- I can't make the cli work HOT 8
- Verifying with a pre-parsed JSON object HOT 4
- What if an attacker know that I am using this library? HOT 9
- The use of "time" - a weakness worth noting? HOT 13
- Why hash() just return string rather than object? HOT 2
- fix failing CI server
- Does it really needs webpack? HOT 7
- Node v6 deprecation - "crypto.pbkdf2 without specifying a digest is deprecated" HOT 3
- Release v2.0.0 on npm HOT 3
- Support bcrypt hashing method? HOT 1
- performance optimisation HOT 4
- Make errors programmatically processable HOT 7
- Do not encourage people to write security issue in public places HOT 1
- Default number of iterations seems extreme HOT 2
- Due to the large number of iterations, Its consuming the full CPU usage. HOT 7
- Update deps, freshen code, release new major version. HOT 7
- Bad default settings HOT 4
- the 'verify' function takes too much time, about 1.3 seconds HOT 2
- Inconsistent use of bytes length/encodings? HOT 3
- Hash and Verify taking too much time HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from credential.