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.
7
votes
2answers
244 views
What is the purpose of using different hash functions for the leaves and internals of a hash tree?
I just learned that the THEX hash tree specification which is widely used in P2P requires that two different hash functions be used: one for the leaf nodes (hashes of input data) and one for the ...
5
votes
1answer
344 views
How does a “Tiger Tree Hash” handle data whose size isn't a power of two?
Constructing a hash tree is simple enough if the data fits into a number of blocks that is a power of two.
...
1
vote
2answers
210 views
How to generate successive stream-cipher keys?
I've identified a weakness in a distributed simulation system I'm looking at, and I'm looking for some advice on how to fix it.
Clients initially negotiate an authentication token with a login server ...
3
votes
2answers
1k views
Difference between “Signature Algorithm” and “Signature Hash Algorithm” in X.509
What's the difference between the "Signature Algorithm" and the "Signature Hash Algorithm" found in an X.509 certificate? Why does it need a "Signature Hash Algorithm"?
Edit:
I'm creating the ...
10
votes
4answers
235 views
Do parts of a hash carry the properties of the entire hash?
When I need to generate unique id's based on some information hashing is typical choice. However, sometimes that id needs to be of a particular size. I've seen a lot of schemes (HMAC-MD5-96 in SSH, ...
1
vote
3answers
297 views
reverse of md5sum
This might be out of ignorance, I apologize, but how complex of a problem might it be to generate a file of size N whose md5sum is X?
For example,
...
1
vote
2answers
188 views
Seeking special-use fingerprinting/hashing algorithm
For a project I wonder if there exists some kind of fixed-size checksumming/fingerprinting function in which based on this fingerprint given data block 1, it is easy to generate more data blocks that ...
1
vote
1answer
254 views
HASH Algorithm for 8 bits MCU
I need to implement the HASH algorithm (MD5 & SHA-1) on an 8 bit MCU. I hear it can only be implemented on 32bit and sometimes 16bits MCU. Is that possible? I will appreciate link where possible. ...
3
votes
3answers
857 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 ...
0
votes
1answer
69 views
How to take SHA-1 safely for my particular case?
Let me ask about my toy passwords generator program X5 which I want to improve.
X5 uses a secret key and a public key to generate a password.Where any public key is supposed to be known to hackers in ...
1
vote
1answer
302 views
How to generate one-time password
Through my reading about the generation of one-time password (OTP) I found that there are many algorithms that generate OTP and they are either based on time such as TOTP or based on mathematical ...
4
votes
4answers
264 views
Are derived hashes weakening the root?
Given a root hash
root = H(plaintext)
and two (or more) derived hashes
h1 = H(salt1 + root)
h2 = H(salt2 + root)
would the ...
1
vote
1answer
161 views
Can one group the SHA-256 outputs depending on partial inputs?
Is it possible to predict a hash key based on half key?
Let's have some example:
I have 100000000 hash results, and they are generated by either
...
3
votes
1answer
136 views
Is a using salt important when creating a hash data validator?
I am creating a service that will return an set of objects, which will be used by multiple systems. At the end of the process, one (or more) of the objects will be sent back to our system for ...
4
votes
2answers
938 views
SHA-256 “midstate”
Recently I've been trying to implement some Bitcoin-related code, and I've stumbled upon a weird concept, a SHA-256 "midstate". Some explanation is given here.
The general concept is that Bitcoin ...
1
vote
1answer
637 views
How does PBKDF1 work?
I need some basic guideline on Password Based Key Derivation Function. PBKDF1 generates a key from password and salt using Hashing algorithm (like SHA1, SHA256, MD5).
What is the step behind this?
3
votes
1answer
176 views
What type of hash functions provides non-malleability of hash digests?
I want to use a hash function for commitments. I don't want an attacker to construct a commitment related to a previously published (but still unopened) commitment.
A simple deterministic commitment ...
0
votes
2answers
332 views
Can md5 be used for encrypting data?
I know that md5 shouldn't be used for password hashing because of collisions and possibility of making dictionary attacks e.g. using rainbow tables. But what about ...
8
votes
5answers
2k views
Are there two known strings which have the same MD5 hash value?
Is there an example of two known strings which have the same hash (MD5) value, i.e. an MD5 collision?
0
votes
2answers
388 views
Salts, how does the script know what the salt is?
I am new to PHP programming and trying to grasp the idea of hashing and encryption for protecting passwords, credit card details and such. I've done a lot of reading about MD5 which I think I ...
6
votes
1answer
273 views
Compressing EC private keys
For reasonable security, EC private keys are typically 256-bits. Shorter EC private keys are not sufficiently secure. However, shorter symmetric keys (128-bits, for example) are comparably secure.
I ...
7
votes
3answers
1k views
What is pre-image resistance, and how can the lack thereof be exploited?
What is preimage resistance, and how can the lack thereof be exploited?
How is this different from collision resistance?
Are there any known preimage attacks that would be considered feasible?
3
votes
2answers
142 views
Does the position of the salt improve its effectiveness when hashing?
Seems most documentation I have read suggests the salt should prefix the value to be hashed. Is this just for consistency, or is the salt more effective when prefixed?
3
votes
2answers
229 views
Malleability of ElGamal and Hashed ElGamal
Question: Suppose A encrypts a number $x$ which indicates her bid on a contract, using ElGamal encryption. Say that the encryption of $x$ produces a ciphertext $c$. Explain how E can modify $c$ to ...
1
vote
1answer
220 views
Verifying the integrity of ciphertext using the cleartext hash?
I want to be able to verify the integrity of a ciphertext by providing the cleartext hash, for this to work it would need to:
$$hash(crypt(cleartext)) = f(hash(cleartext))$$
Where $f$ is an ...
0
votes
1answer
305 views
Creating a hash of XOR'd blocks
Suppose a message $m$ is divided into blocks of length $160$ bits: $m
> = M_1 || M_2 || ... || M_l$ And define $h(m) = M_1 \oplus M_2 \oplus ... \oplus M_l$
Which of the three desirable ...
9
votes
3answers
548 views
Why does the padding in MD5 contain the message length?
I understand the need for padding in MD5. But why do we append the message length to the padding?
I heard it strengthens the hash but how?
Please provide an example if possible and how it applies to ...
-1
votes
1answer
112 views
How to control the output of a hash function to output to specific data according to similarity?
I do not know if the question lies exactly in that field but i'll give it a try unless rejection.
I want to study methods of applying LSH functions to feet in a specific area of digest values. Briefly ...
-2
votes
1answer
301 views
How many possible combinations of input files are possible using a 63-bit length?
I'm trying to calculate how many possible combinations of files there can be using a signed 64-bit file length, but can't seem to find a formula (or I'm using the wrong keywords). For example, the ...
2
votes
1answer
292 views
Hash or encryption function for challenge-response protocol?
Say I have an authentication protocol where the shared secret is never transmitted. The server passes a challenge to the client and the client calculates a response using an algorithm where the ...
3
votes
3answers
627 views
How can I create a fixed length output in my hash function?
I've been recently looking into the creation (and theory) of hash functions, however I just can't figure out how to turn a message into something of a fixed length.
At the moment, my theory of a hash ...
5
votes
1answer
312 views
What is the proper way to use a client nonce?
I've implemented an API for one of my clients, it relies on nonces and a shared secret. The structure:
Client's Site (CS) requests nonce from My App (MA), posting their username
MA verifies the ...
8
votes
1answer
314 views
Is H(k||length||x) a secure MAC construction?
If $H$ is a typical secure hash function, then $(k,x) \mapsto H(k \mid\mid x)$ is not a secure MAC construction, because given a known plaintext $x_1$ and its MAC $m_1$, an attacker can extend $k ...
8
votes
2answers
194 views
Why would you expect to find a collision in a hash function after approximately $\sqrt{n}$ hashes?
I can't get an intuitive understanding of why it's $2^{(\frac{n}{2})}$ and not $2^n$, where $n$ is the number of bits of which the key consists.
8
votes
1answer
279 views
Can one efficiently iterate valid bcrypt hash output values?
bcrypt is an intentionally slow hash algorithm. In my last protocol idea, I wanted to use it to expand a password and then only transfer the bcrypt-hashed password.
An efficient attack on this would ...
7
votes
2answers
317 views
What is a hard-core predicate?
I read this article on Wikipedia: Hard-core predicate.
Still I don't understand what exactly is a hard-core predicate. Is it possible to put this in simple English terminology, and perhaps with a ...
11
votes
2answers
542 views
Is SHA-512 bijective when hashing a single 512-bit block?
It's been said that CRC-64 is bijective for a 64-bit block.
It the corresponding statement true for SHA-2?
12
votes
2answers
329 views
What is the general justification for the hardness of finding preimages for cryptographic hash functions?
Since most cryptographic hash functions are simple, compact constructions does this simplicity impose a limit on the complexity and the size of a function that can generate preimages? That is, given a ...
2
votes
1answer
480 views
Why doesn't preimage resistance imply the second preimage resistance?
Let the preimage resistance be defined as »given a hash value $h$, it is hard to find any message $m$ such that $\operatorname{hash}(m)=h$«, and let the second preimage resistance be defined as »given ...
3
votes
1answer
162 views
Is the last step of an iterated cryptographic hash still as resistant to preimage attacks as the original hash?
Considering a cryptographic hash, such as MD5 or SHA2, denoted by the function $H(m)$ where $m$ is an arbitrary binary string, there is a lot of material available that deals with potential weakness ...
7
votes
7answers
663 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 )
...
3
votes
5answers
505 views
Is there a hash function with 2048bit output?
Is there a publicly available cryptographic hashing algorithm with 2048 bit output?
The standard ones are "only" up to 512 bit (SHA-512, WHIRLPOOL).
(2048 bits are 256 bytes, so it would be useful ...
8
votes
3answers
1k views
How can a random salt for a hash function work in practice?
I understand the theory behind the use salts in hash functions, but when I see it implemented, the implementations always generate the salt on the fly and the salt appears to be different for every ...
6
votes
2answers
249 views
Key Length & Hashing
I need to use a hash function to generate a 128-bit key for a symmetric cipher. The specific cipher is from the eStream portofolio, called Rabbit.
I am using the SRP protocol for authentication (a ...
4
votes
3answers
544 views
Is it feasible to build a stream cipher from a cryptographic hash function?
A few years ago I devised a symmetric-key system that worked like so:
...
7
votes
1answer
1k views
RIPEMD versus SHA-x, what are the main pros and cons?
RIPEMD is a family of cryptographic hash functions, meaning it competes for roughly the same uses as MD5, SHA-1 & SHA-256 do. The Wikipedia page for RIPEMD seems to have some nice things to say ...
10
votes
3answers
823 views
How well does scrypt perform on different architectures / OSes?
The scrypt algorithm seems to be a prominent feature in the "CPU friendly" Bitcoin clones for the proof-of-labor part. I've heard claims that it's relatively slow on Windows and/or Intel compared to ...
10
votes
3answers
1k views
At the current time, is SHA256 the de facto standard for strong cryptographic hashes?
At the current time, is SHA256 the de facto standard for strong cryptographic hashes?
From what I am seeing of more sites utilizing it, I would suppose the answer to this is yes, but would like to ...
2
votes
1answer
115 views
A set of key pairs and one hash to secure them
I have a simple problem: I have a set of users' ECDSA key pairs, and say I want to encrypt them with a simple algorithm. I have access to one variable that uniquely identifies the user, so I hash it ...
12
votes
3answers
873 views
Hashing or encrypting twice to increase security?
Over on the bitcoin forums I asked why the bitcoin client computes SHA-256(SHA-256(x)) as its cryptographic hash for a variety of purposes. The leading theory--since the bitcoin author has ...