Skip to content
This repository has been archived by the owner on Dec 19, 2020. It is now read-only.

Wrong key generation from mnemonic #249

Closed
mrlp4 opened this issue Sep 3, 2019 · 39 comments · Fixed by #262
Closed

Wrong key generation from mnemonic #249

mrlp4 opened this issue Sep 3, 2019 · 39 comments · Fixed by #262
Assignees
Labels
error Something isn't working as intended

Comments

@mrlp4
Copy link
Member

mrlp4 commented Sep 3, 2019

Hi!

Key's being generated in wrong manner then in cyberd chain. Wrong derivation path from bip39 mnemonics.

Current Behavior

comment: # During browser startup trying to import seed phrase: example [toast theory cotton entire index anger side topple tourist raven arrange galaxy interest tornado excuse tiny obvious run husband define trash news logic rent]

  • getting key cyber1ma9cq8x3p7q8jrjsrqnpjn2n9wd2lf4u479r7w

Expected Behavior

comment: # Expected to get key cyber1s22z8fy4ygz56ddd9elxfgpp7snlulnfxgupl8

Reproduction

comment: # - generate new key through cyberd cli

  • start browser from scratch
  • paste key mnemonic to import window
  • get different key than in step 1

Solution

comment: # Correct the way key is being derived from mnemonic seed phrase
Summary:

Definition of Done

comment: # Keys generated from same mnemonic seed phrase is same in cyb and in cyberd

Additional Information

@mrlp4 mrlp4 added the error Something isn't working as intended label Sep 3, 2019
@gitcoinbot
Copy link

Issue Status: 1. Open 2. Started 3. Submitted 4. Done


This issue now has a funding of 0.3 ETH (65.79 USD @ $219.29/ETH) attached to it.

@gitcoinbot
Copy link

@sebastiantf Hello from Gitcoin Core - are you still working on this issue? Please submit a WIP PR or comment back within the next 3 days or you will be removed from this ticket and it will be returned to an ‘Open’ status. Please let us know if you have questions!

  • reminder (3 days)
  • escalation to mods (6 days)

Funders only: Snooze warnings for 1 day | 3 days | 5 days | 10 days | 100 days

@sebastiantf
Copy link

sebastiantf commented Sep 24, 2019

@sebastiantf Hello from Gitcoin Core - are you still working on this issue? Please submit a WIP PR or comment back within the next 3 days or you will be removed from this ticket and it will be returned to an ‘Open’ status. Please let us know if you have questions!

  • reminder (3 days)
  • escalation to mods (6 days)

Funders only: Snooze warnings for 1 day | 3 days | 5 days | 10 days | 100 days

Yes I am still working on this issue. I am trying to get to know the codebase a little more.

The Getting Started links in the README returns a 404

Edit: Is this comment enough to prevent being removed from this issue?

@sebastiantf
Copy link

sebastiantf commented Sep 24, 2019

Are the following insights correct:

cyberd cli uses: github.com/cosmos/go-bip39
cyb app uses: github.com/bitcoinjs/bip39

Might there be differences in how both of these libs implement bip39?

@sebastiantf
Copy link

@mrlp4 Can you please verify my findings above so that I could proceed with my work.

@mrlp4
Copy link
Member Author

mrlp4 commented Sep 27, 2019

We need @xhipster to reply to you, @sebastiantf.

@sebastiantf
Copy link

Ok. Waiting for his response.

@mastercyb
Copy link
Member

mastercyb commented Sep 27, 2019

@sebastiantf sorry for late reply.

Might there be differences in how both of these libs implement bip39?

Might be not. The only thing which need specification is a dereviation path. Our path would match cosmos path with different prefix: cyber

@gitcoinbot
Copy link

@sebastiantf Hello from Gitcoin Core - are you still working on this issue? Please submit a WIP PR or comment back within the next 3 days or you will be removed from this ticket and it will be returned to an ‘Open’ status. Please let us know if you have questions!

  • reminder (3 days)
  • escalation to mods (6 days)

Funders only: Snooze warnings for 1 day | 3 days | 5 days | 10 days | 100 days

@sebastiantf
Copy link

sebastiantf commented Sep 30, 2019

Yes I am still working on this issue

@xhipster Can you please specify where and how the derivation path is being specified in cyberd cli using cosmos. I couldn't find it specified in that repo.

I found the derivation path 44'/118'/0'/0/0 specified in cyb

@sebastiantf
Copy link

Also, why does prefix.go in cyberd cli specifies:

  • AccountAddressPrefix
  • AccountPubKeyPrefix
  • ValidatorAddressPrefix
  • ValidatorPubKeyPrefix
  • ConsNodeAddressPrefix
  • ConsNodePubKeyPrefix

while constants.js in cyb only specifies:

  • PREFIX_BECH32_ACCADDR
  • PREFIX_BECH32_ACCPUB

Aren't the Validator and ConNode Prefixes required/used in cyb?

@gitcoinbot
Copy link

@sebastiantf Hello from Gitcoin Core - are you still working on this issue? Please submit a WIP PR or comment back within the next 3 days or you will be removed from this ticket and it will be returned to an ‘Open’ status. Please let us know if you have questions!

  • reminder (3 days)
  • escalation to mods (6 days)

Funders only: Snooze warnings for 1 day | 3 days | 5 days | 10 days | 100 days

@sebastiantf
Copy link

I'm having some hard time triaging the bug and I haven't received reply comments that could guide me

@gitcoinbot
Copy link

@sebastiantf Hello from Gitcoin Core - are you still working on this issue? Please submit a WIP PR or comment back within the next 3 days or you will be removed from this ticket and it will be returned to an ‘Open’ status. Please let us know if you have questions!

  • reminder (3 days)
  • escalation to mods (6 days)

Funders only: Snooze warnings for 1 day | 3 days | 5 days | 10 days | 100 days

@sebastiantf
Copy link

I havent been able to triage whats going wrong yet

@sebastiantf
Copy link

I have stopped the work on this bounty as I haven't been able to discover whats going wrong and the time limit is closing down

@gitcoinbot
Copy link

Issue Status: 1. Open 2. Started 3. Submitted 4. Done


Workers have applied to start work.

These users each claimed they can complete the work by 2 weeks, 2 days ago.
Please review their action plans below:

1) igetgames has applied to start work (Funders only: approve worker | reject worker).

I believe I can solve this issue quickly.
2) josh-kean has applied to start work (Funders only: approve worker | reject worker).

I will review all the text content of the mnemonic phrase and then follow the process that the phrase is hashed through. I've built my own implementation of BIP-39 and am familiar with issues that can arrive when dealing with entropy.

Learn more on the Gitcoin Issue Details page.

@gitcoinbot
Copy link

@igetgames Hello from Gitcoin Core - are you still working on this issue? Please submit a WIP PR or comment back within the next 3 days or you will be removed from this ticket and it will be returned to an ‘Open’ status. Please let us know if you have questions!

  • reminder (3 days)
  • escalation to mods (6 days)

Funders only: Snooze warnings for 1 day | 3 days | 5 days | 10 days | 100 days

7 similar comments
@gitcoinbot
Copy link

@igetgames Hello from Gitcoin Core - are you still working on this issue? Please submit a WIP PR or comment back within the next 3 days or you will be removed from this ticket and it will be returned to an ‘Open’ status. Please let us know if you have questions!

  • reminder (3 days)
  • escalation to mods (6 days)

Funders only: Snooze warnings for 1 day | 3 days | 5 days | 10 days | 100 days

@gitcoinbot
Copy link

@igetgames Hello from Gitcoin Core - are you still working on this issue? Please submit a WIP PR or comment back within the next 3 days or you will be removed from this ticket and it will be returned to an ‘Open’ status. Please let us know if you have questions!

  • reminder (3 days)
  • escalation to mods (6 days)

Funders only: Snooze warnings for 1 day | 3 days | 5 days | 10 days | 100 days

@gitcoinbot
Copy link

@igetgames Hello from Gitcoin Core - are you still working on this issue? Please submit a WIP PR or comment back within the next 3 days or you will be removed from this ticket and it will be returned to an ‘Open’ status. Please let us know if you have questions!

  • reminder (3 days)
  • escalation to mods (6 days)

Funders only: Snooze warnings for 1 day | 3 days | 5 days | 10 days | 100 days

@gitcoinbot
Copy link

@igetgames Hello from Gitcoin Core - are you still working on this issue? Please submit a WIP PR or comment back within the next 3 days or you will be removed from this ticket and it will be returned to an ‘Open’ status. Please let us know if you have questions!

  • reminder (3 days)
  • escalation to mods (6 days)

Funders only: Snooze warnings for 1 day | 3 days | 5 days | 10 days | 100 days

@gitcoinbot
Copy link

@igetgames Hello from Gitcoin Core - are you still working on this issue? Please submit a WIP PR or comment back within the next 3 days or you will be removed from this ticket and it will be returned to an ‘Open’ status. Please let us know if you have questions!

  • reminder (3 days)
  • escalation to mods (6 days)

