Bitcoin Forum
July 24, 2024, 01:32:19 AM *
News: Help 1Dq create 15th anniversary forum artwork.
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Question regarding the Initialization vector of the bitcoin protocol  (Read 2795 times)
alesske (OP)
Newbie
*
Offline Offline

Activity: 1
Merit: 0


View Profile
May 01, 2014, 03:29:51 PM
 #1

Hello everyone,

I'm doing a research project regarding bitcoins for school and everything is going pretty good except for one thing.

While researching the bitcoin protocol i found this image:

http://www.i-programmer.info/images/stories/News/2013/Nov/B/bitcoinhash.jpg

There is one problem i've run into however.

I don't fully understand the Initialization vector field (IV).
How is this value generated? Is it generated by the SHA-256 algorithm? Or in a different way?
I assume this value needs to be fixed and public because otherwise people can't redo the calculation to check their hash.

Thanks in advance.
telepatheic
Jr. Member
*
Offline Offline

Activity: 56
Merit: 1


View Profile
May 01, 2014, 04:00:16 PM
 #2

This image is sort of showing how to perform the SHA256 algorithm. You can read about how this works on wikipedia http://en.wikipedia.org/wiki/SHA-2#Pseudocode

The initial values are a pre-determined set of bits which are "the first 32 bits of the fractional parts of the square roots of the first 8 primes 2..19"
TierNolan
Legendary
*
Offline Offline

Activity: 1232
Merit: 1094


View Profile
May 01, 2014, 04:05:52 PM
 #3

The problem is that the sha algorithm works in 64 byte "chunks".  Since the header is 80 bytes, 2 chunks are needed.  The hash of the first stage is used as the IV for the 2nd.

As the link shows, the hash function has a defined initialization state.

In order to prove that the IV doesn't have secret properties, it uses the first 8 prime numbers.  The square root of each prime is calculated and the first 4 bytes after the decimal point are extracted.

That gives 8 32 bit numbers, or 256 bits for the IV.

They also do the same with cubed roots of the first 64 primes to compute other parameters.

1LxbG5cKXzTwZg9mjL3gaRE835uNQEteWF
jonald_fyookball
Legendary
*
Offline Offline

Activity: 1302
Merit: 1008


Core dev leaves me neg feedback #abuse #political


View Profile
May 01, 2014, 05:02:41 PM
 #4


In order to prove that the IV doesn't have secret properties, it uses the first 8 prime numbers.  

This is informative.  Useful knowledge to have whenever the security of the cryptography comes into question. Thanks.

telepatheic
Jr. Member
*
Offline Offline

Activity: 56
Merit: 1


View Profile
May 01, 2014, 06:05:42 PM
 #5

Quote
Useful knowledge to have whenever the security of the cryptography comes into question.

Note that SHA256 has never been mathematically proven to be secure. Experts have analysed SHA256 and deemed it be secure but they haven't proven that attacks on it aren't possible.
jonald_fyookball
Legendary
*
Offline Offline

Activity: 1302
Merit: 1008


Core dev leaves me neg feedback #abuse #political


View Profile
May 01, 2014, 06:08:28 PM
 #6

Quote
Useful knowledge to have whenever the security of the cryptography comes into question.

Note that SHA256 has never been mathematically proven to be secure. Experts have analysed SHA256 and deemed it be secure but they haven't proven that attacks on it aren't possible.

Has any cryptographic hash function been mathematically proven to be secure?

telepatheic
Jr. Member
*
Offline Offline

Activity: 56
Merit: 1


View Profile
May 01, 2014, 06:40:18 PM
 #7

Quote
Has any cryptographic hash function been mathematically proven to be secure?

Sort of, see http://en.wikipedia.org/wiki/Security_of_cryptographic_hash_functions#More_practical_provably_secure_hash_functions

They have not been proven to be absolutely secure, but they can be proven to be at least as difficult to find collisions as certain well studied non-deterministic polynomial time problems. Unfortunately these problems haven't been proven to not be polynomial time problems. (The classic million dollar (quite literally) NP = P problem)
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!