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

“official” guidelines about the minimum length of a truncated hash

I am looking for some reference documentation suggesting a minimum reasonable length for a truncated hash (specifically, a truncated SHA-256 hash) to ensure preimage resistance. Obviously, truncating ...
0
votes
1answer
33 views

The magic box puzzle: How to implement a verifiable self-contained secret system?

Imagine we have a magic box that will open only if we pronounce the secret words. Everybody at the beginning of the game have some verifiable proof of the correct secret words. During the first phase ...
1
vote
1answer
64 views

BLAKE2: What is the difference between the salt and the personalization?

Libsodium builds their KDF on top of BLAKE2b: BLAKE2B-subkeylen(key=key, message={}, salt=subkey_id || {0}, personal=ctx || {0}) Besides the key, the function ...
-2
votes
0answers
28 views

How many hashes we need to compute in a 32bit hash to find two messages with the same hash?

I am trying to understand how does the hashing works, so my question is How many hashes we need to compute in a 32 bits hash to find two messages with the same hash?
0
votes
0answers
22 views

Secret community forming based on zero-knowledge proof (IOT)

I want to discuss a simplistic scheme that comes to my mind, after I read about zero-knowledge proof and some fermentation time. I should mention that this is not born out of a business need or ...
0
votes
0answers
40 views

XORing Algorithm Outputs To Guard Against Breakthroughs

