Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.