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
14 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
0answers
22 views

TLS 1.3 Finished message

I am looking to RFC8448 and at page 7 it says: ...
0
votes
0answers
22 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
0answers
14 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
0answers
31 views

AES CBC Encryption Key & Special ASCII characters [duplicate]

Can we add characters like α π Σ µ ...
10
votes
7answers
4k 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
1answer
49 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 ...
0
votes
0answers
41 views

.Net dll encryption [migrated]

By nature, .NET assemblies are extremely easy to reverse engineer. Say I want to hide some code by embedding an encrypted .dll into another .dll that is to be decrypted and loaded at runtime: compile ...
1
vote
1answer
84 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
3answers
392 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
2answers
209 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
1answer
56 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
1answer
72 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
2answers
137 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 ...
1
vote
1answer
268 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
0answers
59 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 $\...
0
votes
0answers
20 views

Why doesn't appending a message to a key instead of vice versa defeat length extension attack? [duplicate]

It's well established that H(K||M) is vulnerable to length extension attacks for SHA-2 and other hashing algorithms, and instead an HMAC construction should be used. However - why can't H(M||K) be ...
1
vote
1answer
148 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: ...
0
votes
0answers
16 views

Public Key Fingerprint: Preimage Resistance

In my system, “resources” are granted operational certificates signed by a particular CA. Each resource has a unique public/private key pair that it generates once. The operational cert granted by the ...
6
votes
3answers
2k views

Can one use a reversible hash algorithm as a compression function?

As we know any text, file, byte...in SHA-256 output will be returned as 64 hex length. Is it possible to create cryptography that can do the same thing as SHA-256 but can be reversed, so if we have ...
1
vote
0answers
27 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
1answer
78 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
1answer
414 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
1answer
161 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 ...
3
votes
1answer
176 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
0answers
141 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
3answers
62 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
1answer
134 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
0answers
45 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
1answer
1k 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
2answers
133 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
1answer
47 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
0answers
19 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
1answer
56 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
1answer
112 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
2answers
654 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
69 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 ...
9
votes
3answers
956 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
244 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
68 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
200 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
1answer
67 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
64 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
179 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
1k 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
920 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
47 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
88 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
104 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
2answers
69 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
2 3 4 5
10