Currently we have only a concrete type to represent signing keys: PrivateKey. It assumes every signing key has its private part on memory, so Libplanet is difficult to utilize other signing facilities besides software-implemented ones. For example, transactions and blocks cannot be signed using secure enclaves.
In order to let various signing facilities integrate with Libplanet, we need to an abstraction layer in the middle. For example, it could look like this:
public interface ISignKey
{
PublicKey PublicKey { get; }
ImmutableArray<byte> Sign(ReadOnlySpan<byte> message);
}
public class PrivateKey : ISignKey
{
// ...
}
It might be able to replace ICryptoBackend<T> as well.
Currently we have only a concrete type to represent signing keys:
PrivateKey
. It assumes every signing key has its private part on memory, so Libplanet is difficult to utilize other signing facilities besides software-implemented ones. For example, transactions and blocks cannot be signed using secure enclaves.In order to let various signing facilities integrate with Libplanet, we need to an abstraction layer in the middle. For example, it could look like this:
It might be able to replace
ICryptoBackend<T>
as well.