Skip to content

Commit 87496b2

Browse files
jongallowaybartonjsjamesmontemagnotannergooding
authored
Update libraries for RC 1 (#10055)
* Update libraries for RC 1 * Fix libraries: replace TBD with content * Add PQC notes * Fix trailing whitespace * Update release-notes/10.0/preview/rc1/libraries.md Co-authored-by: Tanner Gooding <[email protected]> * updates * update link * updates --------- Co-authored-by: Jeremy Barton <[email protected]> Co-authored-by: James Montemagno <[email protected]> Co-authored-by: Tanner Gooding <[email protected]>
1 parent 144498d commit 87496b2

File tree

1 file changed

+69
-2
lines changed

1 file changed

+69
-2
lines changed

release-notes/10.0/preview/rc1/libraries.md

Lines changed: 69 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,73 @@
33
The following .NET 10 RC 1 release notes describe new features and changes in
44
this release.
55

6-
## What's new features
6+
- [Cryptography: ML-DSA External Mu](#cryptography-ml-dsa-external-mu)
7+
- [Cryptography: Post Quantum Cryptography "API Complete"](#cryptography-post-quantum-cryptography-api-complete)
8+
- [UTF-8 Support for hex-string conversion](#utf-8-support-for-hex-string-conversion)
9+
- [Tensor, TensorSpan, and ReadOnlyTensorSpan](#tensor-tensorspan-and-readonlytensorspan)
710

8-
TBD
11+
.NET Libraries updates in .NET 10:
12+
13+
- [What's new in .NET 10](https://learn.microsoft.com/dotnet/core/whats-new/dotnet-10/overview) documentation
14+
15+
## Cryptography: ML-DSA External Mu
16+
17+
The ML-DSA class now allows signatures to be created and verified from an "external" mu (&#x3BC;) value.
18+
19+
```csharp
20+
namespace System.Security.Cryptography;
21+
22+
public partial class MLDsa
23+
{
24+
public byte[] SignMu(byte[] externalMu);
25+
public void SignMu(ReadOnlySpan<byte> externalMu, Span<byte> destination);
26+
public byte[] SignMu(ReadOnlySpan<byte> externalMu);
27+
28+
public bool VerifyMu(byte[] externalMu, byte[] signature);
29+
public bool VerifyMu(ReadOnlySpan<byte> externalMu, ReadOnlySpan<byte> signature);
30+
31+
protected abstract void SignMuCore(ReadOnlySpan<byte> externalMu, Span<byte> destination);
32+
protected abstract bool VerifyMuCore(ReadOnlySpan<byte> externalMu, ReadOnlySpan<byte> signature);
33+
}
34+
```
35+
36+
External mu signatures require platform support. If, as more providers come online, we find that the provider support is fragmented, we may find it useful to add a capability API (e.g. `public bool SupportsMu { get; }`). But, for now, we are presenting it as a universally available feature.
37+
38+
## Cryptography: Post Quantum Cryptography "API Complete"
39+
40+
The `MLDsa`, `MLKem`, `SlhDsa`, and `CompositeMLDsa` types (and their associated -Algorithm types) have all been through the API Review process,
41+
compared against each other for local consistency, and had all of the members declared for the RC1 release -- both for the .NET 10 built-in versions and for the downlevel compatibility versions in Microsoft.Bcl.Cryptography.
42+
43+
The `MLKem` type is no longer marked as `[Experimental]`, but a handful of methods on it still are, because they are based on standards that haven't hit final version/publication. We expect to similarly move `[Experimental]` from the `MLDsa` type down to a handful of its members for the stable release of .NET 10. The `SlhDsa` and `CompositeMLDsa` classes, however, will retain their `[Experimental]` decoration.
44+
45+
While we have no active plans to introduce breaking changes beyond the stable release of .NET 10, the `[Experimental]` attribute is indicating areas where specifications are not complete or we are still waiting on features in our underlying platform libraries.
46+
47+
## UTF-8 Support for hex-string conversion
48+
49+
The `System.Convert` class exposes additional overloads which provide support for converting a buffer of UTF-8 text to the corresponding bytes and vice-versa. These mirror the existing overloads taking `string` and `ReadOnlySpan<char>`:
50+
51+
```csharp
52+
namespace System;
53+
54+
public static class Convert
55+
{
56+
public static System.Buffers.OperationStatus FromHexString(ReadOnlySpan<byte> utf8Source, Span<byte> destination, out int bytesConsumed, out int bytesWritten);
57+
public static byte[] FromHexString(ReadOnlySpan<byte> utf8Source);
58+
public static bool TryToHexString(ReadOnlySpan<byte> source, Span<byte> utf8Destination, out int bytesWritten);
59+
public static bool TryToHexStringLower(ReadOnlySpan<byte> source, Span<byte> utf8Destination, out int bytesWritten);
60+
}
61+
```
62+
63+
## Tensor, TensorSpan, and ReadOnlyTensorSpan
64+
65+
We initially previewed the new tensor APIs as part of .NET 9 (see [here](https://github.com/dotnet/core/blob/main/release-notes/9.0/preview/preview5/libraries.md#enhanced-ai-capabilities-with-tensorprimitives-and-tensort)) and are now shipping these APIs as stable in .NET 10
66+
67+
The API surface remains "out of box" and requires referencing the [System.Numerics.Tensors](https://www.nuget.org/packages/System.Numerics.Tensors) NuGet package to be available.
68+
69+
While the overall API surface remains similar to that previewed in .NET 9, several binary breaking changes were made to the types that were annotated with the `[Experimental]` attribute based on feedback from the community and general user experience problems that were identified.
70+
71+
The types are taking advantage of the new C# 14 extension operators feature so that arithmetic operations are available if the underlying `T` in a `Tensor<T>` itself supports the given operation. Support is identified by the `T` implementing the relevant [Generic Math](https://learn.microsoft.com/en-us/dotnet/standard/generics/math) interfaces, such as `IAdditionOperators<TSelf, TOther, TResult>` or `INumber<TSelf>`. For example, `tensor + tensor` is available for a `Tensor<int>`, but is not available for a `Tensor<bool>`.
72+
73+
## API Diff
74+
75+
The full diff for the "in box" .NET Libraries APIs between .NET 10 Preview 7 and .NET 10 RC1 can be found [here](https://github.com/dotnet/core/blob/main/release-notes/10.0/preview/rc1/api-diff/Microsoft.NETCore.App/10.0-rc1.md).

0 commit comments

Comments
 (0)