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

207 views

### How to formally prove that a given hash construction is collision resistant or not?

Is there a precise procedure or strategy to follow in order to prove in a formal way the (not) collision-resistance of a certain given hash construction? I.e. let $H_1$ and $H_2$ be two hash functions,...
162 views

### Combine two sha512 hashes to a single hash

Assume I have two data fragments: $Frag_1$ and $Frag_2$. I can build sha512 hashes the usual way with $SHA512(Frag_1)$ and $SHA512(Frag_2)$ and then hash the two fragments appended to each other: ...
168 views

### Extension of a password hashing algorithm using Fibonacci

I am right now taking a class named Applied Cryptography and our final project is to create a password hashing method using at least one existing algorithm and then add additional steps to make it ...
20k views

### HMAC-SHA1 vs HMAC-SHA256

I have three questions: Would you use HMAC-SHA1 or HMAC-SHA256 for message authentication? How much HMAC-SHA256 is slower than HMAC-SHA1? Are the security improvements of SHA256 (over SHA1) enough ...
87 views

### Is it a good practice to use plain text for derivation of Keys?

I have a question regarding the derivation of keys in crypto. Is it a good practice to use the plain text (in form of hashes) for derivation of keys ? these keys will be used for encryption of the ...
64 views

### Given just the hash of a file, can I verify that the file contains a specific data block?

Imagine I only have the hash of a file which we can call hash(file). Then a user sends me a data block (or section) of the same file, which we can call ...
93 views

### What is the meaning of h(r) in this protocol?

Could somebody tell me what the meaning is of $h(r)$ in the protocol below? ‎‎$A‎\leftarrow‎{B}\quad:{h(r)‎‎}{,B}{,P{_A(r,B)}}‎ \\A‎\rightarrow‎{B}\quad:r$
246 views

### Is SHA-1 safe for signing ECDHE parameters?

Is using the SHA-1 algorithm insecure for hashing the ephemeral ECDH public key in the signed_params structure? There are some worrying articles about using SHA-1: ...
544 views

### Is SHA-1 still practically secure under specific scenarios?

It is conjectured that SHA-1 has been broken from the "research" perspective but no in real world. That is that there is an algebraic attack that explores weaknesses on its algebraic construction. The ...
38 views

### Is hashing data with dynamic keys still worth effort?

some years ago it took long time to "decrypt" hashes because they took slow cpu to brute force. Nowadays they use graphic cards for stuff like this and can do this most time in less than 20 Minutes ...
375 views

### How to crack SHA256 only letters

I recently created a program that hashes a password using SHA256 and potentially using salt. How can I crack that if I know that the password only contains lowercase letters?
85 views

70 views

### RSA signature attack check on lowest 16 bytes - Implementation

I am referring to solution given in this question I need help to implement Poncho hint in this comment: As the first question i have an RSA signature of 1024 bit applied on an hash (MD5) of the ...
254 views

### Is Checksum to file back decoding possible?

So, I was having this weird thought. If the checksums(MD5 or SHA...) are unique to any file and are modified if any part of the file is edited, why cant the checksums be decoded back to get the ...
174 views

### Is there any such thing as “proof of location”?

I'm looking for a way for someone to prove to me their geographical location without a trusted third-party. Imagine wanting to prove to someone you're actually physically in a specific place. I'd ...
233 views

### Signature and hash function properties

I understand the need for the hash function to be collision resistant and second pre-image resistant. For what reason, exactly, does a hash function need to be pre-image resistant? If this property ...
92 views

### Converting a pre-image resistant hash to second pre-image resistant

I am looking for some standard conversion from any hash function $f$, which has pre-image resistance, to another hash function with second preimage resistance. Is there such a standard conversion?
50 views

### Favor hash size or field size when systems are disparate?

I'm working on an implementation of Krawczyk's Hashed MQV (HMQV). I'm using Crypto++, which is a C++ library. C++ has some features where classes that represent the crypto objects can be combined ...
129 views

### How can I generate a good password from a SHA512 hash?

I have to change local administrator passwords on machines. I don't want to store password in a database. I have to generate a password that I can find later to connect to the machine again. So I ...
161 views

### Keys in HMAC and NMAC

I'm quite new to this topic and have several questions concerning HMAC and NMAC: Why does NMAC need two keys? How can it be attacked if we just used some sort of initialization vector instead of the ...
571 views

### Can hash functions improve a lousy PRNG?

If I have a poor PRNG, could a cryptographically secure hash function make a better output? Say the PRNG can produce as much numbers as you wish, reasonably random, but not good enough to be used in ...
297 views

### Hash functions to generate one time pad

Newbie question... may be... Stream cypher, will XOR message bits with one time pad bits Suppose I have a pseudo random number generator, like a Mersenne twister or sort of. I could use the speudo-...
17k views

