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

Complexity of Hash mining/signing

While reading about mining in crypto currency, I found that it requires some leading bits of a hash function output to be 0. This boils down to preimage resistance of the hash function, hence done ...
1
vote
2answers
63 views

How does password_verify() function gets the salt from the password stored in DB?

I am creating a simple Sign up and Sign in form using PHP. At the sign up, I create hash using password_hash() function and then store it in the DB. At the time of Sign in, initially what I did was ...
1
vote
1answer
68 views

What are the encryption and hash techniques used in Facebook Diem?

Facebook plan a new cryptocurrency release called Diem. What are the hash and encryption techniques used and how are they constrained? The answers must be available in the Diem source code.
2
votes
1answer
42 views

In sha256, is it possible to use less information than the full preimage to prove that the prefix of the preimage is a certain string

Alice split a long string P into two segments A and B. A is relatively short and B is long. H = sha256(A + B) Bob does not know P, but knows H. Is it possible for ...
0
votes
1answer
50 views

Does my SHA-256 TableSalt algo give away the seed salt?

The Setup I have a table of values for which I need to compute a salted hash for each table-cell value. Furthermore, I need the salt for each table cell to be unique and unpredictable. (I can explain ...
1
vote
2answers
768 views

Can SHA512 and SHA3-512 Make Same Collisions?

Does combining those two different cryptographic hash functions in HMAC, when each hashes the same data separately, then saved together, guarantee zero possibily of a collision simultaneously or is ...
1
vote
1answer
76 views

is it efficient if blockchain uses double Hash algorithms $H_1$ and $H_2$?

I wonder is it efficient to use less Target condition and double hash algorithms with different target (or the same target with different Hash algorithms) and one nonce in a Block. Example Target 1 ...
1
vote
0answers
44 views

Remote Attestation: when to use Checksum and when to use a Cryptographic Hash function?

In computer security applications, to check the integrity of a specific data/program binary, a cryptographic hash function is normally deployed to generate a digest and compare it with a reference ...
2
votes
0answers
32 views

Confused about encapsulation using different types of hash functions

I'm reading Improved Efficiency for CCA-Secure Cryptosystems Built Using Identity-Based Encryption. In Section 4 there is a description of encapsulation schemes that says We suggest an encapsulation ...
4
votes
2answers
129 views

Expected Hamming distance of $a+b$ and $(a \oplus b) \oplus ((a \land b) \ll 1)$

Motivation. 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 \;...
0
votes
0answers
48 views

I'm having trouble understanding this [duplicate]

Let $x=(x_1,x_2,...x_n)∈\{0,1\}^n$ for $n∈\mathbb N$. Prove that if one-way functions (OWFs) exist, then there exists a one-way function f such that for every bit $i∈[1, n]$ there exists an algorithm $...
1
vote
1answer
34 views

Breaking merkle damgård construction that uses bitwise and?

I'm preparing for a exam in crypto course, and i'm doing some practice problems. I'm now playing with this problem: ...
2
votes
1answer
40 views

What is the padding block actually in merkle damgård?

I'm studying up on Merkle Damgård construction for hashing and having some trouble understanding the "padding block", at the end of the message blocks. When you look it up it says that in ...
0
votes
1answer
55 views

Would generating the 'digital signature' of a very short message be less work if you encrypted the message instead of it's hash?

Imagine one's computer clearsigned a message by encrypting the message with one's private key and storing the two (the plaintext and the ciphertext) together in a folder (and publishing the public key)...
3
votes
0answers
68 views

Approximating multiplication with few instances of $\oplus$, $\ll$, $\land$, $\lor$

In their paper about the AEAD scheme NORX, the authors mention that $a+b$ can be "well approximated" (this is a bit a hand-wavy statement) by $$a+b \; "="\; a\oplus b \oplus ((a\land b) \ll ...
0
votes
0answers
35 views

Is there a name for this simple identity verification scheme?

Once, while idly wondering, I came up with a simple scheme to prove the authenticity of a chain of messages given the authenticity of the first. It consists of putting a hash at the end of each ...
-1
votes
1answer
73 views

How do we know if someone has successfully discovered the steps of a hashing algorithm? [closed]

I was reading an article about how SHA-256 encrypts stuff (Here it is by the way) but how do we know the steps mentioned are true? I'm not a cryptography expert but I've tried making my own encryption ...
0
votes
1answer
104 views

Why are different private and public key generated in online brainwallets?

Why is that different wallet generating sites give different public and private keys when you enter the same passphrase even though they both use the same Algorithm (Sha 256)? Thank you P.S. Ok...one ...
0
votes
0answers
37 views

Why do you need to apply hash over DH shared key? [duplicate]

I`ve read multiple times that it is not safe to use the shared key resulted from DH key exchange directly and that you need to do a KDF or hash over it and then use the result as a key. Why is it not ...
6
votes
3answers
2k views

Password hash contained '\x00' in middle, resulting in ValueError from bcrypt.hashpw

I have some code that accepts a password in string format, and hash it with SHA3-512 before passing it to bcrypt for hashing. However, by some coincidence, I found a test case that produces a hash ...
0
votes
0answers
25 views

Security of generating one long hash and using half as a secret key and half as a “public” hash vs generating two hash values?

My question is what would be more secure, generating 2 hashes (one key and one hash) with the same password and two different salt values, or generating one long hash with a single salt, taking the ...
7
votes
1answer
201 views

Expandable hash function

I have been studying a cryptosystem using Mersenne primes. More specifically, this paper: https://eprint.iacr.org/2017/481.pdf I have implemented this cryptosystem in python but I am missing the key ...
0
votes
0answers
36 views

Equivalent keys in Hash Functions

Let's suppose I want to use a (keyed) hash function as a stream cipher, I provide a key and a message to be hashed as a counter (like a nonce), and so, XOR each hashed output block on the plaintext. ...
1
vote
1answer
57 views

sha256 - how many characters can we put in a message block?

since we can put 448 bit of the actual message in every block(56 characters), if I have a string of 56 charcters ...
0
votes
2answers
41 views

Shake256 Infinity Collision

Two diferents inputs can have the same output in $Shake256$ for every output size (for example, $Shake256(input_1, \ell) = Shake256(input_2,\ell)$ for every $\ell$)?
1
vote
0answers
13 views

Service match-up over encrypted channel by hashing service description and session ID?

I'm trying to set up a 'view anywhere' telemetry service over a WebRTC RTCDataChannel with on one end a browser and on the other end an embedded system using libdatachannel. The encrypted peer-to-peer ...
1
vote
1answer
77 views

Using SHA1 to obfuscate published resource IDs

First off, yes I do know that SHA1 is cryptographically insecure (and has been for a long time). So this question is more academic than anything. It's also very contrived, but bear with me. I want to ...
1
vote
1answer
54 views

Evaluate hash function [closed]

I am trying to figure out how to evaluate the security of a hash function. If I have defined a candidate hash function: $$H(x) = α^x\text{ mod }p$$ how do I then evaluate it with respect to collision ...
1
vote
2answers
155 views

Would hashing a password twice prevent naive attacks?

A common way of using MD5 or any other hashing algorithms to store passwords is to hash the password with a salt $$\text{hash}(\text{password} \mathbin\| \text{salt}).$$ This way, if an attacker wants ...
0
votes
0answers
30 views

TLS 1.3 Finished message

I am looking to RFC8448 and at page 7 it says: ...
0
votes
0answers
28 views

TLS1.3 transcript hash

From RFC8446: For concreteness, the transcript hash is always taken from the following sequence of handshake messages, starting at the first ClientHello and including only those messages that were ...
0
votes
0answers
38 views

How to estimate time / difficulty to brute force scrypt (or similar) hash at various short fixed lengh outputs?

My particular use case is a hash function that: Is slow / computationally expensive. It would take a pretty long time, or be infeasible to guess the input, if the hash output and the algorithm are ...
0
votes
1answer
94 views

Are zero knowledge proofs alternative private key encryption? [closed]

Are they the alternative to private keys. If I understand correctly, because of the increasing computational power in today's world, zero knowledge proofs are more safe than private keys ? Are these ...
0
votes
2answers
64 views

What does TLS 1.2 mean by SHA functions?

I'm looking at the technical docs for TLS 1.2 and it says it uses SHA (so hashing algorithms): 7.4.1.4.1. Signature Algorithms But hashing just digests an input, to do things like user authentication....
0
votes
0answers
20 views

XMSS vs MSS (Motivation)

I was reading XMSS and I watched some of the presentations about it by Dr. Andreas Hülsing. But I cannot underdstand what is our motivation to use XMSS with 1 layer. Why is it better than MSS? I know ...
1
vote
0answers
51 views

Comparison of SNARK-friendly hash algorithms MiMC7, Poseidon, Pederson?

There are some cryptographically secure hash algorithms designed to be efficient for SNARKs, STARKs and FHE. Some of them already implemented in Zcash, Zokrates and circom. The ones that I know of are:...
1
vote
1answer
108 views

Example of a Hash function which is second pre-image resistant but not collision resistant [duplicate]

We know that a collision resistant hash function is also second pre-image resistant. But the converse is not necessarily true. I am looking for the example of a hash function which is second pre-image ...
0
votes
0answers
40 views

Hashing function as a cipher in CTR mode [duplicate]

Can we use hashing function in CTR mode as a cipher? And our key could be a random initialization vector. Are there any practical problems with that idea, that we don't do this?
0
votes
0answers
15 views

Can a hash function be cyclic? [duplicate]

Is it possible for a hash function, SHA256 for example, to be a cyclic hash function, where the hash of the hash returns the original value? Example: ...
2
votes
1answer
82 views

How to produce a ternary value (3-face “dice roll”) digest from a message?

Apologies in advance if the terminology I am using in the title of this question, is flawed. I want an algorithm that will produce a ternary value (meaning from a set of three, as opposed to from a ...
1
vote
0answers
22 views

Can Litecoin & Bitcoin have overlapping Transaction Ids (txid) [closed]

Im currently coding my own transaction lookup page for cryptos. Since Litecoin and Bitcoin are so similar to their txid. I wanted to ask if its actually possible that these 2 currencies have ...
1
vote
1answer
63 views

Minimal Hamming distance of SHA512 hashes at bit flip

For $n\in\mathbb{N}$ let $\{0,1\}^n$ denote the set of $\{0,1\}$-vectors of length $n$. Let $\{0,1\}^* = \bigcup_{n\in\mathbb{N}}\{0,1\}^n$ denote the collection of all finite-length $\{0,1\}$-strings....
6
votes
2answers
451 views

SHA-512 - How difficult is it to find a hash digest beginning with at least twelve zeros?

I know it's possible to find a hash value with multiple zeroes in it, I know of some BitCoin hashes with it, but how difficult is it to find/create a hash digest with 12 or more leading hex zeroes in ...
2
votes
1answer
56 views

Why does Merkle-Damgård hashing involve putting the padding at the end instead of at the start?

Pretty much the title. We have that $x$ is a prefix of $PAD(x)$, instead of being a suffix - was that an arbitrary choice or is there a reason for it? Thank you.
9
votes
6answers
4k views

Is it possible that a SHA256 hash has the same hex character over and over again?

In theory, there are infinite inputs, that you can hash with SHA-256. So theoretically it would be possible that one hash string would read 0xaaaaaaaa... But would ...
2
votes
1answer
130 views

Number of rounds for constant header size in common hashes and XOFs

We compute hash $H(M_0\mathbin\|M_1)$ of size $d\ge1$ for some constant header $M_0$ of size $m_0$, and $\nu\ge1$ messages $M_1$ of random content and size $m_1$. For Merkle-Damgård hashes, a simple ...
3
votes
1answer
199 views

Yuval's birthday attack

I found this paper: https://www.researchgate.net/profile/Ganesh-Gupta-7/publication/271704029_What_is_Birthday_attack/links/54cfbdcc0cf24601c0958a1e/What-is-Birthday-attack.pdf The following attack is ...
4
votes
1answer
222 views

Weak and strong uniformity of cryptographic hash functions

For any $n\in\mathbb{N}$, let $\{0,1\}^n$ denote the set of $\{0,1\}$-strings of length $n$. For $n\in\mathbb{N}$ let $$\{0,1\}^* = \bigcup_{k\in\mathbb{N}}\{0,1\}^k \text{ and } \{0,1\}^{\leq n} = \...
0
votes
1answer
56 views

Building content-defined chunking with adversarial data preserving guarantees on splitting probability and global stability

I'm using the Prolly tree data structure. This structure operates on serialized data which it chunks at the byte level into pieces. To build trees recursively, the list of chunk hashes is itself ...
2
votes
1answer
46 views

Rolling Hash function over untrusted data: how to preserve statistical splitting properties?

I would like to know if there is a construction for a Rolling Hash function to be used to split the received untrusted data in chunks. The data is split whenever the hash function drops below a ...

1
2 3 4 5
50