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

378 views

### Is calculating HMAC from hashed input a good idea?

The original HMAC algorithm is as follows: H(K XOR opad || H(K XOR ipad || text)) What if text would replaced with H(text)?...
231 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?
80 views

### Proof that a encrypted file has the same content as an (existing) original

Assume that Alice has a file F which she is going to send, in encrypted form, to Bob. Alice possesses F and the public encryption key K of Bob in form of an X509-certificate. She generates the file E ...
16 views

### Decoding base64 with key [on hold]

I'm working on a program that scrapes video URLs from a website. The URLs seem to be coded in base64. Here's an example: ...
49 views

### What is the starting point of Hellman's TMTO method?

I understand what is happening and how the endpoint is computed but I'm still a bit unsure of where "SP" (Staring Point) came from. Are the starting points, randomly selected keys from the key-space n?...
240 views

### Can the SHA256 hashes of consecutive integers be attacked?

Suppose that the attacker knows the SHA256 values of integers $n, n+1, n+2 ... n+k$. $n$ is sufficiently big, so we do not expect to be able to brute force $n$ just by $\operatorname{SHA256}(n)$ ...
3k views

### Probability of SHA256 Collisions for Certain Amount of Hashed Values

I wonder if you can help me figure out that question: Is there a known probability function f: N -> [0,1], that computes the probability of a sha256 collision for a certain amount of values to be ...
48 views

### Why is it so hard to make longer hashes?

I was reading this answer about why there is no such thing as a SHA-1024 hash: SHA-2 was built with state and word sizes to meet the security requirements on commodity computers (x86 and Alpha), ...
282 views

### PGP String-to-Key specifiers

I've been reading through the PGP Standard and here I'm a little confused. This section is discussing converting string data to a session key. I'm confused about the paragraph in bold. First off, what ...
36 views

### Is it possible to turn an image (e.g. a photo) into a cryptographic hash? [closed]

I am looking for a way to turn an image (e.g. a photo captured on a phone) into a cryptographic hash (e.g. SHA256). Is this possible? If so, how?
29 views

### In NTRU digital envelope, do everyone know the hash function $H$ used?

I have a simple question about the NTRU original cryptosystem using a digital envelope. The article can be found here: http://grouper.ieee.org/groups/1363/lattPK/submissions/ntru.pdf It is said that ...
189 views

### Is the security of MAC function is based on HASH function

It is widely known, generally, that a MAC is a HASH with key. I just want to ensure that my understanding is correct to avoid base further assumptions on wrong conception. So, if I used MAC that uses ...
31 views

### Easily reversible hash functions as a method of data transmission [duplicate]

I've been looking through the literature because I want to see if anyone has implemented this idea I have. I know data compression algorithms work by removing redundancy in data. I was wondering ...
63 views

### How to create reduction functions in rainbow tables?

I have been trying to understand rainbow tables lately and one part is giving me trouble to understand here. Let's say I want to generate a table where the chains are 100 000 hash/plaintext long. I ...
41 views

### What is the logic behind Compress function in iterated hash function

I am working on cryptographic hash functions theorems. In the iterated hash functions part a specific word started appearing constantly: "Compress" for instance within the "compress function". I am ...
1k views

### RSA digital signature vs authenticated cipher

I want to provide both confidentiality and integrity for data at rest (many large files stored on disk). I plan to encrypt the data using AES, which will cover the confidentiality requirement. So ...
57 views

### Is a stream cipher similar to One-Time Pad using hash secure?

I've read some Q&A about combining OTP with hash on this site, but I still wonder why some answers said that using hash for OTP key is not strong enough to resist brute force attack? Assuming ...
33 views

### In PKCS#1 V2.2, should MGF be based on the same hash function that RSA-OAEP-ENCRYPT uses?

In Section 7.1.1 of PKCS#1 v2.2 there are two options for RSAES-OAEP-Encrypt given: Hash MGF Appendix B.2.1 of the same document states that MGF1 is based on a hash function. Is MGF1 based on the ...
34 views

### What is many:1 and collision in MD5?

This is in reference to this answer on Stackoverflow. If you read the first paragraph of the answer, you'll find this line: It's always a many:1 mapping (meaning there will always be collisions) ...
484 views

### Are hash functions chaotic?

I'm looking into "bitcoin like" mining processes. Say a security process uses a hash of data as proof that the data was known at some point in time. From what I understand, hash functions are ...
100 views

### Is it safer to use timestamp in REST authentication?

I am working on a personal project to build a REST authentication system which authenticate clients via three parameters: ...
674 views

### Creating a hash of XOR'd blocks

Suppose a message $m$ is divided into blocks of length $160$ bits: $m > = M_1 || M_2 || ... || M_l$ And define $h(m) = M_1 \oplus M_2 \oplus ... \oplus M_l$ Which of the three desirable ...
628 views

