Passwords are secret keys which human beings can memorize.
26
votes
2answers
1k views
What makes a hash function good for password hashing?
Using a cryptographic hash to store e.g. passwords in a database is considered good practice (as opposed to storing them plaintext), but is subject to attacks on said cryptographic hash, assuming the ...
16
votes
6answers
894 views
Is there a secure cryptosystem that can be performed mentally?
I, myself, do not plan on getting into a situation where I would be unable to use a computer in order to communicate securely. However, I can think of many practical situations in which mental ...
15
votes
3answers
672 views
Is using slow password hashing on the client side easier attackable than on the server side?
As we know, one should use a slow password hashing algorithm instead of a fast one for storing passwords, to hinder brute force attacks when the database is compromised. The problem with this is that ...
15
votes
3answers
226 views
What differentiates a password hash from a cryptographic hash besides speed?
I understand that password hashes like bcrypt have the principal property of taking a long time to run, but I'm wondering what if anything about password hashes make them superior to merely running a ...
14
votes
3answers
5k views
How should I calculate the entropy of a password?
If part of the password is a whole regular English word, does the entropy of that part depend on the number of English words in existence, the number of English words known by the choosing algorithm, ...
13
votes
1answer
383 views
Is this password migration strategy secure?
I want to upgrade the security of some existing databases of users' authentication tokens strictly for the purpose of making sure that if the database is stolen, attackers will not be able to guess ...
10
votes
5answers
632 views
Why does PBKDF2 xor the iterations of the hash function together?
The definition of PBKDF2 states that I obtain a derived key* by calling a pseudorandom function a bunch of times recursively:
...
8
votes
4answers
1k views
How can rainbow tables be used for a dictionary attack?
I'm putting together a password policy for my company. I very much want to avoid requiring complex passwords, and would much rather require length.
The maximum length I can enforce is 14 characters. ...
8
votes
2answers
355 views
Do I have to have a different salt for each password?
Should I use a different salt for each password?
In my system, there are no user names, only passwords. When a user logins in, he types in one or more passwords and the server compares the results ...
7
votes
7answers
662 views
How can I improve a password generation scheme based on a shared secret and URL?
I currently use the following method to generate a different password on every website I have to login:
password = SHA1 ( mainPassword . domainName . number )
...
7
votes
2answers
546 views
How should I store passwords that need to be available in plain text?
Suppose I need to store login information for a third-party website for a few users, how would I go about doing it?
Since I am logging into a third party website, I need the password in plain-text, ...
6
votes
2answers
335 views
Is bcrypt better than GnupPG's iterated+salted hashing method?
GnuPG has slow hash built-in in form of iterated+salted S2K.
Does it have disadvantages in comparance with bcrypt or scrypt? Is GnuPG's slow hash method easily automated in GPUs?
6
votes
2answers
375 views
Hash decrypts key, key decrypts cipher… why?
I noticed recently that a couple of pieces of encryption software (TrueCrypt being one of them) don't directly use a hash of the password as the key for the block cipher. Instead, they generate a ...
6
votes
1answer
628 views
How does HOTP keep in sync?
My understanding of HOTP is that each password is unique and based on a counter.
$$PASSWORD = HOTP_1(K,C)$$
Where $C$ is an incremental counter.
What I wish to know, is how you keep the client ...
5
votes
3answers
1k views
SHA1 usage for passwords, alternatives and advantages?
My application can authenticate via openid and oauth (facebook, twitter, etc) and also with its own authentication system. I previously switched hashing from MD5 to SHA1 and during migration I had to ...
5
votes
5answers
236 views
In storing passwords in a database should I use a per-application salt in addition to a per-secret salt?
Assuming that the salts are sufficiently long (16 random chars) is there any advantage in using a per-application salt in addition to a per-secret salt when storing hashed passwords in a database?
...
5
votes
2answers
1k views
Use of salt to hash a password
In a few implementations of hashed passwords, I have seen that the length of the random salt is chosen to be, say, 10 or "some constant". Is there any specific reason why the salt is chosen to have a ...
5
votes
3answers
168 views
Stretching passwords for encrypting small files
I would like to know how to store a sensitive file; a credential of sorts. I want to password-protect it, obviously. It would be appropriate - in my application - to prompt the user for the password ...
5
votes
2answers
131 views
Can the hash of one message be used to make it easier to find the hash of a very similar message?
Background:
I am trying to get an understanding of using a hash of a passphrase as a secret.
Example:
...
4
votes
2answers
739 views
Is there a way to make RC4 (ARCFOUR) secure, or is it completely broken?
I need a method to authenticate a process with another in order to establish interprocess communication between them, to prevent malicious processes from trying to hook onto the system. Currently I ...
4
votes
3answers
207 views
Initialize a PRNG with a password
Let's assume that we have a secure PRNG. Is it "safe" to initialize it with password, or seed based on a password like SHA256(password).
If yes, is it "safe" to generate as RSA or DSA key from it? If ...
4
votes
2answers
187 views
Do MD5's weaknesses affect Oplop?
Oplop is an algorithm that generates account-specific passwords from a master password and user-chosen nickname (typically username@domain). From the website:
Concatenate the master password with ...
4
votes
4answers
213 views
How is it possible to parallelize a hashing function to crack an iteratively hashed password?
Suppose I have an algorithm that relies on multiple iterations of a hash function like SHA1 to slow down an attacker trying to bruteforce a hash.
...
4
votes
4answers
197 views
Could a very long password theoretically eliminate the need for a slow hash?
Before I provide details, I want to clarify that I am not looking to implement this practically, but I'm only asking to get a better understanding.
The way I currently understand it, we use slow ...
4
votes
3answers
618 views
Do I have to recompute all hashes if I change the work factor in bcrypt?
The well-known article about why we should use bcrypt for hashing passwords mentions the work factor - some parameter to the algorithm that determines how long one hashing should be in terms of number ...
4
votes
1answer
213 views
Why does SRP-6a use k = H(N, g) instead of the k = 3 in SRP-6?
I've been reading up on the Secure Remote Pasword protocol (SRP). There are a couple different versions of the protocol (the original published version being designated SRP-3, with two subsequent ...
4
votes
4answers
489 views
How can I validate a hashed password if all I have is another hash?
The Scenario
I have a client-side web application that bounces requests against a server-side API. For the sake of simplicity, every request must pass a username and password. This is similar to ...
4
votes
2answers
171 views
Can I use a key-derivation-function as the hash function H in SRP?
In the Secure Remote Password Protocol, the verifier must be stored on the server. In the case of a server compromise, an attacker could obtain these verifiers. If nobody reused passwords, this ...
4
votes
1answer
363 views
How is BCrypt secure when it uses a static dataset for blowfish hashing?
I'm planning on using this Javascript BCrypt implementation, but as you can see in the code, it uses a 4KB precalculated dataset for the P and ...
4
votes
1answer
80 views
How to generate a key using any m passwords out of total n?
My application requires an AES-256 key K for some secure operation. In order to avoid saving this key in application, I have implemented following scheme:
There ...
3
votes
2answers
230 views
If Bob steals Alice's private key, how exactly would he read her encrypted documents?
So Bob grabs Alice's secret key when she isn't looking and her encrypted files, doesn't he need to know her passphrase to read her files?
What I am reading is that no he does not need it but as far ...
3
votes
2answers
141 views
Can a “pattern” in a series of passwords be detected from their hashes (and maybe a single raw password)?
Let's say I'm a lazy user of a system with annoyingly frequent password change policies. I may have a "good" password I used initially that is only used for this system but since I have to change it ...
3
votes
3answers
840 views
Simple/beginner level explanation of salt
I'm a beginner to cryptography and looking to understand in very simple terms what salt is, when I might need to use it and why I should/should not use it. Can anyone offer me a very simple and clear ...
3
votes
1answer
224 views
What's the reason for applying the hash twice when hashing with salt?
One of the typical approaches to computing a salted hash is this:
hash(salt+hash(secret))
where hash is something like SHA-256 hash function - taking any size ...
3
votes
2answers
158 views
Crypto USB Devices - where is the PIN/Password stored?
I am currently looking at the security of cryto USB drives for storing x509 certificates. I have one in possession currently. It can be read/written to using the Microsoft Crypto APIs. Anytime one ...
3
votes
1answer
114 views
Using an MD5 hash as a password
Suppose Alice is using a password prompt that only accepts up to 32 characters for any particular password.
Memorization of long strings of random characters is not one of Alice's strengths, so she ...
3
votes
1answer
167 views
Exhausting the entropy of a hash function
In the case of password storage, consider the following:
I have an idea that one can exhaust the entropy of input to the MD5 function by using a 128 bit random value as the password (indeed, any hash ...
3
votes
2answers
398 views
How did LinkedIn “salt” all their passwords?
First, just to make sure I understand "salting" correctly:
You randomly generate a string to append to the password before hashing it, so as to increase its length and make precomputed tables much ...
3
votes
2answers
118 views
How is de-synchronisation of HOTP solved?
From RFC 4226 I understand how HOTP generates one-time passwords by incrementing a counter and uses the 'look-ahead' window to try to resynchronise (from this counter), if the user tries a few wrong ...
3
votes
1answer
185 views
A single password manager vs password generator/hash
I have been wondering about the options available for managing passwords. However, they all seem to fail if the master password is compromised (which isn't a big surprise).
On one hand you have ...
3
votes
1answer
178 views
How can one share information using the 'host-proof' paradigm?
I am attempting to make a web-based secure password management and sharing utility, both as an academic exercise and to fully understand and feel safe about using it.
I really like the idea of a ...
3
votes
1answer
141 views
Is a changing public truecrypt container secure?
I have a Truecrypt container which I want to synchronise between computers (i.e. different people, that I want to share the data with).
If I used Dropbox for synchronisation and someone downloaded ...
2
votes
4answers
618 views
Webapp password storage: Salting a hash vs multiple hashes?
For security's sake, of course it's blasphemous to store passwords in plain-text; using a hash function and then doing a re-hash and comparison is considered much better.
But, if bad guys steal your ...
2
votes
2answers
174 views
Hashing passwords with a salt - why use different salt for everyone?
Given a database where we have usernames and passwords, we want to secure users' passwords by hashing them. We should not use only username and passwords in this hash, as someone having data from ...
2
votes
2answers
163 views
Adaptive Hash Functions: How to tell how many iterations were used?
If an adaptive hash function like bcrypt or PBKDF2 is used in hashing passwords, the number of iterations used in the hashing process can be configured.
For a penetration tester or a malicious ...
2
votes
2answers
1k views
How exactly would someone crack a private key passphrase?
Lets say for a PGP/GPG pair with a passphrase.
2
votes
1answer
71 views
Rapidly changing passwords?
Suppose you need to authenticate yourself to a program with the password - but the program's source code is public, the program doesn't have access to any private information and all your ...
2
votes
2answers
244 views
Are there public slow-but-strong algorithms out there that resist brute-force attacks better?
I'm reading that AES uses 4x4 bytes (4*4*8 = 256 bits key) matrix for performances matters (since it's a requirement for common standard encryption algorithms), but are there implementations with ...
2
votes
1answer
1k views
How do I store encrypted files on a web server and decrypt them locally?
I want to store files (images) on a public webserver and let users see them if they know a password. The server shouldn't have the unecrypted files and the server can only serve files, not perform ...
2
votes
3answers
424 views
Hash function in PBKDF2
From this excellent answer I learned (correct me if I am wrong) that when writing a block cipher with say key size 128 bit, one has to pad the password given (variable size) so that it becomes exactly ...

