-
monero-hackerind
Howdy y'all
-
monero-hackerind
I am working on an offline seed generator for monero seeds using dice as a source of entropy.
-
monero-hackerind
Does anybody know what the proper amount of dice rolls (on 6 sided dice) are needed to reach proper level of entropy?
-
monero-hackerind
In seedsigner they use 50 rolls for 12 word seeds and 99 rolls for 24 word seeds. (Which it should not matter as the dice rolls increase entropy and shouldn't directly translate to phrases.
-
monero-hackerind
Based on some Math from coldcard, a d6 dice provides 2.585 bits of additional entropy per roll
-
monero-hackerind
This means:
-
monero-hackerind
50 rolls for 128 bit
-
monero-hackerind
99 rolls for 256 bit
-
monero-hackerind
Would 100 dice rolls (assuming the dice are casino dice with proper random roll) be enough for source of entropy?
-
monero-hackerind
-
jeffro256[m]
Yes, I believe Monero's current seed scheme has 256-bits of entropy, so 100 perfect six-sided dice rolls would provide enough entropy. There is a new seed scheme proposed in Jamtis, called Polyseed, which only has 150 bits of entropy.
-
jeffro256[m]
From a UX perspective, you would be hard pressed to find anyone who would be willing to roll and record 100 die rolls :P
-
jeffro256[m]
You don't "need" the full entropy of a seed though if you determine it to be within your security threshold. As long as there is a deterministic formula for converting a sequence of die rolls into a binary string, you could use any number of die rolls.
-
monero-hackerind
thank you for the answer
-
monero-hackerind
The random number generator on raspberry PI zero is not something I would trust fully. I've had microcontrollers not take ambient noise or temperature as entropy source so it would not be far fetched to see it fail. The other solution is dedicated crypto chips with a better random generator but it raises cost
-
monero-hackerind
I know the UX is a bit clunky but it is more the option for those who are a little bit more paranoid and are ok with feeding the entropy manually.
-
monero-hackerind
I piggyback on the seed generate function of monero python library so I can just feed it a 32 bytes of entropy generated from a hash of the dicerolls as a string
-
cryptogrampy[m]
<jeffro256[m]> "From a UX perspective, you would..." <- back in my day, we grabbed the dice from the yahtzee set and did 5 rolls at once
-
badjabber
"From a UX perspective, you would be hard pressed to find anyone who would be willing to roll and record 100 die rolls :P" <-- I think people would do it
-
badjabber
how many dice per seedword
-
badjabber
?
-
badjabber
5 ot 6 D6
-
badjabber
roll 5 or 6 D6, look up your word. Repeat 24 times (25th is a checksum word) and u done. Might be worth the effort to stay offline
-
moneromooo
You can even roll partial dice if you put the series of rolls as custom entropy to be hashed.
-
moneromooo
(so you have fewer rolls to make overall)
-
MeowingCat
as i understand wallet2 API connects to daemon and gets UTXOs for transaction building
-
moneromooo
Spent or unspent, neither of them knows (except for the ones the wallet owns). But yes.
-
MeowingCat
im doing this wm->setDaemonAddress("...");
-
MeowingCat
and instancing a Monero::Wallet from words
-
MeowingCat
can this thing build and transactions?
-
MeowingCat
build and sign*
-
MeowingCat
the thing im curious about is that we need to create wallets in BTC daemon for UTXOs
-
MeowingCat
is Monero daemon working with the same way?
-
MeowingCat
or when i connect a node like this i can just build and sign transactions?
-
MeowingCat
as i understand it is possible to build and sign transactions with cryptonote API tooo but then i need to get something like UTXOs from a node
-
moneromooo
get_outs
-
moneromooo
called by wallet2::get_outs
-
MeowingCat
Wallet::Wallet::init(const char *argv0, const char *default_log_base_name)
-
MeowingCat
Monero::Wallet::init(const char *argv0, const char *default_log_base_name)
-
MeowingCat
this thing
-
MeowingCat
what are the parameters of this?
-
ime[m]
from commit f9b22a7b01, does the '--hw-device' option require the user to specify a ':' and a device path afterwards?
-
MeowingCat
what does wallet2 do to connect to nodes?
-
MeowingCat
it may be problematic for iOS and Android
-
moneromooo
Opens a connection, sends some JSON RPC, gets result as JSON.
-
moneromooo
With optional SSL.
-
MeowingCat
ummmmm this thing connects to RPC server then
-
MeowingCat
is there an RPC server for testnet i can use?
-
MeowingCat
we have a node setup but i can't use that right now
-
moneromooo
You use your own server.
-
moneromooo
Otherwise you don't learn how to use one, you are subject the vagaries of whether it's up or not, and it can just lie to you.
-
Elijah[m]
<MeowingCat> "is there an RPC server for..." <-
monero.fail/?nettype=testnet. Since this is testnet, deceptive nodes (if any) aren't going to cause real damage. This was useful for me because if I run my e-commerce store locally, it uses either my local test net node or if that's behind, I use one of the nodes in monero fail. For production, I use a node run on the cloud.
-
MeowingCat
looooooking thank youuuuuuuu
-
MeowingCat
im curious about wallet2 API
-
MeowingCat
where does Monero::WalletManager::setDaemonAddress() connect to?
-
MeowingCat
RPC server or a Monero node??
-
moneromooo
A... monero node's RRC server.
-
moneromooo
To be clear, the node and the wallet both have a RPC server, but expose a different set of RPC.
-
MeowingCat
wm->setDaemonAddress("
testnet.xmr.sh");
-
MeowingCat
is this wrong?????
-
UkoeHB
MeowingCat: you need the port number "
testnet.community.rino.io:28081"
-
UkoeHB
oh that one does it have it lol
-
MeowingCat
trying
-
MeowingCat
do i need to do wallet->init()???
-
UkoeHB
why ask? try it and see
-
MeowingCat
im already trying everything
-
MeowingCat
terminate called after throwing an instance of 'tools::error::wallet_not_initialized'
-
MeowingCat
what(): wallet is not initialized
-
MeowingCat
getting this errorr :(((
-
moneromooo
Clearly not tried everything yet then.
-
moneromooo
Looking at what existing working code does should help.
-
moneromooo
ie, the GUI
-
MeowingCat
i looooked at monero-gui
-
MeowingCat
but couldn't find any usage of these things
-
moneromooo
Hmm. OK, I'm surprised. Well, use whatever API calls it uses.
-
MeowingCat
there are Monero::Wallet::mainAddress() and Monero::Wallet::address(uint32_t accountIndex = 0U, uint32_t addressIndex = 0U)
-
MeowingCat
i haven't seen anything about setting network
-
MeowingCat
ohh okiiiii i already made it in recoveryWallet() call
-
MeowingCat
testnet parameter
-
MeowingCat
interesting because after wm->setDaemonAddress("
testnet.community.rino.io:28081");
-
MeowingCat
wm->connected() is returning true
-
MeowingCat
still getting this terminate called after throwing an instance of 'tools::error::wallet_internal_error'
-
MeowingCat
what(): Failed to get height
-
moneromooo
Looks like comms to node failed.
-
moneromooo
Bump log level up, try again, read log, work from there.
-
MeowingCat
terminate called after throwing an instance of 'tools::error::wallet_not_initialized'
-
MeowingCat
what(): wallet is not initialized
-
MeowingCat
this error
-
MeowingCat
w->init("", "walletlogs");
-
MeowingCat
im doing this
-
MeowingCat
but getting this error
-
MeowingCat
i need to understand something
-
MeowingCat
is the way of how wallet2 API works that holding private seed on daemon?
-
MeowingCat
can i just send private view key?
-
moneromooo
The wallet2 object will hold your secret keys. The seed is that, basically. It can be accessed via RPC, though it is not recommended.
-
moneromooo
The node daemon does not need it.
-
MeowingCat
i mean
-
moneromooo
If you mean "I want to give someone my secret key and let them do the work for me", then look at monero-lws.
-
MeowingCat
does wallet2 even provide a way to build and sign transactions without sending private seed anywhere like RPC server??
-
MeowingCat
noooo we will not send private seed anywhere
-
moneromooo
Then wallet2 can build and sign txes without sending the secret keys anywhere.
-
MeowingCat
we can send private view key if it is needed for building transactions (like for getting UTXOs)
-
MeowingCat
niceeeeeeee
-
MeowingCat
Monero works with UTXOs
-
MeowingCat
then i need to send private view key to RPC server right???
-
moneromooo
It's like you do not use the information you're given before asking the same question again.
-
MeowingCat
-
MeowingCat
C++ code
-
MeowingCat
im curious about what is wrong here :((((((((((
-
moneromooo
FWIW, I'm not looking, I'm not familiar with that API as I said before.
-
plowsof[m]
tfw moo forgets what c++ code looks like
-
MeowingCat
INFO logging contrib/epee/src/mlog.cpp:273 New log categories: *:WARNING,net:FATAL,net.http:FATAL,net.ssl:FATAL,net.p2p:FATAL,net.cn:FATAL,daemon.rpc:FATAL,global:INFO,verify:FATAL,serialization:FATAL,daemon.rpc.payment:ERROR,stacktrace:INFO,logging:INFO,msgwriter:INFO
-
MeowingCat
im getting this for this RPC server:
testnet.community.rino.io:28081
-
moneromooo
Bump log level. By default, the wallet does not log (to avoid leaving private info in the log).
-
MeowingCat
i have a Monero::PendingTransaction object how can i serialize it?
-
UkoeHB
MeowingCat: serialization should be like this I think (close enough)
irccloud.com/pastebin/ppnofafq/serialization
-
MeowingCat
UkoeHB, loooooooooking thank youuuuu
-
UkoeHB
it only works for objects with the `BEGIN_SERIALIZE()` etc. macros
-
MeowingCat
you mean i can't serialize a TX with things in wallet2_api.h???
-
UkoeHB
MeowingCat: no, I mean "it only works for objects with the `BEGIN_SERIALIZE()` etc. macros". You have to go look at objects to see if they are serializable.
-
MeowingCat
okiiii