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
0 votes
1 answer
68 views

If encrypting with a hash function in counter mode, will the security of this scheme be at most minimal{input,output}?

It's possible to use a hash function as an encipherment scheme if used in counter mode. Let's suppose I take a 64-bytes (512-bits) seed/key and hash it concatenated with counters, and use it as a ...
alpominth's user avatar
  • 381
-2 votes
1 answer
104 views

What is the critical importance of SHA and other hash families? [closed]

Assume integer factoring, discrete log are classical safe and LWE, McEliece etc are quantum safe. This question is only about SHA and hash families in general on why we need them if we have pkc ...
Turbo's user avatar
  • 908
2 votes
1 answer
136 views

Can I check if a PGP signed message has been modified when I don't have the public key

Is it possible to check if a PGP signed message has been modified when the public key of the signer is not available? Like, is there a message digest (hash) that can be checked without knowing the ...
not2savvy's user avatar
  • 210
2 votes
1 answer
71 views

Bit flipping attack in hash function for message authentication

In this picture we have a use of a hash function for message authentication. M is plaintext message. H is hash function. E is encryption block with K symmetric key. || is concatenation of plaintext M ...
Allexj's user avatar
  • 139
1 vote
1 answer
205 views

Is it possible to generate random hash that is preimage of current hash

In one online crash game website (casino betting game), every game has a hash that is made public after the plane crashes and the crash coefficient is supposed to be random. The coefficient can be ...
dddr rddd's user avatar
0 votes
1 answer
77 views

Iterated hash functions

In this image, It describes the basic idea of an iterative hash function. I am confused as to why the i value is set to be m+t+1 ...
Simon Balfe's user avatar
2 votes
1 answer
152 views

Implementing a Merkle tree using a 128 bit hash function?

I need to implement a Merkle tree using a 128 bit hash function. In general, any hash function that guarantees pre-image, second pre-image and collission resistance should be fine to implement a ...
Lorenzo's user avatar
  • 139
1 vote
2 answers
53 views

Hash functions reversal

How do we know that hash functions cannot be reversed? An example is often given of two primes and their product, but any composite number that is the product of two primes has, by definition, exactly ...
Join the party P.A.R.T.Y.'s user avatar
0 votes
0 answers
66 views

Password Manager desktop app

I have built a small password manager desktop app using python. This app falls under the master-password model.The app connects to two databases stored locally. The first database stores the users ...
StavrosN's user avatar
1 vote
1 answer
607 views

What does the 256 in SHA3-256 and SHAKE256 refer to?

I am simply wondering what the bit-length in the algorithm variant in the table below refers to? For the hash functions I assume that this refers to the ouput length in bits. For instance for SHA3-256 ...
Rory's user avatar
  • 335
1 vote
1 answer
242 views

Can I use Argon2 to encrypt data?

Normally I use Argon2 to generate an encryption key, and then use AES to encrypt data with that key. Can I just set the hash size to be equal to the data size, set the associated data to a random ...
Alice's user avatar
  • 11
2 votes
1 answer
121 views

Why isn't the provided scheme UF-CMA secure?

On an exam I recently took, one of the questions was: Consider the following signature scheme. The public key is $(p,g,g^x)$, where $p$ is a large prime number. $g$ is a generator of $\mathbb Z^*_p$, ...
smitc29's user avatar
  • 23
0 votes
2 answers
106 views

Compression algorithm with multiple valid same-sized outputs

Is there a lossless compression algorithm that has hashing-like properties where there are multiple solutions to it? As in for example, when a 1000-bit data-sequence is compressed into a 500-bit data ...
Tensor's user avatar
  • 27
2 votes
1 answer
48 views

Is hashing salt possible even with the password with salt appended to the end?

Should you hash the salt on its own ? Is that possible? for example being password with salt appended at the end hash(pass || salt) and hash(salt) in a password file?
Bus's user avatar
  • 21
2 votes
1 answer
106 views

theoretical hash collisions vs random number collisions

I have a theoretical question about the probability of collisions of hashes versus random numbers. I'm not interested in the exact probabilities. The exact hash function is not relevant (we can assume ...
Garret Wilson's user avatar
5 votes
3 answers
473 views

Maximum entropy of a hash function?

Let $H(h,k)$ be the expected entropy of some random oracle $X:\left\{0,1\right\}^h \to \left\{0,1\right\}^k$, where $h$ does not necessarily equal $k$. Then, is it true that $\lim\limits_{h\to\infty}...
ManRow's user avatar
  • 323
5 votes
1 answer
156 views

Why is domain separation required?

I understand that domain separation in hashing is important, but I'd like to understand more clearly why and what are the risks involved. What is the theoretical justification for requiring domain ...
Conrado's user avatar
  • 6,404
3 votes
1 answer
156 views

Is it possible to sign in to a website using two different passwords using an MD5 hash collision?