Funders only: Snooze warnings for 1 day | 3 days | 5 days | 10 days | 100 days

@gitcoinbot
Copy link

@igetgames Hello from Gitcoin Core - are you still working on this issue? Please submit a WIP PR or comment back within the next 3 days or you will be removed from this ticket and it will be returned to an ‘Open’ status. Please let us know if you have questions!

  • reminder (3 days)
  • escalation to mods (6 days)

Funders only: Snooze warnings for 1 day | 3 days | 5 days | 10 days | 100 days

@gitcoinbot
Copy link

gitcoinbot commented Nov 20, 2019

@igetgames Hello from Gitcoin Core - are you still working on this issue? Please submit a WIP PR or comment back within the next 3 days or you will be removed from this ticket and it will be returned to an ‘Open’ status. Please let us know if you have questions!

  • reminder (3 days)
  • escalation to mods (6 days)

Funders only: Snooze warnings for 1 day | 3 days | 5 days | 10 days | 100 days

@gitcoinbot
Copy link

@igetgames Hello from Gitcoin Core - are you still working on this issue? Please submit a WIP PR or comment back within the next 3 days or you will be removed from this ticket and it will be returned to an ‘Open’ status. Please let us know if you have questions!

  • reminder (3 days)
  • escalation to mods (6 days)

Funders only: Snooze warnings for 1 day | 3 days | 5 days | 10 days | 100 days

@gitcoinbot
Copy link

Issue Status: 1. Open 2. Started 3. Submitted 4. Done


This issue now has a funding of 1.25 ETH (197.25 USD @ $157.8/ETH) attached to it as part of the https://github.com/cybercongress fund.

@gitcoinbot
Copy link

gitcoinbot commented Nov 22, 2019

Issue Status: 1. Open 2. Started 3. Submitted 4. Done


Work has been started.

These users each claimed they can complete the work by 1 week, 6 days from now.
Please review their action plans below:

1) mul53 has been approved to start work.

Hi there, really interested in solving this problem

Learn more on the Gitcoin Issue Details page.

@PumpkingWok
Copy link

Hi there,
If i can ask it, what is the motivation that bring you to accept the second interest propose ?
Just to know if i was wrong in my application, but i don't see something strange.
Thanks in advance.

@serejandmyself
Copy link
Member

@PumpkingWok hey! By no means your application was wrong. Actually I contacted @janus myself a day before this and discussed the issue with him prior to all other applicants.

I will be opening and funding more issues as soon as this one is solved. Please bare with us. Thanks!

@PumpkingWok
Copy link

Hi @serejandmyself,
Thanks for the reply, no worries, just to know.
Just to say, the next time you should create a bounty reserved and not open to everyone, if you already know who you want to do work on this.
Enjoy your project !!!

@janus
Copy link

janus commented Nov 23, 2019

@PumpkingWok ,
It is okay. Let's work together then and split the money 50-50. This is a bug and it is intellectually challenging. So, come let's reason it together. Shoot a mail to me, my email is in my profile.

@gitcoinbot
Copy link

Issue Status: 1. Open 2. Cancelled


The funding of 0.3 ETH (40.61 USD @ $135.38/ETH) attached to this issue has been cancelled by the bounty submitter

@gitcoinbot
Copy link

Issue Status: 1. Open 2. Started 3. Submitted 4. Done


Work for 1.25 ETH (169.23 USD @ $135.38/ETH) has been submitted by:

  1. @mul53

@serejandmyself please take a look at the submitted work:


@PumpkingWok
Copy link

It is like a Far West, eh eh eh !!!

@janus
Copy link

janus commented Nov 25, 2019

@mul53
Congrats ... .
I spent time rebuilding the whole log ...go and javascript. I found that they were correct and sound. I was to check the front end.

@mastercyb
Copy link
Member

Looks like it works for me :-)

@janus
Copy link

janus commented Nov 25, 2019

Looks like it works for me :-)

It should work ... I have done detailed analysis of the back end javascript and go .. they all produced same result. ... I created codes for them too. So, I told the funder this early morning that the issue is front end .. the mnemonic was a bit twisted. ...

@gitcoinbot
Copy link

Issue Status: 1. Open 2. Started 3. Submitted 4. Done


The funding of 1.25 ETH (182.67 USD @ $146.14/ETH) attached to this issue has been approved & issued to @mul53.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
error Something isn't working as intended
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants