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.

learn more… | top users | synonyms (1)

5
votes
1answer
82 views

How are secure hashing and encryption algorithms proven?

Given that: You should always use proven secure hashing and encryption algorithms, rather than attempting to write your own. What's the process for criteria for an algorithm being proven? Is ...
1
vote
1answer
91 views

Rainbow tables, where have I got it wrong?

There seems to be some error in my understanding of the concept of rainbow tables, despite going through quite a bit of articles on it. Let me show what I don't seem to agree with. My plain text is ...
4
votes
2answers
1k views

Does SHA-1024 hash exist?

Does SHA-1024 cryptographic hash function exist similarly to SHA-512? If not, what's the reason for that? Links: SHA-2 at Wikipedia
3
votes
2answers
191 views

Rely on NSA Suite B Cryptography?

NSA's Suite B Cryptography suggests some cryptographic algorithms for encryption, digital signatures, message digests and key agreements. The selected algorithms and their key size are suggested by ...
2
votes
1answer
41 views

Cryptanalysis of Nonlinear Table Lookup

I am trying to derive a symmetric key based on a master key, combined with a simple string. Based on my limited knowledge, it seems that something like PBKDF2 would do that for me in a well-defined ...
1
vote
0answers
57 views

Implementation Attacks on Hashes

So I am familiar with attacking implementations of block ciphers via side channel attacks, cache-timing attacks, etc. What implementation attacks are there against hashes or hashed based functions ...
-2
votes
1answer
78 views

Is there an encryption that is only reversible with a key?

I'm thinking about man-in-the-middle attacks during a website login, and started wondering about reversible encryption. What I'm imagining is an encryption that takes input ...
-2
votes
1answer
62 views

Is XORing a SHA256 better than truncating it? [duplicate]

Let say I want to truncate SHA256 to 128 bits. What would be the best way to minimize a probability of a collision and improve collision resistance? Taking the last 16 bytes Taking the first 16 ...
3
votes
2answers
66 views

Hash or compression function in Merkle tree nodes?

Wikipedia says about a Merkle tree: Nodes further up in the tree are the hashes of their respective children. Usually, a cryptographic hash function such as SHA-2 or SHA-3 is used for the hashing. ...
4
votes
3answers
119 views

Do I need to use AE/AEAD in my particular scenario? Or is it redundant?

This is my scenario: A small structured text message (1-2kB) is to be sent over an insecure channel. Everything except for the header portion (which contains a title, timestamp, category and tags) ...
1
vote
1answer
60 views

Verification of signed message with encryption

I have a question about the message that is being encrypted and signed. Say, two users called Tom and Mary, both have a pair of private key and public key. Tom sends a message through a system that ...
2
votes
1answer
144 views

SHACAL in SHA-256

I was reading about hash functions, namely SHA, and I read that it is made of the Merkle-Damgard construction. And then the text said that the compression function used is based on the Davis-Meyer ...
5
votes
2answers
179 views

How does Truecrypt change password without the need for a complete re-encryption of volume

From what I understand: TrueCrypt takes the password as message Add salt calculates a digest use digest for encryption From what I understand. A good hash function has Second pre-image ...
2
votes
1answer
53 views

Constant data as input to hash

I want to use hash function on some data, and part of this data, might be constant for a certain period. The output of the hash function is used as authentication data (MAC). I want to know if there ...
8
votes
4answers
266 views

Using hashes as passwords

I have thought of a system for generating passwords which works as follows: Take the following items: A password, such as williamwallace. A secret 1000 digit ...
2
votes
2answers
336 views

Cryptographically Secure Hash Algorithm with Very Specific Property

First of all, I apologize if this is a stupid question, but I don't have any background in cryptography. I'm looking for a secure hash algorithm $H$ with the property $H(K_1+n)\oplus ...
2
votes
1answer
50 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 ...
3
votes
1answer
107 views

