Questions tagged [hash]

A hash algorithm is a function which takes a variable size input and produces a fixed size output. The algorithm tries to make it difficult to predict the output for a given input, find two inputs with the same output, or reconstruct the input from the output.

Filter by
Sorted by
Tagged with
6
votes
2answers
4k views

How does password_hash/password_verify in php work?

Why does this example from the PHP manual give different results every time it runs? echo password_hash("rasmuslerdorf", PASSWORD_DEFAULT); And then, password_verify() knows that ALL those hash ...
9
votes
3answers
560 views

How could our passwords be cracked so easily?

We are saving password in a database using PHP: return hash('sha256', PASSWORD_SALT . $password); Recently a (fortunately) good hacker SQL-injected us and cracked some passwords including the admin ...
3
votes
3answers
177 views

Can one find the value of a “constant salt” if they can set the password and get the hash?

Saying we have an oracle that an attacker can use as many time as they want. The attacker can send a non-empty password to this Oracle. The Oracle hashes the password using sha256(password + pepper), ...
1
vote
1answer
321 views

Cracking Salted Peoplesoft Hashes

So I felt the saga of my last post was getting too long (linked here: Unknown round length makes hash uncrackable?) so I would create a new one addressing the current problem as it stands. My new ...
2
votes
0answers
102 views

Strategy regarding an (almost always) offline app

I'm currently in internship in a software/app development company, where I have to come up with an idea about how can we handle the fact that the user will mostly use an app offline. Basically, the ...
38
votes
7answers
6k views

Does replacing a bcrypt hash with an invalid hash result in no possible working password?

I have a manager who likes to "deactivate" accounts by replacing the existing bcrypt hash in the database with a simple dash (-). This seems to work as the old password is no longer valid and there ...
1
vote
1answer
386 views

Unknown round length makes hash uncrackable?

So I am on an engagement and grabbed some hashes but cracking them has come to no avail. I believe I know the hash type (PBKDF2-HMAC-SHA256) but I am not sure what round size they used. This got me ...
1
vote
2answers
371 views

Why doesn't form based authentication use digest instead of plain text

In form based authentication the credentials are sent as such within the message, whereas in digest based authentication a digest of credentials, domain name and a random challenge is sent instead. ...
3
votes
1answer
351 views

Time to crack passphrase of 4 English word combinations at 7 terahashes/sec

This site suggests using 4 common English words as a password is no longer safe. Apparently the top 5000 English words in any combination of 4 words can be hashed in 1.5 minutes at 7Thash/sec. The ...
1
vote
2answers
179 views

Storing Encrypted Passwords [duplicate]

I was thinking about alternatives to hashes for storing passwords, and I was wondering if there was any huge security flaw with one I came up with. If, when the user creates their account, their ...
5
votes
1answer
516 views

Bruteforce FileVault Encryption?

I've been getting into forensics and penetration testing lately and hoping someone can explain what the below data is and how it might be used to perform a bruteforce (hashcat) attacks against ...
2
votes
1answer
330 views

How to store secret key used for hashing?

I am trying to figure out a secure way to store secret keys used in the hashing of social security numbers. The idea is for de-identification of research subjects yet still permitting follow-ups ...
4
votes
2answers
429 views

Use mining to prevent DDOS attacks on websocket: Is this a viable solution?

I'm thinking whether the following way is a good way to completely and totally prevent ddos on my server. My idea is to use the same mechanism of cryptocurrency mining (bitcoin, with sha256 or any ...
3
votes
2answers
160 views

Can hash collisions be eliminated by hashing twice? [duplicate]

Suppose I have a file verified.txt that has a certain hash X. An attacker can form an impostor.txt that replicates the hash with different content, resulting in a collision for a given algorithm, and ...
54
votes
5answers
12k views

Is it secure to use MD5 to verify the integrity of small files (less than 15kb)?

I know that collision for MD5 has been documented since the 90s and that digital certificates based off of MD5 has been demonstrated to be completely compromised back in 2010 but how effective is MD5 ...
1
vote
1answer
265 views

Is generating a random salt for every password-hash but not saving the salt good/bad? [duplicate]

