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
5
votes
2answers
595 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
1answer
45 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 ...
7
votes
3answers
172 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
2answers
156 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 ...
4
votes
0answers
58 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
3answers
168 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: ...
3
votes
1answer
58 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 ...
1
vote
1answer
23 views

PKCS#7 Signed Data contains always different signature

I am wondering why CMS (PKCS#7) Signed Data contains always a different signature of the original data when the SHA256withRSA signature algorithm is used. (using ...
1
vote
1answer
55 views

Why is data signed with SHA256-RSA-PKCS and digest signed with RSA-PKCS different?

I need to sign some data using RSA. I have the digest that I can sign but the signature turns out different from the signing source data. There is data in data.bin and its sha256 digest in digest.bin <...
4
votes
1answer
953 views

Is it possible to fake any file's SHA256 checksum with Length extension attack? Is SHA256 completely insecure when file size is not also checked?

Can fake SHA256 checksum be created trivially for any file by attacker after padding some data after original file i.e. using length extension attack? E.g: Alice creates fake linux installation ISO ...
2
votes
3answers
869 views

Can I base a public-key cryptosystem only on a hash algorithm?

Could I base a public and private key system on just using a hashing algorithm? For example: privKey = sha256( randomGenerator() ) pubKey = sha256( privKey ) Why ...
0
votes
0answers
39 views

Is this a good implementation of digital signature with timestamp?

Is this a good practice ?. How good or bad is this compared to appending a timestamp to the actual data and hashing it as represented below. ...
-2
votes
1answer
84 views

How much brute forcing efforts needed to find 2 or more inputs that generating same SHA256 outputs

Say I have SHA256 hash result that produced from 2000 bits inputs. For example, 0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef (64 bit hex representation) is the SHA256 output. ...
2
votes
1answer
68 views

Is it possible to retrieve the original hash of a digital signature using a public key?

I am running a server that is receiving packets. Each packet is signed with an RSA 512 SHA-256 digital signature. I have a public key and exponent that I use to verify the digital signatures. I'm ...
0
votes
1answer
49 views

Hash coordinates (back-end) without the client (front-end) knowing the coordinates, but to be able to guess them

So I have a set of coordinates and I will hash these with a random salt with SHA256. Coordinate range is 0,100. ...
1
vote
1answer
48 views

initial value for RSA and SHA-256 signature encoding

As described in RFC 8017, RSASSA-PKCS1-V1_5 uses the following bytes during the encoding process : 0x30, 0x31, 0x30, 0x0d, 0x06, 0x09, 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x02, 0x01, 0x05, 0x00,...
0
votes
3answers
158 views

Why is SHA256/SHA512 not broken for shortish passwords

I don't get why SHA-256/SHA-512 hasn't been broken, at least for shortish (10-12 character) passwords It is perfectly plausible to pre-compute a password/hash-pair table using numerous very fast ...
1
vote
2answers
54 views

Can the ECDSA still work without present of hashing function? [duplicate]

According to walkthrough steps for ECDSA topic from wikipedia as shown below, What if the impact if we don't apply the hashing function (highlighted in blue in the image) to the raw messages? Although ...
1
vote
2answers
67 views

Using different hashing function with ECDSA

I came across an IC device configuration & security flow and the details are illustrated in image below. I'm wondering must the ECDSA pair with the SHA Hashing function? Alternatively, what if ...
-1
votes
1answer
67 views

Salt length in SHA-512 version of Unix crypt command

SHA-512 crypt specs reports that SHA-512 crypt uses 128bit salt. The FreeBSD/Linux password generation code builds the salt using 16 bytes random data (128bits) and then it translates the random data ...
1
vote
1answer
98 views

DES security if used a SHA3 function instead of Normal DES function?

I was practicing some python programming and I decided to implement a simple DES encryption function, so i decided to take some shortcuts so instead of DES expansion boxes and s-Boxes i just used a ...
2
votes
2answers
95 views

Prove that you have the data when hash is public

I am designing an online service where users can upload files (3d models) for processing. I want to speed up things when the same file is uploaded by many different users by allowing them to post a ...
-1
votes
1answer
41 views

Can I derive IV, if I know Encrypted Txt, Key and Encryption Method?

I want to know is there any way to derive the initialization vector, if I know all the other details. AES SHA 256bits CBC pkcs5padding Input: Hello Key: 123 Output: xORGCDL88sa8cUrK8JNSCQ== Now, how ...
-1
votes
1answer
99 views

Are there alternative ways to decrypt the public key to the public address

I've read and I discovered that it's not possible to derive the public key from the public address because of the hashing algorithm.... But is/are there any alternate way/ways that it can be ...
0
votes
1answer
106 views

A hash function that returns a value interpreted as integer

I am new in cryptography. I need to compute a hash of a string value represented as follows: $name||i$ where $i$ is an integer. I use the following pseudocode: ...
0
votes
0answers
53 views

Can I and How Decrypt this Online

Although I had a security course in school a long time ago, I am effectively new to cryptography. I have an encrypted text, the encryption key of 44 characters, the encryption method, (Fernet, which ...
1
vote
1answer
88 views

Collision resistance of hash functions with short, fixed-length inputs?

Regular hash functions like SHA-256 have a variable length input and measure security against collision attacks in bits. For SHA-256 this is 128 bits. When I limit the input length of SHA-256 to for ...
3
votes
4answers
1k views

How to calculate the odds of finding “20” at least three times in a sha256 string?

For example, what are the odds of this happening: Can this even be calculated?
1
vote
1answer
92 views

Is this SHA-256 modification still valid?

We typically model a hash function (in particular $\mathrm{SHA}$-$256$) as a function $H:\{0,1\}^{2^{64}-1} \to \{0,1\}^{256}$ with some special properties that makes them useful in practice. In this ...
0
votes
0answers
37 views

Image Hashing (SHA256) [duplicate]

I'm wondering about the concept of image hashing specifically SHA256. Like how do we do it? Can we hash the image based on the binary file? or do we need to convert the data into strings first then do ...
5
votes
1answer
579 views

How is it possible that these two encryption functions yield the same result?

I opened this post in stackoverflow some time ago where I explained a problem I had about not finding a way that would allow to successfully get the result of a string encrypted with a "aes-256-...
1
vote
1answer
55 views

HMAC SHA256 - fixed vs dynamic key - security and collision impacts

Assume we should apply an hmac sha256 on different messages made of incremental numbers (Ex. 1 to 1 billion). Does it make sense in terms of security to apply a different fixed key for each message? ...
2
votes
1answer
84 views

are outputs of sha256 independent when padded with different seed each time, in other words, when inputs can be somewhat related

So I was wondering about what will be the dependence of the outputs when I padded one input with two different strings two times for technically generating two different strings, say the input string ...
1
vote
0answers
42 views

Getting Sha256 values in any arbitrary range with almost equal probability [duplicate]

I went through this post SHA256 output to 1-6 number range?, this post, SHA256 output to 0-99 number range? and I felt like the exact way mentioned in the first one is really helpful. I am looking for ...
0
votes
1answer
66 views

Explaining the reason of radically more accuracy while using different set of hash functions instead of same set of hash functions on some operations

So I am looking for an explanation of an experiment. In this experiment, I took a set of k hash functions. Say the total number of data points I am working on is d. Call an algorithm A which used that ...
3
votes
1answer
123 views

Why HAIFA and sponge constructions are not prone to length extension attacks?

I was writing in a document about the flaws of the MD construction which pushed cryptographers to create different and more robust constructions. However, I don't know why HAIFA and Sponge ...
0
votes
0answers
100 views

Probability of collision when we use a particular part of sha 256 hashed value

So I was supposed to use hash some co-ordinates and I was supposed to use k 3-wise independent hash functions in order for the mathematical explanations behind that algorithm to be hold. But after ...
10
votes
1answer
1k views

Why does SHA2-224 use different IV's than SHA2-256?

Given that it's otherwise just a truncation, I can guess that being able to compute the 224 value from the 256 value is an unwanted property, but that's just speculation.
2
votes
1answer
64 views

What is the best way of deterministically choosing N of M, given 32 bytes of sha256?

I have a list of M=10,000..100,000 items and 32 bytes of sha256 H. I want to choose N=10..100 items (without order). Is there an efficient way to do this? Or should I use something like ...
15
votes
5answers
6k views

Is it easy to crack a hashed phone number?

I want to SHA256 hash phone numbers in order to hide them. Is this a good idea? Are there any other ways I could make this safe?
0
votes
1answer
69 views

Can I find a number, such that the its SHA-256 hash is all-0 [duplicate]

I want to find a number, such that the result of its SHA-256 hash is all 0. I don't know if this number exists.
2
votes
1answer
149 views

Can we calculate the “previous hash value” in the SHA256 compression function with a known message block and final hash?

Suppose we have a $512$-bit (or $512\times n$ bit) message that we'd like to hash using SHA-256. I've looked at the implementation, and from what I understand, after padding, there will be a total of $...
0
votes
1answer
47 views

AES-256 CTR with ESSIV, is this correct?

I am having some problems encrypting disk using AES-256 in CTR mode, with ESSIV iv generation (I am aware of couple of flaws, although this mode is enough for now). What I have here is: ...
1
vote
1answer
80 views

SHA256 hash malleability

Can an SHA-256 plaintext be malleable? For example: Given $y = hash(x)$ , can an attacker find $z$ so that $z = hash(f(x))$. Here $f()$ might be the addition of a suffix to the message, an XOR ...
1
vote
1answer
62 views

Is it okay to reuse a single symmetric key for a large volume of messages and HMACs, so long as “nonces” are randomly generated for both of them?

https://www.reddit.com/r/crypto/comments/fnku50/nonce_reuse_vs_iv_reuse/ Nonce reuse with the same key is catastrophic to security. The same premise holds for initialization vectors. If the key ...
2
votes
2answers
139 views

What is the difference between a PRF and a PRP, and are cryptographic hash functions the same as HMAC (PRFs or PRPS)?

I read one answer to a similar question that put forth that a hash function is distinct from a PRF, however I've also found materials purporting that cryptographic hash functions are PRFs, and I'm not ...
0
votes
0answers
39 views

Is Joux's multicollision attack applicable for truncated SHA256?

Joux presents an elegant way to generate k-way multi-collisions with about as much effort as generating a single collision: https://www.iacr.org/archive/crypto2004/31520306/multicollisions.pdf ...
1
vote
1answer
121 views

Hash based stream cipher where the input is a constant, key, nonce and counter

This is a question out of curiosity ! A hash function produces an output that is considered computationally infeasible to reverse. Let's consider, for the sake of illustration purposes a tried and ...
0
votes
0answers
55 views

Should I update my fedora encrypted system?

I have installed my Fedora Workstation version 23 using native disk encryption. Since it, I am upgrading it using dnf system-upgrade plugin. Today, I have fedora 32. Some time ago, I’ve discovered ...
0
votes
1answer
38 views

SHA-256 for unique token

I need to create an unique token for a web service. I'm doing that in the following in the following way: ...

1
2 3 4 5
9