Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [hash]

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 find two inputs with the same output or reconstruct the input from the output.

3
votes
3answers
97 views

A hash function for sets that from a hash of a set and a subset of it doesn't reveal the hash of the remaining elements in the set

I'm looking for a function to compute a hash of a set. It needs to satisfy two properties: If someone published a hash $h(S)$ of a set $S$ and a hash $h(S')$ of some subset $S' \subset S$ of it, I ...
0
votes
0answers
15 views

Security implications of an extra inner encrypt for a single block Matyas-Meyer-Oseas hash function

Was giving some thought to simple MMO constructions for fast single block hash functions for things like PQ crypto. There's Haraka, but that's not standard and readily available while simple AES is in ...
1
vote
1answer
52 views

SHA256 message schedule examples

I need some example values for the message schedule stage of SHA256 to test this part of my implementation. If possible in binary, for the string 'abc'.
0
votes
1answer
42 views

How to generate a unique numerical value for an alpha-numeric string?

I need to create a unique numerical value for every alpha-numeric string input. Size of output numerical value can be of any size like 32, 64 128 bits. The input string will always be a mongoID type ...
0
votes
1answer
132 views

What is a fast good-uniformity hash function that if it's seed and it's hash values are unknown, can be strong as cryptographic hash functions?

The hash function is for an application that the input to the hash function is from a user's, hence the user can control the collisions, but the question is that if the collisions, the hash function's ...
2
votes
1answer
76 views

How to encrypt sensitive files in a business application? Is it needed? [on hold]

I'm currently working on a business Java application, and we store sensitive files related to our users. What is the appropriate approach to store them securely? Is it viable to encrypt/decrypt all ...
1
vote
1answer
544 views

If H(m) = 0 for some m, how can a DSA signature be forged?

If we know for some message $m$ that $H(m) = 0$, how can we forge a DSA signature with only the public key? I got that $g^s*r = (g^x)^r$ where $x$ is the private key, but that's one equation with 2 ...
-1
votes
0answers
43 views

Is there a collision free Hash Function for dynamic data that preserves already created hashes? [migrated]

I am familiar with the concept of hash functions and fingerprints but I am new to the implementation of functions and the specific characteristics of all those hash functions out there. What I need ...
125
votes
7answers
48k views

Why can't we reverse hashes?

First off, I know hashes are 1 way. There are an infinite number of inputs that can result in the same hash output. Why can't we take a hash and convert it to an equivalent string that can be hashed ...
0
votes
1answer
134 views

Why do MD5 and SHA-3 use different padding schemes?

What is the rationale for the difference between MD5 and SHA-3 padding schemes? MD5 appends 10* and then the 64-bit message length in bits. SHA-3 appends 10*1. Why do they use different padding ...
4
votes
1answer
207 views

How feasible is a preimage attack or speedups to brute force a substring of MD5?

Beyond the birthday problem analysis how feasible is a preimage attack or speed up brute force on a substring of MD5. For instance let's say from the 128 bits I decide to strip 24 bits, the first four ...
0
votes
1answer
133 views

Does encrypting with MGF1/SHA-512/1024-bit seed equal to a 1024-bit key block cipher?