I wanna do an experiment. I wanna see if it's possible to sign in to an outdated website that still uses MD5 to store passwords (there are surprisingly still a lot) with two different passwords. For ...
Domino's user avatar
  • 31
3 votes
0 answers
33 views

Data type transformation in Rust library

I am using some ark libraries, such as ark_ff and ark_bls12_381, to implement some cryptographic algorithms. In these algorithms, random oracles are needed, which gets some group elements in G1,G2,Gt ...
Walker's user avatar
  • 61
1 vote
0 answers
31 views

Secure ciphersuite from security-wise sub-optimal unkeyed permutation?

Hypothetically, IF we were to create a SSL/TLS or QUIC ciphersuite from a single (unkeyed) permutation operating in sponge mode to provide hashing and duplex mode to provide AEAD cipher, AND IF the ...
DannyNiu's user avatar
  • 9,001
2 votes
1 answer
62 views

Is there a family of cryptographic hash functions that can be realized with a smallish depth quantum circuit?

Certain number-theoretic cryptographic hash functions, such as $x^2\bmod N$, are known to be broken by a quantum computer. For example, one could use Shor's algorithm to factor $N$ into its product ...
Mark S's user avatar
  • 155
3 votes
0 answers
110 views

Are there "light" versions of cryptographic hash functions?

After tinkering with cryptographic hash functions, I started wondering if they do have counterpart functions that would imitate their cryptographic properties but with a lower level of strength in ...
Ryan B.'s user avatar
  • 153
3 votes
1 answer
81 views

Analyzing the security of hash approaches

