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

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 ...
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 ...
59 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 ...
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 ...
170 views

### SHA-256 Hash over multiple SHA-256 Hashes

I am trying to implement a checksum over multiple files. We can assume, that i have a package containing N files. I want to identify such a package uniquely by following calculation: SHA256-Hash ...
56 views

### Detecting Software Changes - Verifying untampered code

This question assumes an environment devoid of any internet connections, the software in questions operates in a non-connected environment on a single machine. I have a piece of software that may be ...
32 views

### Number of qubits and breaking hashes [duplicate]

Noting D-Wave's press release on a 1000 qubits quantum computer had me wondering... Does the number of qubits nonlinearly change the speed/rate at breaking a SHA256 hash? If someone makes a say 10,...
77 views

### MD5 SSL Collision Attack

I want to create fake certificate for test purposes. I have read about the http://marc-stevens.nl/p/hashclash/index.php project but I am unable to understand the two files that I have to put as input ...
30 views

### Is a timing side channel attack effective when the leaked information is related to the result of a hash?

I'm writing a function to act as a cryptographic hash of a number within a range that returns another number of the same range. The catch is that the result needs to have certain properties. I run a ...
29 views

### Is it bad practice to use the message digest of the plaintext as the initialization vector? [duplicate]

Data is being encrypted in a database. A message digest is being created for deduplication purposes. Is it ok to use the message digest that will be the key of the table that houses the encrypted ...
25 views

### How to reconstruct hash value to the original format? [duplicate]

I would like to know how I can reconstruct a hash value such as 558f68181d2b0c9d57d41ce7aa36b71d9 to its original format (734). I have used a code in matlab, which provided me with an hash output, ...
167 views

### What can cause similar MD5 hashes

I have a set of MD5 hashes with huge similarities in the second half of the hash, (made up) examples: ...
153 views

### Key exchange using hash function

Consider two types of attackers on a key exchange (KE) protocol and subsequent communication between the parties which used this KE instance to establish a secure communication key. Attacker Eve ...
143 views

### Are there any known inverse hash lookups for the zero string?

Just wondering, are there any known inverse hashes / hash lookups in common hashes (md5, sha1, sha2, etc.) for the zero string hash value? (i.e. bytes 0x00 00 00 00 00 ...) Or more specifically, for ...
293 views

### RSA - Why should we sign hash rather than raw content? [duplicate]

Apart from obvious performance considerations, is there any mathematical or crypto reasons that imply that we sign a hash rather than a raw content ? I read that it was because the hash must fit in ...
85 views

### Calculate number of chips to solve bit commitment using hash function

I have a problem that I don't know how to solve Assume that H is a cryptographic hash function with output size 80 bits. Assume that ABC123 is a specifically designed line of hardware chips for ...
41 views

### Designing hash function in space-efficient identity based encryption

Let $n$ be an RSA-prime and we know prime factorization of $n(=pq)$. The hash function is the current context maps from a given user identity(id) to a positive integer less than $n$, whose jacobi ...
84 views

### Advantages of using intermediate hash over full hash in digital signature application

Description of intermediate hashes Intermediate (or partial) hashes are canonical forms of digest state that can be transferred from one hash implementation to another, so that the other, limited ...
49 views

### P = NP security implications [duplicate]

If someone finds an efficient way (ridiculous or not) to turn NP into P (such as creating multiple universes, saving the one with the correct answer), would we have any good algorithms for encryption, ...
78 views

### Can you determine an unknown value when it is combined with a known value and you are given the resulting hash? [duplicate]

Say I have a string that I want to keep hidden. You can then enter a known string which is added to the end of the hidden string and you are given the sha256 hash of the combined string. If you were ...
34 views

### Bit strength of combining hash functions? [duplicate]

Suppose there are hash functions H1 and H2 with bit strength of H1 and H2 is n1 and n2. A new good hash function is generated by combining H1 and H2. What will be the bit strength of these combined ...
394 views

### Would it be possible to create a game where one would need to decrypt a simple encryption?

This might sound pretty weird, but I was thinking of a game a person could play alone with a pen and paper. I got this idea where the person would write a random four letter string on a paper, and ...
239 views

### If H(m) = 0 for some m, how can a DSA signature be forged?

If we know for some message $m$ that $H(m) = 0$, how can we forge a DSA signature with only the public key? I got that $g^s*r = (g^x)^r$ where $x$ is the private key, but that's one equation with 2 ...
181 views

### Why is appending the key to a mesage and then hashing that insecure if the hash isn't weakly collision resistant? [duplicate]

