Bitcoin Forum
November 14, 2024, 09:06:29 PM *
News: Check out the artwork 1Dq created to commemorate this forum's 15th anniversary
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: How can I send data directly to an Antminer u2 and receive sha256 hash back?  (Read 2844 times)
smith2199 (OP)
Newbie
*
Offline Offline

Activity: 6
Merit: 0


View Profile
October 30, 2014, 07:31:47 PM
 #1

I'm trying to use the Antminer U2 as a fast SHA256 hash generator.  I would like to send my own original data and receive an output of it's sha256 hash.

Is there an API or other information somewhere on how to get direct access to the Antminer's functions?

smith2199
TheRealSteve
Hero Member
*****
Offline Offline

Activity: 686
Merit: 500

FUN > ROI


View Profile
October 30, 2014, 07:57:16 PM
 #2

That's generally not how miners work.

Have a look at, for example, the cgminer source code to see how a program communicates with several types of miners:
https://github.com/ckolivas/cgminer

You're probably much better off with a GPU-based approach for what you need.

Prelude
Legendary
*
Offline Offline

Activity: 1596
Merit: 1000



View Profile
October 30, 2014, 08:07:59 PM
 #3

If it's not bitcoin based mining, it won't work. It can't do anything else.
smith2199 (OP)
Newbie
*
Offline Offline

Activity: 6
Merit: 0


View Profile
October 30, 2014, 10:50:07 PM
 #4

Thanks, I will look at cgminer code.

As a general knowledge question, is the miner doing more than the 2 SHA256 hashes needed for bitcoin?  I kind of saw it as each miner running the hashes through a group of nonces and reporting back the results.  Is that correct?  Do they return all hash values, or only the first one to meet the target?  Or am I completely off on how I see this?

The data I want to run is bitcoin formatted (previous hash, merkle, etc.).  I'm just looking for how to input that data and get the hash results back from the miner if possible.

Thanks again.
TheRealSteve
Hero Member
*****
Offline Offline

Activity: 686
Merit: 500

FUN > ROI


View Profile
October 31, 2014, 12:57:53 AM
 #5

As a general knowledge question, is the miner doing more than the 2 SHA256 hashes needed for bitcoin?  I kind of saw it as each miner running the hashes through a group of nonces and reporting back the results.  Is that correct?  Do they return all hash values, or only the first one to meet the target?  Or am I completely off on how I see this?
The particulars probably vary per miner, but generally it's the latter case - so you send it the information to hash and the target difficulty, and the hardware then hashes until it finds one that is below ( or is that above? depends on how you look at it Wink ) that difficulty at which point it returns the data needed for that calculation so that software can verify/etc.

One way that you could do what you're trying to do - sort of - is by setting that difficulty really high (or is that low...), so that the hardware basically finds a result on the first try.  I'm not sure if that's entirely possible, or if hardware is going to freak out, but... theoretically anyway.

As for particulars, again, see cgminer source code - or bfgminer source code / MultiMiner source code (there's probably others).  You'll probably have to do a bit of untangling as most of these projects are set up to work with various pieces of hardware, so they modularize their functions, files, etc.  If you get stuck, you can also ask their authors for some help, they're decent chaps Smiley

Dare we ask what it is you're trying to do? Smiley

-ck
Legendary
*
Offline Offline

Activity: 4284
Merit: 1645


Ruu \o/


View Profile WWW
October 31, 2014, 01:35:17 AM
 #6

I'm trying to use the Antminer U2 as a fast SHA256 hash generator.  I would like to send my own original data and receive an output of it's sha256 hash.
You can't. ASIC miners don't do full sha256 and there is no way of untangling just sha256 output from them.

Developer/maintainer for cgminer, ckpool/ckproxy, and the -ck kernel
2% Fee Solo mining at solo.ckpool.org
-ck
tolip_wen
Sr. Member
****
Offline Offline

Activity: 386
Merit: 250


View Profile
November 01, 2014, 10:46:01 AM
 #7

I'm trying to use the Antminer U2 as a fast SHA256 hash generator.  I would like to send my own original data and receive an output of it's sha256 hash.

Is there an API or other information somewhere on how to get direct access to the Antminer's functions?

smith2199

An ASIC is not required for SHA256 hash creation.
'Creating' the hash is not as computationally intense as testing it.

There are programs for a PC with a CPU that will do it.
There is even javascript code that runs locally in a browser that will do it.

Google 'create your own BTC wallet/address' or some such.


YMMV
Smiley

'twisted research and opinion' donations happily accepted @
13362fxFAdrhagmCvSmFy4WoHrNRPG2V57
My sub 1337 vanity address Wink
Soros Shorts
Donator
Legendary
*
Offline Offline

Activity: 1617
Merit: 1012



View Profile
November 01, 2014, 11:54:24 AM
Last edit: November 01, 2014, 12:08:24 PM by Soros Shorts
 #8

I'm trying to use the Antminer U2 as a fast SHA256 hash generator.  I would like to send my own original data and receive an output of it's sha256 hash.

Is there an API or other information somewhere on how to get direct access to the Antminer's functions?

smith2199

An ASIC is not required for SHA256 hash creation.
'Creating' the hash is not as computationally intense as testing it.

There are programs for a PC with a CPU that will do it.
There is even javascript code that runs locally in a browser that will do it.

Google 'create your own BTC wallet/address' or some such.


YMMV
Smiley

Well, OP was looking for a fast hash generator, so presumably using a CPU or GPU wasn't fast enough for him.

Edit: Actually I just realized that without knowing the size of the data he was trying to hash you couldn't even select a suitable architecture.
Undefeatable
Sr. Member
****
Offline Offline

Activity: 286
Merit: 250


View Profile
November 01, 2014, 01:31:34 PM
 #9

I'm trying to use the Antminer U2 as a fast SHA256 hash generator.  I would like to send my own original data and receive an output of it's sha256 hash.

Is there an API or other information somewhere on how to get direct access to the Antminer's functions?

smith2199

I dont get what you are trying to do? Are you going to mine with the antminer?

richardamullens
Newbie
*
Offline Offline

Activity: 51
Merit: 0


View Profile
November 01, 2014, 07:30:50 PM
 #10

I found https://rpiplayground.wordpress.com/ with a google search.

Like you, I wondered if there was any other use for the Antminer U series - cracking passwords perhaps - but it seems not.
-ck
Legendary
*
Offline Offline

Activity: 4284
Merit: 1645


Ruu \o/


View Profile WWW
November 01, 2014, 09:18:42 PM
 #11

I found https://rpiplayground.wordpress.com/ with a google search.

Like you, I wondered if there was any other use for the Antminer U series - cracking passwords perhaps - but it seems not.
https://bitcointalk.org/index.php?topic=743571.0

Developer/maintainer for cgminer, ckpool/ckproxy, and the -ck kernel
2% Fee Solo mining at solo.ckpool.org
-ck
richardamullens
Newbie
*
Offline Offline

Activity: 51
Merit: 0


View Profile
November 02, 2014, 12:18:26 AM
 #12

I found https://rpiplayground.wordpress.com/ with a google search.

Like you, I wondered if there was any other use for the Antminer U series - cracking passwords perhaps - but it seems not.
https://bitcointalk.org/index.php?topic=743571.0

Thanks Smiley
As you say: Door stop, book end, paper weight and boat anchor.
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!