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
50 views

Manually creating a GPG Public Key

I want to manually create a GPG public key that can be imported into GPG, i.e. I want to create a file with a Public-Key Packet, a User ID Packet and a Signature Packet (for an example see here). I ...
0
votes
1answer
38 views

Design flaws when designing a MAC-function

Suppose we want to build a very basic hash function like this: $$c_i = h(c_{i-1},x_i) = c_{i-1}\oplus x_i \quad\quad mit \;\; i\geq1, c_0 = \operatorname{IV}$$ Now suppose we'd use this hash-function ...
1
vote
0answers
99 views

Generating a XOR Hash function for a given group of numbers to maximise collisions

Given $x$, a vector of $m$ distinct bit vectors of bit length $N$, I want to use an XOR-hash $h$ such that all $x_i$ collide to the same value. I define an XOR hash $h$ which takes bit vector $q$ as ...
0
votes
0answers
42 views

Small (code-size) hash functions

I am trying to implement a small encryption tool in as little code as possible as a learning exercise, and currently have managed to get everything to depend only on a HMAC construct. However, most ...
-3
votes
0answers
74 views

Deterministic DSA by Thomas Pornin (Java Illustration, its Errors) [closed]

(DISCLAIMER: I'm clearly seeking a point to be illustrated from a white paper as explained here, "How should questions be handled involving code?", and <...
140
votes
6answers
72k views

Why can't we reverse hashes?

First off, I know hashes are 1 way. There are an infinite number of inputs that can result in the same hash output. Why can't we take a hash and convert it to an equivalent string that can be hashed ...
45
votes
3answers
42k views

Why hash the message before signing it with RSA?

The diagram below illustrates the process of digitally signing a message with RSA: As diagram shows, the message is first hashed, and the signature is then computed on the hash, rather than on the ...
-3
votes
1answer
482 views

Best hash-algorithm [closed]

What is the most secure hash-algorithm. Can you also give the second best and the third best like this: 1. Test 2. test 3. TEST I dont care about the performance
1
vote
1answer
90 views

Is there a crytographic scheme for “ciphertext consistency verification”?

I a problem that essentially boils down to the following: There is raw data, D, encrypted with key K (call its encrypted form <...
1
vote
2answers
1k views

How can I convert numbers into prime numbers?

I'm working with one-way accumulators, but I'm not knowledgable in cryptography. Is there an easy peasy way to hash numbers (or whatever) into prime numbers? Obviously I'd like it to be collision ...
-2
votes
0answers
17 views

Setup Geth Node for the first Time. HELP Please! [closed]

Hello my Name is Sven and i am from Germany.I need Guidance from someone with advanced knowledge in ethereum. I created December 2017 an ethereum Wallet. On March 2018 i invested in P3D. I forgot this ...
2
votes
1answer
235 views

Secure hashing when the input comes from a small space

I have a problem that I'll simplify here. Let's say I want to store a table of {person, fav color}. Only, I don't want anyone to ever be able to look up a person't favorite color; the only thing ...
2
votes
1answer
39 views

Is there a way to prove knowledge of a limited resource like a phone number just to the people who already know about it?

For instance, let's say Bob's phone number is X and Alice has somehow identified that Bob's phone number is X. Now she doesn't have a direct way to contact Bob, so she wants to post in a public forum ...
13
votes
5answers
6k views

Is it easy to crack a hashed phone number?

I want to SHA256 hash phone numbers in order to hide them. Is this a good idea? Are there any other ways I could make this safe?
0
votes
0answers
25 views

Is $f_N$ in this hash function is Matyas-Meyer-Oseas scheme?

I propose a hash function as following: H is an Merkle-Damgard hash function with a compression function $f: \{0,1\}^{3n} \to \{0, 1\}^{2n}$. Output function $f_N: \{0,1\}^{3n} \to \{0, 1\}^n$. M is ...
11
votes
2answers
3k views

How reassuring is 64-bit (in)security?

In Feb 2017, CWI and Google announced SHAttered hash collision attack on SHA1, which took $2^{63.1}$ work estimated 6500 CPU years, to achieve. Therefore, 64-bit should be considered now an insecurity....
1
vote
1answer
41 views

Hash into elliptic curves for private set intersection

Would it be insecure to hash a message $m$ to an elliptic curve point by multiplying it to some generator $G$ for the purpose of a private set intersection ? $$ M = hash(m) * G $$ I keep seeing ...
6
votes
3answers
767 views

Minimum input size of a hash function

This is a theoretical question, to improve my understanding of hash functions. Hash functions have a one-wayness such that they are protected from the first preimage attack. From my understanding, if $...
0
votes
0answers
40 views

Security implication of concatenating two hashes using different algorithms

Background Hashing files is an expensive thing for CPU. I am tasked to write a secure digital signature scheme. For that, I decided to check the integrity of files using Hash/Digest. To be more secure,...
-1
votes
1answer
58 views

Is storing salts encrypted a good idea?

I've read that storing password hashes in a database, you can store the salt in plaintext alongside the actual hash with no detriment to security. I was thinking that one could derive a key from the ...
1
vote
3answers
165 views

Collusion resistant computing of same function by two servers

Is there a secure way of computing same hash function of replicated data by two servers. I mean that both servers host the same version of replicated data and they should output h(M) without colluding,...
182
votes
2answers
87k views

What are the differences between a digital signature, a MAC and a hash?

A message may be accompanied with a digital signature, a MAC or a message hash, as a proof of some kind. Which assurances does each primitive provide to the recipient? What kind of keys are needed?
1
vote
2answers
112 views

Padding of SHA-3

SHA-3 uses Padding, so the original message has a certain length. In the case of SHA-3-512 each block has the size of 576, so any message must be padded, such that it is a multiple of the blocksize ...
2
votes
1answer
74 views

Looking for a Non-textual hashing function

Pardon my terminology, but is there a hashing function of some sort which accepts a string as input and generates a non-textual output of some sort, or perhaps a unique output that can be used to draw ...
1
vote
0answers
35 views

Is using Fiat-shamir Heuristic safe?

What I'd like to do is to have the Prover store a value x where x remains hidden. From x, I'...
1
vote
1answer
59 views

Combining algorithms for password storage?

Is it more secure to combine algorithms for password hashing, for example, Scrypt, Bcrypt, SHA-3, etc.? If an attacker wants to use dedicated hardware, he would need one for each algorithm. However, I ...
1
vote
0answers
31 views

Transcript collisions and hash collisions in (password) key exchange protocol

In New Security Results on Encrypted Key Exchange, there is a Game 2 as follows: Game $G_{2}$: For an easier analysis in the following, we cancel games in which some (unlikely) collisions appear: ...
1
vote
1answer
68 views

Encryption with Web Crypto API (SubtleCrypto)

I want to end-to-end encrypt items in a stateless environment. These items have an identifier (random string). Now I want to add encryption by adding a random key. The URL could be ...
8
votes
0answers
960 views

Does there exist a hash function which has a fixed point? [duplicate]

Does there exist a hash function $h$ and an input $x$ such that $h(x) = x$? I believe this is a special case of collision-resistance. I imagine such a case is guaranteed not to be possible (otherwise ...
26
votes
4answers
9k views

Is there a string that's hash is equal to itself?

I was wondering if there's any string that has a hash equal to itself, so that – when using any (none specific) hash function – the hash would be equal to that string? so that: ...
4
votes
1answer
102 views

Why AEAD instead of encrypting with a simple hash?

I hear a lot about AEAD encryption (GCM, EAX, ...). Why is it unsecure (it seems to be as AEAD exists) to do do that: Imagine a block of data, hash it, append the hash to the data, then encrypt the ...
2
votes
1answer
100 views

Using SHA2 as random number generator?

I need to generate secure pseudorandom numbers in an embedded system. Instead of having to port some RNG library, could I just use an existing SHA2 function as a random number generator (n-th random ...
5
votes
1answer
34 views

Would increasing the “target space” of MD5 collisions make it significantly easier to find a collision?

This is tangential to this question, which asks about generating a file to match an exact MD5 hash. My question is if it would be significantly easier to generate a file that is "within X digits ...
0
votes
0answers
61 views

Why cant we use AES to hash a password, instead of a hash function?

AES needs a key in order to work, hashing-algorithms do not. Suppose we have a fixed key for AES, why don't we simply hash our keys with that? As with hash functions, AES has arbitrary input size, ...
2
votes
1answer
100 views

Cryptographic function that can 'pack' numbers

Is there a cryptographic algorithm that can 'pack' a bunch of strings/numbers and "confirm" if a string/numbers exists (later in the code) while keeping the output hidden? For example, I have ...
0
votes
0answers
53 views

Is it something wrong in proof of Preservation of Collision Resistance for Merkle-Damgard?

I wonder about this proof. Can someone help me? I try to prove for Presevation of Collision Resistance for Merkle-Damgard as guide in end of this paper (Security Reductions of the Second Round SHA-3 ...
4
votes
2answers
1k views

Are My Answers to This Hash Question Correct?

Question When determining the security of a hash system, the cryptanalyst tries the following attacks. (a) If the attacker is NOT allowed to modify the original message, determine the number of hash ...
0
votes
0answers
73 views

Does my encryption scheme make sense?

I'm looking at a way to encrypt a file so that our software will only allow users with the proper license to use it (see details below). I have some notions on that topic, but barely more than knowing ...
22
votes
1answer
12k views

What are the odds of collisions for a hash function with 256-bit output?

There are some related questions on the net but I did not understand their solutions. I am reading in a textbook about methods of finding a collision. It states to consider a collision for a hash ...
6
votes
1answer
141 views

Is it possible to have a signature that signs itself?

This is a curiosity. I don't see any value (yet) of using this. Is it possible to have a signature that signs itself? What I mean is that when you send a signed message, you send something like $(...
0
votes
0answers
25 views

Corona Contact Tracing message exchange

For a university project, I have to design a contact tracing protocol. In my approach, a blockchain is used. Every participant has to generate 3 nonces for every contact. They are hashed in multiple ...
0
votes
1answer
63 views

Is CRC32C (any) better than CRC32(B)?

Is CRC32C (any) better than CRC32(B)? I read that CRC32C (alias Castagnoli) is better than CRC32 (sometimes referred as CRC32B) in detecting errors but what that exactly means and how to check it ...
1
vote
1answer
47 views

Interchangeability of hash outputs

I'm looking at tweetnacl, its crypto_sign_keypair, crypto_sign, and crypto_sign_open ...
2
votes
1answer
62 views

Difficulty to find the pre-images of a pair of hash result such that given $a,b$, $H(x_1)=aH(x_2)+b$?

Suppose given fix values $a,b$, how difficult to find a pair of sha256 pre-images $x_1,x_2$ such that $H(x_2)=aH(x_1)+b$? How difficult to find 4 hash pre-images $x_1,x_2,x_3,x_4$ such that $\dfrac{H(...
5
votes
1answer
155 views

Hash multiset to point on elliptic curve where $A = 0$

I want to hash a multiset to a point on the elliptic curve $y^2 = x^3 + 3$ over a finite field of some 254-bit prime order, where $P = 3 \pmod 4$. Moreover, I want this hash to be incremental, in that ...
3
votes
2answers
5k views

Can someone explain RSA-PSS to me?

I can't find any usable resources about it online (at least ones that make sense to me right now), so any links to articles or if you could explain it to me would be greatly appreciated. What I don't ...
1
vote
0answers
42 views

Exploiting weak hash functions in RSA-PSS

I'm just trying to understand how a Weak/broken hash can break RSA-PSS or any other signature/encryption that uses it. I know you can forge another message that has the same hash but that message ...
2
votes
0answers
31 views

Is it impossible to model a homomorphic hash function as a random oracle?

Recall that, by definition, on input a query $q$, a random oracle $H$ can output a fresh random string as its response $H(q)$ (if this query has not been seen before). My understanding. A homomorphic ...
0
votes
1answer
47 views

EAX vs CTR vs XTS + cascade ciphers in disk encryption hell

Often when I stumble across something interesting, I lose myself in the most overkill ways of implementing it. Today it was full disk encryption: I'm about to move to QubesOS, and I want to secure my ...
0
votes
1answer
66 views

Potential weaknesses when combining hash functions?

For consistency's sake, M is the message, H1 and H2 are separate hash functions. I've heard that concatenation or XORing hash outputs together do not provide improved security against preimage and ...

1
2 3 4 5
45