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.

Filter by
Sorted by
Tagged with
1
vote
1answer
31 views

What if the hash code of the genesis block (first block in the block chain) is changed?

If so, what would happen? And if not, what are some limitations to it? The reason I am asking is because I just started getting into the cryptocurrency and am very interested in the cybersecurity ...
1
vote
1answer
47 views

Swapping a single bit inside a 40 bytes inputs fed to keccak256. Is it safe to assume no change in the first 20 bytes can result in the same hash?

I have the following data (represented as hex from binary below) where the lower bytes is controlled by attacker in the second case : ...
0
votes
0answers
27 views

Colliding input to compression function

So I recently started to look into cryptography and found the following question to cryptography scheme using $T = E_{S}(S \oplus M)$ It is said that this is not secure because you can have a ...
1
vote
1answer
63 views

SHA-256 : Finding two strings that the first n bits of hash value are same [duplicate]

How can I find two strings that have the same hash value for first $n$ bits in SHA-256? I'm implementing it by Python and I have the following ideas and problems: Keep generating two random string ...
0
votes
1answer
59 views

False positives in a signature scheme

Let's considerer a bloom filter: there, we can include witness of membership; false negative isn't possible, but it can exist some significant probability of false-positives. But, what if we demand ...
1
vote
1answer
25 views

Group Signatures with VLR Revocation Check

I was reading the paper by Boneh et al. Link. The scheme describes what is called a Verifier Local Revocation Technique. The Scheme assumes that a Revocation List [RL] allows each verifier to check ...
-1
votes
1answer
62 views

Is a number generator based on hashing an incremental string and a seed considered random? Part 2

Sorry I didn't put enough details on my last question, I didn't expect that there is really lots of factors, so most answers were left for speculations. In this question, I will give the scenario I am ...
0
votes
2answers
74 views

Is a number generator based on hashing an incremental string considered random?

Consider the following system 1 - fixed string as a seed, example "something" 2 - concat an increment number "something-1" 3 - hash it, assume it is "9f2054ea4d2c" 4 - take the first 3 digits to ...
0
votes
0answers
39 views

Is attack against secret prefix possible for messages of any size?

