# Tagged Questions

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 predict the output for a given input, find two inputs with the same output, or reconstruct the input from the output.

126 views

### Is there such a thing as a hash function with a fixed size input?

That seems like it would be a useful primitive. Using it in place of a block cipher in the Merkle–Damgård construction would give a variable-length hash, maybe without the tricky business with related ...
688 views

### Which bitwise operations are used in SHA-256?

From the wikipedia entry on SHA-256 I'm a bit confused about which operations actually go into the algorithm. From the pseudo code it appears the operations are $\texttt{xor}$, $\texttt{and}$, rotate, ...
24 views

### Why do we need Merkle–Damgård strengthening [duplicate]

Reading through some manuals, wikis and other documentation I'm learning about Merkle–Damgård construction. I understand why padding beginning with '1', followed by '0's is needed, but I can't ...
109 views

### How to find 64 collisions for a hash value?

The first block $M_0$ is one of 64 possible values, whereas the next six blocks $M_1...M_6$ are chosen randomly. The idea is to publish the SHA-1 hash of $M_0...M_6$, wait for the value of $M_0$ to be ...
117 views

### Transforming SHA-512 into SHA-512/256?

Based on my skimming over FIPS 180-4 it looks like the only difference between SHA-512 and SHA-512/256 is the initial hash value and the fact that the final output is truncated to 256 bits. My ...
89 views

62 views

### Cyclic group collision resistant keyed cryptographic hash function

I am self-studying cryptography from a book and have come across a really difficult question that's doing my head in. I would be very grateful if somebody can help me out here with this difficult ...
139 views

### Hash functions vs Stream Ciphers in terms of Speed

We know that it's possible to create a hash using a stream cipher (for instance, RC4 or AES in Counter Mode). As stated here: "A Pseudo Random Generator (PRG) and a hash function are both Pseudo ...
83 views

### comparison of security for identity based signature and Hashing (SHA-1) the identities

I would like to know which method can provide better security: using identity based signature or hashing the identities and message (using SHA-1) for authentication?
36 views

### NTRUSign Hashing

I have some trouble understanding the inner workings of NTRUSign. So what I have understood so far is, that when Alice wants to sign a message she does the following steps Convert Alice's message ...
91 views

### What effect does a salt have on attacks against hashes's fundamental properties?

I am interested in analyzing how adding a salt to our hashed passwords affects the three types of attacks we can use. The three types of attacks against hashes are as follows: We have the hashed ...
71 views

### Fast Forward Hash Signatures

As a follow up to the Q/A session: Small Quantum Signatures - Reality check needed I have implemented the discussed idea for a new short-quantum-safe signature system using fast-forwarding hash. It ...
92 views

### Doubts about Authenticated Data Structures logic

I am studying the theory of authenticated data structure, like Merkle Tree and I have a doubt: why use them? I explain better: why to be sure, for example, that a cloud provider didn't modify my files ...
230 views

### Why Merkle Tree doesn't suffer Birthday attack?

I am trying to understand why Merkle Tree doesn't suffer the birthday attack? Can you help me?
33 views

### Can knowing part of what was used to generate an md5 hash make it vulnerable? [duplicate]

Say I am able to ask a black box MD5 generator to generate 1,000,000 hashes given input $STRING$ Where $STRING$ is an arbitrary ...
99 views

### Unconditionally Secure Authentication

I'm trying to add the authentication for my One-Time Pad implementation. I know that to provide Unconditionally Secure Authentication I need to use the One-Time MAC authentication. But I don't ...
92 views

### Probability approximation of no collisions

