A cryptographic hash algorithm is a function which takes a variable size input and produces a fixed size output. The algorithm makes it difficult to predict the output for a given input, find two inputs with the same output, or reconstruct the input from the output.
1
vote
1answer
107 views
Tips on conceiving safe software messaging platform
I have a personal project in mind in which I plan to use cryptography in order to let the users be confident in the fact that, even if all data get's stolen, it would be virtually impossible to crack ...
1
vote
1answer
191 views
How to test distribution of a hash function?
From what I've found, it is generally accepted a cryptographic hash function like SHA-2 has an evenly, randomly distributed output. Is there a way to test this without running through the entire ...
1
vote
1answer
283 views
How to implement order preserving encryption or order preserving hashing
Does anybody know any free implementation of either order preserving encryption or order preserving hashing? I've found some codes like CMPH but I need to dynamically add new DATA and that's why most ...
3
votes
4answers
955 views
How are timestamps verified?
You put an input and the hash value comes as an output then when someone puts the input the hash function it is applied to see if it is the same hash original value is stored in some database , that ...
1
vote
2answers
182 views
Secure Hash Function based on AES
How secure would a hash function be which appends an extra block of 16 zeroed out bytes to the end of the message and then AES-encrypts it with a well-known password (say the first 128 bits of pi) ...
2
votes
1answer
108 views
Is there another resource for Carter-Wegman-style message authentication?
I'm wondering if there are other resources that cover Carter-Wegman style message authentication, besides the sources themselves.
Is there an online text or a book that covers their ideas? I'd ...
4
votes
2answers
192 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 ...
0
votes
2answers
132 views
Is stretching hash several times basically the same as bcrypt?
As I understand it, the main advantage of bcrypt is stretching so it becomes slower to crack overtime. But, is using a "good enough" algorithm (e.g., SHA-2 family) then stretching until it's slow ...
4
votes
1answer
218 views
Why x00 is usually avoided in salt?
In .NET Framework, there is a cryptographic Random Number Generator (RNG) provider which enables to generate a cryptographically strong sequence of random bytes. This provider contain, among others, ...
13
votes
3answers
2k views
Is there a simple hash function that one can compute without a computer?
I am looking for a hash function that is computable by hand (in reasonable time). The function should be at least a little bit secure: There should be no trivial way to find a collision (by hand). For ...
4
votes
1answer
407 views
Is a second preimage attack on MD5 feasible?
What's the practical status of MD5 w.r.t. second-preimage?
Integrity of a piece of data is protected by an MD5 hash, itself assumed genuine. The data (and thus the hash) is known to the adversary. ...
4
votes
3answers
698 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 ...
1
vote
1answer
106 views
Why do we need extra hashing if we could use simpler scheme?
Lets say that we use init vector IV, key K and HMAC key H. Message is M.
Mode of operation is CBC !!!
We usually encrypt as this
...
4
votes
3answers
149 views
Can I jettison MAC if I already have SHA1(M)?
I'm currently using SSL with AES-CBC and HMAC for a file transfer containing string M. Now suppose Alice already knows SHA1(M) (and the adversary does not), and she downloads M from Bob using only ...
2
votes
2answers
180 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 ...
3
votes
2answers
145 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
2answers
152 views
Is a random length-extension worth the effort?
I'm conceiving an application that uses cryptographic tools and concepts for securing data. I know that's difficult and risky, therefore I prefer to ask around before implementing anything.
When ...
4
votes
0answers
90 views
Pseudo preimage for a hash made from a cipher
Consider the Miyaguchi–Preneel construction:
$H_0 = E(0,m_0) \oplus m_0$ (0 here means a vector filled with zeros)
$H_1 = E(H_0,m_1) \oplus H_0 \oplus m_1$
where $E(K,M)$ is a block cipher (for ...
3
votes
1answer
194 views
Memory-hard operations in work-factor hash functions
I'm playing around with work-factor hash functions, and I'm looking for a memory-hard operation to make it resistant to GPU / parallel hardware attacks. I considered a very large (i.e. 64K) s-box that ...
6
votes
1answer
1k views
How does a birthday attack on a hashing algorithm work?
A "normal", brute-force attack on a cryptographic hashing algorithm $H$ should have a complexity of about $2^{n}$ for a hash algorithm with an output length of $n$ bits.
That means it takes about ...
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 ...
4
votes
1answer
191 views
Length of data to hash for PGP
I have finally managed to verify some simple PGP signed message blocks. However, I discovered that for some reason, my implementation limits me to verifying data that is 9-16 bytes long. no less. no ...
6
votes
2answers
350 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?
1
vote
4answers
292 views
Looking for cryptographic secure hash algorithm(s) that produces identical root hash for differently sliced hash list
I have a scenario similar to the one described in Wikipedia: hash list, but with a twist. I'm looking for a cryptographically secure hash function that would create the same root hash for the same ...
2
votes
1answer
144 views
Signing 14 bytes of data
for an embedded device I need to sign a 14-byte string and want to verify that string on the device.
Since there is already an AES-Library on the device, I thought about using the following scheme:
...
4
votes
2answers
244 views
Is the encryption of a hash a good MAC?
At university we were told that it is a bad idea to implement a MAC by simply concatenating a key with the data to sign and to run it through a hash function (e.g. $s = ...
15
votes
3answers
235 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 ...
12
votes
2answers
1k views
“SHA-256” vs “any 256 bits of SHA-512”, which is more secure?
In terms of security strength, Is there any difference in using the SHA-256 algorithm vs using any random 256 bits of the output of the SHA-512 algorithm?
Similarly, what is the security difference ...
3
votes
3answers
252 views
Multiple Hash Functions that work in either nesting
Are there any hashing functions that, if two are used in conjunction (with the same salts) will return the same response regardless of ordering?
I.e. are there hash-functions $H_1$, $H_2$ such that ...
0
votes
2answers
157 views
Idea for user/pass hashing to prevent rainbow tables, would it work?
I'm very new to cryptography (and security in general, for that matter), but I had an idea that I'm sure is very flawed, but is worth asking. If a computer user, online account, etc, needs to verify a ...
2
votes
1answer
170 views
Is there a known vulnerability when using identical key and salt with PBKDF2?
For optimum security, a random salt should be chosen for PBKDF2.
I came across a scenario where I produce a hash of a random file that serves as the "password". Due to the nature of files, this has ...
6
votes
1answer
95 views
Abstracting primitives and modes of operation
I am developing a symmetric crypto library and have reached a roadblock. Looking at block ciphers, it is quite obvious that all block ciphers are trivially abstractable as a simple primitive ...
4
votes
4answers
207 views
Asymmetric algorithm to generate compact unique messages that can be validated
I have a cryptographic problem with the following characteristics:
I need to generate a set of relatively short messages; say 20 bytes in length
The contents of the messages themselves is not ...
1
vote
3answers
213 views
Getting started [closed]
I'm looking for a good place to start in cryptography and places to go to get free books etc on the topic.
I have been looking online but I always get stuck at some point or another. I need something ...
13
votes
2answers
591 views
What do the magic numbers 0x5c and 0x36 in the opad/ipad calc in HMAC do?
Wikipedia lists the following pseudocode for HMAC:
...
2
votes
1answer
95 views
Why are there $ signs in my passwd file?
I am trying to get access to my eReader and I managed to get the passwd file.
...
2
votes
2answers
747 views
Digital Signatures, Standard Hash Functions and MACs
I'm studying Hash functions and Digital Signatures in sequence, and came up with some doubts about their usage.
First of all:
What is the difference between hashing a document and signing it?
And ...
2
votes
3answers
452 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 ...
6
votes
4answers
1k views
Difference between encrypting something and hashing something
What is the difference between encrypting something and hashing something? in what situations would I want one or the other?
1
vote
1answer
192 views
How to represent a 32-byte SHA2 hash in the shortest possible string?
I'm calculating a SHA2 hash of a certain sensitive key value. I need to store files on disk using this hash a directory path prefix. So lets say I hash the key value 150023, I get a 32-byte value ...
3
votes
2answers
403 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 ...
4
votes
2answers
642 views
Is HMAC-DRBG or Hash-DRBG stronger?
Out of the two deterministic random bit generators defined in section 10.1 of NIST SP 800-90 (i.e. based on hash functions), which one is cryptographically stronger?
Hash-DRBG (Section 10.1.1)
...
3
votes
1answer
230 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 ...
4
votes
1answer
224 views
OpenPGP Signature Packet hashed data
RFC 4880 describes the version 4 signature packet, tag 2, as
...
1
vote
1answer
190 views
“Signing” with public key
For this question, the following caveats and assumptions hold:
There exists a 2048-bit RSA key pair used exclusively for signing/verification
The private key is kept completely private
There exists ...
5
votes
3answers
1k views
In the SHA hash algorithm, why is the message always padded?
In the SHA hash algorithm the message is always padded, even if initially the correct length without padding; the padding is of the form "1" followed by the necessary number of 0s.
Why is it ...
6
votes
2answers
251 views
Attacks of the MAC construction $\mathcal{H}(m||k)$ for common hashes $\mathcal{H}$?
Consider a common practically-collision-resistant Merkle–Damgård hash function $\mathcal{H}$ (e.g. SHA-1, RIPEMD-160, SHA-256, SHA-512). We define a Message Authentication Code $\mathcal{C}$
$$(k,m) ...
12
votes
2answers
1k views
Is every output of a hash function possible?
Is every output of a hash function (e.g. SHA1, MD5, etc) guaranteed to be possible, or, conversely, are there any output values that cannot possibly be created from any input? If so, what guarantees ...
9
votes
1answer
185 views
Which MACs can be converted into a secure unkeyed hash function?
It is known that setting the secret key to a fixed, public value does not make MACs like CBC-MAC or GMAC into secure unkeyed cryptographic hash functions that could be used - for instance - for ...
1
vote
0answers
60 views
Applying multiple hash functions to improve security? [duplicate]
Possible Duplicate:
Guarding against cryptanalytic breakthroughs: combining multiple hash functions
I'm a total newb to cryptography but after reading what I've read about it, I had a ...