Stack Exchange Network

Stack Exchange network consists of 174 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.

0
votes
0answers
2 views

RiskyHash - how risky is it?

I know, writing a MAC / PRG function is risky business... but, honestly, I'm unhappy with SipHash since it's slow when used as a hashing function for Hash Maps. I also know that Hash Maps should be ...
0
votes
1answer
17 views

SHA-1 collision for strings of two symbols

Is it possible to have strings of two (Unicode) symbols with equal SHA-1 hash? For example, smth like "ab", "ba".
3
votes
0answers
7 views

Is there an advantage to using a hash in combination with a key-derivation function?

Note: This question was originally asked at Information Security Stack Exchange, but was moved here due to a topic overlap. It is currently recommended by OWASP to use an adaptive key-derivation ...
0
votes
0answers
17 views

Which Auxiliary Hash Function to use for Pointcheval's mDP protocol

I study GKE+P group key agreement protocol presented on paper Flexible Group Key Exchange with On-Demand Computation of Subgroup Keys by Michel Abdalla, Céline Chevalier, Mark Manulis and David ...
0
votes
0answers
46 views

Prove I know a value v in a set s.t. K = H(v) [duplicate]

Is it possible to prove that I know a value v in a finite set, such that the hash of the value v is K. Where v is private and K is public
1
vote
1answer
59 views

What is the minimum message length to obtain the full potential of a hash?

Suppose I want to commit to a uniformly picked nonce of fixed length $n$ bits without revealing the nonce, so I use a secure hash function $H$ mapping messages to digests of length $d$ bits. Suppose $...
16
votes
2answers
4k views

What makes SHA256 secure?

For example, RSA relies on a mathematically hard problem, factoring, while ECDSA or similar rely on discrete logarithm problem. What makes SHA256 and similar hash functions, of the same family, ...
5
votes
2answers
96 views

Is there any hash function that relies on integer exponentiation instead of XOR?

I'm trying to implement a hash function in an esoteric language that has no 32-bit or 64-bit operations. Keccak, for example, is too slow in that language. I'd need a design that minimizes the number ...
0
votes
0answers
69 views

Identification of RF hash algorithm [migrated]

I have an unbranded LED lamp with a remote control. I would like to reverse the protocol of the remote but unfortunately I can't create my own packages. The frequency of the remote transceiver is 2....
2
votes
1answer
47 views

Given a SHA-256 message block, is it possible to undo the transformation of the internal state?

Consider the transformation described in section 6.2 of RFC4634 ("US Secure Hash Algorithms (SHA and HMAC-SHA)"). Given the message block M(i), and hence the ...
1
vote
1answer
53 views

Message authentication vs entity authentication

Does message authentication authenticate the entity? If the answer is "No", because message authentications like MAC work with the shared symmetric key, then my second question is: Does a message ...
6
votes
1answer
86 views

What is the use of SCRAM-SHA-256 (over SCRAM-SHA-1)?

The Salted Challenge Response Authentication Mechanism (SCRAM) specified in RFC 5802 can use arbitrary hash functions to operate. The base version from RFC 5802 uses SHA-1. From my understanding, ...
0
votes
1answer
43 views

How to make my hash more robust to the brute force?

I'm using PBKDF2 SHA 256 with 100 000 iterations to generate a secret. I want to increase the cost of brute forcing the passphrase I use to generate the secret. I'm thinking of using scrypt after ...
5
votes
2answers
116 views

Early propagation of carries in the BLAKE hash function

The BLAKE paper uses round constants derived from $\pi$ to improve diffusion, even if the additions modulo $2^{32}$ are replaced with bitwise XOR when processing a null message and null initial state: ...
1
vote
1answer
26 views

Number of preimages of hash function from bounded domain

Suppose we have an "ideal" cryptographic hash function $H: \{0,1\}^{n+k}\to \{0,1\}^{n}$ and a given bitstring $b\in \{0,1\}^{n}$, Can we estimate how many preimages $H^{-1}(b)$ there are? With ...
7
votes
1answer
90 views

SNARK-friendly one-way compression functions

I'm looking for a one-way compression function that is secure and efficient within a zk-SNARK circuit. The motivation behind this comes from these considerations: SHA256-compression is highly ...
2
votes
1answer
48 views

Are there any known security issues when doing the following chaining of BCrypt Hashes: 'bcryt(bcrypt(user-pw, work-factor1), work-factor2)'

I am currently developing a protocol which would be able to "upgrade" the strength of a bcrypt password hashes without the knowledge of the user-password so a system may upgrade it without user ...
4
votes
0answers
76 views

