mvondracek / PA193_mnemonic_Slytherin

BIP39 Mnemonic Phrase Generator and Verifier
0 stars 3 forks source link

Function stubs for basic functionality #14

Closed mvondracek closed 4 years ago

mvondracek commented 4 years ago

Public API is only generate, recover, verify.

mvondracek commented 4 years ago

I think that a way how CLI tool communicates with user and internal handling of data are two separate things. Our CLI tool should accept binary or hexa strings. However, I suggest that our package handles seed and entrophy as single type. Whether it should be bytes or str depends on operations we will perform with seed and entropy. What do you think?

sobuch commented 4 years ago

Ok, you are right that its different, but, if we are implementing checks for both formats of input we may as well include both in the library. Or would that make the interface messy? Based on the required functionality seed should be definitely a string, entropy would make more sense to me as bytes, but I am not sure here.

lsolodkova commented 4 years ago

seed should be definitely a string

Why should it? Should we display it or store somewhere? Actually, it's used for generating wallets, but the functionality of our project ends at this point.

sobuch commented 4 years ago

page 5 specifies "Output: seed and initial entropy as hexadecimal strings"

mvondracek commented 4 years ago

As seed is output from PBKDF2, it could be more efective to handle it as bytes. I am talking about separation of real data and representation of that data. Our tool should now read seed and entropy as hexa or binary and then print them as hexa strings.

What about having seed and entropy as bytes for now? It can be changed, if implementation proves that string would be better.

sobuch commented 4 years ago

Ok

lsolodkova commented 4 years ago

I bet it wouldn't, but anyway we could add some functionality for converting input from string to bytes.

mvondracek commented 4 years ago

Input conversion is a one-liner. I'll do that in CLI tool.