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
0 answers
59 views

Using multiplicative hashing functions for hashing. Is it secure?

I recently started learning about hashing techniques and I read that techniques like multiplicative hashing techniques (for example using Fibonacci as a method of multiplicative hashing algorithm) are ...
bd55's user avatar
  • 23
1 vote
0 answers
80 views

Zero Knowledge Proof for SHA-256 preimages

I need to design some protocol where actors will leverage Zero Knowledge Proofs (ZKP) to prove that they know the pre-image of some specific SHA256 hash without revealing the pre-image itself. Ideally,...
Bernardo Rodrigues's user avatar
2 votes
1 answer
99 views

SHAKE256 XOF: Absorb incrementally vs all at once

I'm diving into SHAKE256's XOF (Extendable Output Function), and I've got a bit of a head-scratcher. I'm wondering if there's any difference between incrementally absorbing bytes and absorbing ...
Rui 's user avatar
  • 31
0 votes
0 answers
33 views

Security Analysis: Adversary's Ability to Recover Concatenated and Hashed Secret with Partial String Knowledge

Suppose I have the following secret, calculated by concatenating and hashing the results of two random strings: secret = H( H( random_string1 ) || H( random_string2 ) ) Let's assume that the adversary ...
Kadir Korkmaz's user avatar
0 votes
1 answer
56 views

KangarooTwelve based Random-Access PRNG

Can the KangarooTwelve Keccak-p[1600,12] be used to create a CSPRNG in which there is random access to an element (or a small group of outputs) of the generated list (instead of sequential generation)?...
Ilan's user avatar
  • 1
0 votes
1 answer
69 views

using XOR as a hash function

I'm writing a simple small IP hash table on an FPGA for an ARP cache. On the FPGA I need to ensure I can very efficiently calculate the hash due the critical path of the circuit. I have a 32-bit input ...
John Smith's user avatar
0 votes
1 answer
54 views

Any way to predict MD5(P||password||S)?

I am looking at something that does authentication the following way: Accept a prefix P, suffix S and a hash ...
Blub's user avatar
  • 215
2 votes
2 answers
1k views

How to generate n unique numbers from the output of a hash function?

What would be an easy way to use the hexadecimal output of a hash function (like md5) to generate n unique numbers from, say 0 to 15. Of course I could generate n ...
Starscream512's user avatar
19 votes
3 answers
12k views

Is it safe to create a public ID by hashing a private key?

In an application, a curve25519 private key is the only stable identifier for an individual. I don't have readily have access to the corresponding public key. Would it be safe to generate a public ...
Moss Richardson's user avatar
0 votes
1 answer
66 views

Safe implicit value validation: $H_k(k \oplus m) \sim H_k(m)$?

$H_k$ is a cryptographic hash function that's keyed using a section of key material $k$ (for whatever definition of "keyed" that's appropriate for the given hash function $H$). Are the ...
aiootp's user avatar
  • 703
2 votes
2 answers
464 views

What is the difference between a seeded RNG and an XOF hash?

Suppose I have some ZK proofs that were turned non-interactive using Fiat-Shamir heuristic. So I need to generate the challenge value deterministically using some data shared between the prover and ...
fjarri's user avatar
  • 289
1 vote
0 answers
49 views

name/acronym/abbreviation explanation for hashes

