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

No way to serialize or restore a key pair? #11

Open
adamierymenko opened this issue Apr 16, 2023 · 1 comment
Open

No way to serialize or restore a key pair? #11

adamierymenko opened this issue Apr 16, 2023 · 1 comment

Comments

@adamierymenko
Copy link

It looks like there's no way to save/restore a Keypair. I guess this is nowhere even near production ready right?

@ghost
Copy link

ghost commented Jun 1, 2023

it's pretty simple to implement your own restoration function. here's an example of how you can do so:

// src/api.rs

impl Keypair {
  // -- snip --
  pub fn restore(pub_bytes: Vec<u8>, sec_bytes: Vec<u8>) -> Self {
    Self {
      public: pub_bytes.try_into().unwrap(),
      secret: sec_bytes.try_into().unwrap(),
    }
  }
}

though, it would be really useful if this was included by default (and honestly i'm confused as to why it's not).

kibernetikos pushed a commit to kibernetikos/dilithium that referenced this issue Jan 2, 2024
kibernetikos pushed a commit to kibernetikos/dilithium that referenced this issue Jan 2, 2024
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

No branches or pull requests

1 participant