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.
589
questions
0
votes
1
answer
99
views
A query regarding SHA256 Algorithm
I am trying to code SHA256 from scratch to understand its implementation based on the wiki pseudo code as its clear enough. But I am running into problems with the calculation of W[i] for the first ...
0
votes
0
answers
39
views
If the source code of SHA256 hashing algorithm is available in public, why can't it be hacked? [duplicate]
If the SHA256 algorithm is public, why can't attackers use it to create more collisions rendering the algorithm useless?
2
votes
2
answers
400
views
Does SHA-256 have (128-time + 128-space = 256-overall)-bit collision resistance?
First, we consider those hash functions that can actually provide 256-bit pre-image security, and not something like SHAKE128<l=256bits> where the sponge ...
2
votes
2
answers
2k
views
How to unhash sha256? Alternatives to brute force?
I know it's almost impossible to do, SHA256 is a one-way function that can't be easily reversed, just like there are operations that have no reverse, take:
$f(x) = x+5$ , it's easy to see that if you ...
0
votes
1
answer
330
views
Does this paper find cryptographic weakness of SHA-256?
I found only the abstract and tables of this paper
https://dl.acm.org/doi/abs/10.1145/3409501.3409513
From the abstract
In this paper, the researchers proved that the modified SHA256 is viable to ...
2
votes
2
answers
128
views
In sha256, is it possible to use less information than the full preimage to prove that the prefix of the preimage is a certain string
Alice split a long string P into two segments A and B. A is relatively short and B is long.
H = sha256(A + B)
Bob does not know P, but knows H.
Is it possible for ...
0
votes
1
answer
125
views
Does my SHA-256 TableSalt algo give away the seed salt?
The Setup
I have a table of values for which I need to compute a salted hash for each table-cell value. Furthermore, I need the salt for each table cell to be unique and unpredictable. (I can explain ...
1
vote
2
answers
158
views
is it safe to combine scrypt with other hash algorithms?
I'm currently writing a file encryption program, and I designed this scheme to derive a key from user input password:
...
2
votes
1
answer
2k
views
What is the role of SHA-1 on Diffie-Hellman-group1-SHA1?
I undersntand that in Diffie Hellman each party generates a public / private key pair and distributes the public key.
I know that a combined key is created with the sender private key, and the ...
-1
votes
1
answer
81
views
How do we know if someone has successfully discovered the steps of a hashing algorithm? [closed]
I was reading an article about how SHA-256 encrypts stuff (Here it is by the way) but how do we know the steps mentioned are true? I'm not a cryptography expert but I've tried making my own encryption ...
0
votes
1
answer
232
views
Why are different private and public key generated in online brainwallets?
Why is that different wallet generating sites give different public and private keys when you enter the same passphrase even though they both use the same Algorithm (Sha 256)?
Thank you
P.S.
Ok...one ...
2
votes
1
answer
890
views
sha256 - how many characters can we put in a message block?
since we can put 448 bit of the actual message in every block(56 characters), if I have a string of 56 charcters ...
0
votes
0
answers
79
views
Is 64-bit SHA-256 IV-based MAC for fixed-length messages reasonably secure?
I want to use truncate8(SHA256-nopad(IV=secret, message)) as a 64-bit MAC, where message is guaranteed to be exactly one hash ...
0
votes
1
answer
173
views
TLS1.3 transcript hash
From RFC8446:
For concreteness, the transcript hash is always taken from the
following sequence of handshake messages, starting at the first
ClientHello and including only those messages that were ...
0
votes
0
answers
15
views
Can a hash function be cyclic? [duplicate]
Is it possible for a hash function, SHA256 for example, to be a cyclic hash function, where the hash of the hash returns the original value?
Example:
...
-2
votes
0
answers
39
views
AES CBC Encryption Key & Special ASCII characters [duplicate]
Can we add characters like α π Σ µ ...
9
votes
6
answers
7k
views
Is it possible that a SHA256 hash has the same hex character over and over again?
In theory, there are infinite inputs, that you can hash with SHA-256. So theoretically it would be possible that one hash string would read 0xaaaaaaaa...
But would ...
0
votes
1
answer
405
views
How to generate different hash values for same files/messages?
I was generating HashValue for contents in the file. I want a different hash value every time I wanna generate even if the file is the same.
I am using SHA256. For the same files, the hash value I am ...
1
vote
1
answer
419
views
Known text attack on Hash function (SHA 256 or SHA512)
I was thinking the below attack scenario on hash function. Let's assume that three binary numbers A(1000 bits), B(16 bits) and C(283 bits) are concatenated together and H(A||B||C) is generated using ...
1
vote
3
answers
2k
views
Can SHA256 hash be considered as a secure key proof?
I want to use PBKDF2 with 1,000,000 iterations (I don't know yet exactly how many I will choose) to derive a 256-bit symmetric key K from a password provided by a user (at least 40 bits of entropy). ...
3
votes
2
answers
393
views
Use slow hashing to reduce digest size?
I have seen this question on MD5 replacement for 128 bit digests. It is said numerous times that having a 128 bit digest is impossible today because finding a collision would only require $2^{64}$ ...
1
vote
1
answer
648
views
How is an ADFS SAML token's digest value calculated?
I am trying to re-calculate the digest value on an ADFS SAML token and cannot figure out how the digest has been originally calculated on the ADFS side.
The specification states that it is the SAML ...
1
vote
1
answer
94
views
Depth of the SHA-256 collision search knowing partial input and final hashes
So I have a partial input data (string) PART1+UNKNOWN+PART2, length of UNKNOWN is self-describing.
I have a bunch of valid ...
2
votes
2
answers
505
views
Is SHA-256 bijective on a certain domain?
Following the discussion on bijectivity and given that function inverse is studied on domain/codomain, I would like to ask whether we can find subsets where this function can be bijective.
Let's say ...
2
votes
1
answer
1k
views
Is SHA-256 a bijective function?
I suppose this question addresses surjectivity and injectivity. We talk about collisions but did we prove yet rigidly that this function is not reversible?
EDIT: Accepting the answer based on ...
2
votes
0
answers
154
views
Depth of $\operatorname{SHA-256}$ implementation by fan-in $2$ and fan-out $1$ Boolean circuits?
A fan-in $2$ and fan-out $1$ Boolean circuit is a circuit consisting of $\operatorname{AND}$, $\operatorname{OR}$ and $\operatorname{NOT}$ gates where number of inputs to $\operatorname{AND}$ and $\...
2
votes
1
answer
957
views
Generating HMAC(SHA256) keys using WebCrypto deriveKey() API
I am using the javascript WebCrypto API window.crypto.subtle.deriveKey() API to generate HMAC keys like this:
...
9
votes
3
answers
4k
views
Can one use a reversible hash algorithm as a compression function?
As we know any input to SHA-256 will be returned as 64 hex length output. Is it possible to create a hash that can do the same thing as SHA-256 but can be reversed, so if we have the output of 64 ...
1
vote
0
answers
59
views
vec_sel in SHA-1
I can't find what is vec_sel() in this optimization from Wikipedia:
Instead of the formulation from the original FIPS PUB 180-1 shown, the following equivalent ...
3
votes
1
answer
339
views
Optimizing SHA-256 implementation for fixed input prefix
Is it possible to optimize/precalculate some results in SHA-256 if the input starts with fixed values? My input is always 1111||message. Can I precalculate the <...
0
votes
1
answer
4k
views
AES-ECB Reverse attack CTF [closed]
We have a key representing an SHA-256 hash in HEX, and we have the key in AES-ECB. We also have a file with plaintext to cipher messages that were encrypted with our key. How could we find this key?
<...
1
vote
1
answer
946
views
Should I calculate SHA-256 hash of a raw bytes of a token or it's hex encoding?
I have a system where I should generate a secret token for a user. The presence of a token is sufficient to grant access to some user-related data.
I am generating a 4096 bit token from a ...
6
votes
1
answer
2k
views
Is HMAC-SHA256 a PRF?
In the abstract of The Exact PRF-Security of NMAC and HMAC, Gazi, Pietrzak, and Rybar state:
NMAC was introduced by Bellare, Canetti and Krawczyk [Crypto’96], who proved it to be a secure
...
1
vote
0
answers
2k
views
How quickly can we compute SHA256?
Disclaimer.
I have asked a similar question on Electronics StackExchange: they advised me to try here.
The question
I am in the process of developing a simple protocol whose security relies on the ...
0
votes
3
answers
498
views
If you have two inputs of the same length, are there theoretically collissions in both MD5 and SHA-256?
Can there be two messages M, M' both of the same length such that both MD5(M)=MD5(M') and SHA-256(M)=SHA-256(M')?
Let's compare two files: if they have the same length, they are candidates for having ...
0
votes
1
answer
3k
views
SHA-256 private/public coordinates to the PEM format
I feel that my question might display a bit of ignorance. I have been searching for answers, but have had no luck--perhaps my assumptions are wrong. I apologize if that is the case.
Context:
I have a ...
0
votes
0
answers
98
views
SHA3_512 as dynamic SBOX generator
I'm creating a substitution-permutation cipher (for learning purposes only of course) and I'd like to implement dynamic SBOXs. The cipher will have a block size of 128, and 32 rounds. These SBOXs will ...
9
votes
1
answer
2k
views
Outlook of trustworthiness of SHA-2
On the Wikipedia page of SHA-2, the following is written:
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, and ...
1
vote
4
answers
1k
views
How long would it take all of the supercomputers or cloud computing on Earth to bruteforce a significantly long password?
I was arguing with a colleague who thinks that SHA256 (password + 64 character static salt) is "insecure." My argument is that nothing in cryptography is "secure," it's all a ...
0
votes
1
answer
131
views
Different inputs but able to generate consistent outputs across different SHA engines
Say I'm feeding in few thousand bits data (INPUT AAAA) into both SHA256 & SHA3 256 engines at the same time. (Both engines using different hashing architecture) and hence it will generate ...
1
vote
0
answers
31
views
TLS 1.3 clarification needed on hello_hash and subsequent hashes
I am exploring TLS, mainly from the server side at the moment. I am creating a server that will authenticate a client using TLS 1.3 and eventually I will be creating a client authenticating to a ...
2
votes
1
answer
102
views
Any way to prove possession of a RSA 2048 private key using 256 bit?
Alice has a RSA 2048 private key and Bob has corresponding public key.
They have a secure connection, but Alice can transmit only 256bit to Bob (Bob can transmit any amount of data to Alice).
Is there ...
2
votes
1
answer
1k
views
What is the overhead of GCM? And how are GCM tags signed by RSA/PKI?
I'm mainly trying to wrap my head around the pipeline of encryption, hashing and signing.
I've read over this question, describing the overhead of GCM, which I understand to be configurable for space-...
5
votes
2
answers
1k
views
Extending the size of input for SHA-2 function
In the question Does a hash function necessarily need to allow arbitrary length input? many answers talk about the theoretical limit of the SHA-2 functions being $2^{64} - 1$ bit due to padding. I was ...
2
votes
1
answer
402
views
How are SHACAL-2 ciphers calculated?
I am trying to learn about the underlying functionality of the different hash functions (currently SHA) and I'm pretty stuck even after watching a Stanford video about it.
One method of hashing is by ...
10
votes
3
answers
5k
views
Is double SHA-256 the best choice for Bitcoin?
So I was just curious.
I really look up to Blockchain technology and I have read that Bitcoin uses double SHA-256 for hashing.
( from what I understood, double sha256 is essentially $\operatorname{SHA-...
4
votes
2
answers
1k
views
Embedding SHA256 inside SHA1 for BitTorrent
BitTorrent uses SHA1 for its hashes, but SHA1 is unsafe and people can tamper the preimage and still obtain the same hash, right?
So imagine I want to be very sure the file I'm sharing on BitTorrent ...
5
votes
0
answers
144
views
Challenging $O(2^{n/2})$ for hash collisions using quantum computers
In "Finding Hash Collisions with Quantum Computers by Using Differential Trails with Smaller Probability than Birthday Bound" the authors Akinori Hosoyamada and Yu Sasaki state that it may ...
1
vote
3
answers
676
views
Is it possible to generate a hash function that produces similar output to SHA-256?
Is it possible to create a hash function that generates a correlated to SHA-256 when given the same input?
In other words, given a fixed input X:
...
2
votes
1
answer
404
views
Do any other factors aside from length of input affect the runtime of the SHA-256 hashing algorithm?
To my understanding, the only factor that (even if ever so slightly on most implementations) affects the run time of SHA-256 is the amount of padded chunks the extension & compression function ...