(Cryptographically and hash/checksum wise consider me a rookie, as I'm rather just using algorithms.) While there are many names, not all of them are explained - I tried searching for the meaning of a ...
AmigoJack's user avatar
  • 111
0 votes
1 answer
42 views

Is there a way to short circuit (speed up) hashing a large but sparse array?

Imagine a large array (Megabytes) that is virtually empty, i.e. contains 0 in almost all locations. But also imagine there's 1000 pseudo random locations that contain a pseudo random byte. There is ...
Paul Uszak's user avatar
2 votes
1 answer
86 views

Is hash function cryptanalysis the same or more difficult for iterated hashing, as H(H(H(H(H))))?

The effectiveness of hash function attacks is typically measured in $x$ broken rounds of $N$ total designed rounds. And some constructs containing iterated hash functions include proof of work schemes,...
Paul Uszak's user avatar
2 votes
1 answer
57 views

Can limited password/PIN length be compensated by a computationally intensive hashing function?

Say we have a very limited password space with only a 4 digit PIN, so only 10000 PIN possibilities. Say also that the attacker has access to the stored form of the PIN. Can breaking the PIN be made ...
hunger's user avatar
  • 123
3 votes
1 answer
51 views

Security level of sponge construction based on output and capacity

I was looking at the security level of instances of sponge construction on Wikipedia depicted in the following image. It seems to me that the security level for collision resistance follows the ...
A.Solei's user avatar
  • 365
0 votes
2 answers
87 views

Sponge construction versus Merkle-Damgard For Hashing based on the very same primitive

I am a bit confused about Sponge construction and Merkle-Damgard-style ones for hashing. The only advantage I see for sponge construction is that they are secure against length extension attacks. So ...
A.Solei's user avatar
  • 365
1 vote
0 answers
32 views

Answering boolean question without knowing "Who" answer [closed]

Can cryptography solve this problem? Two people are chatting, Mr. X and Ms Y. They give each other a CRC16 hash of someone's name initials and salt a random number at the end (suffix). Ms Y: "I ...
Muhammad Ikhwan Perwira's user avatar
0 votes
0 answers
8 views

LoRa Cloud PIN derivation according to 'smtc0' algorithm

I am following the steps in LoRa Cloud in order to derive the PIN value using the Algorithm smtc0 (https://www.loracloud.com/documentation/join_service?url=derivation_schemes.html). I don't quite ...
user110681's user avatar
0 votes
1 answer
77 views

What are the chances of two 5-symbol strings derived from md5 colliding?

I'm taking 2 medium-length strings (50-70 chars) and hash them using md5 to get results like d2ae4f4919a10958e2c603782f0ec1cc, then recording the first 5 symbols of ...
ADC's user avatar
  • 3
2 votes
4 answers
130 views

How is the $\chi$ step of the Keccak permutation invertible?

I would like to understand how Keccak's permutation function is reversible. The difficulty I have is with the $\chi$ step that uses the and operator which is not revertible. All the other ...
glurks's user avatar
  • 23
0 votes
0 answers
38 views

Parallelizable MAC/hash value stored securely

Assume the following: $E: \{0, 1\}^k \times \{0, 1\}^b \rightarrow \{0, 1\}^b$ is a block cipher with a $k$-bit key size and a $b$-bit block size. $T$ is a $b$-bit authentication tag that is ...
Melab's user avatar
  • 3,605
0 votes
0 answers
22 views

tan(x) as a hash function

print(tan(int.from_bytes(open("plain.txt", "rb").read().strip(), "big")).n(1024)) Its sage code. How difficult or easy is it to ...
crypto_lover's user avatar
4 votes
2 answers
116 views

How certain is it that a shorter password can't match the salted hash of a long one?

We (collectively) salt passwords, then hash them; maybe even run them through something like PBKDF2 first (depending on how the password will be used). The end result is that we have a string $p$ and ...
András Korn's user avatar
0 votes
1 answer
81 views

How much of SHA3's internal state can be reached?

After reading that about "37% of the 256-bit outputs" of SHA-256 are unreachable when fed only 256-bit inputs [1] I'm curious & confused. The formula from the proof here considers a ...
aiootp's user avatar
  • 703
1 vote
0 answers
62 views

Is it possible to get the negative point with −x in that version of the Pedersen hash over the BaybyJubJub curve?

The Pedersen hash is a low constraints friendly hash for Zk-Snarks. Unlike many algorithms, the Pedersen hash returns a point P = (x,y) on a curve as a hash. ...
user2284570's user avatar
0 votes
1 answer
65 views

Is keccak256 (and similar hash functions) a suitable KBKDF for 256-bit keys?

Let's temporarily work upon the assumption that proper KBKDF functions do not exist, for the sake of argument. Would keccak256 be a secure choice for a KBKDF that derives 256-bit keys from a 256-bit ...
rrrrrrrrrrrrrrrr's user avatar
2 votes
0 answers
39 views

Easy-to-update parallelizable hashes

Do any parallelizable cryptographic hash algorithms that allow for quick—preferably constant-time—recalculation of a hash result upon updating a portion of the data input exist? I know that BLAKE3 is ...
Melab's user avatar
  • 3,605
0 votes
1 answer
32 views

Is it safe to sign a short token with salted md5

I want to generate some tokens for client as http cookie can I md5 them with salt and then use "<random token>"+"<md5>" as the token ...
xingxing hao's user avatar
2 votes
0 answers
97 views

Security of Even-Mansour based Merkle-Damgård

Assuming I have single-key Even-Mansour with single $2n$-bit permutation in wide-pipe Merkle-Damgård specifically with Matyas-Meyer-Oseas mode outputting $n$-bit hash. What security can I expect ...
LightBit's user avatar
  • 1,507
3 votes
3 answers
1k views

If I hash different seeds with same size of hash output and XOR on plaintext, is it secure as One-time pad?

Let's suppose I take 1MiB of truly random data and split in pieces (seeds) of 32-bytes (256-bits), so I hash each seed with a hash function with the same output digest size (32-bytes/256-bits) and XOR ...
alpominth's user avatar
  • 379
1 vote
1 answer
201 views

Pedersen Hash : when truncating the hash to keep only the X coordinate, is it possible to compute a collision when the Babyjubjub curve is used?

The Pedersen hash is a low constraints friendly hash for Zk-Snarks. Unlike many algorithms, the Pedersen hash returns a point P = (x,y) on a curve as a hash. ...
user2284570's user avatar
0 votes
0 answers
29 views

Genrerate n numbers based on a string [duplicate]

I wanna generate a list of numbers based on a unique string. They shouldn't be predicatble and every time to generate they are the same. Could someone help me pleeease :)?
Jonathan Krützel's user avatar
0 votes
1 answer
74 views

If we supply a random uuid4 hashed salt to Hashid, will it be considered secure?

Ideally, Hashids -: https://pypi.org/project/hashID/ are considered insecure and it is recommended that we should not use them for any sensitive functions. Though, is a HashId considered secure if we ...
CryptoInfo's user avatar
0 votes
1 answer
67 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
  • 379
-2 votes
1 answer
100 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
127 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
  • 200
2 votes
1 answer
64 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
  • 143
1 vote
1 answer
152 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
67 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
102 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
52 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
65 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
359 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
  • 315
1 vote
1 answer
184 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
81 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
100 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
47 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
83 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
460 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

1
2 3 4 5
59