23 votes
Accepted

Where can I find a description of the CryptoNight hash algorithm?

The description of the CryptoNight hash algorithm and the steps it performs can be found in the code as well as in a written file by the CryptoNote team, which can be found here. Lastly, in his blog, ...
dEBRUYNE's user avatar
  • 15.1k
16 votes
Accepted

Can you have a multsig wallet with the current Monero protocol?

Yes. Essentially, you can split up the private spend key according to a (k,n)-secret sharing scheme. Then any k participants can collect the keys together to recreate this private spend key and then ...
PyRulez's user avatar
  • 3,120
6 votes
Accepted

Why is sc_reduce32 needed?

The paper is incorrect; it's actually mod l, not q. l is the curve order of ed25519. The primary reason AFAIK is that the code doesn't work correctly with scalars above a certain multiple of l. The ...
Luigi's user avatar
  • 2,452
5 votes

What's the difference between the CryptoNightR and RandomX algorithms?

Quoting SChernykh (one of the CryptonightR authors): CryptonightR is a modification to Cryptonight whereas RandomX is done completely from scratch. The main purpose of CryptonightR is to be the ...
jtgrassie's user avatar
  • 18.9k
5 votes
Accepted

Where does Curve25519's limit occur?

It will get wrapped around because it's later passed through sc_reduce32 function which performs mod l operation on the input. See below example using silent Matt's big int library which is loaded ...
JollyMort's user avatar
  • 19.9k
5 votes

Where can I find a description of the CryptoNight hash algorithm?

The algorithm is described in Cryptonote Standard 008.
Clement J.'s user avatar
  • 3,339
5 votes
Accepted

Non-Deterministic Wallets

Originally Monero used non-deterministic wallets. Deterministic (and mnemonics) are a convenience feature. Take a look at the --non-deterministic command-line flag, which will generate a non-...
Luigi's user avatar
  • 2,452
4 votes
Accepted

How is the G constant calculated in the cryptonote protocol?

G is defined in the definition of the signature scheme, Edwards-curve Digital Signature Algorithm (EdDSA)in the case of Cryptonote and Monero. As explained in this answer in crypo.SE : the base ...
Clement J.'s user avatar
  • 3,339
4 votes
Accepted

Ring signature with sublinear size increase

This was answered by core-team member smooth on Reddit: First one has a trusted setup. I don't know what issues there might be with the other one. I remember the MRL guys look at some sublinear ...
dEBRUYNE's user avatar
  • 15.1k
4 votes
Accepted

How can I validate a cryptonight algorithm implementation?

The Monero blockchain is full of test cases: for every block, you can assemble the hashing blob for that block, hash it with your new implementation, and check the resulting hash is below the target ...
user36303's user avatar
  • 34.8k
3 votes
Accepted

Possible error in book Zero to Monero: Second Edition

Is this an error or am I misunderstand something? No it is not an error, you are misunderstanding. Since the group is cyclic, we can identify it with... Next we check if 5 is in... Group elements ...
jtgrassie's user avatar
  • 18.9k
3 votes
Accepted

How MoneroDice is provably fair?

A hex string is created using a hash_hmac(serverSeed, clientSeed_nonce) function, where "clientSeed_nonce" is literally the client seed, the underscore character, and the nonce, all concatenated ...
Imagin Ation's user avatar
3 votes

What is "aes_round" in the Monero hashing algorithm?

An AES round uses the three functions (SubBytes, ShiftRows and MixColumns). The Wikipedia article on AES has a high-level description of the algorithm and links to the AES standard, reference source ...
glv's user avatar
  • 3,334
3 votes

Is CryptoNight the hash function which plays the role of the "random oracle"?

The Hp and Hs hash functions of the Cryptonote paper are called hash_to_ec and hash_to_scalar in the Monero code base, and they are based on the Keccak1600 hash function (called fast_hash in the code),...
glv's user avatar
  • 3,334
2 votes
Accepted

How is the one time address generated from the public address?

A one time address for Bob is generated by taking a random r, multiply by Bob's public spend key, hash the result and multiply it by the curve base point, adding (in ECC terms) Bob's public view key. ...
user36303's user avatar
  • 34.8k
2 votes

