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

Davies-Meyer block cipher and IV

I have three questions regarding Davies-Meyer construction : What is the name of the underlying block cipher? How is generated the first input hash value (IV) passed to the block cipher? What is ...
1
vote
0answers
74 views

SHA-256 Hash Crack

Suppose, If a SHA-2 hash does get broken completely with hardly any power, where would it get reported and is there currently a bounty on it?
1
vote
1answer
58 views

What is a differential attack on a hash function? How would one attack a SHA algorithm and what would achieve?

Currently, I have been assigned to attack a reduced version of SHA-1. What are we trying to achieve? How do we attack it?
1
vote
0answers
43 views

Is there a string that's it's SHA-256 hash is equal to itself? [duplicate]

Take for example SHA256. Is it possible for the hash of a 64 character hex string S to be S? ...
2
votes
2answers
229 views

Verifying a prediction of the future

I'm trying to find an algorithm to prove that someone knows some short secret message (for example some prediction of the future) before finally revealing it. For example: Alice knows what temperature ...
0
votes
0answers
34 views

Objective block cipher round function measures of security

One issue that may arise when attempting to evaluate the security of a round function for a block cipher is that the analysis of the round function does not treat the round key space and the message ...
2
votes
0answers
74 views

How to exploit Java's RNG to find clusters?

In the above image, you can see a coordinate grid containing some random green points. Each point has a pseudorandom 1/10 chance of being green. What I'm looking for are clusters of these green points ...
2
votes
1answer
124 views

How to create recreatable hashes?

I recently stumbled upon a YouTube video explaining a casino game. In simple words, they randomly generate a multiplier for your initial investment. This multiplier is supposed to be backed by a hash ...
4
votes
1answer
97 views

HKDF randomness extraction - salt or no salt?

According to the HKDF paper, the use of a salt serves two purposes: domain separation and randomness extraction. This question is solely about the necessity of a salt for the purposes of randomness ...
0
votes
2answers
98 views

Digital Signatures forgery on 60000 messages with brute force

Assume an operating system uses digital signatures to ensure executable files can be authenticated and can't be modified; where the digital signatures are constructed by creating a hash of the ...
0
votes
1answer
34 views

Key Derivation/Hashing Function with Fast Comparison