My question is how safe is XORing two algorithm outputs together... ...For Symmetric Encryption: Master key from CSPRNG ==> MK HKDF-Expand(...
1
vote
1answer
54 views

In PKI, with a hash-encrypted message (first hashed, then encrypted), how is the plaintext ever retrieved?

Consider a normal PKI encryption flow - hash the plaintext, then encrypt the hash with the private key of the sender and then encrypt it with the public key of the recipient. All this is good - and I ...
-2
votes
0answers
40 views

Difference of Hash function and Cryptographic Accumulator

What's the difference between a one-way hash function and a cryptographic accumulator?Both of them are one way hash function but the only main difference is accumulator has quasi commutative property. ...
0
votes
1answer
117 views

How safe is my method

I'm building a website. I have an API which takes 2 parameters: delete_user(user_id, hash). And there is method to evaluate hash using SHA512: ...
0
votes
1answer
74 views

Scrypt KDF cipher (scrypt CLI) - known vulnerabilities and cryptanalysis?

There is a scrypt cipher that is used for example by some cryptos like LItecoin for their mining algorithm. I never heard of scrypt. I know eg SHA-256 which is well analyzed and considered as secure ...
1
vote
1answer
70 views

Good pre-image resistance value for hash visualization

I want to do "hash visualization", i.e. derive a human-meaningful information from a hash, like a phrase or an avatar. But the current techniques usually don't use many bits, for example tripphrases ...
0
votes
2answers
64 views

Is there something like a secure hashmap?

TL;DR: Is there such a thing as a hashmap whose contents cannot be read unless you have the right encryption key, and where each encryption key only works for a specific key value pair? More context: ...
0
votes
1answer
54 views

Does hashing a hash of a password over and over again increase its security?

I've heard of password cracking attacks using a list of commonly used passwords. Suppose in my situation, I can never be sure about the strength of the password, that a user inputs to my interface. So ...
10
votes
1answer
177 views

Minimizing exchanges for ZK proof of a message with given SHA-256

Consider the problem of proving knowledge of a message $m$ which has a certain public SHA-256 hash $h$, without disclosing $m$ or usable information about it, while minimizing the information exchange ...
7
votes
4answers
241 views

Can I replace SHA-1 with SHA-512/160 to address Shambles?

The destination is software (within a remote trust boundary) that expects SHA-1 results. Would it be safer for the source (that's within my own trust boundary) to replace my SHA-1 computation at my ...
2
votes
1answer
76 views

Partial key reveal for SHA-256 hash

Let's say I have a message 0123456789abcdefghijklmnopqrstuvwxyz which gives me the SHA-256 hash ...
3
votes
2answers
44 views

How a chosen prefix collision is more useful than a standard collision concerning hashing functions?

Recently a paper has been released about SHA-1 chosen prefix collision. They present what a chosen prefix collision is, but I don't understand how is it more interesting than a standard collision ? ...
16
votes
1answer
4k views

In 2020, SHA-1 practically broken in chosen-prefix collision (CP-collision). Can double SHA-1 hashing prevent CP-collision?

In a recent study SHA-1 is a Shambles - First Chosen-Prefix Collision on SHA-1 and Application to the PGP Web of Trust by Gaëtan Leurent and Thomas Peyrin. 2020, they showed the first practical chosen-...
1
vote
1answer
51 views

Attack on envelop mac

As I am reading the Paper: MDx-MAC and building fast MACs from hash functions I am having trouble understanding the Attack on the Envelope Method (4.3). In particular, I am not sure what chaining ...
1
vote
0answers
80 views

Idea behind internal SHA-2 functions

In the SHA-2 family, specifically SHA-256, there are functions called Sigma0 and Sigma1, which look like this: ...
0
votes
0answers
27 views

Possible Local DNS Servers With Hashing? [migrated]

DNS is centralized across several servers to stop the following: Querying the IP for the domain name. Continuously querying the domain name to do #1. Changing an entry to the database. What if you: ...
2
votes
1answer
63 views

How to store encrypted solutions of a find location game?

I'm coding a bot on Telegram to sustain a quiz game. A group of people (authors) can upload photos of streets or particular landscapes that they have found on internet, without any description, and ...
0
votes
0answers
38 views

If we have chunk encryption for AES-Rijndael-CBC, should we hash Authenticate/tag each single chunk with a hash vs whole file?

was frustrated by which one to pick and my brain could not guess which one is better Authenticate the whole file as one with a hash vs authenticating each ciphered text. So very quickly: i have super ...
0
votes
1answer
26 views

DSA authenticity/integrity

Does checking sig with DSA implies both that the sender is verified , and the msg is original without change of any bit? (case i dont have a reference HASH for that file, only public key)
3
votes
1answer
74 views

Can the confusion/diffusion of a hash algorithm be quantified?

I am wondering whether the confusion and diffusion are quantified in any way when we examine hashing algorithms and, if so, how they are quantified and what units (if any) are used to represent them.
0
votes
0answers
23 views

Unilateral Authentication hash type for verification

The scenario: Alice wants to exchange information with Bob on an encrypted channel proxying through Pete (Pete can't read the info sent between Alice and Bob), but doesn't want Bob to know who she is, ...
4
votes
1answer
553 views

Multiple AES Key Derivation from a master key

I need cryptography advice regarding this issue. Kamus is a service that encrypts secrets for applications running on Kubernetes. When using AES (actually, Rijndael) symmetric encryption, Kamus uses ...
1
vote
1answer
51 views

Are there low-bit hashing or encryption functions for teaching cryptographical concepts?

I understand how hashing and encryption/decryption work at a very high level, where the functions work as a black box. Hashing scrambles the input in a non-uniquely reversible way, whereas encryption ...
4
votes
2answers
179 views

“One-Wayness” of SHA 1

I recently started learning about Hash Functions for my first time, and I've gone through and have tried to understand the SHA1 process. Brilliant does an excellent job of explaining it step by step. ...
0
votes
0answers
28 views

MD5 padding bit in 0 and 1 [duplicate]

How can I calculate the padding in bits (0,1)? is there is a way to calculate and find all the bits in the padding? and can you please show me an example.
1
vote
2answers
105 views

Read the result of the hash by SHA-256 as a number

I want to read the full output hash of SHA-256 as a number. How I can do it? Is it in the range of 0 to 2^256?
0
votes
0answers
40 views

What's the use of HMAC in PBKDF2? [duplicate]

As far as I know, PBKDF2 uses an underlying pseudorandom function in order to generate a hash (like SHA256) so as far I understood PBKDF2 is basically a hash function that uses an underlying function ...
6
votes
1answer
107 views

Do a 160-bit SHA-1 hash and a 160-bit slice of a SHA-256 hash have the same strength in terms of collision-free?

Take OpenPGP fingerprint for example. If the 40-digit hex standard remains unchanged, would it be helpful to upgrade SHA-1 to SHA-256 (but only taking the last 160 bits), in terms of reducing the risk ...
0
votes
1answer
297 views

SHA256 output to 1-6 number range?

I want to calculate a random number (1 to 6) from the output of sha256. Can I assurance the probability of 6 abilities is the same?
1
vote
1answer
117 views

Protect the original message of a hash from brute force

My apologies for the somewhat inaccurate terminology. Basically I have some simple messages (entropy ~50 bits) the user will use for registration. The messages should remain private, and I don't ...
12
votes
4answers
3k views

Can we use a Cryptographic hash function to generate infinite random numbers?

I have seen that there are PRNG that can generate a specific number of random-numbers. The Mersenne Twister as an example, can generate 2**19937 (if I'm not wrong) but... can we use a cryptographic ...
2
votes
2answers
226 views

Does stronger cryptographic hashes also imply being better at verifying integrity?

What I know so far Fact 1) I know that all cryptographic hash functions have the following properties They are many-to-one in nature They produce fixed size outputs Given an output ...
2
votes
0answers
68 views

How many bits of cryptographic security do these XOR Mid-Square random numbers have?

This pseudo-random number generator uses only XOR and Mid-Square operations: Get one secret 128-bit truly random seed $R_0$ Generate a million secret $R_j$ by the recurrences (for $1\le j\le 1000000$)...
0
votes
0answers
23 views

How is a salt used in WPA-PSK PBKDF2 key generation for both sides

I'm just learning about WPA-PSK and d I'm already stuck. My understanding is that both the AP and STA share the PSK, which is generated from PBKDF2 function. Which according to wikipedia is: ...
0
votes
0answers
37 views

What is degree of state bits and how do i count it?

in the this paper,section 3,autors attack hamsi-256.Also they explain the weakness that are exploited.Im not so good at math,and also not native english speacker, so i dont understand term "degree of ...
1
vote
0answers
43 views

Why is this attack complexity equal that exact number of bit operations?

in the this paper,section 3,autors attack hamsi-256. Im trying to make a parametrized version, so i need to understand how do they estimate the complexity of attack in bit operations,that reads as ...
0
votes
1answer
63 views

Can anybody please explain why is the probabilty of finding a desired message for random chaining values equal $2^{-224}$?

Can someone explain why does probability is equal $2^{-224}$ in the following piece of paper? The length of messages blocks in Hamsi is equal 32 and the length of chaining values is equal 256.
2
votes
1answer
58 views

Checksum for bailing early on first corrupt byte in stream?

Suppose you want to transmit bytes of a file from computer a to b, but you want to bail early if any of the bytes are wrong. It’s easy to prescribe a hash/checksum implementation for the entire file. ...
2
votes
1answer
78 views

What's the difference between a hash chain, transaction chain and a blockchain?

Can anyone explain to me what the difference is between a hash chain, transaction chain and a blockchain?
0
votes
1answer
62 views

An unusual use-case for HMAC as compression function in web browsers

It's an unfortunate fact that, right now (2019), browsers don't expose standardized streaming hashing interfaces in SubtleCrypto. The only way to hash a file, is to ...
1
vote
1answer
54 views

Infinite one time pads using a pseudorandom hash function [duplicate]

Paul Christiano writes (source): I’ll assume that we have some 256 bit cryptographic hash function F [...] The first important observation is that a 256-bit shared secret allows Alice and Bob to ...
0
votes
1answer
67 views

What is the probability of a collision in SHA-512 when the input is 512 bits of data

Although this question is strongly related to my previous question, it's certainly not the same: Suppose the input of SHA-512 is 512 bits of data (so exactly the same size as the output). If I would ...
1
vote
2answers
1k views

Are there parts of a SHA-512 hash that occur more often then others?

Suppose I have a 'begin' password that I can remember. I calculate it's SHA-512 hash, transform it to base-64 and check if it has a least 1 lowercase, 1 number, 1 capital, and 1 sign. If this is not ...
1
vote
1answer
87 views

Why use PBKDF2 over SHA-512 to derive AES encryption key? [duplicate]

Suppose I am using user passwords to derive AES-128-CBC encryption key. This key will be used to encrypt some sensitive data for the user so that even the website owner / operator can not decrypt it. ...
1
vote
1answer
81 views

Supercomputer to crash hash

For NVIDIA TESLA V100 I know a hashcat performance for SHA1: it is about 17000 MH/s. Performance index for V100 is FP32 5120, FP64 2560. But what about supercomputers? For example Summit ...