I read this related article: Hashed pw storage with random salt which is kind of related to my question, but in the question and in the answers as well they mention to store the random salt used to ...
1
vote
0answers
82 views

Restrict Public API To Access From Single App

I have a REST api on a server and an application for android phones that mostly makes calls to that api and presents the info to the user. Because the application needs to be a quick way to lookup ...
8
votes
5answers
951 views

Why don't websites provide a checksum of their downloadable files?

I very rarely see websites provide a SHA-2 hash that's signed to ensure file integrity for the user downloaded side file, and show that the file has not been manipulated or out right replaced with a ...
1
vote
0answers
24 views

Different hash functions for validation and PBE [duplicate]

Consider a service that stores files. Users create accounts, secured by passwords, to access these files. PBE is used to secure the contents of these files. However, it is desirable to be able to ...
1
vote
0answers
67 views

Re-using the hash value of password to server by malicious actor

Let's say Alice logged into https://www.facebook.com with her email and password: Email: Alice@gmail.com Password: correctHorseShoeBattery Nonce given by ...
-1
votes
1answer
160 views

How to learn hash type while knowing password as a plain-text format and its hash value? [duplicate]

I have a hash string and also its plain-text format string. But I don't know which encryption algorithm is used. How can I learn this? I used a lot of hash type checker. But all of these cannot ...
6
votes
1answer
419 views

How can short-circuit hash equality be exploited?

I recently came across some password code that hashed the password and then compared it with the saved hash in the naive way: one character at a time, short-circuiting as soon as a non-match was found....
1
vote
1answer
1k views

Using Windows LSA Hashes obtained from crackmapexec

I have obtained some hashes using crackmapexec and dumping from the LSA process. The hashes are in this form (data below is fake): adm_name:c6f132a235209036744ba5d303bd5d9b:SOME.ORGANISATION.COM:...
2
votes
1answer
682 views

Collision-free cryptographic hashing?

I wish to hash something that outputs a collision-free hash, and to use that hash as an id in a database. Using conventional cryptographic hashing (fixed-length) means there is a chance of collision, ...
-1
votes
2answers
478 views

Hashing User Passwords Client or Server side [duplicate]

I am a university student and I have only now reached the part of my degree where we focus on security. The task was very broad in how we were to protect our database and user details. All it said was ...
2
votes
2answers
224 views

Does having a salted password hash make cracking an unsalted hash of the same password easier?

I've been asked to implement a system to prevent reusing passwords on the same account. The most secure way I know to do this is to compare hashes of the password + a known salt. bcrypt.hash(sha256(...
1
vote
3answers
554 views

Rolling your own crypto [closed]

I know this is usually frowned upon, but supposing you were to roll your own encryption cipher (completely on your own or with a small group of friends, with no peer review possible), what could you ...
0
votes
1answer
164 views

Using multiple hashes to verify a file

I'm dreaming of a service where a client sends my service a hash of a file that they generate locally from that file. The idea is that having such a hash would be enough to show that the user is ...
5
votes
2answers
5k views

How to reverse engineer password from /etc/shadow

I failed to answer a question in a CaptureTheFlag event, and the the question still bugs me. I want to share the question here and please help me if you know the solution. Question: You have the ...
1
vote
3answers
189 views

Should Hashes of Sensitive Data be Encrypted

I'm planning on storing chunks of encrypted data inside a file, along with each chunk would be the hash(sha256) of the unencrypted chunk stored in the file as well. Is storing the hash secure?
1
vote
3answers
4k views

How to decrypt a password for recovery with php [duplicate]

I have a website that people can sign up for and sign in to. I would like to implement a password recovery system that sends you the decrypted password. When the user signs up, the password is salted ...
2
votes
1answer
90 views

What kind of encryption is this file using? It used to be plain text

I was collecting data and building a database from a mobile game on Android. Here's an after/before image. If I do CTRL + A and copy paste on the left side, all information gets copied to clipboard ...
0
votes
1answer
88 views

Deterministic password generation using Yubikey

I like LastPass but having to have it as a browser plugin means an attacker could steal all my passwords at once. It makes a lot of sense to use a hardware device to store my passwords, like yubikey ...
0
votes
1answer
197 views

What is the weakest scheme in common use for password hashing?

