Questions tagged [sha-256]

SHA-256 is part of the SHA-2 family of hash functions with a 256-bit output and a 128-bit security level.

Filter by
Sorted by
Tagged with
0
votes
0answers
8 views

RSA/ECB/OAEPWithSHA-256AndMGF1Padding in Ruby [migrated]

Any thoughts on the best approach to decrypt a value encrypted with RSA/ECB/OAEPWithSHA-256AndMGF1Padding encryption in Ruby? Or general steps?
1
vote
0answers
36 views

SHA256 creates a unique hash for two *.wim that have identical content - are there better methods for verifying *.wim contents?

I'm trying to verify that the contents of a Windows Image are identical for two WIM files; however, I think the timestamps for the file modifications are affecting the final checksums--even though the ...
5
votes
2answers
149 views

Collision resistance of partial SHA-256 hashes XOR'ed

My hashing algorithm computes the SHA-256 for each of 12 input strings and XORs them to get the final hash. Is there a risk of an attacker being able to forge 2 sets of inputs that yield the same ...
0
votes
1answer
62 views

Do I still need SHA256 if I already had a AES 256 key that is 44 characters long?

Several months ago, I was required to research on AES and SHA-256 to make a secured license system for my app. However, I was dumb enough that couldn't distinguish between the 256 bits from AES and ...
-1
votes
3answers
205 views

SHA-256: One input, two different outputs?

I am new to SHA-256. I have discovered that the same input could produce different SHA-256 hash ouputs depending on the (online) device I chose for generating the hash. Is this normal, or is there a ...
0
votes
1answer
52 views

How does sha-2 with fewer rounds work?

The wikipedia page about sha-2 states: Currently, the best public attacks break preimage resistance for 52 out of 64 rounds of SHA-256 or 57 out of 80 rounds of SHA-512 How exactly is the sha-256 ...
2
votes
2answers
127 views

Hashing a hash for authentication

I currently use Argon2 to derive a key (I will use a salt which I will save in a file as plaintext for when I later need to derive a key again) from a given password which I will use to encrypt a file ...
2
votes
3answers
103 views

Suitable 16-bit checksum?

I am writing a toy1 transport protocol and I am trying to implement a feature whereby: A 16-bit checksum is included in every packet. This checksum can be extended to be 48-bit if the data is large, ...
-1
votes
1answer
43 views

Is it possible for a hash in SHA-256 to have more than 8 digits? [closed]

Is it ever possible for a hash to have more than 8 digits in SHA-256?
0
votes
0answers
45 views

Why initialize values and array SHA256 with specific buffer?

Why initialize values and array SHA256 with specific buffer? ...
0
votes
2answers
115 views

How is the hash for a file calculated?

Is the file just read bit by bit to calculate the hash with those values or is there more to it? Are there any resources to read a bit more about file hashing?
1
vote
1answer
90 views

SHA256 message schedule examples

I need some example values for the message schedule stage of SHA256 to test this part of my implementation. If possible in binary, for the string 'abc'.
0
votes
2answers
56 views

For the hash computation of SHA-256, is it computed in parallel or series?

I'm trying to write my own SHA-256 implementation in VHDL, which runs in parallel execution style I have been using this as a reference to the SHA-256 algorithm: https://www.researchgate.net/file....
1
vote
1answer
62 views

ECDSA signature of a random 32 byte number vs. the hash of the number

I'm working on an application that involves signing a 32 byte random number generated by the OS. Assuming the RNG works as intended, is it safe to sign the random number itself rather than a hash of ...
0
votes
1answer
48 views

Bitcoin mining: how is a block header of 80 bytes processed in SHA-256? Isn't it too big?

The whole process of bitcoin mining was making sense to me until a moment of madness an hour ago, if there are 80 bytes of data to be processed in SHA-256, that's 640 bits of data to be processed in ...
2
votes
1answer
89 views

Use a hash-function twice

I'm creating a small messenger and I wanted to know if it makes sense to store user passwords double-hashed in our backend-database. I wanted the user the register in an app, which should save a hash ...
0
votes
1answer
86 views

Is there any Corelation between the SHA256 and SHA512 hash of the same data?

Is there any Corelation between the SHA256 and SHA512 hash of the same data ?
2
votes
2answers
1k views

What is the difference between SHA-3 and SHA-256?