Say that I have a random oracle function $H$. This function outputs a value in $\mathbb{F}_{p}$ where $p \approx 2^{256}$. $H$ can accept either one or two inputs (outputting a single value in both ...
vimwitch's user avatar
  • 139
4 votes
1 answer
238 views

very smooth hash (VSH) Stepwise examples

Can someone please point me to or give me stepwise example of VSH hash function. I couldn't find an example or a reference implementation. I tried to go through original publication but it seems way ...
Shivendra Mishra's user avatar
3 votes
1 answer
93 views

Can using an unknown, non uniform random salt increase difficulty for password attacks?

I remember reading a previous stack exchange post (unfortunately was unable to find the link, if someone knows the link that would be great!) about a method to make password checking time for the ...
Manu Bhat's user avatar
2 votes
1 answer
81 views

Merkle tree alternating hash and polynomial

I want to get feedback on the security of a modified merkle tree data structure. Using the image above as a reference assume I have a random oracle function $H$. Assume $H$ outputs a value in $\mathbb{...
vimwitch's user avatar
  • 139
5 votes
1 answer
753 views

How to reveal/prove some personal information later

I want to put some personal info like name and email in e.g. some program that I release to the public but I don't want anybody be able to retrieve those personal info and only when I want they can ...
Maloo's user avatar
  • 53
0 votes
2 answers
240 views

Is sha3 a one-way funtion

If i store sensitive stuff (e.g passwords, salted passwords, Internet protacel adresss(so i know its not tamperd with), private keys(the keys are using a portion of the key on multiple disks in ...
Downvoter's user avatar
1 vote
0 answers
53 views

How can I perform a one-client MITM attack in a Diffie-Hellman key exchange? [closed]

Suppose we have intercepted a public key exchange (via Diffie-Hellman protocol). In addition to the keys A and B, the generator g and the module p are known. Assuming that it is possible to exchange ...
Albert's user avatar
  • 11
2 votes
1 answer
539 views

Is there a simple formula to calculate how many inputs generate same outputs in cryptographic hash functions, being the input larger than the input?

Let's suppose I hash a 384-bits message with a cryptographic hash function and generate a hash digest of 128-bits. I know that due to the pigeonhole principle, many inputs of same size will result in ...
alpominth's user avatar
  • 381
1 vote
1 answer
84 views

Hardening a polynomial checksum scheme

I have a checksum scheme that uses a simple polynomial summation as described here. Basically I'll take a random value $R$ and a set of inputs $[v_0, v_1, v_2]$ and checksum it like $v_0*R + v_1*R^2 + ...
vimwitch's user avatar
  • 139
3 votes
1 answer
108 views

What kind of hashing is GF multiplication in GCM cipher mode and GMAC?

In GCM, GMAC, the additional associated data (AAD) (as well as outputs of subsequent blocks) is multiplied by a polynomial H in GF(2^128). This appears to be doing some secure hashing. Is that what's ...
zzazzles's user avatar
  • 117
2 votes
2 answers
104 views

Salts are stored with the hash - so for a single user it's no security advantage?

A hacker goes into a database and downloads a bunch of hashes and salts of users with knowledge of the hashing method. Say this is one entry that got downloaded: cbc0a790b2f28fc72ca43eb749028b9f:...
No Name's user avatar
  • 161
0 votes
1 answer
75 views

Finding block mode and key length from encrypted data

I have an AES encrypted data and the key, but I am not able to tell the block cipher mode [ECB|CBC|CTR] used in encryption or know the key length. Below is the encrypted data output in java. ...
Aviril Smith's user avatar
0 votes
0 answers
60 views

Hashing a seed full of entropy with a cryptographic hash function and emiting a key with the same size as input: can a collision attack occurs?

I read this in the documentation of HighwayHash: By contrast, 'strong' hashes such as SipHash or HighwayHash require infeasible attacker effort to find a hash collision (an expected 2^32 guesses of m ...
alpominth's user avatar
  • 381
3 votes
1 answer
330 views

One way function candidate based on the Collatz function

I am relatively new to cryptography and am curious what cryptographers would say about what I think is a beautiful one-way hash function described in a paper I found here https://arxiv.org/abs/1801....
Craig Feinstein's user avatar
1 vote
1 answer
68 views

Hash Flooding a Randomized Modular Hash Table

Assume we have a hash table using the function h(x) = x mod 32. h(x) = x mod 33. Also assume it dynamically resizes by doubling the amount of buckets and rehashing. If I was able to provide inputs for ...
DivideByZero's user avatar
5 votes
1 answer
168 views

Cryptographically obfuscating IP addresses while preserving locality

In an online community, you sometimes have to ban certain IP addresses or even entire IP ranges due to abuse. You may hire moderators to help you with this, but you might not trust them enough to show ...
Isopod's user avatar
  • 53
1 vote
1 answer
43 views

Is it safe or reasonable to use the key parameter in a cryptographic hash function as a counter?

Not all the cryptographic hash functions have the counter parameter for making messages be different for each counter value. But many accept a key parameter. Is reasonable to use the key parameter as ...
alpominth's user avatar
  • 381
1 vote
1 answer
161 views

Does an increase of message size increase the number of guesses to find a collision?

If I hash a 256-bit message and generate an output digest of the same size with a cryptographic hash function then the number of guesses to find a collision is expected to be 2^128. Does increasing ...
alpominth's user avatar
  • 381
1 vote
0 answers
64 views

How to estimate the collision resistance of a hash function if a secondary key is used (keyed hash function)?

According to the documentation of HighwayHash, for finding a collision are expected $m \over 2$ guesses, being $m$ the message. By contrast, 'strong' hashes such as SipHash or HighwayHash require ...
alpominth's user avatar
  • 381
1 vote
0 answers
39 views

How can knowledge of a secret be compared among untrusted entities?

Lets say entity A sends a secret "token" to anybody that they trust. The token itself is the proof and its sent equally to everybody and it has or needs to be derived from application ...
secret-token's user avatar
1 vote
1 answer
71 views

Can HKDF be used in place of a cryptographic hash function?

For context, I'm making a non-production grade reference implementation of the balloon hash function using the Web Crypto API. In order to make it less susceptible to certain attacks on common memory ...
n-l-i's user avatar
  • 435
0 votes
0 answers
22 views

Once a secure hash function built up a (fast) internal hash table, can data to be hashed be different from the data inserted when doing the lookups?

One experienced user of this forum said: "The key is the input of the hash function to build up a fast internal hash table. The key is hashed again to perform the lookup.". If I hash a data ...
alpominth's user avatar
  • 381
1 vote
0 answers
127 views

Why do the hash functions tested by SMhasher appear to be exceptionally fast?

In SMhasher, it seems that data (keys) are read one by one sequentialy, and not splited and: ...
alpominth's user avatar
  • 381
1 vote
1 answer
444 views

best HMACSHA signed JWT secret length

I would like to use JWT but one thing I'm still thinking is ¿what is the best length for the secret? If I'm using HS512 as a signing method the secret should have a length of 512 bits as far as I ...
Clara Raquel's user avatar
0 votes
0 answers
54 views

Could Diffie-Hellman ciphertext be used as OPRF(Oblivious pseudorandom functions) input?

In my recent PSI project, I wanted to use Diffie-Hellman encryption to obtain ciphertext as OPRF input, but I could not find similar work related to it. In my opinion, Diffie-Hellman ciphertext length ...
艾霖轩's user avatar
1 vote
3 answers
152 views

Why cant you use randomness to seed more randomness?

If I have 256 bits of handwavium "perfectly random data" and I hash these 256 bits of data with a secure hash function (possibly SHA-256). Could the resulting hash be considered "...
CaffeineAddiction's user avatar
1 vote
1 answer
129 views

Why hashing a seed to generate a key and using chaining to get the rest of key matterial is not secure?

Here, an user says about using a seed to generate a key that is larger than the digest size: "Do not use hash chaining: that's a bad way of constructing a key derivation function from a hash. If ...
alpominth's user avatar
  • 381
2 votes
2 answers
1k views

Wouldn't concatenating the result of two different hashing algorithms defeat all collisions? [duplicate]

Let's say I have three messages: A B C And I run each of these through two different ...
Eddie's user avatar
  • 983

1
2
3 4 5
59