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

Expanded secret key #12

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open

Conversation

greg-szabo
Copy link

Initial stab at the expanded secret key feature. This is an extreme solution where the seed key is always hashed into an expanded secret key. The seed key is not stored, so it is straightforward when we want to serialize/deserialize.

If we kept the seed key, we would need to decide how we deserialize bytes into a SigningKey, because the
serialization does not keep the key size. So, deserialization has to know it upfront. (The expanded secret key is 64 bytes.) I had half an implementation for that, too, but there are so many assumptions that I want to confirm with you if keeping the seed key is crucial for you.

Furthermore, I had to rewrite the SerdeHelper into regular serialization/deserialization, because Serde can not automatically serialize byte arrays bigger than 32 bytes. While reviewing the PR, I noticed that this required the std::fmt library. I'm unfamiliar with no_std, but if this violates that paradigm, I'll keep working on it. I'd appreciate your advice there.

The tests will immediately show the difference. The unit tests show that the SigningKey is a 64-byte key, and the RFC tests show that the original seed keys can also be used to create a SigningKey.

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.

1 participant