I am new about cryptography, I learned that SHA-3 (Secure Hash Algorithm 3) is the latest member of the Secure Hash Algorithm family of standards, released by NIST....
-2
votes
1answer
70 views

Is it possible to unhash sha256 if you are given the sha256 and unhash of a variable? [closed]

Lets say that $a, b, c$ are variables and you know that $$\operatorname{sha256}(a) = b \\ \operatorname{decrypt}(b) = a \\ \operatorname{sha256}(b) = c \\ \operatorname{decrypt}(c) = b$$ Is it ...
6
votes
1answer
2k views

What does the symbol $W_t$ mean in the SHA-256 specification?

I'm really confused about the computation about SHA 256. $$W_t = \begin{cases} M_t^{(i)} & 0 \leq t \leq 15 \\ &\\ \sigma_1^{256}(W_{t-2}) + W_{t-7} + \sigma_0^{256}(W_{t-15}) + W_{t-16} &...
2
votes
2answers
324 views

How to prove that finding a cycle in a cryptographic hash function is hard?

I want to show that finding cycles in a cryptographic hash function is hard. My thought: assume there a black box, that given a cryptographic hash function $h$, finds some $x$ and $r$ in polynomial ...
1
vote
2answers
94 views

Can i generate a SHA512 hash if i know the SHA256 hash of some unknown data?

if the SHA256 Hash of some unknown data is known ! Can i find the SHA512 of that unknown data ?
1
vote
1answer
217 views

Is SHA-256 OK to use for key derivation for a key that is never persisted?

