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

[WIP] Slip32 #436

Closed
wants to merge 2 commits into from
Closed

[WIP] Slip32 #436

wants to merge 2 commits into from

Conversation

anler
Copy link
Contributor

@anler anler commented Mar 3, 2019

Export/import keys to Slip32 format.

I'm stuck in: see TODO comment in wallet/src/slip32.rs file


// 33 bytes for key
//
// TODO: Find a way to get access to secp256k1::SecretKey bytes,
Copy link
Member

Choose a reason for hiding this comment

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

In rust-bitcoin/rust-secp256k1#75 (comment) they answer how to get the bytes out from a secret key.

You should be able to use [..] to get the bytes out of a secret key no problem. See, eg, this line in rust-lightning: https://github.com/rust-bitcoin/rust-lightning/blob/master/src/ln/chan_utils.rs#L80

@@ -6,5 +6,11 @@ version = "0.1.0"
workspace = ".."

[dependencies]
bip39 = "*"
bip39 = "0.6.0-beta.1"
failure = "*"
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
failure = "*"
failure = "0.1.5"

bip39 = "*"
bip39 = "0.6.0-beta.1"
failure = "*"
hmac = "*"
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
hmac = "*"
hmac = "0.7.0"

bip39 = "0.6.0-beta.1"
failure = "*"
hmac = "*"
secp256k1 = "*"
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
secp256k1 = "*"
secp256k1 = "0.12.2"

failure = "*"
hmac = "*"
secp256k1 = "*"
sha2 = "*"
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
sha2 = "*"
sha2 = "0.8.0"

hmac = "*"
secp256k1 = "*"
sha2 = "*"
bech32 = "*"
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
bech32 = "*"
bech32 = "0.6.0"

tiny-hderive = "*"
endianrw = "*"
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
endianrw = "*"
endianrw = "0.2.2"

hmac = "*"
secp256k1 = "*"
sha2 = "*"
bech32 = "*"
tiny-hderive = "*"
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
tiny-hderive = "*"
tiny-hderive = "0.1.0"


/// Use the given key as the HMAC key
pub fn with_key(mut self, key: &'a str) -> Self {
self.key = key;
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
self.key = key;
self.key = key;

@lrubiorod
Copy link
Contributor

It is included in #432

@lrubiorod lrubiorod closed this Mar 15, 2019
@anler anler deleted the slip32 branch March 21, 2019 13:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants