mirror of
https://github.com/monero-project/monero-docs.git
synced 2024-12-22 19:49:22 +00:00
Add Ed25519 stub
This commit is contained in:
parent
74952e6cee
commit
92a264662d
8 changed files with 40 additions and 16 deletions
|
@ -1,7 +1,27 @@
|
||||||
# Ed25519 curve
|
# Ed25519 curve
|
||||||
|
|
||||||
Monero uses Ref10 implementation by Daniel J. Bernstein.
|
**!! Work in progress - be sceptical on accuracy !!**
|
||||||
|
|
||||||
|
Monero employs Ed25519 curve as a basis for its signature scheme.
|
||||||
|
|
||||||
|
However, Monero does not follow EdDSA reference signature scheme.
|
||||||
|
|
||||||
|
## Public key derivation
|
||||||
|
|
||||||
|
In relation to EdDSA, Monero derives public keys differently:
|
||||||
|
|
||||||
|
* Monero uses Keccak instead of SHA-512
|
||||||
|
* Monero uses private keys as scalars, not as seeds
|
||||||
|
|
||||||
|
## Signature scheme
|
||||||
|
|
||||||
|
In relation to EdDSA, Monero uses a different signature scheme.
|
||||||
|
|
||||||
|
## Implementation
|
||||||
|
|
||||||
|
For the curve itself, Monero uses Ref10 implementation by Daniel J. Bernstein.
|
||||||
|
|
||||||
## Reference
|
## Reference
|
||||||
|
|
||||||
https://stackoverflow.com/questions/19147619/what-implementions-of-ed25519-exist
|
* [Understanding Monero Cryptography](https://medium.com/@luigi1111w/understanding-monero-cryptography-privacy-introduction-9baf073e970c) - excellent writeup by Luigi
|
||||||
|
* [StackOverflow answer](https://monero.stackexchange.com/questions/2290/why-how-does-monero-generate-public-ed25519-keys-without-using-the-standard-publ)
|
||||||
|
|
|
@ -1,11 +1,12 @@
|
||||||
# Keccak-256 hash function
|
# Keccak-256 hash function
|
||||||
|
|
||||||
Monero employs Keccak-256 as a hashing function.
|
Monero employs Keccak as a hashing function. In most context specifically Keccak-256 is used,
|
||||||
|
providing 32-byte hashes.
|
||||||
|
|
||||||
Keccak is the leading hashing function, designed by non-NSA designers.
|
Keccak is the leading hashing function, designed by non-NSA designers.
|
||||||
Keccak won [NIST competition](https://en.wikipedia.org/wiki/NIST_hash_function_competition) to become the official SHA3.
|
Keccak won [NIST competition](https://en.wikipedia.org/wiki/NIST_hash_function_competition) to become the official SHA3.
|
||||||
|
|
||||||
## Uses
|
## Use Cases
|
||||||
|
|
||||||
Monero does **not** employ Keccak for Proof-of-Work. Instead, Keccak is used for:
|
Monero does **not** employ Keccak for Proof-of-Work. Instead, Keccak is used for:
|
||||||
|
|
||||||
|
|
|
@ -1,15 +1,19 @@
|
||||||
# Monero Pseudo Random Number Generator
|
# Monero Pseudorandom Number Generator
|
||||||
|
|
||||||
Monero uses PRNG based on Keccak hashing function.
|
Monero uses PRNG based on the Keccak hashing function.
|
||||||
|
Basically, output of the previous hashing round is input for the next one.
|
||||||
|
|
||||||
The seed comes from entropy sources provided by operating system.
|
The initial seed comes from entropy sources provided by operating system.
|
||||||
On Linux and MacOS this translates to `/dev/urandom`.
|
On Linux and MacOS the seed comes from `/dev/urandom`.
|
||||||
On Windows the WinAPI `CryptGenRandom` call is used.
|
On Windows the WinAPI `CryptGenRandom` call is used for seeding.
|
||||||
|
|
||||||
There is no reseeding.
|
There is no reseeding.
|
||||||
|
|
||||||
## Caveats
|
## Caveats
|
||||||
|
|
||||||
|
* This concerns the reference C++ implementation of Monero.
|
||||||
|
Please note there are many alternative implementations of private key generation,
|
||||||
|
including JavaScript, Python, Android/Java. These should be researched case by case for correctness.
|
||||||
* In Monero source code you can also find libsodium based random bytes generator. It is part of the embedded library and apparently is not used in actual Monero code.
|
* In Monero source code you can also find libsodium based random bytes generator. It is part of the embedded library and apparently is not used in actual Monero code.
|
||||||
|
|
||||||
## Reference
|
## Reference
|
||||||
|
|
|
@ -25,7 +25,7 @@ Index | Size in bytes | Description
|
||||||
65 | 8 | compact payment ID - 8 bytes randomly generated by the recipient; note that it does not need encryption in the address itself but it is hidden in a transaction paying to integrated address to prevent linking payment with the address by external observers
|
65 | 8 | compact payment ID - 8 bytes randomly generated by the recipient; note that it does not need encryption in the address itself but it is hidden in a transaction paying to integrated address to prevent linking payment with the address by external observers
|
||||||
73 | 4 | checksum ([Keccak-f[1600] hash](https://github.com/monero-project/monero/blob/8f1f43163a221153403a46902d026e3b72f1b3e3/src/common/base58.cpp#L261) of the previous 73 bytes, trimmed to first [4](https://github.com/monero-project/monero/blob/8f1f43163a221153403a46902d026e3b72f1b3e3/src/common/base58.cpp#L53) bytes)
|
73 | 4 | checksum ([Keccak-f[1600] hash](https://github.com/monero-project/monero/blob/8f1f43163a221153403a46902d026e3b72f1b3e3/src/common/base58.cpp#L261) of the previous 73 bytes, trimmed to first [4](https://github.com/monero-project/monero/blob/8f1f43163a221153403a46902d026e3b72f1b3e3/src/common/base58.cpp#L53) bytes)
|
||||||
|
|
||||||
It totals to 78 bytes. The bytes are then encoded ([src](https://github.com/monero-project/monero/blob/8f1f43163a221153403a46902d026e3b72f1b3e3/src/common/base58.cpp#L240)) in [Monero specific Base58](/primitives/base58) format, resulting in a 106 chars long string. Example integrated address:
|
It totals to 78 bytes. The bytes are then encoded ([src](https://github.com/monero-project/monero/blob/8f1f43163a221153403a46902d026e3b72f1b3e3/src/common/base58.cpp#L240)) in [Monero specific Base58](/cryptography/base58) format, resulting in a 106 chars long string. Example integrated address:
|
||||||
|
|
||||||
`4LL9oSLmtpccfufTMvppY6JwXNouMBzSkbLYfpAV5Usx3skxNgYeYTRj5UzqtReoS44qo9mtmXCqY45DJ852K5Jv2bYXZKKQePHES9khPK`
|
`4LL9oSLmtpccfufTMvppY6JwXNouMBzSkbLYfpAV5Usx3skxNgYeYTRj5UzqtReoS44qo9mtmXCqY45DJ852K5Jv2bYXZKKQePHES9khPK`
|
||||||
|
|
||||||
|
|
|
@ -33,7 +33,7 @@ Index | Size in bytes | Description
|
||||||
33 | 32 | public view key
|
33 | 32 | public view key
|
||||||
65 | 4 | checksum ([Keccak-f[1600] hash](https://github.com/monero-project/monero/blob/8f1f43163a221153403a46902d026e3b72f1b3e3/src/common/base58.cpp#L261) of the previous 65 bytes, trimmed to first [4](https://github.com/monero-project/monero/blob/8f1f43163a221153403a46902d026e3b72f1b3e3/src/common/base58.cpp#L53) bytes)
|
65 | 4 | checksum ([Keccak-f[1600] hash](https://github.com/monero-project/monero/blob/8f1f43163a221153403a46902d026e3b72f1b3e3/src/common/base58.cpp#L261) of the previous 65 bytes, trimmed to first [4](https://github.com/monero-project/monero/blob/8f1f43163a221153403a46902d026e3b72f1b3e3/src/common/base58.cpp#L53) bytes)
|
||||||
|
|
||||||
It totals to 69 bytes. The bytes are then encoded ([src](https://github.com/monero-project/monero/blob/8f1f43163a221153403a46902d026e3b72f1b3e3/src/common/base58.cpp#L240)) in [Monero specific Base58](/primitives/base58) format, resulting in a 95 chars long string. Example standard address:
|
It totals to 69 bytes. The bytes are then encoded ([src](https://github.com/monero-project/monero/blob/8f1f43163a221153403a46902d026e3b72f1b3e3/src/common/base58.cpp#L240)) in [Monero specific Base58](/cryptography/base58) format, resulting in a 95 chars long string. Example standard address:
|
||||||
|
|
||||||
`4AdUndXHHZ6cfufTMvppY6JwXNouMBzSkbLYfpAV5Usx3skxNgYeYTRj5UzqtReoS44qo9mtmXCqY45DJ852K5Jv2684Rge`
|
`4AdUndXHHZ6cfufTMvppY6JwXNouMBzSkbLYfpAV5Usx3skxNgYeYTRj5UzqtReoS44qo9mtmXCqY45DJ852K5Jv2684Rge`
|
||||||
|
|
||||||
|
|
|
@ -70,6 +70,5 @@ This translates to <1% inflation decreasing over time.
|
||||||
|
|
||||||
## IP address privacy
|
## IP address privacy
|
||||||
|
|
||||||
* not built in
|
* not built in - please use TOR or I2P
|
||||||
* use TOR or I2P
|
* there is an ongoing effort to integrate I2P into Monero - the Kovri project
|
||||||
* there is an ongoing effort to integrate I2P into Monero: the Kovri project
|
|
||||||
|
|
|
@ -8,13 +8,13 @@ pages:
|
||||||
- Home: 'index.md'
|
- Home: 'index.md'
|
||||||
- Interacting: 'interacting/overview.md'
|
- Interacting: 'interacting/overview.md'
|
||||||
- Technical Specs: 'technical-specs.md'
|
- Technical Specs: 'technical-specs.md'
|
||||||
- Primitives:
|
|
||||||
- Base58: 'primitives/base58.md'
|
|
||||||
- Cryptography:
|
- Cryptography:
|
||||||
- Overview: 'cryptography/overview.md'
|
- Overview: 'cryptography/overview.md'
|
||||||
- PRNG: 'cryptography/prng.md'
|
- PRNG: 'cryptography/prng.md'
|
||||||
- 'Keccak-256': 'cryptography/keccak-256.md'
|
- 'Keccak-256': 'cryptography/keccak-256.md'
|
||||||
|
- Ed25519: 'cryptography/ed25519.md'
|
||||||
# - CryptoNight PoW: 'cryptography/cryptonight.md'
|
# - CryptoNight PoW: 'cryptography/cryptonight.md'
|
||||||
|
- Base58: 'cryptography/base58.md'
|
||||||
- Address:
|
- Address:
|
||||||
- Standard: 'public-address/standard-address.md'
|
- Standard: 'public-address/standard-address.md'
|
||||||
- Integrated: 'public-address/integrated-address.md'
|
- Integrated: 'public-address/integrated-address.md'
|
||||||
|
|
Loading…
Reference in a new issue