I am comparing the actual probability of no collisions to the probability approximation formula of no collisions from the Understanding Cryptography text. The approximation is as follows: P(\text{...
23 views

### Does OEAP padding limit the size of my modulous to the size fo the hash function?

im looking at wiki at the moment as how to use oeap padding and it appears, help me out if im wrong as G(r) - expands r to the size of the padded message, I am then limited by the size of my hash ...
74 views

### Does including the size of the hashed data improve security over just the hash

Trying to settle a discussion at work. We are mostly concerned with pre-image resistance. Suppose we have a common secure hash function $H$ (e.g. SHA-1/SHA-2) and some message $M$ we want to hash. ...
88 views

### Continuous stream of strong randomness from limited entropy?

I need a continuous (infinite) strong random generator, but I've only got limited entropy as seed. I know there's already a contradiction there, but I'm looking for a practical approach. Suppose I ...
82 views

### Rogue CA Certificate MD5 Collision Control

Papers from Marc Stevens et al show that X509 certificates that rely on MD5 signatures can break the assumed security model, that is, it allows for a forged certificate to have the same signature as a ...
82 views

### Which hash function is usually used in RSA?

I know there are several available, however I can't seem to find whether there is one standard one or not. I think I understand the process of digital signatures, just wondering which has function is ...
69 views

### Cryptographic hash with ability to ignore specific bits based on a hidden pattern?

I'm looking to use password-style hashing to validate an environment, where some parts may be irrelevant. For example: ...
178 views

### Backdoorable hash function in password database

I want to use a (preferably established) hash function that is backdoorable in a password database. I want to do so because I need password escrow (being able to get the cleartext back. I want to ...
60 views

### Reversible hash function

I met the following 'reversible hash' function applied on a data $d$ consisting of $d_1, \ldots, d_n$ words: $h_0(d) = 0, h_i(d) = c ∗ (d_i + h_{i−1}(d))$, for $0 < i \leq n$. $c$ is a small, odd ...
70 views

### Memory hardness of key derivation function through XOR-ring multiple matrix values

For theoretical purposes in order to enhance my own understanding, and NOT in order to create my own cryptography, I am asking a question about the memory-hardness of a key derivation function ...
223 views

Suppose I want to keep a client's password database secure (not in plaintext), while still having access to the plaintext password. Now I generates a public/private keypair. Then I send the public ...
84 views

### Taking half of a X bits hash key as secure as using a X/2 bit hash function?

This question comes from a (nitpicking) comment by me in this SO question. I said that using the half of the output from a 256 bit hash function is worse than using a 128 bit hash function. My ...
1k views

### Password hashing security of argon2 versus bcrypt/PBKDF2?

I wonder if it can be approximated how much of a security margin the new argon2 hash, winner of the password hashing competition, can give over bcrypt or PBKDF2, for an attacker using large GPU ...
509 views

### Decoding base64 encoded message with a key

I am pentesting a database that where I found data which was base64 encoded. I tried the usual method of decoding base64, which didn't work. Later, I found in ...
160 views

### Memory hard key derivation (password hash) using AES encryption

I am restricted on a certain environment involving PHP and am currently unable to implement new memory hard hashes such as scrypt (and I am not trying to compete with the likes of scrypt). My ...
266 views

### Keyless integrity checking with SHA-256

Currently a program is loading some files from an untrustworthy source (e.g. a CDN) which could have been tampered with. It has a known SHA-256 hash of the file stored locally, then it downloads the ...
349 views

### Is there a scheme where two cipher texts can be proven to have the same (unencrypted) content?

Is there a scheme where two ciphertexts (encrypted with different keys) can be proven to have the same (plaintext) content without disclosing the plaintext or any private keys? I assume that the ...
176 views

### Proving collision resistance of a hash function?

Let $f$, $g$, and $h$ be hash functions that each map binary strings of length $2n$ to binary strings of length $n$. Suppose that $h(x) = f(g(x)||g(x))$. Prove that if $f$ and $g$ are collision ...
67 views

### How is a group element converted into a key?

I've only just started research on cryptography so I apologize if this is a basic question or I'm getting terms confused. I'm researching braid group cryptography and currently looking at the Anshel-...
44 views

### Is a hash “reset sequence” possible?

Is there such thing as "hash reset sequence" that brings hash to the same known state? A hash function has a state. In MD5 and others vulnerable to the length extension attack, the attack works by ...
166 views

### How does a Hashing algorithm always result in a digest in a fixed size?

This question revolves around the Hashing Algorithm attribute that the resulting digest is always the same size (also known as Fixed Width). For example, whether you hash the word "hello", or 10gb ...
319 views

### What is the use case for XOF functions (i.e. SHAKE128/256)?

FIPS 202 defines 2 functions: SHAKE128 SHAKE256 As extendable-output functions (XOFs) that can have variable output length. But in Appendix A.2 marks: it is possible to use an XOF as a hash ...
177 views

### Is there any relation between two strings with the same MD5 hash?

Is there any relation between two strings with the same MD5 hash? For example these two strings: ...
216 views

### Does complicating a flawed algorithm make it secure?

It's a basic question I guess, but I don't know the answer and I don't think that anyone asked it. Suppose I built a system, it relies on MD5 for security, suddenly I read am article on how easy are ...
53 views

### How many Hashes to find a digest of 2^{n−k}?

Given an n-bit cryptographic hash function $H$, how many messages should we expect to hash before finding a message $x$ such that $H(x) < 2^{n−k}$ for some integer k? My take: Shouldn't it simply ...
46 views

### Is it possible to have self-authenticated message?

Consider a text with $n$ words which $m$ words of it can be replaced with an equivalent word. Therefore we have $2^m$ different texts with the same meaning. For example "You are {so/very} {keen/eager}...
89 views

### Easy hash function collision

I'm designing a cryptography-breaking assignment for a college-level introductory security course, and I'm looking for a hash function which is reasonably easy (but not too easy) to generate ...
19 views

### Encrypted vs unencrypted digital signatures [duplicate]

Is there a difference in terms of security between An encrypted stream of bits obtained by encrypting a plaintext concatenated with it's signature $C = E_k(plaintext||\sigma)$ where $E$ is a ...
206 views

### Hash email address with a non-random salt for moderate security?

Crypto noob here. I have an application that has only moderate security requirements (internal use, limited audience). I want to send a unique url with a token in it to each user. If anyone has the ...
4k views

### Why can't I reverse a hash to a possible input?

I'm going to provide “proof” why a hash function can be reversed, and I hope you can tell my why I'm wrong So, a hash function can be implemented as a series of logic gates. All logic gates can be ...