salt

Generating a secure cookie token to store persistently

可紊 提交于 2019-12-05 04:46:25
问题 I am trying to create a login and register page for my website. I am looking to use cookies in order to track a users session however I'm trying to implement it in the most proper and secure way. I've tried looking at tutorials and forums but most of them are outdated and use techniques that people comment are not secure. I understand tokens needs to be randomly generated and encrypted so I found one response that suggested to use a MessageDigest on UUID. But I found more articles suggesting

Unique Salt per User using Flask-Security

久未见 提交于 2019-12-05 04:22:55
After reading here a bit about salting passwords, it seems that it's best to use a unique salt for each user. I'm working on implementing Flask-Security atm, and from the documentation it appears you can only set a global salt: ie SECURITY_PASSWORD_SALT = 'thesalt' Question: How would one go about making a unique salt for each password? Thanks! edit: from the docs on Flask-Security, I found this, which seems to again suggest that this module only uses a single salt for all passwords out of the box. flask_security.utils.get_hmac(password) Returns a Base64 encoded HMAC+SHA512 of the password

PHP crypt and salt - more clarification please

拥有回忆 提交于 2019-12-05 02:52:56
I was here yesterday and got some really great answers. I took what I got and put together, what I think will be a fairly secure algorithm. I'm having a problem using blowfish with a for loop that generates the salt. I'm using base64 characters and a for loop to get a random string. I want to take this generated string and insert it into the crypt function as the salt. Because the documentation about blowfish is so sparse and the PHP docs don't really even mention it, I'm sort of stabbing in the dark here. The really strange thing is if you run this code the way it is now, it will not fail.

What is the point of salt and hashing if database is accessible?

五迷三道 提交于 2019-12-05 02:45:58
I just learned the concept of hashing ("Hey! don't forget the salt!") and using salt to make the password secured. Hashing it is a one way encryption (actually not encryption but hashing) so it cannot be reversed engineered. Salting is prefixing or appending randomly created values to the password before hashing 'coz the problem in hashing (just hashing) is, some genius has provided a hash table of words from the dictionary so that they'll just compare the hash from that dictionary to the user's table from the database to login - W-wait? did I say table from the database? So it means somebody

How does salt work in Rails' has_secure_password

℡╲_俬逩灬. 提交于 2019-12-04 23:45:24
From what I understand from salting to make an encrypted password more secure, I would generate a random number (the salt) and store it along side the hashed password, in the user record (for example.) I would concatenate the salt with the plaintext password and then encrypt it (hash). The resulting hash would be much more difficult to crack. This process would be repeated to verify the password. Looking at has_secure_password and bcrypt_ruby (disclosure: I am not a security expert) I don't see how that is done, as the only thing stored in the user record is the hashed password. Where's the

comparing salt and hashed passwords during login doesn't seem work right

可紊 提交于 2019-12-04 20:55:51
I stored salt and hash values of password during user registration... But during their login i then salt and hash the password given by the user, what happens is a new salt and a new hash is generated.... string password = collection["Password"]; reg.PasswordSalt = CreateSalt(6); reg.PasswordHash = CreatePasswordHash(password, reg.PasswordSalt); These statements are in both registration and login.... salt and hash during registration was eVSJE84W and 18DE22FED8C378DB7716B0E4B6C0BA54167315A2 During login it was 4YDIeARH and 12E3C1F4F4CFE04EA973D7C65A09A78E2D80AAC7 ..... Any suggestion....

ASP.NET password hashing and password salt

蓝咒 提交于 2019-12-04 20:53:30
I'm creating a custom "add user" page in ASP.Net web forms and have hit a problem. I can insert all the data into the membership table but the passwords are stored in plain text and the password salt has been hardcoded. How do i go about hashing the passwords so that users can log in (as the membership framework checks for a password hash and not a clear text password). Also, is the salt completely random or is it linked to the password hash somehow? Any help would be greatly appreciated, Marc <membership defaultProvider="SqlProvider" userIsOnlineTimeWindow="15"> <providers> <clear /> <add

Spring Security 3: Salting password issue

妖精的绣舞 提交于 2019-12-04 19:16:19
问题 I have got an simple application made in which I am able to register users and authenticate them. I've got the passwords encoded using and successfully able to authenticate them. I am using Spring 3, Spring Security 3 and Hibernate 3 in my application. Now I want to salt their passwords with the ID of the user but I am not able to achieve this functionality. Could someone help me achieve it? I've been trying to do it for quite some time but ain't able to get it done. Here is the code I've got

PHP storing password with blowfish & salt & pepper

本秂侑毒 提交于 2019-12-04 19:02:52
I want to store secure user passwords in a MySQL database with PHP. How can I make it better? My Class: private static $algo = '$2a'; private static $cost = '$10'; private static $pepper = 'eMI8MHpEByw/M4c9o7sN3d'; public static function generateSalt($length) { $randomBinaryString = mcrypt_create_iv($length, MCRYPT_DEV_URANDOM); $randomEncodedString = str_replace('+', '.', base64_encode($randomBinaryString)); return substr($randomEncodedString, 0, $length); } public static function generateHash($password) { if (!defined('CRYPT_BLOWFISH')) die('The CRYPT_BLOWFISH algorithm is required (PHP 5.3)

PasswordDeriveBytes(.net 2.0) for iPhone

孤者浪人 提交于 2019-12-04 15:51:46
I want to use PasswordDeriveBytes(RSA PBKDF1) of .NET 2.0 within iPhone. How could i achieve the same exact implementation? Are there any methods or libraries for it? I especially want it for using a salt. Thanks Since MS implementation is not totally following the PKCS#5 specification the easiest way would be to convert Mono (C#) source code into Objective C. That will get you very close to MS implementation (everything except a very bad bug :-). In any case I suggest you stick to the specification (don't get more bytes that what it's designed to provide). https://raw.github.com/mono/mono