Bitcoin Forum
November 11, 2024, 09:30:52 PM *
News: Latest Bitcoin Core release: 28.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1] 2 »  All
  Print  
Author Topic: SHA256 Compression?  (Read 2202 times)
Reclaim3r (OP)
Full Member
***
Offline Offline

Activity: 139
Merit: 100


View Profile
March 01, 2015, 02:15:06 AM
 #1

I have been trying to design my own SHA256 ASIC for a while now and I'm starting to nearly grasp how the entire hashing algorithm works.
The only thing I seem to have difficulty understanding is how the hash function deals with "extended" strings of data.

That is, its ability to deal with varying lengths of data.
How does it deal with it and does it interfere much with ASIC hashing?
ncsupanda
Legendary
*
Offline Offline

Activity: 1628
Merit: 1012



View Profile
March 01, 2015, 02:22:31 AM
 #2

You might have more luck in the technical forum.

https://bitcointalk.org/index.php?board=6.0
Reclaim3r (OP)
Full Member
***
Offline Offline

Activity: 139
Merit: 100


View Profile
March 01, 2015, 02:24:18 AM
 #3

Thanks. Is it possible to get this moved?
ncsupanda
Legendary
*
Offline Offline

Activity: 1628
Merit: 1012



View Profile
March 01, 2015, 02:37:04 AM
 #4

Thanks. Is it possible to get this moved?

Yep, you can even do it yourself. Look at the bottom left.
btchris
Hero Member
*****
Offline Offline

Activity: 672
Merit: 504

a.k.a. gurnec on GitHub


View Profile WWW
March 01, 2015, 02:59:12 AM
Last edit: March 01, 2015, 04:27:00 PM by btchris
 #5

I don't know the first thing about ASIC programming.... but if you're writing software that requires a large iteration count (PBKDF2, etc.) I'd probably take the "easy" way out and just do the first iteration in software, and do the rest with a single hash block and a hard-coded data length in the ASIC (what I lazily do with GPU/OpenCL-based stuff).
TheRealSteve
Hero Member
*****
Offline Offline

Activity: 686
Merit: 500

FUN > ROI


View Profile
March 01, 2015, 03:22:03 AM
 #6

Are you trying to design a generic SHA256 ASIC, or a Bitcoin mining ASIC?  There's a fair bit of difference there.

If the latter, I'd suggest looking at some of the public documents for the older FPGA miners, Avalon's chips, the data mining software sends to simple chips (i.e. not miners with their own controller board). etc.
For a quick "ahhh", see: http://crypto.stackexchange.com/questions/1862/how-can-i-calculate-the-sha-256-midstate

hhanh00
Sr. Member
****
Offline Offline

Activity: 467
Merit: 267


View Profile
March 01, 2015, 03:22:56 AM
 #7

1. In the general case, you add padding.
2. In the bitcoin case, the header has a fixed size. In fact, the nonce is in the 2nd block so you can reuse the state after you have done the first block.

Reclaim3r (OP)
Full Member
***
Offline Offline

Activity: 139
Merit: 100


View Profile
March 01, 2015, 03:29:13 PM
 #8

Are you trying to design a generic SHA256 ASIC, or a Bitcoin mining ASIC?  There's a fair bit of difference there.

If the latter, I'd suggest looking at some of the public documents for the older FPGA miners, Avalon's chips, the data mining software sends to simple chips (i.e. not miners with their own controller board). etc.
For a quick "ahhh", see: http://crypto.stackexchange.com/questions/1862/how-can-i-calculate-the-sha-256-midstate

Bitcoin mining ASIC. Thanks for the link. I'll look it over  Smiley
Sergio_Demian_Lerner
Hero Member
*****
expert
Offline Offline

Activity: 555
Merit: 654


View Profile WWW
March 01, 2015, 10:03:48 PM
 #9

You could start reading Dadda's paper.
"The design of a high speed ASIC unit for the hash function SHA-256 (384, 512)"
 
jeffhuys
Sr. Member
****
Offline Offline

Activity: 252
Merit: 250



View Profile
March 02, 2015, 01:11:40 AM
 #10

You could start reading Dadda's paper.
"The design of a high speed ASIC unit for the hash function SHA-256 (384, 512)"
 