The scenario: On the one side a user enters a pass phrase to encrypt a stream of data (AES-GCM) and a symmetric encryption key is derived from the pass phrase using plain SHA-256 (so not a slow ...
0
votes
0answers
50 views

Is reverse engineering SHA256-HMAC function possible? [duplicate]

Assume HMAC function is used to generate a 6-digt integers time-based onetime password. As follows: $$K_h =\operatorname{HMAC}(k,t) = H((k\oplus\text{opad})\mathbin\| H((k\oplus\text{ipad})\mathbin\|...
4
votes
2answers
513 views

How can I hash an input into an arbitrary domain point?

I am trying to implement a signature scheme involving RSA signing of a message digest generated by SHA-$256$. I want to hash the input into an RSA domain point instead of the fixed $256$ bit digest ...
-1
votes
1answer
370 views

How to change hash checksum of a text file without changing the contents in the file

I have created a text file called test.txt and the content of the file is Hello World I would like to change the SHA checksum hash without modifying the contents and filename. Is there any way to do ...
2
votes
1answer
184 views

Is padding of the digest needed in SHA256 with RSA-2048 scheme?

For a signing scheme involving generating a $256$ bit digest using SHA256 followed by RSA with $2048$ bit modulus, the signature would always be 256 bit without padding even though sigantures of up to ...
2
votes
1answer
122 views

What should I use for consequent AES key derivation?

I am writing a small chat program to explore some methods and concepts in cryptography and currently I am using a shared AES key tunneled with RSA which upon further reading revealed many flaws both ...
2
votes
2answers
153 views

Does the knowledge of SHA256(secret) and SHA256(secret + known constant) give any information about the secret just SHA256(secret)?

Does knowledge of SHA256(secret) and SHA256(secret + known constant) give any information about the secret than just SHA256(secret)?
2
votes
1answer
70 views

Is it possible to guarantee a SHA-256 hash will begin with a certain 3 bytes?

I've found this online currency someone has built as a project and it's "miner" / Proof of Work algorithm is as follows: Generate 32 bytes of random data and hash it, store the original value and the ...
17
votes
2answers
4k views

What makes SHA256 secure?

For example, RSA relies on a mathematically hard problem, factoring, while ECDSA or similar rely on discrete logarithm problem. What makes SHA256 and similar hash functions, of the same family, ...
8
votes
1answer
736 views

What is the use of SCRAM-SHA-256 (over SCRAM-SHA-1)?

The Salted Challenge Response Authentication Mechanism (SCRAM) specified in RFC 5802 can use arbitrary hash functions to operate. The base version from RFC 5802 uses SHA-1. From my understanding, ...
2
votes
1answer
76 views

For two LUKS volumes made with the same password, can stealing the encryption key from one volume allow access to the other?

A running computer has two LUKS volumes that were made with the same password. One volume is open (key is in RAM), the other is closed. If the running computer is stolen, is the closed volume safe? ...
0
votes
1answer
59 views

How to name a signature algorithm that has no hashed component

I have an API-based service that digitally signs messages with RSA or ECDSA (system decides during runtime). The input is base64 encoded SHA-256 hash and the output is: signature of this hash ...
0
votes
1answer
74 views

What pieces of information do you need to unhash a key to find out the original message?

I am very new to the hashing world and despite hours of research (AKA Googling) I still don't understand this piece of information. What are the different pieces of information that are needed in ...
0
votes
1answer
245 views

Use partial hash to verify entire hash

I've had an idea about storing parts of SHA256 hashes and I'd like to find out how secure it is, or how much less secure it is than storing the entire hash. For example, users can share this list of ...
0
votes
1answer
906 views

Hash Collision Probabilities

Please give help! how can I calculate the probability of collision? I need a mathematical equation for my studying. Assume, I am using SHA256 to hash 100-bits. Thus: SHA256 {100} = 256-bits (hash ...
-1
votes
1answer
1k views

Is it possible to convert the output of sha256 hash to binary or decimal value? [closed]

Can the output value of the sha256 hash function be converted to binary or decimal number? I know that the output is a set of 256bits. Is it possible to convert the output data to an unique ...
4
votes
2answers
284 views

If you wrote a reversible SHA-256 algorithm, how many “metadata” bits would be required for reversability?

I was reading about reversible computing while thinking about FPGA circuits. I realized that it would be possible to write a reversible SHA-256 algorithm if you stored some additional information as "...
17
votes
1answer
3k views

What are the consequences of removing a single byte from a sha256 hash?

I'm working on a system (Ethereum) where it is significantly cheaper to store 32 bytes than 33 bytes. I'd like to create a table where data is stored based on its hash. Sha256 would meet this ...
48
votes
11answers
15k views

How do hashes really ensure uniqueness?

This might seem an impractical and unnecessary conversation, but I feel it's something I need to clarify. Especially, as I just got my first developer job in a blockchain startup. So hashes are said ...
3
votes
1answer
896 views

Is SHA1 secured enough as a PRNG

I read SHA1 is still a secured hashing function with no collision found as of now. However, it's just a matter of time for someone to come up with such a collision or attack. Therefore, in new ...
2
votes
1answer
265 views

Practical quantum attacks on SHA256 MAC and HMAC

Is SHA256 MAC (or HMAC) vulnerable to any quantum attacks? Game setup: The attacker's goal is to produce a valid MAC to be accepted by other devices in the ecosystem. The ecosystem consists of ...
0
votes
2answers
186 views

Can I find the IV of a single block of SHA256, given the plaintext and digest?

Each 512-bit block of SHA256 takes an initialization vector (IV) and message schedule and returns a digest. Knowing the message schedule and resulting digest, is it feasible to reverse the algorithm ...
19
votes
5answers
2k views

How many hex digits do I need to compare when manually checking hash functions?

I sometimes run sha256sum on large files after transferring them from one place to another, and will just skim the hash output to verify it's correct. But, I usually just look at the first/last 5 or 6 ...
0
votes
1answer
916 views

Signing with RSA-SHA256 algorithm using EC keys

Is it practical to sign a data using RSA-SHA256 algorithm with EC keys? I used a small NodeJS script and crypto module (uses openSSL internally) to test this and I could successfully sign the data ...
-2
votes
2answers
467 views

VeraCrypt a weak point [closed]

Biggest flaw in VeraCrypt(or other Encryption programs) is Hash Algorithm. VeraCrypt hashes (SHA,Whirlpool,Streebog) it is the only point where can break an encrypted disk. Because break algorithm (...
2
votes
1answer
87 views

Why is a 1 added after the message input and before adding padding zeros (if necessary) when using SHA256 or RIPEMD160? [duplicate]

In preparing an input for SHA256 or RIPEMD-160 a single bit (1) is appended to the message before adding any necessary zero padding and before adding the bitlength (64 bits) to form 1 or more 512 bit ...
0
votes
1answer
462 views

SHA's finite character set and collision

From what I've researched, SHA's hex encoded string contains the characters [a-fA-F0-9]. If we represent it in Base64, it can contain ...