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
2 votes
1 answer
490 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 ...
user1563721's user avatar
2 votes
1 answer
3k 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 <...
Margus Pala's user avatar
4 votes
3 answers
3k views

Is it possible to fake any file's SHA-256 checksum with a length extension attack?

Can a fake SHA-256 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 ...
nlzzl1m's user avatar
  • 41
2 votes
3 answers
1k 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 ...
stefcud's user avatar
  • 131
0 votes
0 answers
146 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. ...
knobiDev's user avatar
  • 101
-2 votes
1 answer
177 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. ...
Pi-Turn's user avatar
  • 83
2 votes
1 answer
1k 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 ...
Justin Marinelli's user avatar
1 vote
2 answers
230 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. ...
Roy Berris's user avatar
2 votes
1 answer
426 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,...
cmdEvo's user avatar
  • 23
1 vote
3 answers
1k 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 ...
EML's user avatar
  • 111
1 vote
2 answers
631 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 ...
Pi-Turn's user avatar
  • 83
1 vote
2 answers
310 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 ...
Pi-Turn's user avatar
  • 83
-1 votes
1 answer
2k 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 ...
JohnP's user avatar
  • 3
1 vote
1 answer
142 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 ...
KMG's user avatar
  • 403
2 votes
2 answers
225 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 ...
ANIVGames's user avatar
  • 123
-1 votes
1 answer
105 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 ...
AKJ's user avatar
  • 3
-1 votes
1 answer
616 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 ...
Dave Kent 's user avatar
1 vote
1 answer
813 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: ...
jusmin's user avatar
  • 23
0 votes
0 answers
150 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 ...
Chozang's user avatar
  • 101
1 vote
1 answer
1k 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 ...
Vincent007's user avatar
3 votes
4 answers
2k 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?
user83711's user avatar
  • 139
1 vote
1 answer
177 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 ...
Bean Guy's user avatar
  • 722
0 votes
0 answers
347 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 ...
C-Na's user avatar
  • 1
5 votes
1 answer
957 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-...
user2638180's user avatar
1 vote
1 answer
274 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? ...
Mercurio's user avatar
2 votes
1 answer
396 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 ...
Subha Nawer Pushpita's user avatar
1 vote
0 answers
55 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 ...
Subha Nawer Pushpita's user avatar
-1 votes
1 answer
125 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 ...
Subha Nawer Pushpita's user avatar
3 votes
1 answer
373 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 ...
Hinton Zsh's user avatar
0 votes
0 answers
344 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 ...
Subha Nawer Pushpita's user avatar
12 votes
1 answer
2k 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.
hanshenrik's user avatar
2 votes
1 answer
85 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 ...
fadedbee's user avatar
  • 897
18 votes
5 answers
10k 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?
Jack Resone's user avatar
0 votes
1 answer
628 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.
codernull's user avatar
2 votes
1 answer
498 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 $...
George T's user avatar
0 votes
1 answer
165 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: ...
wtdmn's user avatar
  • 1
1 vote
1 answer
277 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 ...
Anonymous's user avatar
1 vote
1 answer
408 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 ...
cyborg's user avatar
  • 59
2 votes
2 answers
585 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 ...
cyborg's user avatar
  • 59
0 votes
0 answers
99 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 ...
Anonymous's user avatar
1 vote
1 answer
359 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 ...
Aravind A's user avatar
  • 1,000
0 votes
0 answers
67 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 ...
vdTOG's user avatar
  • 13
0 votes
1 answer
410 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: ...
user31929's user avatar
  • 103
0 votes
1 answer
94 views

SHA-256 Hashing Functionality

It seems all these options are correct to me fingerprint of the provided input. A one-way deterministic hash function. symmetric hash function A hash function that generates a digest. ...
Ayaz's user avatar
  • 1
0 votes
1 answer
60 views

Can we use a hash-based stream cipher against DPA attacks?

There have been lots of DPA researches against block ciphers. I was wondering if we use a cryptographically secure hash of an incremental counter as a stream cipher, will it withstand DPA attacks? ...
adieux's user avatar
  • 21
0 votes
2 answers
302 views

For uniterated SHA-256 of salted password, should the password precede the salt?

This is a follow-up to this question (thanks to answers from @fgrieu and @kelalaka ) about the format of a salt when hashing a salted password. I realize this is pretty much academic, as the proposed ...
rtillery's user avatar
  • 115
1 vote
2 answers
645 views

What format should a salt be when it is concatenated with the password?

Assume that, in the available environment, it is not possible to use modern password hashing functions (bcrypt, scrypt, Argon2, PBKDF2, etc.), so it is necessary to roll my own stand-in, until they ...
rtillery's user avatar
  • 115
0 votes
0 answers
212 views

Combining Hashes - NTLM and SHA

i have been recently learning about different types of hashing and the encryption/decryption methods of such hashes. Im currently trying to find the preimage of this hash i have been given as a ...
BarTM's user avatar
  • 1
3 votes
1 answer
51 views

How to find k-way second preimages

For example: Assuming someone has found a second preimage for SHA-256. In other words, for SHA256(M1)=H, someone has found M2 which SHA256(M2)=H Now, is it possible to generate k-way second ...
Anonymous's user avatar
  • 143
1 vote
0 answers
178 views

"Reversing" SHA256 [duplicate]

Let's say I give you the sha256 hash of my password, which I'll call X. Now, the sha256 algorithm is a one-way function, meaning you can give it some input and get an output, but you can't get the ...
Ömer Enes Özmen's user avatar

1 2 3
4
5
12