### length extension attack on an MD5 hash of a text file of about 10K Bytes?

How much computing time on a typical desktop computer would it take to find a new length and new data to extend a text file of about 10K Bytes with a given MD5 hash?
64 views

### HMAC vs CMAC, which is faster?

I want to know which is faster-HMAC or CMAC.I know CMAC is based on block cipher encryption,where output of each block is X-OR with the next plain text block. If security is not a concern,which will ...
21 views

### Secure algorithm for calculating token and comparison

I am trying to define algorithm that would create a irreversible token from IDs, which are 10 digit information, and then would be compared on two different end points. Between end points, only ...
353 views

### How were shift amount constants in MD5 found?

The md5 specification gives a series of 4 rounds to execute over a 16-word block. Each round has a repeating sequence of 4 shift amounts (s in ...
38 views

### PBKDF2 with the same salt for all IDs

I have a unique identifiers that I would like to keep secure and provide information about it through tokens. These tokens should be verifiable after using the same algorithm on other end system with ...
53 views

### Can we use a sort of “hash” function in CTR mode instead of a block cipher? [duplicate]

CTR mode does not use the decryption function at all, only the encryption function. This may suggest that a different primitive that has this "one-way" property could do the trick. For instance, I ...
15 views

### PAN authenticatable irreversible tokenization algorithm

I need to implement algorithm to create authenticatable irreversible tokens from PAN, without using any secrets. Is it possible? Is there any standards for that from associations? I was thinking ...
17k views

### Why use an Initialization Vector (IV)?

Why use an Initialization Vector (IV)? How are IV's used? What are the advantages/disadvantages of using an IV? Why use an IV instead of a longer key in which some section of the key is pubic? What ...
380 views

### How can I control the output of a hash function to output to specific data according to similarity?

I do not know if the question lies exactly in that field but I'll give it a try unless rejection. I want to study methods of applying LSH functions to feet in a specific area of digest values. ...
73 views

### Proving a function is one way hash function

I am working on a project which computes the hash of the given input, I have to prove that the function is pre-image resistant that is given an output we cannot get back to the input. While proving ...
159 views

### Why do different applications of hash functions demand different properties of the hash function?

A strong cryptographic hash function in general must guarantee several properties, including: Preimage resistance, second preimage resistance and collision resistance. It turns out, however, that ...
109 views

### Reversing a hash of known hashing algorithm

I am sure this is a very easy thing to do but I am not sure how to go about solving a problem like this, So there is this hash function which operates on a message which is in the form of a byte array ...
81 views

### Commutative Hash Function for Password Challenge?

I had an idea. Could anyone tell me if this is a thing, if they see any problems with it, and if they know of a commutative hash function that would make it work? Suppose you had a pair of ...
106 views

### Can a hash have more than one input?

From a definition stand point, can a hashing algorithm have more than one input, ex: $H(m_1, m_2, m_3)$? If not why are algorithms like bcrypt, scrypt and pbkdf2 referred to as password hashing ...
46 views

### In which situation is HMAC mandatory rather than signature? [duplicate]

I’ve seen that the question has been asked already but this is still confusing to me. In a digital signature, Alice sends a message M and the ...
53 views

### Encoding an element in $r=r'||h(r')$ way

We consider a finite field $\mathbb{F}_p$, where $p$ is a large prime e.g. 256-bit. We have $b$ a fixed element of the field. We encode it as $b'=b||h(b)$, where $h(.)$ is a cryptographic hash ...
14 views

### Entropy of Hash function [duplicate]

How is the entropy of the output of hash functions are defined? More specifically I saw in the paper https://eprint.iacr.org/2013/383.pdf Table 3 page 24. The entropy of challenge is mentioned which ...
167 views

### Security of basic SHA256 MAC in an authenticate-then-encrypt scheme

I know the following construct is insecure if the MAC as defined below is appended to the encrypted message in an Encrypt then Authenticate (EtA) scheme. $k_1$: encryption key $k_2$: authentication ...
39 views

### Proof for collision resistance on a block-based hash

I am designing an unkeyed hash based on the SIMON cipher. This is a follow up to “this” question. A quick summary: I have an ECC engine and the SIMON cipher in hardware, and it’s in an extremely ...
52 views

### What do the last chunks of the output string of Scrypt contain?

When you use scrypt to hash a string, it will generate something like: ...
135 views

### How can I instantiate a generalized hash function?

I've come across a bunch of "strange" hash function notations, such as the following ones and now I don't know how to choose / instantiate them. Can you please explain me what this notation means and ...
19 views

52 views

### How is a hash function that implements random oracle model collision resistance?

ROM is considered as collision resistance. Does ROM assume there is an infinite set of output, or assume the output set is always larger than the input set? Because by the pigeonhole principle, ROM is ...