Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

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.

1
vote
1answer
91 views

Where do the constants for SHA-1/2/3 come from?

My request is: I need to know the source of constants (shift constants, IV, or S-Box) for the following algorithms: SHA-1 SHA-2 (all sizes) SHA-3 Examples: BLOWFISH uses the hexadecimal ...
1
vote
2answers
88 views

Verify partial message given hash of full message

I need to verify partial downloads (retrieved sequentially), given a (preferably short) hash of the complete download. Given a message $m_0 \mathbin\| m_1 \mathbin\| m_2 \mathbin\| \cdots$, hash ...
0
votes
0answers
22 views
0
votes
1answer
36 views

Probabilistic verification of signature schemes like RSA?

I was wondering if there were any verification algorithm in the literature that enables a "probabilistic" verification of well-known signature schemes? For RSA signature verification for example, is ...
1
vote
5answers
143 views

Why are password database breaches bad if cryptographic hashes can't be reversed? [on hold]

If companies such as Facebook store our passwords as hashes, when they are leaked how can this be a threat to the users? I thought of it because nowadays we do not have computational power to break ...
1
vote
1answer
76 views

Are Merkle Dags really Dags in most cases?

Let $H$ a cryptographic hash function of image length $n+1$ and $s_0$, $s_1$, ... , $s_k$ a finite sequence of bitstrings (length $>n+1$), such that $s_j$ contains a hash of $s_{j-1}$ for all $1\...
2
votes
3answers
53 views

“Work factor” and “iteration count” nomenclature in adaptive functions

