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.

learn more… | top users | synonyms (1)

0
votes
0answers
31 views

Collision attacks on digital signatures

After reading this document about MD5 collision attacks, I still don't understand how collisions can make digital signatures insecure. In the paper, the researchers created two files with the same ...
3
votes
0answers
35 views

The effect of truncated hash on entropy

Suppose i have a 128 bits random binary string (128 bits of entropy), then i hash it using SHA-256, then i take the first 128 bits of the output hash. Does the taken bit string still have (almost) 128 ...
1
vote
2answers
64 views

Hash function such that fx(hash(s1),hash(s2)) = hash(concat(s1,s2))

First, I'm not a mathematician, so I may express this question awkwardly. Feel free to chuckle. I'm wondering if there exists a hash function h such that for given strings s1 and s2, and string ...
-1
votes
0answers
21 views

cryptographic hash function [on hold]

Consider an ideal cryptographic hash function H : {0, 1}∗ → {0, 1}n, in other words, H takes a string of arbitrary length and returns a string of n bits, and it is assumed that H acts like a “random ...
1
vote
2answers
76 views

What is the best hash for HMAC?

Long question but I am starting to lose sight of all the HASH algo's there are. I know SHAKE128 and 256 are part of the SHA-3 standard but is the SHA3 standard officially released yet? i can only ...
0
votes
1answer
27 views

chaining multiple key derivation functions together

