Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: rust key derivation #1063

Merged
merged 113 commits into from
Nov 13, 2024
Merged

feat: rust key derivation #1063

merged 113 commits into from
Nov 13, 2024

Conversation

bkioshn
Copy link
Contributor

@bkioshn bkioshn commented Oct 29, 2024

Description

Implement Cardano key derivation using BIP39 mnemonic
The logic is written in Rust and expose to Flutter using the help of flutter_rust_bridge

Related Issue(s)

#1012 #1094

Description of Changes

Main functions

  1. Given mnemonic and passphrase, generate an extended private key
  2. Given extended private key and derivation path, derive a new extended private key
  3. Given extended private key, derive the extended public key
  4. Given extended private key, and data, sign the data to produce signature
  5. Given extended private key, data, signature, verify the signature
  6. Given extended public key, data, signature, verify the signature
  7. dropping the extended private key (zeroing)
  • Thread pool handling is included
  • Simple return type eg. [u8; 96] is used so frontend can handle easily

Other

  • simple.rs is removed
  • Auto generated file for rust (frb_generated.rs) is ignored

Please confirm the following checks

  • My code follows the style guidelines of this project
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream module

@bkioshn bkioshn marked this pull request as draft October 29, 2024 12:37
Copy link
Contributor

github-actions bot commented Oct 29, 2024

Test Report | ${\color{lightgreen}Pass: 320/320}$ | ${\color{red}Fail: 0/320}$ |

@bkioshn bkioshn self-assigned this Oct 30, 2024
@bkioshn bkioshn added the enhancement New feature or request label Oct 30, 2024
@bkioshn bkioshn marked this pull request as ready for review October 30, 2024 09:50
@bkioshn bkioshn requested a review from dtscalac October 30, 2024 09:50
@bkioshn bkioshn added this to the M4: Voting & Delegation milestone Oct 30, 2024
Signed-off-by: bkioshn <[email protected]>
Copy link
Contributor

github-actions bot commented Nov 6, 2024

Test Report | ${\color{lightgreen}Pass: 320/320}$ | ${\color{red}Fail: 0/320}$ |

Copy link
Contributor

github-actions bot commented Nov 7, 2024

Test Report | ${\color{lightgreen}Pass: 320/320}$ | ${\color{red}Fail: 0/320}$ |

Copy link
Contributor

Test Report | ${\color{lightgreen}Pass: 320/320}$ | ${\color{red}Fail: 0/320}$ |

Copy link
Contributor

Test Report | ${\color{lightgreen}Pass: 320/320}$ | ${\color{red}Fail: 0/320}$ |

Copy link
Contributor

Test Report | ${\color{lightgreen}Pass: 320/320}$ | ${\color{red}Fail: 0/320}$ |

Copy link
Contributor

Test Report | ${\color{lightgreen}Pass: 320/320}$ | ${\color{red}Fail: 0/320}$ |

@bkioshn bkioshn requested a review from Mr-Leshiy November 11, 2024 08:55
Copy link
Contributor

Test Report | ${\color{lightgreen}Pass: 320/320}$ | ${\color{red}Fail: 0/320}$ |

Copy link
Contributor

Test Report | ${\color{lightgreen}Pass: 320/320}$ | ${\color{red}Fail: 0/320}$ |

Copy link
Contributor

@Mr-Leshiy Mr-Leshiy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@minikin minikin enabled auto-merge (squash) November 13, 2024 10:15
@minikin minikin requested review from Mr-Leshiy and removed request for FelipeRosa November 13, 2024 10:15
Copy link
Contributor

Test Report | ${\color{lightgreen}Pass: 320/320}$ | ${\color{red}Fail: 0/320}$ |

@minikin minikin disabled auto-merge November 13, 2024 11:01
@minikin minikin merged commit 0712347 into main Nov 13, 2024
37 checks passed
@minikin minikin deleted the feat/rust-key-derivation branch November 13, 2024 11:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request review me PR is ready for review
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

7 participants