### Difference between encrypting something and hashing something

What is the difference between encrypting something and hashing something? in what situations would I want one or the other?
1k views

### What good is a hash accompanying a program?

After studying at length about weaknesses in SHA2, length extension attacks, forged signatures, etc. I have to ask why groups like Gnu provide hashes on their program texts? As long as the public ...
335 views

### Why isn't outputting only a portion of the hash state a simple defense against length extension attacks?

As I understand length extension attacks, they depend on the coincidental property of most cryptographic hash functions that the hash value is exactly the hash function state after hashing the last ...
555 views

### SHA-256 exhaustive search

How do I calculate the number of computations needed to break SHA256 in case we are using it for safely storing passwords (together with a salt)? Are there any formulas that can be employed? For ...
70 views

### Salting in asp.net?

I have spent the past hour reading up on salting and still don't understand how it is achieved. Forgive me if im wrong, but the way I am thinking of salting is, storing an ArrayList of random strings ...
199 views

### What is degree of randomness in individual bits of MD5 hash?

I am researching on Hashing Algorithms and would like to know if we take individual bits of MD5, say we take first 8 bits or any random 8 bits of MD5 then what is the randomness probability of having ...
283 views

### How can I map arbitrary group elements to unique integers without using Hash functions?

Let's say, I have a group $G$ of large prime order $p$. A set $S$ consists of $n$ random elements chosen from $G$. Without using a collision resistant hash function $H$, how can I map elements of $G$ ...
123 views

### How much pre-hashing a password increase security against brute force attack?

I am wondering how much hashing a password used as key for a symmetric key algorithm helps preventing brute force attack on crypted text. Let's assume I want to crypt text A using key B using AES-...
218 views

### Problem with testing MD5 collisions

I am trying to test MD5 collisions presented in “Collisions for Hash Functions MD4, MD5, HAVA” (PDF) by Xiaoyun Wang, Dengguo Feng, Xuejia Lai, Hongbo Yu; 2004. I wrote a PHP script to test it, but ...
96 views

### Using password-based encryption as a hashing scheme

Classic scheme: Given password and hashing algorithm Generate salt Calculate ...
71 views

### Question about keyed hash functions

Maybe the answer to my question is obvious, but I have doubt... I have noticed that hash functions are studied in two forms, keyed hash functions or unkeyed. In general, lecture notes present hash ...
763 views

### I hashed my bag and in it I put… “Is there a hash for unordered items?”

(By items I mean hashable objects.) As an example (with obviously way too short hashes for readability), say I packed my bag and in it I put a shovel (hashed to S)...
436 views

### Can passwords be stored securely so that a similarity comparison can be made?

On the Pro Webmasters StackExchange site, someone asked a question about a webapp (in this case cPanel) that refused to allow a password change because it was too similar to a previous password. I ...
248 views

### Will hashing over and over eventually give the same hash?

There are many cases in maths where doing the same thing over and over again will bring you closer to a value. Derivation of polynomials is the striking example: no matter what you start with, you end ...
558 views

### Suggestion : CRC vs SHA1

I need some suggestions about the use of the CRC in my application. I need to be sure about the BIOS run by the CPU. I have a FPGA between the BIOS flash and the CPU that sniff every read performed by ...
270 views

### Collision attacks on digital signatures

After reading this document about MD5 collision attacks, I still don't understand how collisions can make digital signatures insecure. In the paper, the researchers created two files with the same ...
689 views

### How many attempts does it take to crack a 32-bit password hash with this scenario?

How many attempts does it take to crack (match) a 32-bit password hash from a database of 4 million password hashes? Correct me if I'm wrong, but to crack a 32-bit password hash would take roughly 2^...
177 views

### Accelerated hashing on consumer-grade CPU?

Question is a follow-up to this one. The question was about accelerating SHA1. I am writing an application, where I do have a choice of hash algorithm, as long as it's a strong one. I want to be able ...
65 views

### Getting the encryption/has algorithm used for modem configuration file [closed]

Hello guys I have backed up my modem configuration file and found the username and password is in clear text; the files shows the username and the password is : ...
281 views

### Establishing encryption key using shared secret

I need to establish some security on a network of 8 bit microcontrollers. very limited RAM, CPU and packet sizes. I have zeroed in on a shared secret based scheme. Setting up shared secret is out of ...
29 views

### HMAC for encrypted authentication token: recommended iteration number [duplicate]

In the web application I use 10,000+ iterations for hashing passwords stored in database (random salt and all). Password-related operations are not frequent enough to create a noticeable performance ...
124 views

### Do hand-based hash functions / MACs exist?

Is there research on a hash function or a MAC that can be executed without computers? I know there's a lot of history on hand-based ciphers and the OTP can easily be excecuted by hand. (By using ...