Is this an acceptable All-or-Nothing Transform?

I was thinking about AONTs, and designed the one below, I call it CHANT for Chained-Hash All-or-Nothing Transform; it's my very first shot at something of the sort, and was hoping I could get your ...
4
votes
1answer
121 views

Compression function to guarantee randomness of one time pads?

First of all, I would like to note that I am not building my own crypto. I am simply curious and would like to learn. What I am wondering is this: if we are worried about randomness of something ...
3
votes
2answers
133 views

Reversing DJB2 Hashes

I have some spare time, and a few hundred DJB2-hashed values sitting around. I thought I'd try to do something "useful" and invert DJB2, such that I could calculate the plaintext of the hashes (which ...
2
votes
1answer
102 views

Probability that two different files can have same MD5 hash for both an unencrypted and encrypted version (AES256, same key between files)

This math is way over my head, and don't even know if it can be done, but here are the assumptions: Take unencrypted File [Fu] of variable length, but assume 100KB as an example. Let File [Fe] be ...
1
vote
0answers
63 views

Universal hashing techniques based on matrix multiplication

The article here says below, about a universal hashing technique based on matrix multiplications. "However, there is a little known method based on using a random matrix. It has lots of advantages - ...
1
vote
2answers
66 views

Different padding rules for Merkle-Damgard and Keccak/sponge function

We learned that length padding was used in Merkle-Damgard where after padding with zeros another block is added that contains the initial length of the input. This is supposed to prevent same hash ...
2
votes
1answer
94 views

Secure way to store fixed size string of digits

I need to store a string of digits (0-9) of a fixed size in my database securely. I've already performed a rainbow table attack on a plain hash, and it broke it in a matter of seconds. One option I ...
1
vote
2answers
170 views

Why is MAC using nonce+message+hash(nonce+message+identifier) not the standard?

Given that we know that nonce + message + hash(nonce + message + mac-key) all inside the encryption makes it possible to detect if any bits of the message have been ...
1
vote
1answer
50 views

Publicly Verifiable Authenticator

I am working on a Block Storage system, where I have the need to encrypt and authenticate blocks by a client, but also want the server to be able to detect bit corruption while minimizing the work ...
2
votes
1answer
57 views

Is it possible to deduce the value of a string when given its hash and multiples hashes of the string + other known strings?

To be clear, I have access to $H(S)$ and as many $H(S||K)$ as I want. Every string $K$ is known. Can I use the extra information to my advantage and try to deduce $S$, without requiring bruteforce? Or ...
3
votes
2answers
618 views

How long does it take to crack PBKDF2?

How much time will it take to crack PBKDF2 while using a 9 character password? I'm not specifying any specific system or platform. If a brute force attack is made using the best ever super computer ...
3
votes
1answer
91 views

Using GMAC for Authentication without encrypting the message

I am pretty new to cryptography and have a sample of GCM mode of operation for AES. PFB the code ...
-1
votes
3answers
83 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? ...
2
votes
1answer
33 views

Calculating IHVs from known message and hash output

Here is a somewhat silly and atypical problem I am currently facing. Usually, when it comes to hashes, one is bothered with finding collisions and preimages. My problem is, I need to find the IHV used ...
3
votes
1answer
88 views

Is there a practical upper limit for password rehashing?

When using PBKDF2, is there a practical upper limit to the iteration count above which we lose security? Note: If you answer “No”, that's fine. But if you answer: “There can't be an upper limit“, ...
3
votes
1answer
111 views

Does adding a salt to the message before HMAC processing add any security?

An HMAC function is designed to verify message integrity, i.e., that the message has not been tampered with. It is generally (always?) implemented by using a hashing function ...
5
votes
2answers
609 views

When only using one-way hashing, is it possible to tell the number of characters changed between the old and new password?

The other day when changing my password on a Solaris 10 system I was surprised that Solaris was able to detect that I hadn't changed enough characters between the new and current passwords. MINDIFF ...
1
vote
0answers
89 views