Great info! Thanks for sharing.

EDIT: Hmm. Probably no place to get this without paywall, right?

Sukrim
Legendary
*
Offline Offline

Activity: 2618
Merit: 1007


View Profile
March 02, 2015, 03:09:23 AM
 #11

Maybe at university libraries?

https://www.coinlend.org <-- automated lending at various exchanges.
https://www.bitfinex.com <-- Trade BTC for other currencies and vice versa.
TheRealSteve
Hero Member
*****
Offline Offline

Activity: 686
Merit: 500

FUN > ROI


View Profile
March 02, 2015, 03:38:34 AM
 #12

Google → filetype:pdf "design of a high speed ASIC unit"
( you'll want to "View more results" on the last page - unless you get a different result order )

Or just pay the $31.. if you're designing an ASIC, that should be one of the rather small line items in your expenses Smiley

ncsupanda
Legendary
*
Offline Offline

Activity: 1628
Merit: 1012



View Profile
March 02, 2015, 03:43:59 AM
 #13

Let me know if this is the one. If it is, I'll email you a copy and take this one down.

Reclaim3r (OP)
Full Member
***
Offline Offline

Activity: 139
Merit: 100


View Profile
March 02, 2015, 02:54:21 PM
 #14

That looks like real useful piece of information. Is it possible to get that e-mailed please?
TheRealSteve
Hero Member
*****
Offline Offline

Activity: 686
Merit: 500

FUN > ROI


View Profile
March 02, 2015, 03:01:55 PM
 #15

That looks like real useful piece of information. Is it possible to get that e-mailed please?

Instructions are hard, I guess:
Google → filetype:pdf "design of a high speed ASIC unit"
( you'll want to "View more results" on the last page - unless you get a different result order )
http://www.date-conference.com/proceedings/PAPERS/2004/DATE04/DF_FILES/04D_5.PDF

Reclaim3r (OP)
Full Member
***
Offline Offline

Activity: 139
Merit: 100


View Profile
March 02, 2015, 03:05:34 PM
 #16

The instructions were easy. I had difficulty finding the right PDF. Thank you and sorry for the extra work you had to put in to link it.  Wink
TheRealSteve
Hero Member
*****
Offline Offline

Activity: 686
Merit: 500

FUN > ROI


View Profile
March 02, 2015, 03:11:55 PM
 #17

The instructions were easy. I had difficulty finding the right PDF. Thank you and sorry for the extra work you had to put in to link it.  Wink
Tip me a coffee, I think that's fair recompense Wink
( wait, does that tip bot thing even monitor BCT yet? Dangit. )

Sukrim
Legendary
*
Offline Offline

Activity: 2618
Merit: 1007


View Profile
March 02, 2015, 03:16:35 PM
 #18

No, that tip bot thingie is pure spam and only a centralized service - there would be next to no difference if Changetip was used together with PayPal instead of Bitcoin.

https://www.coinlend.org <-- automated lending at various exchanges.
https://www.bitfinex.com <-- Trade BTC for other currencies and vice versa.
Reclaim3r (OP)
Full Member
***
Offline Offline

Activity: 139
Merit: 100


View Profile
March 02, 2015, 04:38:27 PM
 #19

The instructions were easy. I had difficulty finding the right PDF. Thank you and sorry for the extra work you had to put in to link it.  Wink
Tip me a coffee, I think that's fair recompense Wink
( wait, does that tip bot thing even monitor BCT yet? Dangit. )

Maybe when I actually have BTC to start with.
TheRealSteve
Hero Member
*****
Offline Offline

Activity: 686
Merit: 500

FUN > ROI


View Profile
March 02, 2015, 05:36:41 PM
 #20

Tip me a coffee, I think that's fair recompense Wink
( wait, does that tip bot thing even monitor BCT yet? Dangit. )
Maybe when I actually have BTC to start with.
Hah - was firmly tongue-in-cheek, though now I almost wish I could tip you Wink

No, that tip bot thingie is pure spam and only a centralized service - there would be next to no difference if Changetip was used together with PayPal instead of Bitcoin.
See above - don't want to derail the thread with a discussion on tipping systems Smiley

Pages: [1] 2 »  All
  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!