Git Product home page Git Product logo

Comments (12)

Joysan78 avatar Joysan78 commented on May 24, 2024

Tnx I'll try that😊

from monero.

moneromooo-monero avatar moneromooo-monero commented on May 24, 2024

bytes_to_words in src/mnemonics/electrum-words.cpp
From a comment in that function:
// 4 bytes -> 3 words. 8 digits base 16 -> 3 digits base 1626

from monero.

developergames2d avatar developergames2d commented on May 24, 2024

bytes_to_words in src/mnemonics/electrum-words.cpp From a comment in that function: // 4 bytes -> 3 words. 8 digits base 16 -> 3 digits base 1626

I have 32 bytes. You give me the algorithm for 32 / 4 * 3 = 24 words. How can to get the 25-th word?

from monero.

selsta avatar selsta commented on May 24, 2024

The last word is a checksum.

https://monero.stackexchange.com/questions/874/what-is-the-checksum-at-the-end-of-a-mnemonic-seed

from monero.

developergames2d avatar developergames2d commented on May 24, 2024

The last word is a checksum.

https://monero.stackexchange.com/questions/874/what-is-the-checksum-at-the-end-of-a-mnemonic-seed

Example (for 0-private key):
abbey x24:

The string which we feed to CRC32 will be:
abbabbabbabbabbabbabbabbabbabbabbabbabbabbabbabbabbabbabbabbabbabbabbabb
and the result of CRC32 performed on it will be 0xb038cd80 = 2956512640. 2956512640 mod 24 is 16, not 0 (index of abbey is 0, this is right last word for 0-private key).

from monero.

moneromooo-monero avatar moneromooo-monero commented on May 24, 2024

There is no CRC32 involved.
abb is 0. So abbabbabbabb is 0x00000000.

from monero.

developergames2d avatar developergames2d commented on May 24, 2024

There is no CRC32 involved. abb is 0. So abbabbabbabb is 0x00000000.

For WHAT we calculate CRC32? The string "abbabbabb..."?

from monero.

developergames2d avatar developergames2d commented on May 24, 2024

There is no CRC32 involved. abb is 0. So abbabbabbabb is 0x00000000.

In example for "skirting trash phase buckets apology gags sedan coffee vinegar else fifteen pitched idled gorilla siren cucumber urban junk vastness laboratory rift rhino situated taxi" we calculated CRC32 for string "skitraphabucapogagsedcofvinelsfifpitidlgorsircucurbjunvaslabrifrhisittax". This is 1790087523 mod 24 is 3. Ok. But for "abbabbabbabbabbabbabbabbabbabbabbabbabbabbabbabbabbabbabbabbabbabbabbabb" I can't get 0, only 16 (2956512640 mod 24).

from monero.

selsta avatar selsta commented on May 24, 2024

It means the 16th word (starts with 0) of the seed is the checksum -> abbey. The checksum can only be abbey because all words from 0 to 23 are abbey.

from monero.

developergames2d avatar developergames2d commented on May 24, 2024

It means the 16th word (starts with 0) of the seed is the checksum -> abbey. The checksum can only be abbey because all words from 0 to 23 are abbey.

Thank you!

from monero.

developergames2d avatar developergames2d commented on May 24, 2024

It turns out that the maximum number of combinations of seed phrases is 1626^24 more than hexes (2^256) by about 7%, i.e. it is better to randomly select 24 words and then get the 25th than to get 24 words out of 64-hexadecimal number...
The maximum of hexadecimal seed is FFFFFFFF_16 x 6 -> 4294967295_10 x 6 -> (1624,807,489)_1626 x 6 -> "zones listen foamy zones listen foamy zones listen foamy zones listen foamy zones listen foamy zones listen foamy zones listen foamy zones listen foamy". And 25th word is zones. Whereas the "maximum" phrase is "zoom"x25...

from monero.

developergames2d avatar developergames2d commented on May 24, 2024

It turns out that the maximum number of combinations of seed phrases is 1626^24 more than hexes (2^256) by about 7%, i.e. it is better to randomly select 24 words and then get the 25th than to get 24 words out of 64-hexadecimal number... The maximum of hexadecimal seed is FFFFFFFF_16 x 6 -> 4294967295_10 x 6 -> (1624,807,489)_1626 x 6 -> "zones listen foamy zones listen foamy zones listen foamy zones listen foamy zones listen foamy zones listen foamy zones listen foamy zones listen foamy". And 25th word is zones. Whereas the "maximum" phrase is "zoom"x25...

It turns out that about 7% of the seeds have one Private spend key and addresses (as pairs, much less common are threes etc.).

from monero.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.