Suppose I have H(M|K) and that H is not weakly collision resistant. If I have a message mac pair (M,MAC), how is it possible to find another message mac pair (M2,MAC2)? My thinking for this problem is ...
70 views

### Strength of Combining Hash functions [duplicate]

If I combine two hash functions, what will the impact on the strength of the resulting function. If I combine in following way: H1*H2 (multiply) H1 + H2 (concat) H1 Xor H2 H1 (H2) EDIT: Lets say H1 ...
464 views

### What is the exact purpose of length padding in Merkle–Damgård hash functions? [duplicate]

Is a length padding technique in a hash function used to avoid length extension attacks ?
161 views

### Could I use an hashing function for Symmetric encryption? [duplicate]

I know there are way better and more tested encryption methods, but I was wondering if the following code could be use for symmetric encryption? ...
173 views

### Base64 for a hash algorithm [closed]

May be a silly question, but I am really curious. If a hash algorithm uses Base64 in the process of hashing a string for example, it is still considered a hash algorithm, even though it uses an ...
475 views

### Recovering SHA1 knowing 2/3 of the hash generated

I am doing some research on cryptography, so I generated a random string of numbers resembling a creditcard number(according to MOD10 validation) and encrypted it with SHA1 algorithm for encryption. ...
2k views

### How many possible input files are there who's length can be stored in 63-bits?

I'm trying to calculate how many possible combinations of files there can be using a signed 64-bit file length, but can't seem to find a formula (or I'm using the wrong keywords). For example, the ...
222 views

### Best hash-algorithm [closed]

What is the most secure hash-algorithm. Can you also give the second best and the third best like this: 1. Test 2. test 3. TEST I dont care about the performance
156 views

### What is the translation for “hash” in french? [closed]

I am doing a French presentation on basic cryptography, and the generation of random numbers. Most terms are easily translatable, but I can't seem to find a word for hash, as in cryptographic hashing, ...
97 views

### Keccak and compression functions

Keccak follows a sponge construction. Can we say that Keccak employs a compression function? Generally speaking, for sponge constructions, can we say that there is an underlying compression function?
55 views

### Collision-Resistance Hash Function PRF

I am trying to solve the following question with an example/proof. The question is from Introduction to Modern Cryptography by Katz and Lindell. Any help would be appreciated.
32 views

### 3 digit code at the end of a changing magstripe (maybe hash?) [closed]

Myself and some fellow students are doing some "Independent Security Research" on campus and trying to crack the campus paid parking system to better understand how it might work. The system works ...
182 views

### Python KDF - Master Key and Derivatives

The encrypted file can be opened by following combinations (either any 2 DK, or 1 MK): DK1 + DK2 DK1 + DK3 DK2 + DK3 DK1 + DK2 + DK3 MK Any heads-up with Python ...
67 views

### What's wrong with this “order-preserving MAC” function?

Please note: this is purely a thought experiment and not intended for any real-world usage! I came up with a simple function $\mathrm{OPF}$ to map the integers $[0,C)$ (where $C$ is the "ChunkSize") ...
447 views

### Hash Based Encryption (fast & simple), how well would this compare to AES? [duplicate]

First of all, I know it's a very bad idea to invent your own encryption algorithm. It's better to use existing known, trusted, extensively tested and studied algorithms with a proven track record. The ...
252 views

### What are alternatives to the random oracle model for modelling hash functions? [closed]

I was looking for more realistic alternatives to the ROM for describing hash functions in theoretical proofs. I came across the common reference string model (where hash functions can be modeled as ...
81 views

213 views

### Reversing a Psuedo Crytographic Hash [closed]

I'm trying to get a better understanding of cryptographic hashing. Take the example transformation function below, is it possible to reverse this formula to solve/isolate for message[i]? ...
615 views

### Reverse engineering a single checksum byte [closed]

I am working to understand a system which saves a few bytes of data together with what appears to be a single checksum byte that provides a very naive guarantee that the data has not been tampered ...
337 views

### How can I convert numbers into prime numbers?

I'm working with one-way accumulators, but I'm not knowledgable in cryptography. Is there an easy peasy way to hash numbers (or whatever) into prime numbers? Obviously I'd like it to be collision ...
209 views

### Hash Based Encryption (fast & simple), how well would this compare to AES? [duplicate]

First of all, I know it's a very bad idea to invent your own encryption algorithm. It's better to use existing known, trusted, extensively tested and studied algorithms with a proven track record. The ...
167 views

### Adding “salt” to “doHash” function in Java [closed]

For one of my university projects I am being asked to "Improve the code to satisfy the pre-image resistance requirement." Basically the program is a basic encryption server system, and when I type a ...
78 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 ...