1

I'm attempting to write a monero miner in PHP (I know PHP). I'm not after hashing speed I'm after understanding what is happening.

I have looked over the "CRYPTONOTE STANDARD 008" document that seems to explain what to do once I have the block data, what I'm not sure about is the input I am supposed to run the Keccak hash on.

First, the input is hashed using Keccak [KECCAK] with parameters b = 1600 and c = 512.

Any code samples in PHP would be greatly appreciated.

1
  • so far this is what I have ` <?PHP $currentblock = file_get_contents("moneroblocks.info/api/get_stats/"); $myarry = explode( ",",$currentblock); $difficulty = $myarry[0]; $temp = explode( ":",$myarry[1]); $height =$temp[1]; $hashrate= $myarry[2]; $total_emission= $myarry[3]; $last_reward= $myarry[4]; $last_timestamp= $myarry[5]; echo $currentblock; echo "<BR><BR>"; $currentblock2 = file_get_contents("moneroblocks.info/api/get_block_header/$height"); echo $currentblock2;
    – tek-dragon
    Jan 29, 2018 at 3:16

1 Answer 1

-1

Keccak is nearly SHA-3.

Taken from CryptoNoter

SHA-3 is based on (a particular instanciation of) Keccak, but with a couple minor differences from the original Keccak. Cryptonote was made before SHA-3 standardization. - user36303

4
  • SHA-3 is based on (a particular instanciation of) Keccak, but with a couple minor differences from the original Keccak. Cryptonote was made before SHA-3 standardization.
    – user36303
    Jan 30, 2018 at 15:39
  • This answer is wrong. SHA-3 and Keccak-256 3.0 do not produce the same outputs as explained by its author: twitter.com/mjos_crypto/status/933456673443901440 .
    – Maxithi
    Jan 30, 2018 at 15:54
  • I think/ hope I have the hashing side of it down unfortunatly I need to beable to getwork from a pool.
    – tek-dragon
    Jan 31, 2018 at 21:28
  • I think I found most of what I need to connect with PHP using Curl currently working on writing a simple getwork function then I can test the rest of what I have. thanks.
    – tek-dragon
    Feb 2, 2018 at 6:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.