-
m-relay
<recanman:kernal.eu> First time
-
m-relay
<recanman:kernal.eu> I restarted monerod and the issue went away
-
m-relay
<recanman:kernal.eu> Just wanted to post it in case it was useful
-
vthor
how do I derivate the public address and the view key from the spend key?
-
m-relay
<mcneb10:envs.net> the public address is a combination of the public view and spend keys
-
m-relay
-
sech1
Private view key is normally generated from the private spend key (although 3rd-party wallets can do it differently)
-
vthor
oh heck, so I need to arrive on the address first derivate the public spend key, secret view key -> public view key to generate a wallet. then I can also directly generate the wallet by myself :/
-
m-relay
<mcneb10:envs.net> iirc the private spend key is randomly generated, and the private view key is made by keccak 256 hashing the private spend key 10000 times
-
m-relay
<mcneb10:envs.net> then you can derive the public keys from the private keys
-
vthor
I want to have the outcome compatible with monero-gui/cli/rpc and feather, my challenge is now to get from the secret spend key I created from polyseed to the complete wallet or to the correct seed phrase, I assumed wrongly that the key provided to monero.seed.Seed (in monero-python) is equal to the secret spend key, but isn't :S
-
sech1
view secret key is just a keccak(spend secret key), if you create it with Monero CLI/GUI
-
sech1
so it's just a keccak hash
-
sech1
and sc_reduce32
-
vthor
sc_reduce is from ed25519?
-
sech1
yes, it's from src/crypto/crypto-ops.c
-
vthor
hehe, there I have also still an issu open, because monero.seed.Seed a randomly generated seed, then restored wallet with monero-rpc leads to another seed phrase but the same wallet....
-
vthor
so it's polyseed -> secret_spend_key -> ed25519.sc_reduce(keccak(secret_spend_key, rounds)) -> secret_view_key.
-
vthor
then I need to get from both the public keys, the private keys are ed25519?
-
vthor
and rounds = 1 or 10000?
-
sech1
1 round of keccak
-
sech1
Private keys are ed25519
-
vthor
will look first in src/crypto/crypto-ops.c before I make more unnecesarry questions... sorry, I'm a bit accelerated
-
vthor
thank you very much sech1 :)
-
m-relay
<recanman:kernal.eu> vthor here's the original python reference implementation:
ed25519.cr.yp.to/python/ed25519.py
-
m-relay
-
vthor
recanmen thank you, but it's shipped whith monero-python
-
vthor
and I could create now everything by hand, but now it seems feather does something else then claimed :/ will see there, something doesn't add up.