Is there a key derivation/hashing function (that has any real value) that fulfills both of these criteria: Slow to compute the hash Fast to verify the hash based on the input string (not given a ...
1
vote
2answers
71 views

If secret S is not known to an attacker, while constant K and SHA3(K + SHA3(S)) are known to an attacker, is S discoverable?

I'm trying to understand how secure S is from an attacker. Let's say in an instance where they have enormous hashing power available to them, as would be the case where they own cryptocurrency mining ...
1
vote
1answer
73 views

Avoiding MD5 collision with secondary partial hashes

I am trying to design a VCS like program that determines if the files are the same by comparing their MD5 hashes. Then I read about MD5 collisions here, and I wonder if I can work around that by doing ...
1
vote
2answers
228 views

How do you get a Public Key from a Fingerprint

I've seen some people putting their public key's (I'd suppose they refer to a PGP PK) fingerprint on powerpoints and alike so that they can be reached out to using a safe channel. From my POV, it's ...
2
votes
0answers
90 views

Why this function isn't second preimage resistant?

Why is $h(k,m)$ not second-preimage resistant? Let $E_k$ be a block cipher where the message space is the same as the key space. $$h(k,m)=E_k(m\oplus k)\oplus k$$ I've been reading about second ...
1
vote
1answer
96 views

Why a hash function in a manner similar to CBC-MAC is not collision-resistant?

I'm reading the book The Joy of Cryptography by Mike Rosulek. When reading Chapter 11, on the hash function, I found a very interesting exercise. Does anyone have ideas on how to prove this? Please ...
0
votes
1answer
86 views

Does sha256 is ok for that? If not does EC?

I think from what I studied that I had the correct reasoning, but I would like a double check. Here is the thing: Given two matrix: A and B I calculate the hashFunction(A, B) = C Now I calcultate the ...
0
votes
1answer
51 views

Can the security of Salsa20/Chacha20 be expanded to 448-bits if I fill the nonce and the Nothing-up-my-sleeve numbers with key material?

As I studied, Salsa20/Chacha20 is basically a hash function that accepts a 64-byte input and returns a output of the same size of input. 128-bits of the input are filled with four "Nothing-up-my-...
1
vote
0answers
16 views

How can a generate a key with defined key size with a hash function with its security/internal state shorter than the key?

Let's suppose I took a high resolution photo full of entropy and I want to convert in a key with 2048-bits of security. Practically all the known hash algorithms have maximum 512-bits of security. Is ...
1
vote
0answers
29 views

Which cryptographic tool can be used to prove that a program passes a certain test?

Let's say I have a smart contract located at an address A, and another smart contract that runs tests on A located at ...
1
vote
2answers
64 views

Hashing 64-bit counters with different keys and XORing to blocks of plaintext, multiple times: Some questions

Let's suppose I want a 2048-bit block encryption. I take a 512-bit hash funcion (as Blake2b), provide a counter and a key and hash the counter and so XOR the hashed value in a ciphertext block, and ...
0
votes
0answers
65 views

Why does SHA2 work? [duplicate]

I was reading how bitcoin uses sha2 I understand how sha2 works procedurally (i.e. https://qvault.io/cryptography/how-sha-2-works-step-by-step-sha-256/), but I have no clue why it works. Steps like s0 ...
0
votes
1answer
48 views

Concatenation in Merkle Trees

Consider a simple Merkle Tree with leaves alice +100 and bob +50. Using the SHA256 hash algorithm, the digest of the respective ...
3
votes
1answer
295 views

Grinding in the Fiat-Shamir heuristic

The Fiat-Shamir heuristic is assumed to substitute public-coin messages from the verifier by hashes of the prover's messages until this point, i.e.: $$H(\alpha_1) = \beta_1, \\ H(\alpha_1, \alpha_2) = ...
0
votes
0answers
35 views

Looking for ASIC resistant hash functions

I am looking for some sort of hash function that is resistant to ASIC so something that works well on a CPU but is not very good with other hardware like a GPU or ASIC
2
votes
1answer
63 views

How would a malicious group of co-signers use a hash collision to sign an unintended message?

According to BIP340: However, a major drawback of this optimization is that finding collisions in a short hash function is easy. This complicates the implementation of secure signing protocols in ...
1
vote
1answer
55 views

Using CMAC instead of hash function for message signing [duplicate]

Generally, when we want to generate a signature for message M we use hash function H, and sign the result of H(M) with the private key. What if instead of hash function H we would use a CMAC with key ...
3
votes
2answers
123 views

Is there a zero-knowledge proof of a hashed secret?

Alice wants to share a secret $S$ with Bob so she encrypts it with Bob's private key. Bob is not online at the moment so Victor will keep it safe for him in the meantime. Victor the verifier would ...
1
vote
2answers
976 views

How insecure would a cipher based on iterative hashing be?

I was just wondering how the following construction could be insecure. I can tell that known-plain attacks are possible, but I'm not sure about anything else. Let the user pick a password and hash it ...
0
votes
1answer
79 views

Multiplication two points in elliptic curve cryptography [duplicate]

Are there references or prove to say that multiplying two points in the elliptic curve cryptography ECC is not allowed, as an example below? Multiply the public key PKA by a point (Z) on the ECC since ...
0
votes
0answers
36 views

How does not tagging hashes result in leaking the secret key if a nonce is re-used in a different scheme?

I'm reading through BIP340 and I'm having trouble understanding this part: For example, without tagged hashing a BIP340 signature could also be valid for a signature scheme where the only difference ...
1
vote
0answers
67 views

Why does HMAC use the hash twice? [duplicate]

According to the HMAC specification in RFC2104, an HMAC is computed in the following way: HMAC(K, text) = H(K XOR opad, H(K XOR ipad, text)) where ...
2
votes
3answers
107 views

Does encryption also hide file hash?

I have files in my computer that are being uploaded to a cloud storage provider (Sync) that specifies that files are encrypted on the client's side, then uploaded to their servers, and that only has ...
2
votes
0answers
34 views

composing password hash functions

Firstly I know that what I'm asking about is not practical, so let's keep it theoretical. Let $B[H](x)$ be balloon hashing with $H$ as it's underlying hash. What happens if I do $B[H1](B[H2](x))$, ...
2
votes
0answers
46 views

For unequal set sizes in PSI: why should the party with fewer elements use cuckoo hash rather than simple hash?

Most PSI papers usually use hash-to-bin to improve the number of comparsons. For unequal set sizes in 2PSI, I have read CCS17, which designs a PSI protocol for unequal size. The party with fewer ...
1
vote
2answers
94 views

reversing hash function makes possibilities increase exponentially, yet there is a finite number of inputs. How?

When trying to reverse a hash function, there is loss, e.g. a+b=c given c=5, try to go back to a,b (previous step) (a,b)=(5,0),(4,1),(3,2),(2,3),(1,4),(0,5) but, ...
3
votes
1answer
259 views

Is the security of a Schnorr signature dependent on the hash function that is used?

When a Schnorr signature is created, the number $r$ is concatenated with the message to produce a new value which is then hashed to give a number represented by $e$. The number $e$, accompanied by ...
0
votes
1answer
46 views

Python code for 'Verifiable Canonical Generation of the Generator g', FIPS 186-4, returns False [closed]

Edit: if anyone, inexperienced like me, lands on this question, it has been answered at the stackoverflow. Why the Python code, see below, returns false? More context: I am going through the FIPS 186-...
0
votes
0answers
11 views

How to sign CAM/DENM messages using mbed LTS libray with ECDSA (EEE Std 1609.2)

I have read ETSI TS 103 097 and EEE Std 1609.2 which gives me the security data structure defined in ASN.1 notation. I want to use mbed LTS to calculate the ECDSA signature. I understand that I should ...
-1
votes
1answer
69 views

truncated sha3-512

Let's say I need performance on 64-bit machine, then SHA3-512 is the way to go. SHA-512/256(x) is SHA-512(x) with output truncated to 256 bits, according to https://pycryptodome.readthedocs.io/en/...
3
votes
1answer
159 views

Collision finding method

The "birthday paradox" places an upper bound on collision resistance: if a hash function produces $N$ bits of output, an attacker who computes only $2^{N/2}$ (...) hash operations on random ...
2
votes
3answers
642 views

Composition of cryptographic hash functions

I've stumbled upon many opinions, so I ask about them myself. Let $H(x)$ and $F(x)$ be hash functions. is $H(F(x))$ or $F(H(x))$ safer than $H(x)$ or $F(x)$ is $H(F(x))$ or $F(H(x))$ safe when $H(x)$ ...
2
votes
1answer
62 views

Is SHA1 break significant for an algorithm intended to be Proof-Of-Work?

Let's say I'm modifying the Scrypt hash function (https://github.com/Tarsnap/scrypt/blob/master/lib/crypto/crypto_scrypt-ref.c) and that all I want to do is replace SHA256 with SHA1 in the code to ...
1
vote
2answers
124 views

Can you identify these cryptographic algorithmic symbols?

I am mostly self taught and have limited knowledge of the symbology in the image below. It is a diagram of a sub block the RIPEMD-160 algorithm: Are such symbols standardized? Is there a good ...
2
votes
1answer
73 views

How to have a hash function that maps any binary string of size n to binary string of size n?

I am implementing certificateless cryptography from this research paper in python language. Essentially, I want to have the following hash function mapping. This hash function is mentioned in the ...
2
votes
1answer
60 views

Should I use HMAC to create a multiple part HASH token

I have a web API with a custom API authentication system that users each have a SecretKey and a public ApiKey. Using these two keys client(or user) can generate a token for the authentication on the ...
2
votes
0answers
36 views

Cyclical Redundancy Check and bijections [closed]

Let $F_M(n)=\operatorname{CRC32}(M|n)$, where $M$ is an arbitrary length prefix message, $n$ is a 32 bit integer (whether little or big-endian encoded is unimportant) and "|" is simply ...
1
vote
0answers
56 views

Hashing function: Generate unique 3 letters Identifier [closed]

I need to create an id generation function that takes 4-digit number and returns a unique 3-letter identifier. I already have a function that generates a 2-letter id from 3-digit number with some ...
0
votes
0answers
57 views

I am confused on how to solve this question about one way hashing

I know that I have to use decryption, but I am confused about how it breaks one-way (preimage resistance)
0
votes
1answer
77 views

Why is this image not pre-image resistant?

The answers to my HW say that a preimage of a single block is easily found. I do not understand how it is easily found. Please help.

1
2 3 4 5
53