Partial collisions of hashes, why is this important?

There's a lot of work finding "partial collisions" in hashes, and "Parallel Collision Search with Cryptanalytic Applications" seems to be the go-to paper for this work. I'm trying to understand why ...
0
votes
0answers
29 views

DSA signature creation using hash oh the message

I am trying to understand how i can create DSA signature. the arithmetic uses H(M) and it is given a random nunber for the hashing result.( written- lets assume it is 121). Is the number really random ...
-3
votes
0answers
79 views

Do exist a one-way function that have 2 Condition?

Can anyone help me to prove this theorem that i can't prove it in a book that i bought it recently. If exist one-way function or OWF function: 1--exist a one way function ( with name $f$) such that ...
3
votes
1answer
62 views

GMAC vs HMAC in message forgery and bandwidth

Saarinen in his work GCM, GHASH and Weak Keys says that; The GHASH algorithm belongs to a widely studied class of Wegman-Carter polynomial universal hashes. The security bounds known (this and ...
0
votes
1answer
37 views

What pieces of information do you need to unhash a key to find out the original message?

I am very new to the hashing world and despite hours of research (AKA Googling) I still don't understand this piece of information. What are the different pieces of information that are needed in ...
3
votes
1answer
96 views

Does Composition of compressing Collision Resistant Hash Functions $H^{*}=H_2(H_1(x))$ is Collision Resistant?

I'm trying to solve the following problem: Given two CRHF $H_1:2^{4n}\to2^{2n}$, $H_2:2^{2n}\to 2^n$, construct the following hash function $H^{*}=H_2(H_1(x))$ compressing from $2^{4n}\to 2^n$. We ...
1
vote
3answers
87 views

Difference between hash function

In some paper, the terms "cryptographic hash function" and "deterministic hash function" would appear? I'm wondering what's their difference, and are there some other types of hash functions? Like the ...
0
votes
1answer
87 views

Computational Complexity of SHA-3 (SHAKE128)

Please, I got the question "what is the computational complexity of SHA-3 (SHAKE128)"? What does that mean and how can I calculate that?? *I am using SHA-3 (SHAKE128) in my mechanism to hash fix ...
9
votes
4answers
927 views

Why is SHA-512 limited to an input of $2^{128}$ bits?

Both SHA-384 and SHA-512 are limited to an input size of less than $2^{128}$ bits. Considering SHA-512 has a higher output size, couldn't it include more input data?
0
votes
1answer
55 views

Use partial hash to verify entire hash

I've had an idea about storing parts of SHA256 hashes and I'd like to find out how secure it is, or how much less secure it is than storing the entire hash. For example, users can share this list of ...
0
votes
1answer
47 views

Hash Collision Probabilities

Please give help! how can I calculate the probability of collision? I need a mathematical equation for my studying. Assume, I am using SHA256 to hash 100-bits. Thus: SHA256 {100} = 256-bits (hash ...
1
vote
1answer
96 views

Given a particular $1600$-bit output $Y$, is it feasible to find a $1600$-bit input $X$ such that $\text{Keccak-}f[1600](X) = Y$?

I have read this answer on Crypto.SE and I want to clarify a few details. Does this property of $\text{Keccak-}f[1600](x)$ imply that if we know a particular $1600$-bit output $Y$, it is feasible ...
2
votes
1answer
59 views

Calculate new hash from old hash + appended string

If I have a hash of some string in the form: hash(UNK + "known"), Is there a way to calculate the hash of (UNK + "known" + "append"), given the hash of the original value? Specifically I'm asking ...
27
votes
5answers
7k views

Other than password hashes, are there other uses for non-reversible crypto

Hashing is useful for checking that an input matches expectations without giving away the stored expected version - so confirming passwords etc. But are there other use cases? In general, ...
1
vote
2answers
64 views

Using a hash of data instead of the full raw data for authenticated data in AES-GCM

I am serialising JSON objects, and would like to encrypt some of the values. I plan to do this with AES-GCM. I would also like to ensure the integrity of the overall object. The requirements are ...
-1
votes
1answer
113 views

Is it possible to convert the output of sha256 hash to binary or decimal value? [closed]

Can the output value of the sha256 hash function be converted to binary or decimal number? I know that the output is a set of 256bits. Is it possible to convert the output data to an unique ...
0
votes
1answer
84 views

Finding the Input if Hash Value, Hash Function, and Key are known

Let's assume that we have a hash value $h$ is calculated by using HMAC-SHA256. We have the key $k$. We also know some information about the input: It contains a pattern like 15 numbers where first ...
0
votes
1answer
73 views

Is the hash function $h(x\|y) = AES_x( y)$ collision resistant?

If $x$ and $y$ are both 128-bit strings would the function $h(x||y) = AES_x(y)$, where $x\|y$ means concatenation, be considered collision resistant ? Is there an easy way to find $(x_1, y_1)$ and $(...
1
vote
0answers
54 views

Extendable hash collision resistance of multiplication

I have a hash function $HashSet(A) = H(a_1) *\cdots * H(a_n)$, where $A = \{a_1,\ldots,a_n\}$ and $H$ is a hash function which generates values of $b$ bits (and $H$ has no collision attack that ...
15
votes
1answer
3k views

What are the consequences of removing a single byte from a sha256 hash?

I'm working on a system (Ethereum) where it is significantly cheaper to store 32 bytes than 33 bytes. I'd like to create a table where data is stored based on its hash. Sha256 would meet this ...
1
vote
1answer
79 views

Does the One-Time Hash-based Signature Scheme render Ring Signatures useless?

On the Bitcoin community, to maintain privacy, they recommend using one-time spend addresses. CryptoNote, Monero et al. prefer Ring Signatures to maintain that privacy. There are some issues regarding ...
6
votes
6answers
11k views

Can a large file be hashed down to 32 bytes, and then reconstructed from the hash? [duplicate]

We can hash a file or data using multihash or SHA-256, but can we retrieve the original data or file from the hash? Are there any methods to retrieve the original file or data from a hash of it ...
3
votes
1answer
34 views

For a hash over a finite space without size reduction, is a public permutation sufficient?

Suppose the application is a Lamport signature scheme. Is the following a secure hash $\{0,1\}^n \rightarrow \{0,1\}^n$? $$ H(x) = x \oplus P(x) $$ where $P$ is a public permutation that permutes an ...
0
votes
2answers
65 views

Can someone explain to me the concept of hashing versus the concept of encryption? [duplicate]

I'm a bit confused over the difference between hashing and encryption. Could someone help explain this to me in simple and concise, yet comprehensive layman's terms? I'm not asking for any specifics ...
11
votes
1answer
188 views

Why was Davies–Meyer chosen over Miyaguchi–Preneel most of the time?

The only Miyaguchi–Preneel MD hash I know is Whirlpool. I suppose there are likely others. Why do most MD hashes choose Davies–Meyer? If anything, Davies–Meyer relies on related-key resistance while ...
0
votes
2answers
69 views

Where is the password hash calculated, locally on or the server?

My computer security professor uses the following notation, where S denotes a server and A denoted Alice. Alice wants to authenticate herself to the server. The hash function is a hash chain where $h^...
0
votes
1answer
65 views

Hash using AES and key 0

Consider the following hash function for a message x = x1||x2|| · · · ||xn: h(x) = Mn i=1 AES0(xi) = AES0(x1) ⊕ AES0(x2) ⊕ · · · ⊕ AES0(xn) where the key used in AES is k = 0. Can someone explain what ...
0
votes
2answers
89 views

Blockchain cryptography

I'm a high school student doing a project about blockchain. I'm trying to figure out why hashing algorithms are crucial for the existence of blockchain and other types of cryptography wouldn't work. ...
0
votes
1answer
73 views

Show that if a fixed key MAC is not collision resistant then the MAC function is not computation resistant for every key K

I'm really having some trouble with this one. Let $H$ be a MAC function. For every key $K$ we can create an unkeyed hash function (i.e.an MDC) by using $H$ to hash messages with the fixed key $K$. ...
1
vote
1answer
96 views

How to find a collision with a given prefix and a known key in an AES ECB symmetric block cipher?

I should be able to find a collision for a vulnerable hash function which uses AES ECB given a prefix, but I am unable to find a reasonable solution (besides brute-force attack). The hash function is ...
0
votes
1answer
93 views

How might one create a system of election by lot (sortition) that is both secure and verifiable?

I've been puzzling recently over sortition, a democratic method of selection for public office which I find very fascinating. Basically, instead of choosing candidates like Hillary Clinton or Donald ...
1
vote
0answers
82 views

Is it possible to apply a pseudo-random permutation (a keyed permutation) to construct a sponge function?

The description of the sponge function on Crypto.Stackexchange contains the following text (source): The cryptographic sponge is a construction scheme for hash functions (and other symmetric ...
-2
votes
4answers
168 views

Size of A Hashed String Using SHA-512

When hashing a messages of size of n, does the SHA2 algorithm always produce the same sized hashed value? The reason I am asking is that I am building an OAuth 2.0 ...