I was looking at PBKDF2, bcrypt and scrypt as options for key derivation; and would like to try using them all together in order to get the cryptographic strength of the strongest one (which seems to ...
5
votes
1answer
356 views

Purpose of expanding then shrinking in SHA-1

What is the purpose of expanding then shrinking in SHA-1? Does it serves any security purposes?
-1
votes
0answers
28 views

Open and Closed Hasing Algorithm [closed]

I have been looking for both open and closed hashing algorithms for over two weeks now. I can't seem to find any that are general and could be applied to any language. I would really appreciate it if ...
1
vote
1answer
118 views

Concatenation of two strong hashes may have striking weakness

For any hash functions $H_0$ and $H_1$, it is easily proved that their concatenation $H_0\|H_1$, defined by $(H_0\|H_1)(X)=H_0(X)\|H_1(X)$, is at least as resistant as the strongest of $H_0$ and $H_1$ ...
0
votes
1answer
64 views

What practical uses can random hash collisions be put to?

Using magic, I've built a machine that instantly generates hash collisions. To try it out, I set the dial to SHA256 and typed in "e7cf3ef4f17c3999a94f2c6f612e8a888e5b1026878e4e19398b23bd38ec221a". I ...
0
votes
0answers
30 views

Weaknesses of truncated hash value [duplicate]

I want to apply one of SHA-2 functions to a plain text and then truncate the hash value into parts and store them into different areas so are there any security implications for truncating the hash ...
2
votes
4answers
124 views

Can we reverse a hash when we know part of the input?

While I read that hashes are not meant to be reversible, but assuming we have part/half of the message/input of a hash? Is there any method that we can use to recover the remaining message via this ...
0
votes
0answers
23 views

Weakness in double hashing? [duplicate]

I remember reading an account of how double hashing (i.e. sha256(sha256(x))) can make some form of communication protocol between Alice and Bob trivially insecure, ...
0
votes
0answers
54 views

Key exchange using hash function

Consider two types of attackers on a key exchange (KE) protocol and subsequent communication between the parties which used this KE instance to establish a secure communication key. Attacker Eve ...
0
votes
2answers
82 views

Self verifying hash algorithm

For quite some time I've been thinking about the idea to construct a hashing algorithm that contains its own checksum value, and thereby can verify itself. With hashing algorithms like SHA1 and MD5 ...
0
votes
1answer
83 views

Problem with testing MD5 collisions

I am trying to test MD5 collisions presented in “Collisions for Hash Functions MD4, MD5, HAVA” (PDF) by Xiaoyun Wang, Dengguo Feng, Xuejia Lai, Hongbo Yu; 2004. I wrote a PHP script to test it, but ...
3
votes
1answer
119 views

Is there a format preserving cryptographically secure hash?

I want a way to 'scramble' strings (like words, names) in a predictable way but I don't ever want to (myself or anyone else) be able to 'unscramble' the strings. I found that perhaps what I am ...
0
votes
2answers
83 views

Will SHA1 or Other Hash Functions Ever Contain Quotes [closed]

I feel foolish asking this, but will the hash generated by SHA-1 or other encryption methods ever have the possibility of containing a quote? Or any other characters that may be escaped such as ", ', ...
0
votes
1answer
126 views

How to compare between two cryptographic algorithms in terms of security? [closed]

How to compare between two cryptographic algorithms (e.g. SHA-1 and SipHash) in terms of security? That is, how could one prove that algorithm X is more secure than algorithm Y?
4
votes
2answers
81 views

Signing Files vs. Signing File Hashes

What are the security pitfalls that may occur by signing a list of file hashes, versus signing individual files? In short, the security trade-offs between: ...
0
votes
0answers
32 views

Pseudorandom function and hash function [duplicate]

What is the difference between a pseudorandom function and hash function ? I have already read the answer in this link What is the difference between a hash function and a pseudorandom function? but ...
0
votes
0answers
26 views

BLAKE2 input parameters [migrated]

Being a newbie, I was reading papers on the recent crop of hash functions and BLAKE2 intrigued me. Then I wanted to play around with the "blake2s" code in the code package. If I were to implement a ...
-2
votes
1answer
63 views

Hashes and Ciphers [closed]

So I'm brand new to cryptography, I'm confused on a few fundamental issues, and my normal avenues of research aren't bearing any fruit. I'm hoping someone can describe the relationship between ...
10
votes
1answer
679 views

Why are the outputs of the md5sum tool and Crypto++'s MD5 different?

Could you please tell me what is the difference of coreutils' md5sum and sha*sum tools (...
2
votes
1answer
56 views

Why is C_digest defined in PKCS#11?

Digesting doesn't require any key and can be performed on the client side. Why does the PKCS#11 token interface standard have a C_digest method? For example, why should I send my data to a PKCS11 HSM ...
-1
votes
2answers
176 views

How to choose an algorithm

I have some understanding of Cryptography and I would like to know if there is a tool or website to help me choose an algorithm based on my own needs (I'm being vague in purpose). I'm looking for a ...
2
votes
2answers
112 views

Using hash for one time pad key

Recently I've been delving into security algorithms, I already knew some of the (easy) math behind AES and RSA and how to and not to implement it. But well, i got a bit bored so i thought I'd just do ...
0
votes
1answer
70 views

Reducing size of hash function

If I have some data I hash with SHA256 as hash=SHA256(data) and then copy only the first 8 bytes of the hash instead of the whole 32 bytes. How easy is it to find a ...
2
votes
1answer
82 views

Hash “Preimage by product” resistance

Let H() be a hash function that achieves collision resistance as well as first and second preimage resistance. Let's equip the output set of H of a multiplicative group structure, more precisely a ...
0
votes
0answers
50 views

Full Domain hash library

I need to know if any of the well-known crypto libraries (openssl, crypto++) supports full domain hash function. If not, what library I can use?
1
vote
0answers
46 views

Crypto hash function vs encryption algorithms

Why is a cryptographic hash function generally faster to execute in software than conventional encryption algorithms such as DES?
0
votes
1answer
122 views

How many attempts does it take to crack a 32-bit password hash with this scenario?

How many attempts does it take to crack (match) a 32-bit password hash from a database of 4 million password hashes? Correct me if I'm wrong, but to crack a 32-bit password hash would take roughly ...
5
votes
2answers
207 views

Anonymous Gravatar Problem

Gravatar is a service that serves avatars for users based on md5(email_address). The hash is embedded on websites, so it's public. One of the problems with this ...
0
votes
1answer
54 views

Hashing - Digital Signing and Trivial Stretching

Two very basic questions: 1. Digital Signing Why is it not possible to just simply replace the hash value from the request? Examples: ...
0
votes
0answers
13 views

Can a tree hash with leaf-size of 1 byte support verification of content with elided ranges, at a cost of at most 2 supplied internal-node hashes?

Perhaps someone can confirm my intuition: A tree hash with leaves of size 1 (for example Blake2 in a tree-hash mode) would of course not be very efficient. But it seems that it might be a suitable ...
2
votes
1answer
64 views

Save the last cycle in GCM GHASH calculation

I need to implement GCM GHASH in hardware, using FPGA. The data bus is 640 bits, so I will use 5 adder/multiplier blocks in parallel. The message size is fixed and AAD is 0. A little example: ...
1
vote
1answer
108 views

Hash function as secure as one-time pad?

We know that the one-time pad is provably secure as a cipher to encrypt some data. Is there an algorithm which does the same just as a hash function? Can we get a provably secure hash function? Maybe ...
2
votes
1answer
150 views

SHA1 Partial Collision

I'm working on a little python script that reads in two fairly similar English sentences (they're in text files - reading them in) and I'm trying to force a SHA1 partial collision (e.g. first 32 bits ...
4
votes
1answer
225 views

How hard is it to find plaintexts whose hashes satisfy $h(a)\oplus h(b)=h(c)$?

Given a cryptographic hash function $h$, for example SHA256, how hard is it to find plaintexts $a,b,c$ such that $$h(a)\oplus h(b)=h(c) \text?$$
2
votes
2answers
81 views

How does BLAKE2 ensure that hash(A) != hash(B) when B = A||0 and both A & B have the same number of blocks?

Suppose I have two arrays : A = a single byte, being zero. B = two bytes, both being zero. B = A||0 (i.e. B starts with A, and differs only by appending a zero byte) BLAKE2(A) != BLAKE2(B) Yet, ...
0
votes
1answer
86 views

How much work is required to detect multiple collisions for a hash function?

Assume an ideal hash function of output size n bits, detecting one collision requires approximately 2^(n/2) evaluations of the ...
0
votes
2answers
98 views

How does RSA padding work exactly?

I've read everywhere online and people say plain text RSA is very unsafe. To make it safe you pad it but no examples are shown anywhere on how to do it. It's explained that random data is added to the ...
-1
votes
1answer
79 views

HMAC-Ripemd-160 in TrueCrypt

I'm wondering if it is still secure. I know TrueCrypt closed its doors but I continue using it because the cryptoaudit didn't find any huge bugs or security issues in TrueCrypt. But I have a bad ...
0
votes
1answer
65 views

Help converting sha256 to 32-bit stream

I need some help with hash value calculation. I am a bit confused by this statement that I found on w3 website on calculation of a DigestValue for xmldsig ( ...
1
vote
1answer
107 views

What kind of attack does the current brokenness of SHA-1 allow?

I understand that the following is becoming feasible, or already is: Find any 2 data (d1 and d2), for which SHA1(d1) = SHA1(d2) However, it is not entirely clear ...
4
votes
3answers
170 views

Hash which can be used to verify one of multiple inputs?

Is there a hash function H1 which, when given inputs a, b, etc., produces output ...
0
votes
1answer
73 views

How to implement the Salsa20 hash function?

I am currently implementing Salsa20 from the specification as an exercise in learning and self-flagellation. I have Sections 1-7 passing the test examples provided. I am now stuck on Section 8, The ...
0
votes
0answers
57 views

Are there any known inverse hash lookups for the zero string?

Just wondering, are there any known inverse hashes / hash lookups in common hashes (md5, sha1, sha2, etc.) for the zero string hash value? (i.e. bytes 0x00 00 00 00 00 ...) Or more specifically, for ...
1
vote
1answer
73 views

Why are cryptographically secure hashes required for digital signing (RSA or DSA)?

I know that a cryptographically secure hashing algorithm is required for proper message signing (SHA-1, or I think SHA-2 is the current suggested algorithm). However, why does the hashing algorithm ...
4
votes
2answers
142 views

Share encrypted files without giving master key

Imagine I have four files I want to encrypt. I have master key, and from that master key I derive four keys, one for each file: ...