# 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.

75 views

### Is size Q equal to size SHA(Q)? [closed]

Assume d is a 128 bit random integer and P is base point of an elliptic curve and Q = dP is a point on the elliptic curve and SHA is a hash function with 128 bit output, my question is: Is size Q ...
307 views

### Why have hashes when you have MACs?

It would seem to a naive eye that if you have a MAC, you have a hash function: use a key that all the parties know (such as all-bits-zero). A potential application would be a resource-constrained ...
335 views

### Does CBC encryption of a hash provide authenticity?

Given a message $M$ and a cryptographic hash function $H$, let $f(M) = E_K(M || H(M))$ where $E_K$ is AES-128-CBC encryption with PKCS#5 padding. Take $H = \textrm{SHA-256}$ if it matters. In other ...
176 views

### SHA256 Round Equivalence

I have calculated the average number of operations in 1 round of SHA256 as follows: Additions: 9.25 Bitwise Rotations: 9 Bitwise Shifts: 1.5 Bitwise AND: 5 Bitwise XOR: 10 I have certain ...
149 views

### Multiple parties must encrypt and get the same result

Hopefully this question is not too simple - I did some research but with encryption I really don't want to make a mistake. Our scenario is that multiple groups need to encrypt a number and arrive at ...
972 views

### Is it theoretically possible to construct a string that contains its own hash value?

After saw the xkcd comic Self-Description, I wonder if it is theoretically possible to construct a self-descriptive string that contains its own hash value? Let's say the string's MD5 value is ...
1k views

### Are there cryptographic hash functions that can be computed using only paper and pen without leaking any information about the plaintext?

I am looking for a cryptographic hash function that can be computed by a human using only paper and pen without ever leaking any information about the plaintext on the paper. The cryptographic hash ...
3k views

### Pre-image resistant but not 2nd pre-image resistant?

Are there any cryptographic hash functions for which there is a known pre-image attack, or a known second pre-image attack, but not both? The attack doesn't have to be practical - just anything that ...
251 views

### Allowing the user to choose the hashing formula at the registration

I was thinking of a potential new way to increase someone's account security. The idea was allowing the user to choose one of the hash formulas available in the software (example: "MD5", "SHA512" and ...
183 views

### Concerns about using a hash to determine if specific input data has already been encrypted

A system is used to securely store account numbers. When an account number is added to the system it is securely encrypted and stored in a database along with the IV and a reference to the encrypted ...
4k views

### Is truncating a SHA512 hash to the first 160 bits as secure as using SHA1?

I am from a web development background (I don't know an awful lot about cryptography or how the algorithms themselves work), so I am asking this question in simple terms. Consider a hash of the word ...
213 views

### split up sha256 hash and compare indiv block results

We have a h/w accelerator in our SoC and it can do sha256. The restrictions are it's input descriptors (which defines the input packet and len) must not straddle 64K boundary. When it does we can ...
1k views

### Hash function based on pseudorandom functions and security

Are there hash functions that make use of pseudorandom functions. Precisely, I'm looking for a specification of a hash function based on PRF (and based on the security of such a primitive).
194 views

### Why must we hash lot of times in rainbow tables?

I don't get the utility to chain and reduce in generating rainbow tables. Hash functions are made to not have collisions, or at least chain only 2 times so we don't return to the concept of the hash ...
3k views

### How is input message for SHA-2 padded?

I read about how is an input message prepared to be hashed by MD4,MD5 or SHA-1: Step1 Append padding bits The input message is "padded" (extended) so that its length (in bits) equals to 448 ...
218 views

Why do people say that using hash twice or more is bad? yes there is key derivation that do that job, but in a low bandwidth network countries, the solution i see is to use a simple hashing system on ...
257 views

### Parallel-resistant proof-of-work scheme?

I am looking for a proof-of-work scheme which cannot be effectively parallelized. For example, in hashcash (and by extension bitcoin) you have some collision-resistant hash function $f()$, a target ...
129 views

### What prevents continued hashing of a key from being used as a cipher when xored with plaintext? [duplicate]

This is just an idea I had while looking through some threads so take it as you will. Given a plaintext of any length and a key that a specific hash function is capable of taking as input(I mention ...
100 views

### Best hash size for hash trees

I want to know if having a 8-byte hash value is better than 16-byte hash value for use within hash trees. My mind tells me that the shorter the hash value, the better. But doesn't a smaller hash ...
250 views

### What is the purpose of update() in popular hash APIs?

E.g., in Python's hashlib, update() basically merges in string buffer functionality into the object. Several other digest APIs I've seen have this pattern. Considering this adds functionality that ...
725 views

### Compare two hashes with different salt

I'm storing the salted hash of a credit card number in a database. What I'd like to be able to do is determine if two different entries in the same database correspond to the same credit card. ...
262 views

### Difference between actual attacks and theoretical attacks on SHA cryptographic series

Could anyone tell me what the difference is between a THEORETICAL ATTACK (Like the one done on SHA-1) and an actual attack (Like the one done on SHA-0). Is a theoretical attack a proposed method of ...
304 views

### Stream cipher with Diffie-Hellman and Cryptographic Hash Function? [duplicate]

I know: Never do your own crypto. But this question is just theoretical. Assume you do a Diffie-Hellman Key Exchange with a server to produce a shared secret $x$. Then use a cryptographic hash ...
3k views

### Using a Hash as a secure PRNG

I was just looking at some NIST PRNG recommendations, specifically at Hash_DRBG. I read briefly through the algorithm, and even though it is not overly complex, it still seems unnecessary to me. I ...
666 views

### Is it possible to actually verify a “sponge function” security claim?

When using a “sponge function” to create a cryptographic hash, we can look at the flat sponge claim, which flattens the claimed success probabilities of all attacks using a single parameter: the ...
171 views

2k views

### Why crypto hash functions must be collision resistant and how to find resistant?

Why cryptographic hash functions must be collision-free and is there any methods to evaluate whether a function is not resistant to collision? Thanks,
842 views

### Reversing SHA1 (don't know the correct term)

Given sha1(pad(A) || pad(B)), where B is known, can I calculate sha1(pad(A))? pad(A) means its length is exactly 1 block (64 bytes for SHA-1) If yes, for which other hash functions it will work too? ...
116 views

### Encrypt user email but be able to find user by email

Sorry for my dumb question, but it's better to ask dumb question than to do dumb things silently. I want to encrypt user email in my DB so that if someone stole the DB (and not the key) - he won't be ...