I am aware of message extension attack on MACs constructed with a hash function that uses Merkle-Damgård scheme. $$MAC=h(k,x)$$ I am interested if this attack only works if $0 ≡ x$ mod (hash input ...
1
vote
0answers
22 views

Secret key suffix vs HMAC [duplicate]

What is the benefit of using HMAC over hash with key suffix? I realize that using key prefix is a bad idea because it allows message extension attacks. When adding key as a suffix such attack ...
0
votes
1answer
62 views

What are the random variables in Universal Hash Function?

Universal hash function is defined as follow: $f_{(k_0,k_1)}(x) = (k_0\cdot x + k_1) \mod p$, where $p$ is prime In Wikipedia, it is mentioned that the above function is pairwise independent. ...
0
votes
0answers
41 views

How to show that a result of hash function and a random is computationally indistinguishable?

I want to ask: How to show that a result of hash function and a random is computationally indistinguishable If we denote $H(): \mathcal{X} \rightarrow \mathcal{Y}$ is a secure hash function, $m$ is a ...
0
votes
1answer
45 views

Password to password mapping

DISCLAIMER: I understand the question might be a bit amateurish due to my limited knowledge of cryptography but, please, bear with me for a minute. QUESTION: Suppose a user Alice generates a pass ...
0
votes
0answers
42 views

Hash function over numbers that preserve addition and multiplication

I wonder if there is a known hash function that for any $x$, $y$ which are numbers in a certain range with certain accuracy (I guess one can think of them as integers?), you can define two functions ...
2
votes
2answers
51 views

Difference between strongly universal and $\delta$ univeral hash functions

Define a family of strongly universal hash functions as: $$\forall x_1, x_2 \in \{0,1\}^n, \forall y_1, y_2 \in \{0,1\}^m, ~ x_1\ne x_2: ~~ \Pr_{h\in H} [h(x_1) = y_1 ~\text{and}~ h(x_2) = y_2] \le \...
0
votes
0answers
24 views

Can hash functions be used for asymmetric encryption? [duplicate]

Snuffle uses hash functions but it is symmetric key encryption. Can a hash function be used to let a client encrypt without knowing the private key, and the server decrypt using a private key? https:/...
0
votes
0answers
33 views

Is there a name for encryption which relies on repetitive calculation (=time) instead of a key-value? (e.g. block chain, hash value, block cipher)

Many encryption problems are fast to solve if a key, factor, exponent or something similar is known. Other encryption methods don't have such keys. E.g. a hash value of another value. It's used ...
0
votes
1answer
29 views

Add a pepper to a hash: as a string or a buffer, and should I calculate a hash of a peppered plain text?

I'm using a bcryptjs to generate a computationally slow hash function for storing passwords: ...
12
votes
3answers
2k views

SHA3-255, one bit less

I need a SHA3-255 or 511. What if I simply truncate a standard SHA3-256 or 512? Apart from the doubled probability of hash collision, are there any other things I should be aware of? I could also ...
1
vote
1answer
59 views

How are AEAD, GCM, CBC, Poly1305, EtM, MtE and E&M related?

I am using OpenSSL 1.1.1 to implement a TLS 1.3 communication module so I tried to learn how data integrity and authentication is ensured. I read a lot about AEAD, GCM, CBC, Poly1305, EtM, MtE and E&...
0
votes
0answers
23 views

Is there a 'chain-function' which allows computing the value for the index which is next, previous, +/- some constants but has no shortcut for other?

Looking for an algorithm which has a cyclic 'chain'-function which only allows the computation of next, previous element and in addition to that also a shift by a small amount of constants. Example 1 ...
2
votes
1answer
71 views

What is Regular Digest/Hash Function

I was reading a paper, Practical and Provably-Secure Commitment Schemes from Collision-Free Hashing where there was a reference to message digests being 'regular' Here, MD is a message digest. I've ...
0
votes
2answers
48 views

Hashing large messages, how does it work?

Is the message divided into chunks, each chunk hashed separately, or something else?
0
votes
0answers
37 views

Do any block cipher encryption functions (or similar functions) exist which are associative to each other and cyclic?

Most block ciphers encrypt a plaintext deterministically into a ciphertext which allows decryption in the opposite direction. Now, instead of encrypting just one plaintext, I'm looking for a cyclic '...
3
votes
3answers
85 views

What's the likelihood of a collision if I use a hash to detect data change?

I have a set of data that I want to sync, and instead of sending an entire set of data, I wanted to use a hash. It is basically a list of GUIDs with either "true" or "false". ...
1
vote
1answer
91 views

Is SHA256 resistant to second preimage attack?

I am looking into building a merkle tree algorithm and I need to know if SHA256 is resistant to second preimage attack.
0
votes
0answers
83 views

Preimage attack on cbc-mac with constant key

Is a hash function created by using CBC-MAC with one public key that does not change secure against preimage attacks? If not, how could you exploit this to find a single block message that hashes to a ...
-2
votes
1answer
64 views

Why do we need HMAC?

AFAIK, HMAC solves the collision problem of hash algorithms by mixing in a pre shared secret. Can't we just use the pre shared secret to symmetrically encrypt data and leave out the hashing?
0
votes
1answer
44 views

blake2b length extension attack approach

I understand that a completion flag parameter with Boolean value of 1 is used by Blake2 when it’s compressing the final block of the digested message. This ensures that one cannot load the state of a ...
84
votes
4answers
11k views

Has SHA256 been broken by Treadwell Stanton DuPont?

In a recent press release issued by Treadwell Stanton DuPont, the claim is made that their research laboratories have successfully broken all 64 rounds of the SHA256 hashing algorithm. They further ...
2
votes
1answer
85 views

Why XOFs are more convenient than Hash Functions in modeling Random Oracles

In this answer, it is mentioned that Easier instantiation of random oracles. Some security proofs rely on the so-called random oracle model to prove the security of a given scheme. Normally you'd ...
13
votes
7answers
6k views

Can I say “I have encrypted something” if I hash something?

As I understand it, a hashing algorithm is some kind of encryption, just a specific kind of it. So is it wrong to say "I encrypted this value." if I "only" hash it? I understand that it gives the ...
0
votes
0answers
41 views

Pollard's Kangaroo: How random does $f$ have to be?

I'm implementing Pollard's kangaroo algorithm as described here. Wikipedia's description of the protocol says that you should have "a pseudorandom map $f:G\rightarrow S$." Does anyone know what ...
2
votes
2answers
45 views

How to protect against brute force attacks in the case of a small dictionary?

Sorry if I'm not using the right terminology, as I'm new to crypto. I want to know the most effective way to protect a database against brute force attacks in the case of a small dictionary. For ...
1
vote
3answers
63 views

Can you find the salt if you have the original password in plaintext and the hashed version?

Suppose that I have a password in plaintext. I also have the hashed version of the password. Say it uses MD5. Is it possible to find out what the salt is given the above information? I'm guessing not?
9
votes
2answers
2k views

Does secure hashing imply secure symmetric encryption?

I was wondering if the mere existence of a (by some definition) secure cryptographic hash function immediately implies an equally secure symmetric encryption scheme. By my understanding, one could to ...
4
votes
2answers
396 views

How secure are public hashed passwords (with a salt)?

I'm working on a blockchain-based distributed application which stores Client information. I'm thinking of alternate ways to authenticate ...
1
vote
3answers
86 views

Do all files have a hash / checksum?

I am curious If every single digital file has a hash and/or a checksum. When verifying my downloaded files using hdiutil on mac os, about 90% of my files report some sort of checksum. However, when i ...
2
votes
2answers
115 views

Is there an input length range for SHAKE128 hash function?

For SHAKE128 hash function in SHA3VS document, I find this paragraph: Therefore, for testing SHAKE128, (168*2)+1) = 337 unpredictable messages will be generated with lengths from 0 to 337 336 ...
0
votes
0answers
30 views

Help, Feedback and Solutions to a problem on a PoC CSPRNG

Background I do not recommend trying to roll your own crypto. This is just a for-fun PoC, which won't be used in any public or private scenario. I am creating a PoC nearly-true random number ...
1
vote
1answer
34 views

W-OTS+ one-wayness property

I am reading the "W-OTS⁺ – Shorter Signatures for Hash-Based Signature Schemes," by Andreas Hülsing, and I am stuck in understanding the success probability of an adversary, $\mathcal A$, against the ...
4
votes
2answers
1k views

Why this brute force attack doesn't reduce all cryptographic hash functions' security bits against collision attacks to N/3?

The traditional brute force collision attack is generate $2^{N/2}$ (unique) random strings, hash them and this results in ~50% chance for collision. The attack talked in the question's title is ...
0
votes
1answer
89 views

Would it be easier to bruteforce the original data if given two hashes (from different hash functions)? [closed]

I have a chat server which uses public keys to identify their clients. But if the public key is known, then everyone can send a direct message (DM) to each other, which is annoying. The clients should ...
1
vote
2answers
111 views

Is there something wrong with using a hash function as a PRG?

I need to create cryptographically secure pseudorandomness in JavaScript. However, when I googled for PRGs, all I found was very sketchy. My idea is as follows (in pseudocode): ...
1
vote
2answers
73 views

How to prove if a Hash Function is collision resistant

Say we have the following Hash Function, H(x) = 4x mod N where N is a number generated by multiplying two prime numbers and x={0,1,2,3,...,N-1}. So lets assume that ...
0
votes
2answers
80 views

Birthday Attack Probability of Collision in Introduction to Modern Cryptography

I have some questions about the chapter of Birthday Attack in Introduction to Modern Cryptography. When $q=\Theta(2^{l/2})$ the probability of this collision is roughly $1/2$ What's the meaning of ...
0
votes
0answers
21 views

Designing a hash prediction model for a draw result, unmodifiable [duplicate]

I have to create a prediction model that forms a draw result of a prediction, essentially encoding the future draw result and the draw date. Then others will be able to check if the prediction is ...
2
votes
1answer
100 views

Using an AES-256-GCM key as a salt to SHA-256

Assume 256 bit keys are randomly generated and data is encrypted using AES-GCM-256 prior to being sent to a server. The goal is to enable the server to determine uniqueness of data it receives ...
1
vote
1answer
60 views

What is the possibility of collision of trailing 160 bits of Keccak_256, for any two differing public-keys as pre-images?

Earlier today I was answering a question on the ethereum SE site that analyzed the potential for more than one private key on curve secp256k1 (which maps to a distinct public key) to control the same ...
2
votes
2answers
119 views

Statistical Analysis of Cryptographic Hashing Algorithms

I was wondering how can I use NIST Statistical Test Suite to check for the randomness of output generated by a cryptographic hashing algorithm, let say SHA-256? To be specific, how will I generate ...