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.
588
questions
1
vote
1
answer
111
views
Fastest method of CNF equation solution verification
I am trying to find a way to mine bitcoin faster than an ASIC by using a CNF representation of sha(sha(hash)), which would be an equation containing a few hundred thousand clauses, let's call it n ...
2
votes
1
answer
2k
views
Can OpenSSL sign an ED25519 certificate with ECDSA-with-SHA256?
We are trying to generate some self-signed certificates to test our cybersecurity firmware before switching to a "real" CA-signed chain of trust. The specification we are coding to mandates ...
3
votes
1
answer
467
views
NIST expression for HMAC security strength
In NIST SP800-107, NIST claims that the security strength of HMAC is MIN(security of HMAC key, $2L$). $L$ is the length of the output of the underlying hash function. Let's take HMAC-SHA256 as an ...
0
votes
2
answers
856
views
Is it possible to break SHA-256 with hash tables?
If x is the value you're hashing, $t(x)$ is the hash of that value, and $t(x+s)$ is that value with salt, then hashed. You could create a hash table where the key is $t(x+s)$, the value is $x+s$, and ...
1
vote
1
answer
102
views
Probabilistic SHA-256 hash tending all values to 0.5
I wrote SHA-256 with arrays of integers representing the bits (e.g. [1,0,...,1]), and then I altered it to accept partial values (e.g. [0.5, 0.79, 0.0, 1]), as in each value has an x chance of being '...
0
votes
2
answers
209
views
Is it possible to perform Hash(a) + "b" -> Hash(a||b)
Assume that we have (know):
Hash(A)
Length of A
A's character type ([0->9],[a->z])
A is a string
Everything about B (original string, Length, etc.)
HashMethod SHA256
Note: A's original value is ...
1
vote
1
answer
198
views
Why is the SHA256 in libsnark so slow?
When I use the merkle proof example of libsnark, I find that it takes more time to calculate the merkle tree than to calculate the proof. As shown in the log below, it takes 0.04s to calculate a ...
1
vote
1
answer
399
views
TLS 1.2 client finish message
Im working on TLS1.2 on cipher suite ECDHE_ECDSA_AES_128_CBC_SHA256. Im currently at the stage of client encrypted message where I always got error on wireshark from the server saying that Fatal, ...
1
vote
1
answer
208
views
How to crack sha256 used as streamcipher with known or guessable block
Using SHA-256 as a stream cipher appears to bear cryptographic weaknesses, however, I am not quite sure how to implement them in decryption.
Assume that I have an encryption function using 64-byte ...
0
votes
2
answers
344
views
What does it mean if two files created by the same person shares the same SHA256 hash?
Okay so I've got an assignment for cyberlaw and this could be irrelevant to the question. But I have a situation where someone signed a a will using an advanced electronic signature, but this ...
0
votes
2
answers
297
views
Can I use half of 256 bit key as AES 256 IV?
After some google research, I have found out the IV used in AES 256 bit encryption must be a 128 bit key.
My AES256 encryption is processed with key of random 256 bit key and IV generated of text ...
0
votes
1
answer
712
views
Are RSA-SHA256 signatures prone to length extension attacks?
I need to sign a message using a private key and verify the message with a public key, while making sure the message hasn’t been tampered.
I know that SHA-256 itself is prone to length-extension ...
0
votes
1
answer
555
views
SHA-256 compression functions without padding
Looking at the example of the null input (512 bits), it takes as input:
input (Hex):
...
1
vote
1
answer
228
views
SHA-256 in binary-circuit-based MPC
For a binary-circuit-based MPC, the multiparty will provide its inputs to calculate the result, which indicated the function $f(x_1, x_2, \dots,x_n)$ needs to accept $2$ or more inputs.
Why do there ...
2
votes
1
answer
1k
views
Understanding Hash collisions - why bad?
I read few answers about the question: why are hash collisions so dangerous?
But did not get a really satisfying answer.
Assume we are the first people who found a SHA256-collision, like
sha256($§&...
3
votes
1
answer
333
views
Can I treat SHA-256 hashes as 64 fair dice rolls with numbers between 1 and 16?
My understanding was that SHA-256 is pretty random or "random" enough.
I assumed that would mean that every character would behave like a 1 to 16 dice roll.
With this assumption, I would ...
3
votes
1
answer
727
views
Is there a quantum algorithm to find SHA256 collisions?
As I understand, the Bitcoin network can be seen as a supercomputer looking for SHA256 collisions. It hasn't found one yet (March 2022). Also, in the post-quantum cryptography era, you would be ...
6
votes
1
answer
3k
views
RSA Signature using SHA-256 is secure?
Is following RSA signature scheme secure against forgery and prevents breaking text book RSA?
$$y = \operatorname{SHA-256}(m)$$
$$s = y^d\bmod N$$
where $m$ is message of arbitrary length, $y$ is the ...
2
votes
2
answers
751
views
What are the first bits of a bitstring, for instance generated using SHA-256? [closed]
I have a string that generates from SHA-256
x = fea5f97f9ca1e1a0a2ae344f4e12a3ab0c4d9221e6bb5d70bc567e39f8fbc3d5
What's are the first 10 bits are of the value of <...
0
votes
1
answer
266
views
Compressing SHA256 to be a viable database id?
Don't know a lot about cryptography, so need some help on this.
I would like to use a SHA256 string as a unique id in my database for users, but scaling that would be difficult.
Is it possible to ...
1
vote
1
answer
220
views
Is this simple Proof of Work algorithm based on SHA256 susceptible to length extension attack?
Each block's contents are hashed into 32 bytes using $\operatorname{SHA-256}$ (call this string $a$). In order for the block to be accepted, there must be a 256bit nonce (call this string $b$) ...
1
vote
0
answers
146
views
SHA-256 Hash Crack
Suppose, If a SHA-2 hash does get broken completely with hardly any power, where would it get reported and is there currently a bounty on it?
3
votes
1
answer
252
views
How to create recreatable hashes?
I recently stumbled upon a YouTube video explaining a casino game. In simple words, they randomly generate a multiplier for your initial investment. This multiplier is supposed to be backed by a hash ...
1
vote
2
answers
704
views
Concatenation in Merkle Trees
Consider a simple Merkle Tree with leaves alice +100 and bob +50. Using the SHA256 hash algorithm, the digest of the respective ...
6
votes
1
answer
2k
views
Risks of Using SHA1 Instead of SHA256 for RSA with OAEP Padding
I'm presently implementing a simple RSA-based encryption as follows in PHP (using openssl_public_encrypt):
...
1
vote
2
answers
1k
views
How insecure would a cipher based on iterative hashing be?
I was just wondering how the following construction could be insecure. I can tell that known-plain attacks are possible, but I'm not sure about anything else.
Let the user pick a password and hash it ...
2
votes
3
answers
254
views
Reversing hash function makes possibilities increase exponentially, yet there is a finite number of inputs. How?
When trying to reverse a hash function, there is loss, e.g.
a+b=c
given c=5, try to go back to a,b (previous step)
(a,b)=(5,0),(4,1),(3,2),(2,3),(1,4),(0,5)
but, ...
0
votes
0
answers
248
views
Bug Bounty for a reversed Hash
this is just a general question, Is there is a bug bounty from the NSA or anyone else for reversing a SHA HASH, specifically SHA-256?
2
votes
1
answer
123
views
Should I use HMAC to create a multiple part HASH token
I have a web API with a custom API authentication system that users each have a SecretKey and a public ApiKey. Using these two keys client(or user) can generate a token for the authentication on the ...
0
votes
2
answers
211
views
Bringing a key to 256 bit by a hash algorithm
For example, if I use Rijndael for encryption, I have to specify a key of a certain length. For user convenience, I want the user to be able to use a key of any length. Then, to get the key to the ...
0
votes
1
answer
212
views
Reverse SHA256 Hashed Value from Multiple Instances where Part of Hashed Value is known
I apologize in advance if this question has been answered already. However, I have not been able to find an existing answer - despite the case being pretty simple and common I imagine. Perhaps there ...
0
votes
1
answer
467
views
SHA-256 doesn't follow a uniform distribution?
I have been playing with SHA-2-256 in Julia and I noticed that the hashes produced don't appear to follow a uniform distribution. My understanding of secure hashing algorithms is that they should ...
2
votes
1
answer
460
views
How strong if I combine two hash functions, such as MD5(SHA256(input))?
If I try to do MD5(SHA256(input)), what is the strength of this so-called double hashing approach?
Is it as strong as SHA256, or as strong as MD5, or as strong as ...
1
vote
2
answers
276
views
Can I use SHA256 from BIP39 passphrase for auth credentials?
I am working on an E2E encrypted app. I am using OpenPGP.js and storing public and private keys on the server. The private key is encrypted with a BIP39 passphrase which is stored in browser ...
1
vote
2
answers
2k
views
What is the difference between "Elliptic Curve Function" and "Hash Functions" like SHA256?
I am reading about bitcoin and I am a little confused about "elliptic curve function" and "SHA256".
Do they have the same properties? Can both be used to generate private and ...
2
votes
1
answer
5k
views
Does the signature length of RS256 depend on the size of the RSA key used for signing?
The following NodeJS code, when run (v16.8.0), logs 512 to stdout.
...
2
votes
3
answers
197
views
$2^{64}$ versions of the same message
I am reading a textbook and in there they explain the property of hash functions. In particular, they give an example of how unlikely it would be to find a second input value that would match the hash ...
0
votes
2
answers
1k
views
Is it possible to get the SHA256 hash collision with partial known data
I have a text sentence that consists of 448 digits [0-9] [a-f] (in HEX format).
This text sentence is partially cut off, but I know the middle, and the beginning ...
0
votes
0
answers
38
views
Protect PII in-transit via hash comparison
I'm being asked to provide a solution for my internal customer. All network communication is internal and no applications nor their servers are accessible via the internet.
REQUESTOR application will ...
2
votes
1
answer
2k
views
How to generate a circuit for SHA-256?
In "A Boolean Circuit for SHA-256" by Steven Goldfeder, the author gives a Boolean circuit for SHA-256. I find this method very complicated.
May I ask how to construct a Boolean circuit for ...
2
votes
3
answers
470
views
What happens if a padding sequence is encountered at the end of input for SHA-256?
I am acquiring binary data from a sensor and storing it in a file. As each byte of data is read from the sensor, it goes into a SHA256 hash.
The length of the acquired data stream varies from one ...
2
votes
1
answer
827
views
API key generation technique
I am designing an web api which needs to grant access to various client apps via an api key sent as http header. I know, not really how it should be done but I have no control over this part.
My ...
4
votes
0
answers
275
views
Uniqueness and Schnorr signatures
I am trying to analyse a "uniqueness" game around Schnorr signatures. The game is described in $\textbf{B.}$ and I try to provide in $\textbf{1.}$ and $\textbf{2.}$ some incomplete answers ...
0
votes
0
answers
1k
views
Generating certificate using ECDSA_P256 algorithm but with sha256RSA signature
If you have a look at a certificate encrypting google.com it advertises a 256-bit ECC key with ECDSA_P256 parameter. The signature algorithm is sha256RSA. I've been ...
1
vote
1
answer
52
views
Number of Legitimate Bitcoin Wallets from unsequenced set of 24 Words
If someone found a scrambled BIP-39 24 word sequence how hard would it be to determine the correct sequence that yields someone's wallet.
Are there multiple different unique sequences of the same 24 ...
0
votes
0
answers
291
views
How does one construct a SNARK circuit for proving the knowledge of a SHA256 pre-image?
Usually one explains how the R1CS/QAPs and SNARKs work using examples of circuits with multiplication and addition nodes, and constructing polynomials from that is relatively straightforward. SHA-2 ...
1
vote
0
answers
52
views
Matching accounts across multiple data leaks via their hashed passwords
I've heard about several instances where OSINT researchers were able to match user accounts from multiple data leaks purely based on their hashed passwords, assuming accounts had the same password on ...
0
votes
2
answers
2k
views
Doubt regarding converting hex to byte in SHA-256 input
Hash functions such as SHA-256 takes a binary string as input. Now given a hex string when we convert it to a normal text string the computed SHA-256 value would be the same. Herein lies my problem
...
-1
votes
1
answer
195
views
How to pad in the SHA256 Algorithm (an example using Bitcoin Header)?
For any bitcoin block we combine various Header fields to create a string which is an input to a 2 pass SHA algorithm. The resultant hash must match with the Hash in the Block header for the Block to ...
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 ...