What's the scratchpad for?

The scratchpad is filled with pseudo-random data based on the state (using rounds of the AES block cipher). Check https://cryptonote.org/cns/cns008.txt for a detailed description of the algorithm (...
glv's user avatar
  • 3,334
2 votes

Is there a Javascript implementation of the CryptoNight algorithm?

Sure there is. Do a npm search cryptonight-hashing and take a pick :) NAME | DESCRIPTION | AUTHOR | DATE | VERSION | KEYWORD cryptonight-hashing | ...
Mogens TrasherDK's user avatar
2 votes
Accepted

How can I tell what difficulty my solution is?

You can find the difficulty of a submitted hash (which is just a big endian hex encoded string) by dividing the base difficulty (2^256-1) by your hash. As such, nodejs-pool (the most common pool ...
jtgrassie's user avatar
  • 18.9k
2 votes

Multiple CPU miners with low hashrate vs single CPU miner with high hashrate

If all the computers have a good network connectivity, the probability of successfully mining a block is proportional to your total hash rate. Mining with 10 CPUs doing 200 h/s each and mining with 1 ...
glv's user avatar
  • 3,334
2 votes
Accepted

How are fees computed?

Can someone explain the algorithm to compute Monero transaction fee? The computation of the current dynamic fee algorithm is explained, in detail, here: https://web.getmonero.org/2017/12/11/A-note-on-...
jtgrassie's user avatar
  • 18.9k
2 votes

Monero address prefix creation algorithm

Primary Addresses: Base58( 0x12 | S0 | V0 | checksum ) = “ 4 ..........” [95 chars] Sub Addresses: Base58( 0x2A | Si | Vi | checksum ) = “ 8 ..........” [95 chars] Integrated Addresses: Base58( 0x13 | ...
baro77's user avatar
  • 229
1 vote

How can I code monero mining algorithm from scratch?

The algorithm is documented here: doc/specs.md Note that implementing in javascript would be a largely pointless exercise due to the fact it will run horrendously slowly, in part due to native ...
jtgrassie's user avatar
  • 18.9k
1 vote
Accepted

Is the RandomX only algorithm to go?

I have got what I wanted here. For whoever looks for an answer for this as well. https://www.reddit.com/r/MoneroMining/comments/vi5mho/is_the_randomx_only_algorithm_to_go/
dominikj111's user avatar
1 vote
Accepted

Encrypt and decrypt seed algorithms in Python

Which one is the method currently being used in the reference wallet? The current reference is as follows (and what is commented as the "CN Add" method). Once you have the seed bytes from ...
jtgrassie's user avatar
  • 18.9k
1 vote

Monero stratum on yiimp pool

I’ve build the stratum supporting RandomX and replaced with yiimp stratum. It works. https://github.com/tpfuemp/yiimp-randomx
att's user avatar
  • 133
1 vote

Hash rate of three million mining Monero?

"Is this article truthful when it quotes a hash rate of three million when mining Monero?" Answer: No. If the hashrate was 3 million, then everyone who was mining Bitcoin must've moved for ...
me123's user avatar
  • 11
1 vote

how does monero schedule an algorithm update?

Miners and nodes are updated ahead of time with new software. This software is hard coded to know in advance the block height at which the mining algorithm is agreed to change over. Block height is ...
knaccc's user avatar
  • 8,448
1 vote

How to update algorithm to cryptonight v1

You will need to update src/crypto/slow-hash.c. Compare it to Monero's latest version to see the changes.
jtgrassie's user avatar
  • 18.9k
1 vote

Does anyone have test data that illustrates the CryptoNight 7 algorithm?

One simple way is to call the daemon RPC's method getblock. From this you can get the result.blob (the data to be hashed) and from the result.block_header.hash, the expected hash result.
jtgrassie's user avatar
  • 18.9k
1 vote

Why is sc_reduce32 needed?

The order for both ed25519 and curve25519 curves can be found from libgcrypt-1.8.5/cipher/ecc-curves.c in hex is 1000000000000000000000000000000014DEF9DEA2F79CD65812631A5CF5D3ED. Examine the ...
skaht's user avatar
  • 1,566

Only top scored, non community-wiki answers of a minimum length are eligible