Suppose: Alice uses SHA-512 with MGF1(as in PKCS#1 V2) and a 1024-bit random seed to generate a mask, XORs the mask with a message(M), gets a cipher text (CT), and sends the CT to her old friend Bob....
0
votes
0answers
27 views

Need help deciphering this ciphertext which I don't know its algorithm [closed]

I got a base 32 code which I decrypted to get another ciper but don't know how to decrypt. base32 code: ...
5
votes
1answer
150 views

linear cryptanalysis of hash function

I have studied linear cryptanalysis for block ciphers, but i did not understand how it works on hash functions. Can you give me an explanation of this attack on hash functions?
0
votes
0answers
50 views

Reverse Engineering Salted SHA1 Password Logic in SQL [closed]

I recently took over as an application administrator for an in-house developed app, an app which came with no documentation and no support. I found out my predecessor gave the exact same initial ...
1
vote
1answer
55 views

ECDSA signature of a random 32 byte number vs. the hash of the number

I'm working on an application that involves signing a 32 byte random number generated by the OS. Assuming the RNG works as intended, is it safe to sign the random number itself rather than a hash of ...
1
vote
1answer
61 views

How simple hash provide message authentication?

This structure provides message authentication. My question is if someone finds the key he can simply change the message and compute new hash according new message and send it to the receiver. If so, ...
0
votes
2answers
71 views

Does there exist equivalent hash function?

Is it possible to find equivalent hash function? Under equivalent, i assume same input produce same output, but they have different initial integer values and/or different set of bitwise operators. Or ...
4
votes
2answers
150 views

Would a HMAC digest make sense in an RSA / ECDSA signature?

When MD5 and SHA1 were broken there was, each time, a scramble to upgrade software and certificates to remove the offending algorithm. However, in each case, the HMAC variant of each hash function was ...
3
votes
1answer
50 views

What is the smallest size of the hash output?

Suppose we want to make the hash pre-image resistant to 40 bit security (success chance is $2^{−40}$). What would be the smallest size of the hash output?
-1
votes
0answers
42 views

cryptographic hashing - tinyHMAC

Anette and Bernard are using the $\newcommand{\tH}{\operatorname{tinyHMAC}}\tH$ for protecting the integrity of communication. To reduce the success chance of the attacker, they are considering ...
1
vote
0answers
51 views

Overcome MD5-RSA Signature verification

I asked this question already at the Information Security SO site, but my research on how to overcome this problem ended always on the crypto site. That's why I will try to find some help here :) I ...
1
vote
1answer
34 views

deterministic uuidv4 -> uuidv4

I need to copy a graph of elements with uuidv4s each, and separately stored relations containing element uuidv4s. On copy, I ...
0
votes
1answer
67 views

Block chain and storage issues

On reading about block chain technology, it was observed that it leverages the distributed ledger technology through P2P, here integrity is ensured through hash computed by miners, and then is ...
0
votes
1answer
23 views

Difference between one-way encryption, Transparent data encryption (TDE) and data encryption

What is the main difference between one-way encryption, Transparent data encryption (TDE) and data encryption? If one needs to store passwords or credit card details in the DB, which one is best to ...
1
vote
0answers
19 views

Round counts and permutation usage for hashing for a Merkle tree

Are there any current recommendations for performant hashing in a Merkle tree? It appears the hash based signatures in Sphincs use Blake2 everywhere (see Table 1 on page 22 of https://sphincs.cr.yp....
15
votes
3answers
694 views

Does a partial preimage attack imply a preimage attack?

Let's assume we have an $n$-bit hash function and a $b$-bit partial preimage attack that is faster than brute force. Does this imply a faster than brute force preimage attack on the whole hash? It ...
-1
votes
2answers
764 views

Recovering SHA1 knowing 2/3 of the hash generated

I am doing some research on cryptography, so I generated a random string of numbers resembling a creditcard number(according to MOD10 validation) and encrypted it with SHA1 algorithm for encryption. ...
14
votes
3answers
7k views

How can I calculate the 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 ...
2
votes
1answer
72 views

Use a hash-function twice

I'm creating a small messenger and I wanted to know if it makes sense to store user passwords double-hashed in our backend-database. I wanted the user the register in an app, which should save a hash ...
1
vote
0answers
25 views

How to prove security of scheme constructed by Hash then PRP

Suppose there is a scheme where a message is first hashed and then sent to a PRP. If the hash is done using an $\epsilon$-bounded universal hash function and the PRP $K\times \{0,1\}^n\rightarrow\{0,1\...
31
votes
1answer
84k views

How is SHA1 different from MD5?

On the surface, SHA1 and MD5 look pretty similar. Their diagrams include chunks of bits, bit rotation, xor and special functions. Their implementations are roughly the same length (at least the ones I'...
1
vote
2answers
83 views

Hash collisions in sha512 hash of secp256k1 public keys

For a sha512 hash of a secp256k1 public key, how many other public keys could generate that hash? I would assume zero since the key size is equal to the hash length (secp256k1 public keys are 64 bytes,...
0
votes
2answers
67 views

Hash Function Formating Question

If a hash function is written: Hash(Hello||World) Is that equivalent to Hash(Hello) + Hash(World) or ...
2
votes
2answers
226 views

Have there been efforts to prevent length extension attacks of hashing algorithms that are based on the Merkle–Damgård construction?

Have there ever been some publicized efforts to prevent length extension attacks of hashing algorithms that are based on the Merkle–Damgård construction (MD5, SHA1, SHA2, ...)?
6
votes
1answer
3k views

AES: Why is it a good practice to use only the first 16 bytes of a hash for encryption?

I'd like to encrypt Text with AES/CTR and a password defined by the user in java. I already checked the internet (and stackoverflow) for answers. The most used version is to hash the user password ...
0
votes
0answers
27 views

Computational hardness in two different cryptographic problems [closed]

What is computationally hardest, finding the private key corresponding to a given public key, or, finding a pre-image that hashes to a public key for a key pair (any pair) where you control the ...
3
votes
1answer
111 views

Assumptions on one-way functions

What are the assumptions we make to propose a one-way function? I only know of some number theoretic assumptions, but what are the other assumptions you can possibly make, which if true, would imply ...
1
vote
2answers
583 views

Fastest algorithm for message authentication?

I'm searching for the fastest way to verify that a message was sent by the correct user. The first solution I know of is to use HMAC. But in order to verify, I'll have to produce another signature ...
2
votes
1answer
113 views

Long Term Security of Truecrypt's hash function?

Does Truecrypt's hash function weaken the security of a chosen cipher cascade? Considering I want to choose a cipher cascade of 3 ciphers for long term security (50+ years) for my archived data on ...
0
votes
2answers
112 views

Cryptographic hash where the hashing function input is similar to the result

I was wondering if there is a cryptographic hash where the resulting hash is identical to the input for the hash function. If this is the case, would it be a weakness in the hashing function?
2
votes
1answer
466 views

Prove preimage resistance property

Let $ f : \{0,1\}^* \rightarrow \{0,1\}^n$ and $ g : \{0,1\}^* \rightarrow \{0,1\}^m$. $h$ is created by concatenate f and g: $ h : \{0,1\}^* \to \{0,1\}^{n+m}$ with $h(x) = f(x) || g(x)$. How do I ...
-1
votes
1answer
53 views

Hashing algorithm with fixed range rather than fixed size output [closed]

I have read that output that varies by key size or file size can leak information. So if it should produce fixed size then what is the scenario if it produces fixed range? By fixed range I mean that ...
6
votes
3answers
891 views

Inserting a backdoor into a cryptographic hash function

I'm curious as to how a backdoor can be built into a hash function. What might it take the form of? What's probability of getting one that can be backdoored in a way that can actually undermine its ...
6
votes
1answer
5k views

What are the strenghts and weaknesses of Whirlpool Hashing Algorithm

I want to find out if the Whirlpool hashing algorithm have any weaknesses. There are quite a bit of articles explaining the strengths of this algorithm, but for some reason I cannot find any on its ...
1
vote
1answer
44 views

Facebook app-scoped identifiers and similar - implementing stateless ID obfuscation

After certain privacy concerns Facebook rolled out a bunch of changes to their APIs, one being "scoping" user identifiers per app. In effect, this means that Alice's canonical facebook user ID is ...
0
votes
1answer
69 views

Is there any Corelation between the SHA256 and SHA512 hash of the same data?

Is there any Corelation between the SHA256 and SHA512 hash of the same data ?
0
votes
2answers
81 views

Hash functions with variable and fixed length inputs

I was told that a hash function (mostly looking at the SHA-* family) should have input strings of variant length provided first, and those of fixed length after (ie salt), in order to avoid some kind ...
0
votes
0answers
35 views

Storing secrets on a peer-to-peer network by splitting up AONT data

I've come up with a way to transform a stream of bytes such that if any single bit is modified, it cannot be transformed back into its original state. Here's how it works: Encoding Get hash ...
0
votes
1answer
99 views

How can I verifiably announce a choice without revealing its content?

Here is the simplified problem: Alice chooses from a small set of possible values. Bob guesses which value Alice picked. Alice reveals what value she picked. Alice's choice must stay secret ...