-
Notifications
You must be signed in to change notification settings - Fork 5.1k
Open
Labels
api-ready-for-reviewAPI is ready for review, it is NOT ready for implementationAPI is ready for review, it is NOT ready for implementationarea-System.Security
Milestone
Description
Background and motivation
This is an amendment to the previously approved API review #116282 for SLH-DSA.
In the #117911 API review we renamed "secret key" to "private key" because the FIPS publication uses private key in its external names and glossary terms. FIPS 205 does the same thing, where "private key" is used significantly more than "secret key".
We should consider renaming SLH-DSA's secret key members to private key.
API Proposal
namespace System.Security.Cryptogrpahy
{
public abstract class SlhDsa : IDisposable
{
- public static SlhDsa ImportSlhDsaSecretKey(SlhDsaAlgorithm algorithm, byte[] source);
+ public static SlhDsa ImportSlhDsaPrivateKey(SlhDsaAlgorithm algorithm, byte[] source);
- public static SlhDsa ImportSlhDsaSecretKey(SlhDsaAlgorithm algorithm, ReadOnlySpan<byte> source);
+ public static SlhDsa ImportSlhDsaPrivateKey(SlhDsaAlgorithm algorithm, ReadOnlySpan<byte> source);
- public byte[] ExportSlhDsaSecretKey();
+ public byte[] ExportSlhDsaPrivateKey();
- public void ExportSlhDsaSecretKey(Span<byte> destination);
+ public void ExportSlhDsaPrivateKey(Span<byte> destination);
- protected abstract void ExportSlhDsaSecretKeyCore(Span<byte> destination);
+ protected abstract void ExportSlhDsaPrivateKeyCore(Span<byte> destination);
}
public sealed class SlhDsaAlgorithm
{
- public int SecretKeySizeInBytes { get; }
+ public int PrivateKeySizeInBytes { get; }
}
API Usage
Same usage, just with different names.
Alternative Designs
No response
Risks
Breaking change in the 10.0 cycle, but these have the Experimental attribute on the classes.
Metadata
Metadata
Assignees
Labels
api-ready-for-reviewAPI is ready for review, it is NOT ready for implementationAPI is ready for review, it is NOT ready for implementationarea-System.Security