brokenbydefault / Nanollet

The unique ultra-light wallet for Nano/Raiblocks with amazing features, written in Golang.
https://nanollet.org
MIT License
53 stars 7 forks source link

Add an option to show standard seed #38

Open rainbyte opened 5 years ago

rainbyte commented 5 years ago

Currently Nanollet has an option to show the SeedFY corresponding to the wallet. If possible, it would be good to have a way to access the standard seed instead.

This could help to improve interop with other wallets in certain situations. Of course relevant warnings should be shown too.

Thanks in advance!

inkeliz commented 5 years ago

It's not possible. It's possible to create the seed, but the derivation is not the same.

The Raiblocks uses a concatenation of seed and index, kind of Blake2(message = seed || index). In another hand, the Nanollet uses the proper KDF provided by Blake2 [1], which leads to Blake2(message = index, key = seed).

This change breaks the compatibility between the reference wallet and the Nanollet. However, Nanollet follows the definition of Blake2.

Furthermore, because Nanollet was initially built to support more currencies, it uses the Blake2XOF instead of Blake2. The Blake2XOF makes it possible to create keys larger than only 512 bits, which may need for some new crazy cryptocurrency.

However, it's possible to Nanollet support the "standard seed", maybe in a future version will be possible to use/create a SeedFY or use/create a Seed, this second option is compatible with other wallets.

[1] 2.9 Keyed hashing (MAC and PRF): https://blake2.net/blake2.pdf

rainbyte commented 5 years ago

Then a warning should be added somewhere, because "it is not possible to recover the funds using other wallet".

I noticed this when Nanollet did not let me send the full amount of NANO, leaving some dust behind. Then I tried to recover the dust using other wallet, just for testing, which was not possible.

(I suppose having a "send max" operation should be other issue, right?)