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.
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.