Convergent encryption has dictionary attack, but why hash function doesn't?

Convergent encryption (CE), $E_k(d)$, is a way to encrypt the data $d$, with the characteristic that the encryption key $k$ is $k=h(d)$, where $h(\cdot)$ is a cryptographic hash function. Consider a ...
4
votes
2answers
268 views

Is SipHash cryptographically secure?

I'm evaluating different hash algorithms for use in my application. One of the kind of algorithms I am looking at are cryptographically secure ones to protect against DOS attacks. SipHash seems ...
4
votes
3answers
176 views

SHA256 output to 0-99 number range?

Is it mathematically possible to take a SHA256 hash and turn it into a 0-99 number where each number in 0-99 range is equally likely to be picked? As a 256 bit hash means the highest value possible ...
2
votes
1answer
128 views

generate hash of all handshake messages for verify data (DTLS)

I am trying to create a DTLS client finished packet, where I need to generate verify data for handshake hash is need. And here I want to know how to generate handshake hash. As of now I am doing like ...
3
votes
2answers
268 views

Is there a standard way to use a nonce with HMAC?

Many protocols use HMAC on messages that include a nonce, but they don't seem to do it in a consistent way. For example, in OAuth the nonce is in the middle of an URL-encoded key-value string, like ...
5
votes
1answer
167 views

Does collision resistance imply (or not) second-preimage resistance?

I've seen contradictory results. Sometimes hash functions are collision-resistant but not necessarily second-preimage resistant. I've seen this kind of things in papers from Bart Preneel: “Security ...
2
votes
1answer
89 views

Empty message Hash length

I am learning Hash Algorithms and in a presentation (PDF) about these algorithms I read that: Length of $h(m)$ much shorter then length of $m$. Now my question is: What if we talk about an ...
1
vote
1answer
115 views

Combining Random Hashes - avoiding collisions and ensuring randomness

I have a series of integers which I want to convert to random integer (64 bit). The idea here is to produce random numbers very quickly. The issues that good quality random numbers are required with a ...
2
votes
3answers
137 views

Do sites store login password with hash? If so, can people can use hash collision to log in?

I was researching about hash, and I thought, If sites store passwords with hash algorithms, then can't this happen: User A has the password 'hello' User B finds out the hash code of the password of ...
3
votes
1answer
135 views

Description of signatures with message recovery (as in ISO/IEC 9796-2 and EMV Signatures)

I'd like to get an overview of how the signatures with message recovery work, especially in case EMV and other smart card systems. Is there a nice overview available without being required to read the ...
1
vote
1answer
110 views

Where do I truncate the bits in SHA 256 hash algorithm?

I'm implementing SHA-256 in PHP using strings. Where do you truncate in the algorithm? There are a lot of places where there's binary addition happening so the number of bits in $W(i)$ keep ...
6
votes
2answers
117 views

Fast hashing into elliptic curve

Is there a fast algorithm for mapping $n$-bit numbers $s$ (for fixed $n$) into a cyclic subgroup of an elliptic curve (over a finite field) in which the Discrete Logarithm Problem is hard? By fast, I ...
4
votes
2answers
99 views

Does knowing multiple hash of the same content make it more likely to generate original plain text?

Say I'm trying to brute force the original plain text of an SHA256 hash, does knowing the RIPEMD160 hash of the same text help? In other words, does providing access to hash values of the same text ...
1
vote
1answer
129 views

SHA1 collision event probability after n iterations

There are String1 and String2 - some variables-strings. The probability of collision for different ...
5
votes
1answer
147 views

Is HMAC needed for a SHA-3 based MAC?

HMAC does nested hashing in order to prevent Length Extension Attacks. Given that you use the SHA-3 hash (which is resistant against length extension attacks), would you still need to go through that ...
-2
votes
2answers
73 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 ...