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
2 votes
1 answer
248 views

Generate a key with a size bigger than the hash output length/security, is it possible? [duplicate]

Let's suppose I want to generate a 2048-bit key from a hash function with security up to 512-bits (such as Blake2b). I take 4 high-resolution photos, hash them with a hash output length of 512-bits ...
2 votes
2 answers
86 views

Hashing Passwords and Hash Functions

I'm a complete noob. I was reading up on hash functions. So if a bank has its user password's run through a hash function, it'll produce a unique hash for every password right? Thus, even if hackers ...
0 votes
0 answers
58 views

Checking if a function is collision-resistant

Consider a prime order cyclic group $\Bbb G$ of order $q$ with generator $g$. Then consider the function$$f:\Bbb Z^n_q\to\Bbb G\\(\alpha_1,\alpha_2,...,\alpha_n)\mapsto g^{\alpha_1\cdot\alpha_2...\...
0 votes
0 answers
70 views

Looking for a hash function (not necessarily cryptographic) where similar inputs return dissimilar outputs

I have the need to take a string and return a color. One requirement is that the same name always returns the same color. Another is that similar names should not return similar colors. I understand ...
  • 1
2 votes
1 answer
114 views

More efficient way of iterative hashing

Here is a possible way to perform iterative cryptographic hashing twice as fast as in the ordinary way. Given a compression function $f: \{0,1\}^{a+b} \rightarrow \{0,1\}^b$. Assume the message is of ...
  • 120
1 vote
1 answer
517 views

Is this authentication protocol secure against both eavesdropping and server database disclosure?

Consider the following protocol from the book "Network Security: Private Communication in a Public World" by Kaufman et al. Alice knows a password. Bob, a server that will authenticate ...
1 vote
1 answer
51 views

vary length hash collision on deterministic block cipher

I am trying to learn attack on hash collision. I guess for this scheme, it might be possible to use messages with different lengths to find a pair of same ciphertexts. An attempt is to use the same ...
0 votes
0 answers
34 views

How Davies–Meyer does work? [duplicate]

I am here so if I asked something wrong or in the wrong way please let me know. How to hash compression large data into the fixed size of the string. Edit: How Davies–Meyer does work? Take the example ...
1 vote
0 answers
70 views

Cryptographic hash function to map interval onto itself

Is there any existing approach to construct perfect hash function that map [0, M) to [0, M)? It should be one to one mapping and ...
1 vote
0 answers
75 views

How to find strength of a cryptographic hash function?

I am having an idea to create a cryptographic hashing algorithm. I found a mathematical function $f: x \rightarrow y$ . By using Merkle-Damgård construction wide pipe, I designed a hashing function. ...
0 votes
1 answer
136 views

Using the hash of the plaintext as the key

I want to start off by being very clear: I'm not designing a system around this, this is 100% a hypothetical I was toying with. Is there any harm in using the cryptographic hash of a plaintext as the ...
1 vote
0 answers
45 views

Generalizing randomized permutation functions

The paper on the "SNEIKEN and SNEIKHA" AE and HASH sponge-based algorithms, respectively, presents a 512-bit permutation function "SNEIK512" that, unlike other permutations (ie: ...
0 votes
1 answer
351 views

Is a perfect hash function the same concept as a collision-resistant hash function?

About collision-resistant hash functions, in Katz's Introduction to Modern Cryptography, 6.1 Definitions Hash functions are simply functions that take inputs of some length and compress them into ...
  • 151
0 votes
0 answers
15 views

How to assign md5 of another file to one wav file? [duplicate]

Good afternoon . Please tell me how to change the md5 hash of one wav file to the md5 hash of another wav file. I want to bypass the anti-cheat check on md5. Maybe there are online paid services? I ...
  • 1
2 votes
2 answers
233 views

Are pseudorandom generators, pseudorandom permutations and hash functions all keyless?

In Katz's Introduction to Modern Cryptography, Chapter 7 Practical Constructions of Symmetric-Key Primitives In previous chapters we have demonstrated how secure encryption schemes and message ...
  • 151
3 votes
1 answer
194 views

Why is RSA not a hashfunction?

The RSA-Assumption says that $(GenSP,F,SampleX)$ is one-way. So if we initialize an instance of RSA $(n,e), (n,d)$ and fairly forget the secret-key and SampleX uniformly distributed over $X, F = x^e \...
1 vote
1 answer
185 views

Can you recover $y$ if you have $x$ in Pedersen hash?

(this might be a silly question) Pedersen hash works in the following way: $(x, y) = kG$ where $k$ is the pre-image and $(x, y)$ is the resulting hash. Say we hide part of the hash to preserve privacy....
0 votes
0 answers
32 views

Checksum function verifying even numbers as the sum of two halves

Does the following checksum function make sense? I am attempting to show that for all even numbers there exists at least two summands that, when normalized to $\frac{1}{2}$, asymptotically sum to 1: $\...
0 votes
1 answer
336 views

SHA-256 compression functions without padding

Looking at the example of the null input (512 bits), it takes as input: input (Hex): ...
  • 137
1 vote
1 answer
97 views

Why do we need both bitmasks and keyed hash in SPHINCS+

I think one of them is related to multitarget attacks and the other is related to collision attacks. But I cannot find how hash based crypto related to hash collisions. 1-) Consider the following ...
  • 113
1 vote
1 answer
59 views

Inverses of the operation $(a,b) \mapsto a \oplus b\oplus ((a \land b) \ll 1)$ for fixed bit length

Background. In their paper about the cryptographic scheme NORX, the authors use a fast approximation of + by bitwise operations (taking fewer CPU cycles than proper addition) using the formula $$a+b \;...
1 vote
1 answer
115 views

Do proof of work hash function arguments have anything in common?

Some proof of work hashes have a lot of initial zeros. Do the arguments to the hash functions giving these zero containing hashes have anything in common, or are they stochastic? What I am looking ...
1 vote
1 answer
104 views

Understanding intermediate values - SHA2 - 512

I am trying to understand SHA2 - 512 algorithm, so I am following this document which has the intermediate values for the string "abc". At t=0, the values ...
  • 125
3 votes
1 answer
166 views

Can a collision resistant hash return zero?

Recently, I have been reading the original proof of GCM. It mentioned the properties of "almost universal" and "return zero" for hash function. I wonder if there is a connection ...
  • 125
3 votes
2 answers
320 views

Will Hashing Multiple Times Be More, Less, Or Similarly Secure As Hashing Once

Will Hashing Multiple Times Be More, Less, Or Similarly Secure As Hashing Once? Flushing out this question: I saw this claim: List item: ...
2 votes
1 answer
783 views

Understanding Hash collisions - why bad?

I read few answers about the question: why are hash collisions so dangerous? But did not get a really satisfying answer. Assume we are the first people who found a SHA256-collision, like sha256($§&...
  • 23
3 votes
1 answer
283 views

Can I treat SHA-256 hashes as 64 fair dice rolls with numbers between 1 and 16?

My understanding was that SHA-256 is pretty random or "random" enough. I assumed that would mean that every character would behave like a 1 to 16 dice roll. With this assumption, I would ...
  • 133
0 votes
0 answers
54 views

Collision resistance analysis

I am learning about collision resistance security notion of hash functions. However, I got confused when collision resistance experiment started using "keyed" hash functions in the ...
3 votes
0 answers
94 views

Can you use a keyed hash function as a general purpose hash function?

I'm working with SWIFFT, a provably secure keyed hash function, which is desirable to me. Unfortunately from what I gather it is ONLY a keyed hash function. Would there be any disadvantages or ...
2 votes
1 answer
638 views

Which hashing function is good enough for session IDs?

Background I'm building a URL shortener, and the URL to shorten may contain a SessionId. For the URL shortener to not compromise the security of the SessionId, I must use a shortening strategy that ...
0 votes
1 answer
143 views

Finding collisions of polynomial rolling hashes

A polynomial hash defines a hash as $H = c_1a^{k-1} + c_2a^{k-2} ... + c_ka^0$, all modulo $2^n$ (that is, in $GF(2^n)$). For brevity, let $c$ be a $k$ dimensional vector (encapsulating all the ...
0 votes
2 answers
373 views

Hash Comparison to Detect Ransomware File Encryption

As detailed in a separate question, I thought I had a way to detect the type of ransomware that encrypts files silently, and then decrypts them on the fly, so as to prevent the user from realizing ...
0 votes
1 answer
89 views

How safe is my pseudonymization procedure?

I work for an institution where patient data is collected and I am supposed to encrypt it. At the moment I do the following steps (with R): Randomly assigning an ...
2 votes
1 answer
220 views

Are such verification wormholes known, or even possible?

1. Scenario Suppose that we have a source that is generating one random value per, say, minute. So we have random value $x_1$ in $1$st minute, $x_2$ in $2$nd minute, $\ldots$, $x_n$ in the $n$th ...
  • 553
3 votes
1 answer
253 views

Impersonation attack on Lamport's one time password

So here I am, googling my brain on the possibilities of impersonation attempts by a MITM attacker on Lamport's one-time password scheme. Here's my scenario: Say we have a client and server setup. ...
  • 153
2 votes
2 answers
150 views

I don't quite understand hashing

I don't quite understand hashing, for encryption or otherwise. So, if you have a website, and a user signs up, you store his password as a hash. When they log in, your website takes the submitted ...
0 votes
1 answer
90 views

Standard way to generate pseudorandom bytes on demand

I considered Extendable-Output Function (XOF) with a random seed but it seems I would have to specify the output length at the start and store the entire output. I don't know how many bytes I will ...
  • 825
1 vote
2 answers
208 views

Does concept "Collision Resistance" and "Binding Commitment" in cryptography similar?

I found there are two perplexing and related concept "Collision Resistance" and "Computation Binding in Commitment" in cryptography. I found the wikipedia's explanation is ...
  • 205
0 votes
0 answers
64 views

How to map output of SHA to $\mathbb{F}_q^n$

I have an arbitrary string. I want to know how to implement a hash function $H: \{0,1\}^* \to \mathbb F_q^n$ which takes arbitrary strings to an element of $\mathbb{F}_q^n$. Here $\mathbb{F}_q$ ...
2 votes
1 answer
550 views

Argon2 allows a huge key length in input, but does it really provide the security of the key provided?

I read the Argon2 specification. It says in 3.1 (Page #5): Secret value K (serves as key if necessary, but we do not assume any key use by default) may have any length from $0$ to $2^{32}\text{-}1$ ...
1 vote
1 answer
129 views

How to most inexpensively extract 1 byte of uniformly distributed entropy from a 32-byte Curve25519 EC point

I'm looking for the simplest and most inexpensive hash with the following properties: Input: A 32-byte Curve25519 EC point containing approximately 125 bits of non-uniformly distributed entropy (...
  • 4,322
12 votes
5 answers
3k views

Hash paradox in an image file that contain hash text?

Is it possible to include a hash digest visibly in an image, such that the hash of the image itself is that same digest? When we draw the text of the hash in the image, we will of course change the ...
1 vote
1 answer
70 views

Checking equivalence among distributed sets

I have elements from $\{0, 1\}^{n}$ (range of a hash function) The master $A$ can have any subset of this range. There are clients that each have a subset from the space, too. I want to make sure that ...
  • 581
2 votes
2 answers
1k views

Is there collision in encryption like in hash functions?

In hash functions, $h(m) = h(m_1)$ is called collision and is very undesired that they are feasible to find as it undermines hash security. However, is there essentially analogous concern in ...
2 votes
1 answer
309 views

Benefits of hashing a particular seed in a PRNG

This question is linked with this question (stackoverflow) where I asked about a specific implementation detail of Python's random number generator (Mersenne Twister). Here, I have a slightly ...
4 votes
2 answers
357 views

Can a service provide a hash/encryption key to others that it itself cannot use?

Consider a service $S$ that receives hashes of documents from a number of providers. If two hashes match, it notifies the providers. We do not want anyone at the service to be able to identify the ...
  • 41
3 votes
2 answers
486 views

Can two different hash function create two unlinkable `ed25519` keys from the same randomness?

Assume the following scenario: Alice has access to 32 bytes of true randomness $s$. Alice hashes $s$ with SHA-512, and uses the resulting hash as the secret $d_{A}$ for ...
2 votes
0 answers
60 views

Hash verification by key

I want to implement the following algorithm, but don't know what tools to use. D - data I generate some universal value for D - Y I generate some random key - K, get a hash of D by this key - H I ...
3 votes
0 answers
575 views

What does j9T mean in yescrypt (from /etc/shadow)? [closed]

For example I have a shadow string $y$j9T$PaFEMV0mbpeadmHDv0Lp31$G/LliR3MqgdjEBcFC1E.s/3vlRofsZ0Wn5JyZHXAol5 There are 4 parts id : y (yescrypt) param : j9T salt :...
2 votes
1 answer
287 views

Encryption with AES128 (ECB) and Key validation

In my new challenge-project my server once upon a time is broadcasting an "onion" made of three layers encrypted with AES128 (ECB) - 16 bytes long over WiFi. I am using a WiFi Beacon Frame, ...
  • 123

1
3 4
5
6 7
58