Bitcoin Forum
April 22, 2024, 11:58:56 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: How does bitcoin work? (mathematical prespective)  (Read 1502 times)
RogeRsIII (OP)
Newbie
*
Offline Offline

Activity: 2
Merit: 0


View Profile
May 16, 2016, 04:44:49 PM
 #1

Hey I am kindy new to all of this about bitcoins, cryptology and programming but I´m researching how bitcoins work through more of a math view about all the mathematical algorithims and equations used. I know about ECDSA in digital signatures and have some idea of how bitcoin mining works, so can somebody help me know about what is used for bitcoins and how.
1713830336
Hero Member
*
Offline Offline

Posts: 1713830336

View Profile Personal Message (Offline)

Ignore
1713830336
Reply with quote  #2

1713830336
Report to moderator
1713830336
Hero Member
*
Offline Offline

Posts: 1713830336

View Profile Personal Message (Offline)

Ignore
1713830336
Reply with quote  #2

1713830336
Report to moderator
1713830336
Hero Member
*
Offline Offline

Posts: 1713830336

View Profile Personal Message (Offline)

Ignore
1713830336
Reply with quote  #2

1713830336
Report to moderator
Bitcoin mining is now a specialized and very risky industry, just like gold mining. Amateur miners are unlikely to make much money, and may even lose money. Bitcoin is much more than just mining, though!
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1713830336
Hero Member
*
Offline Offline

Posts: 1713830336

View Profile Personal Message (Offline)

Ignore
1713830336
Reply with quote  #2

1713830336
Report to moderator
1713830336
Hero Member
*
Offline Offline

Posts: 1713830336

View Profile Personal Message (Offline)

Ignore
1713830336
Reply with quote  #2

1713830336
Report to moderator
1713830336
Hero Member
*
Offline Offline

Posts: 1713830336

View Profile Personal Message (Offline)

Ignore
1713830336
Reply with quote  #2

1713830336
Report to moderator
DannyHamilton
Legendary
*
Offline Offline

Activity: 3374
Merit: 4576



View Profile
May 16, 2016, 05:03:25 PM
Merited by ABCbits (3)
 #2

Hey I am kindy new to all of this about bitcoins, cryptology and programming but I´m researching how bitcoins work through more of a math view about all the mathematical algorithims and equations used. I know about ECDSA in digital signatures and have some idea of how bitcoin mining works, so can somebody help me know about what is used for bitcoins and how.

  • Elliptical Curve point multiplication: To generate a public key from a private key
  • ECDSA digital signature: To prove authorization to transfer control of funds
  • RIPEMD160 and SHA256: To generate a public key hash from a public key
  • base10 to base58 conversion: To generate a bitcoin address from a public key hash
  • SHA256(SHA256(blockheader)): To mine a bitcoin block
  • Algebraic addition, subtraction, multiplication, division, and comparison: To calculate balances from the list of unspent transaction outputs, increment nonce, calculate block reward, etc.

and I'm not sure, but I think...

  • AES256: To encrypt private keys in the Bitcoin Core wallet

That's about it from a high level.  Obviously this is all just a computer program, which means that almost everything is a set of machine code telling the computer which binary values to compare, copy, increment, decrement, or any of the other instructions available in the processor, but I doubt that's what you're talking about. I think there are also some checksums and parity calculations in the network communications protocol, but I doubt you're asking about that either.
RogeRsIII (OP)
Newbie
*
Offline Offline

Activity: 2
Merit: 0


View Profile
May 17, 2016, 04:28:34 AM
 #3

Hey I am kindy new to all of this about bitcoins, cryptology and programming but I´m researching how bitcoins work through more of a math view about all the mathematical algorithims and equations used. I know about ECDSA in digital signatures and have some idea of how bitcoin mining works, so can somebody help me know about what is used for bitcoins and how.

  • Elliptical Curve point multiplication: To generate a public key from a private key
  • ECDSA digital signature: To prove authorization to transfer control of funds
  • RIPEMD160 and SHA256: To generate a public key hash from a public key
  • base10 to base58 conversion: To generate a bitcoin address from a public key hash
  • SHA256(SHA256(blockheader)): To mine a bitcoin block
  • Algebraic addition, subtraction, multiplication, division, and comparison: To calculate balances from the list of unspent transaction outputs, increment nonce, calculate block reward, etc.

and I'm not sure, but I think...

  • AES256: To encrypt private keys in the Bitcoin Core wallet


That's about it from a high level.  Obviously this is all just a computer program, which means that almost everything is a set of machine code telling the computer which binary values to compare, copy, increment, decrement, or any of the other instructions available in the processor, but I doubt that's what you're talking about. I think there are also some checksums and parity calculations in the network communications protocol, but I doubt you're asking about that either.


Thanks man this actually helped me.
YarkoL
Legendary
*
Offline Offline

Activity: 996
Merit: 1012


View Profile
May 17, 2016, 03:38:31 PM
 #4


SHA256(SHA256(blockheader)): To mine a bitcoin block


Sha256d is also used in constructing merkle tree of transactions.

hashA = SHA256(SHA256(transactionA))
hashB = SHA256(SHA256(transactionB))
hashAB = SHA256(SHA256(hashA,hashB))

These equations describe individual nut and bolts in the system so to speak..
But is there any formalism that can describe how the network
arrives at consensus?

“God does not play dice"
belcher
Sr. Member
****
Offline Offline

Activity: 261
Merit: 518


View Profile
May 17, 2016, 06:14:10 PM
 #5

This is an excellent resource for developers / programmers. https://bitcoin.org/en/developer-guide

1HZBd22eQLgbwxjwbCtSjhoPFWxQg8rBd9
JoinMarket - CoinJoin that people will actually use.
PGP fingerprint: 0A8B 038F 5E10 CC27 89BF CFFF EF73 4EA6 77F3 1129
kn_b_y
Newbie
*
Offline Offline

Activity: 26
Merit: 3


View Profile
May 18, 2016, 02:46:27 PM
 #6

I would add - familiarise yourself with Adam Back's proof of work scheme, hashcash.

I still find it incredible that someone can produce a small block of data and a number and then by using that information alone they can prove to you that they had access to a year's supply of supercomputing resources.
vincentvincent
Sr. Member
****
Offline Offline

Activity: 285
Merit: 251


View Profile
May 27, 2016, 08:29:23 PM
 #7

I read this book and I found it incredible interesting to read and learn how bitcoin works:

https://freedom-to-tinker.com/blog/randomwalker/the-princeton-bitcoin-textbook-is-now-freely-available/
Karartma1
Legendary
*
Offline Offline

Activity: 2310
Merit: 1422



View Profile
May 29, 2016, 10:07:31 AM
 #8

interesting thread, welcome roger. I'm no math expert but I found Andreas Antonopoulos' book Mastering Bitcoin - Unlockin Digital Cryptocurrencies very helpful.
https://www.bitcoinbook.info/
 Wink


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!