Bitcoin Forum
May 03, 2024, 03:07:00 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: How secure is SHA256 when input size is not 512 bits?  (Read 185 times)
potatobad (OP)
Newbie
*
Offline Offline

Activity: 5
Merit: 0


View Profile
December 21, 2019, 06:13:51 PM
Last edit: December 21, 2019, 07:07:58 PM by potatobad
 #1

So if I understand correctly bitcoin performs a hash on a 256 bit ecdsa public key, do you still have a 256 bit protection when the input is not 512 bit? Isnt the compression function security based on compressing 2 to 1?
1714705620
Hero Member
*
Offline Offline

Posts: 1714705620

View Profile Personal Message (Offline)

Ignore
1714705620
Reply with quote  #2

1714705620
Report to moderator
1714705620
Hero Member
*
Offline Offline

Posts: 1714705620

View Profile Personal Message (Offline)

Ignore
1714705620
Reply with quote  #2

1714705620
Report to moderator
1714705620
Hero Member
*
Offline Offline

Posts: 1714705620

View Profile Personal Message (Offline)

Ignore
1714705620
Reply with quote  #2

1714705620
Report to moderator
"This isn't the kind of software where we can leave so many unresolved bugs that we need a tracker for them." -- Satoshi
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
pooya87
Legendary
*
Offline Offline

Activity: 3444
Merit: 10530



View Profile
December 22, 2019, 04:38:19 AM
Merited by ABCbits (1)
 #2

security of a hash algorithm is defined by its output size and the algorithm itself not by its input size. SHA256 provides 128-bits of security.
by the way the hash that you are referring to is RIPEMD160 of SHA256 of the public key and it is only used in transaction outputs so that we don't reveal the public key until that output is to be spent. and the size of the "input" is defined by the elliptic curve that bitcoin uses so it is always 256 bit and there is no way around it.

.
.BLACKJACK ♠ FUN.
█████████
██████████████
████████████
█████████████████
████████████████▄▄
░█████████████▀░▀▀
██████████████████
░██████████████
████████████████
░██████████████
████████████
███████████████░██
██████████
CRYPTO CASINO &
SPORTS BETTING
▄▄███████▄▄
▄███████████████▄
███████████████████
█████████████████████
███████████████████████
█████████████████████████
█████████████████████████
█████████████████████████
███████████████████████
█████████████████████
███████████████████
▀███████████████▀
█████████
.
odolvlobo
Legendary
*
Offline Offline

Activity: 4298
Merit: 3214



View Profile
December 22, 2019, 09:53:59 AM
Merited by ABCbits (1)
 #3

So if I understand correctly bitcoin performs a hash on a 256 bit ecdsa public key, do you still have a 256 bit protection when the input is not 512 bit? Isnt the compression function security based on compressing 2 to 1?

A compressed key is just the first half of the uncompressed key. Because the second half of an uncompressed public key is (almost) completely determined by the first half, it gives you no additional security.

Join an anti-signature campaign: Click ignore on the members of signature campaigns.
PGP Fingerprint: 6B6BC26599EC24EF7E29A405EAF050539D0B2925 Signing address: 13GAVJo8YaAuenj6keiEykwxWUZ7jMoSLt
potatobad (OP)
Newbie
*
Offline Offline

Activity: 5
Merit: 0


View Profile
December 23, 2019, 01:37:13 AM
 #4

security of a hash algorithm is defined by its output size and the algorithm itself not by its input size.

Ok you hash a fixed 16 bit input with sha256 and ill find it in a second
pooya87
Legendary
*
Offline Offline

Activity: 3444
Merit: 10530



View Profile
December 23, 2019, 04:16:22 AM
 #5

security of a hash algorithm is defined by its output size and the algorithm itself not by its input size.

Ok you hash a fixed 16 bit input with sha256 and ill find it in a second

that would be brute forcing which has nothing to do with security of SHA256. and the answer to your original question is "it is less secure if you use 16 bits instead of 512 bits input".
but since your original question is about 256 bit versus 512 bit input, brute force is not an option there since 256 bit is still big enough to make it impossible.

.
.BLACKJACK ♠ FUN.
█████████
██████████████
████████████
█████████████████
████████████████▄▄
░█████████████▀░▀▀
██████████████████
░██████████████
████████████████
░██████████████
████████████
███████████████░██
██████████
CRYPTO CASINO &
SPORTS BETTING
▄▄███████▄▄
▄███████████████▄
███████████████████
█████████████████████
███████████████████████
█████████████████████████
█████████████████████████
█████████████████████████
███████████████████████
█████████████████████
███████████████████
▀███████████████▀
█████████
.
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!