Author

Topic: How can I send data directly to an Antminer u2 and receive sha256 hash back? (Read 2844 times)

newbie
Activity: 51
Merit: 0
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://bitcointalksearch.org/topic/what-can-i-use-bitcoin-miners-for-other-than-mining-743571

Thanks Smiley
As you say: Door stop, book end, paper weight and boat anchor.
-ck
legendary
Activity: 4088
Merit: 1631
Ruu \o/
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://bitcointalksearch.org/topic/what-can-i-use-bitcoin-miners-for-other-than-mining-743571
newbie
Activity: 51
Merit: 0
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.
sr. member
Activity: 286
Merit: 250
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?
donator
Activity: 1617
Merit: 1012
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.
sr. member
Activity: 386
Merit: 250
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
-ck
legendary
Activity: 4088
Merit: 1631
Ruu \o/
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.
hero member
Activity: 686
Merit: 500
FUN > ROI
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
newbie
Activity: 6
Merit: 0
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.
legendary
Activity: 1596
Merit: 1000
If it's not bitcoin based mining, it won't work. It can't do anything else.
hero member
Activity: 686
Merit: 500
FUN > ROI
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.
newbie
Activity: 6
Merit: 0
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
Jump to: