public TemporaryExposureKeySignServiceDebug(IConfiguration config) { Key = System.Security.Cryptography.ECDsaCng.Create(ECCurve.NamedCurves.nistP256); PublicKey = Key.ExportSubjectPublicKeyInfo(); }
// Do not wrap ExportPkcs8PrivateKey, let it fall back to reconstructing it from parameters // so that the ECDsa.Create()-returned object uses the same set of attributes on all platforms. // (CNG adds the key usage attribute to distinguish ECDSA from ECDH) //public override byte[] ExportPkcs8PrivateKey() => _wrapped.ExportPkcs8PrivateKey(); public override byte[] ExportSubjectPublicKeyInfo() => _wrapped.ExportSubjectPublicKeyInfo();