In adaptive functions like PBKDF2 / bcrypt I often read people refer to "iteration count" and others refer to "work factor", and they seem to be used interchangeably (even though they're not - the ...
14
votes
3answers
3k views

Can we assume that a hash function with high collision resistance also means a highly uniform distribution?

I want to use a hash function to generate a random sequence from number 0-n. And so I would like to find a good function that results in values that are seemingly random (does not need to be secure), ...
0
votes
0answers
15 views

What happens if I send a XRP transaction to a blank TAG when I was supposed to send to a specifc TAG? [migrated]

I sent XRP to a blank TAG while I was supposed to send to the éxchange's TAG. The address is the one from the exchange but the TAG was left blank. The exchange says that they can't recover the money. ...
2
votes
2answers
56 views

Does it make any difference when salting database passwords with Random vs SecureRandom?

I want to salt database passwords and then compute the hash but I wonder if I should use Random or SecureRandom? From an attacker perspective would it be easy to break if Random is used or ...
0
votes
1answer
61 views

Hashing functions - How to define them?

Let $\mathcal{G}$ be a cyclic additive group for an elliptic curve $E\, / \ \,\mathbb{F}_p$, and let $p, n$ be two large prime numbers (e.g., we can consider $\texttt{secp160r1}$ with $p = 160$ bit ...
2
votes
1answer
74 views

Cryptographic hash function based on logistic map?

Is there any secure cryptographic hash function based on the logistic map?
0
votes
1answer
33 views

Is there a lower limit on message length for signature?

I was working on a tool that signs small messages (~20 bytes) when a question occurred about message size: What would be the risk of using extremely small/restricted input (say, 5 bytes of hexadecimal ...
4
votes
1answer
120 views

What are the advantages of SM3 and SM4 compared to NIST-approved algorithms (SHA3 and AES)

Armv8.4-A will add extended support for more cryptographic primitives, to include SM3, which is a cryptographic hash function used in the Chinese National Standard; and SM4, a 128-bit block cipher; ...
2
votes
3answers
111 views

How can a hash have a fixed length?

I am very new to cryptography, I apologize if my question is so basic. I do not understand how a hash can have a fixed length, because you can have infinite inputs to a hash function. With a fixed ...
9
votes
3answers
1k views

Smallest Guaranteed hash collision cycle length

If I take the sha-256 of an empty string, and apply the hash function $2^{256}!$ times, will I end up with the same hash that I started with? Is the smallest required cycle equal to the LCM of $1$ to ...
2
votes
2answers
146 views

Why do the non-leaf Nodes of Merkle tree need to be hashed?

Given the standard Merkle Tree as shown Wikipedia. I am having a hard time understanding why Hash(Hash(Leaf A)|| Hash(Leaf B)) at the parent of A and B is ...
-1
votes
1answer
41 views

Is it possible for a hash in SHA-256 to have more than 8 digits? [closed]

Is it ever possible for a hash to have more than 8 digits in SHA-256?
0
votes
2answers
77 views

Is it Ok in practice to rely only on the first 64 bits of a scrypt hash in this scenario?

I’m in a situation where I need to perform authentication against a large set of exactly 8 bytes longs passwords (with however full choice of encoding from the user and even custom encoding support): ...
0
votes
0answers
39 views

Why initialize values and array SHA256 with specific buffer?

Why initialize values and array SHA256 with specific buffer? ...
2
votes
3answers
123 views

Blake2 vs md5 for checksum / file integrity

I'm working on something that requires computing a checksum / file integrity. I've heard MD5 was no longer recommended. Should I use Blake2 instead? Is there a specific variant of Blake2 I should use ...
0
votes
2answers
107 views

How is the hash for a file calculated?

Is the file just read bit by bit to calculate the hash with those values or is there more to it? Are there any resources to read a bit more about file hashing?
0
votes
0answers
62 views

19 out of 24 words of BIP39 passphrase (brute-force last 5?)

I have managed to lose 5 words of my 24 word Ledger Nano S recovery phrase. I have words 1-19 but I am missing words 20-24. I have significant holdings on the wallet so would very much like to recover ...
1
vote
2answers
153 views

Does it matter if I publish only publish good or bad MD5 hashes after recovering from a hack?

(This question is a follow-up from another question I asked about MD5, which is why I'm insisting on using MD5 in this question as well) My imaginary Linux distribution, Sushi Linux has had a big ...
24
votes
8answers
8k views

Is there really no use for MD5 anymore?

I read an article about password schemes that makes two seemingly conflicting claims: MD5 is broken; it’s too slow to use as a general purpose hash; etc The problem is that MD5 is fast I know ...
0
votes
0answers
22 views

Security implications of an extra inner encrypt for a single block Matyas-Meyer-Oseas hash function

Was giving some thought to simple MMO constructions for fast single block hash functions for things like PQ crypto. There's Haraka, but that's not standard and readily available while simple AES is in ...
1
vote
1answer
82 views

SHA256 message schedule examples

I need some example values for the message schedule stage of SHA256 to test this part of my implementation. If possible in binary, for the string 'abc'.
0
votes
1answer
55 views

How to generate a unique numerical value for an alpha-numeric string?

I need to create a unique numerical value for every alpha-numeric string input. Size of output numerical value can be of any size like 32, 64 128 bits. The input string will always be a mongoID type ...
0
votes
2answers
75 views

Does there exist equivalent hash function?

Is it possible to find equivalent hash function? Under equivalent, i assume same input produce same output, but they have different initial integer values and/or different set of bitwise operators. Or ...
1
vote
1answer
72 views

How simple hash provide message authentication?

This structure provides message authentication. My question is if someone finds the key he can simply change the message and compute new hash according new message and send it to the receiver. If so, ...
1
vote
1answer
60 views

ECDSA signature of a random 32 byte number vs. the hash of the number

I'm working on an application that involves signing a 32 byte random number generated by the OS. Assuming the RNG works as intended, is it safe to sign the random number itself rather than a hash of ...
3
votes
1answer
54 views

What is the smallest size of the hash output?

Suppose we want to make the hash pre-image resistant to 40 bit security (success chance is $2^{−40}$). What would be the smallest size of the hash output?
1
vote
0answers
63 views

Overcome MD5-RSA Signature verification

I asked this question already at the Information Security SO site, but my research on how to overcome this problem ended always on the crypto site. That's why I will try to find some help here :) I ...
1
vote
1answer
47 views

deterministic uuidv4 -> uuidv4

I need to copy a graph of elements with uuidv4s each, and separately stored relations containing element uuidv4s. On copy, I ...
0
votes
1answer
30 views

Difference between one-way encryption, Transparent data encryption (TDE) and data encryption

What is the main difference between one-way encryption, Transparent data encryption (TDE) and data encryption? If one needs to store passwords or credit card details in the DB, which one is best to ...
1
vote
0answers
24 views

Round counts and permutation usage for hashing for a Merkle tree

Are there any current recommendations for performant hashing in a Merkle tree? It appears the hash based signatures in Sphincs use Blake2 everywhere (see Table 1 on page 22 of https://sphincs.cr.yp....
0
votes
1answer
70 views

Block chain and storage issues

On reading about block chain technology, it was observed that it leverages the distributed ledger technology through P2P, here integrity is ensured through hash computed by miners, and then is ...
2
votes
1answer
84 views

Use a hash-function twice

I'm creating a small messenger and I wanted to know if it makes sense to store user passwords double-hashed in our backend-database. I wanted the user the register in an app, which should save a hash ...
1
vote
0answers
31 views

How to prove security of scheme constructed by Hash then PRP

Suppose there is a scheme where a message is first hashed and then sent to a PRP. If the hash is done using an $\epsilon$-bounded universal hash function and the PRP $K\times \{0,1\}^n\rightarrow\{0,1\...
1
vote
2answers
120 views

Hash collisions in sha512 hash of secp256k1 public keys

For a sha512 hash of a secp256k1 public key, how many other public keys could generate that hash? I would assume zero since the key size is equal to the hash length (secp256k1 public keys are 64 bytes,...
7
votes
1answer
3k views

AES: Why is it a good practice to use only the first 16 bytes of a hash for encryption?

I'd like to encrypt Text with AES/CTR and a password defined by the user in java. I already checked the internet (and stackoverflow) for answers. The most used version is to hash the user password ...
2
votes
2answers
238 views

Have there been efforts to prevent length extension attacks of hashing algorithms that are based on the Merkle–Damgård construction?

Have there ever been some publicized efforts to prevent length extension attacks of hashing algorithms that are based on the Merkle–Damgård construction (MD5, SHA1, SHA2, ...)?
4
votes
2answers
175 views

Assumptions on one-way functions

What are the assumptions we make to propose a one-way function? I only know of some number theoretic assumptions, but what are the other assumptions you can possibly make, which if true, would imply ...
0
votes
2answers
130 views

Cryptographic hash where the hashing function input is similar to the result

I was wondering if there is a cryptographic hash where the resulting hash is identical to the input for the hash function. If this is the case, would it be a weakness in the hashing function?
-1
votes
1answer
61 views

Hashing algorithm with fixed range rather than fixed size output [closed]

I have read that output that varies by key size or file size can leak information. So if it should produce fixed size then what is the scenario if it produces fixed range? By fixed range I mean that ...
1
vote
1answer
46 views

Facebook app-scoped identifiers and similar - implementing stateless ID obfuscation

After certain privacy concerns Facebook rolled out a bunch of changes to their APIs, one being "scoping" user identifiers per app. In effect, this means that Alice's canonical facebook user ID is ...
0
votes
1answer
78 views

Is there any Corelation between the SHA256 and SHA512 hash of the same data?

Is there any Corelation between the SHA256 and SHA512 hash of the same data ?
0
votes
0answers
40 views

Storing secrets on a peer-to-peer network by splitting up AONT data

I've come up with a way to transform a stream of bytes such that if any single bit is modified, it cannot be transformed back into its original state. Here's how it works: Encoding Get hash ...
-2
votes
1answer
88 views

Where can I find some thought-provoking questions on the fundamentals of Cryptography? [closed]

The question might sound broad, allow me to explain. Cryptography is a diverse domain. I have been in Crypto research since last four years. Recently, one of my colleague got interviewed by an IT ...
0
votes
2answers
100 views

Hash functions with variable and fixed length inputs

I was told that a hash function (mostly looking at the SHA-* family) should have input strings of variant length provided first, and those of fixed length after (ie salt), in order to avoid some kind ...