Essentially, what's the next step up from plaintext password storage? I suspect the answer is going to be MD5, but I'm not familiar with a broad enough variety of examples to be sure. The reason ...
1
vote
1answer
140 views

Is it good practice to store information about a subkey inside a hash?

I recently wrote out a small javascript library that allows you to verify identity server password hashes in nodeJS. While I was doing the research I learnt that the type of hash, iterations and salt ...
1
vote
1answer
2k views

Is SHA synonymous with SHA1 or SHA0?

There is so little info and so much confusion out there. People often equate SHA2 as being SHA256; so then would SHA be 160 bit, also known as SHA1? Is SHA deprecated, like SHA1? Are they the ...
19
votes
2answers
5k views

How secure is BCRYPT(SHA1(Password)) [duplicate]

This question is a fork from a previous question here: Is it safe/wise to store a salt in the same field as the hashed password? Assume you run a web portal, and store passwords in SHA1 hashes. How ...
1
vote
1answer
482 views

How to best hash patient names to generate a pseudonym?

I am working on a data acquisition and preprocessing tool for a brain tumor database. The tool preprocesses the data and harmonizes it so it can be united in a one big database. Due to privacy ...
11
votes
5answers
2k views

Generating and securing gift card codes

I'm working for a company that is generating gift card codes which can be used to pay for goods on online stores. I'm wondering what the most secure way of generating these gift card codes are. The ...
0
votes
2answers
230 views

How to verify 2 hashed values with different salts originating from the same clear-text password?

I have a project where I need to do an account merge across two websites. Some percentage of users have accounts on both sites (same email address). Rather than just assume that two accounts with ...
0
votes
2answers
380 views

How is a random salt derived from output of password_hash(), given that hashing functions are deterministic?

Regarding the PHP function password_verify(), how is the "unhashed" random salt derived from the output of password_hash(), given that hashing functions are deterministic? It seems to me that, if the ...
4
votes
1answer
986 views

How Secure is Microsoft ASP.NET Core Identity?

Someone told me about it and showed me the characteristics of version 3: ASP.NET Core Identity Version 3: PBKDF2 with HMAC-SHA256, 128-bit salt, 256-bit subkey, 10000 iterations Which was from ...
0
votes
1answer
187 views

PHP - Does password_hash/Argon2i effectively truncate passwords after certain length?

If I'm not wrong, by default PHP's password_hash with PASSWORD_ARGON2I outputs a 43-character alphanumeric hash among other things. While this means that simple passwords that are shorter than 43 ...
1
vote
1answer
40 views

Store hashes for a finite set of strings that would be extremely time consuming to reverse via table lookup but also allow grouping

Lets say I have finite set of strings (lets say half a billion). There can never be any other strings I would need to store other than these half a billion strings. The strings may be repeated in my ...
10
votes
2answers
3k views

Mathematically, how long would it take to crack a bcrypt password hash?

So I'm currently using bcrypt to hash passwords with a randomly generated salt (as seen in the pip bcrypt module), with 12 rounds. I have been looking around, but I cannot find a detailed and clear ...
0
votes
2answers
285 views

Minimum number of bits to prevent hash collisions? [closed]

There are a number of hashing functions in wide spread use now. Seems the general range of bits is from 128 (MD5) to 512 (SHA-2). To prevent different types of hash collisions, what are the ...
2
votes
1answer
405 views

Path traversal using hash extension attack

I'm trying to write a PoC for path traversal using hash extension attack on a PHP site. My obstacle is in specifying an acceptable string. The vulnerability is in in the URL: http://127.0.0.1/...
0
votes
2answers
7k views

How Facebook hashes passwords

I found this presentation how Facebook stores customer passwords and how they do authentication. This slide shows how they hash passwords: Is it a good idea to do such operations with a raw password?...
40
votes
4answers
9k views

What's the point in hashing phone numbers?

Some services (for instance ProtonMail) claim to store hashes of phone numbers, instead of phone numbers themselves (while they don't say how they hash it). Now, given that the number of potentially ...
0
votes
2answers
109 views

Rearranging hash adds no security?

I'm a rookie when it comes to Information Security so I've been reading a lot of the top questions on this stackexchange for the sake of learning. I came across this question that discusses hashing. ...