Skip to content

Conversation

scott-xu
Copy link
Collaborator

@scott-xu scott-xu commented Sep 22, 2025

Beginning in Windows 10, CNG provides support for Curve25519.
See https://learn.microsoft.com/en-us/windows/win32/seccng/cng-named-elliptic-curves

@scott-xu scott-xu changed the title Use BCL Curve25519 when possible Use BCL Curve25519 for windows 10+ Sep 22, 2025
@scott-xu scott-xu changed the title Use BCL Curve25519 for windows 10+ Use BCL Curve25519 for Windows 10+ Sep 22, 2025
@scott-xu scott-xu marked this pull request as ready for review September 22, 2025 12:36
@scott-xu scott-xu marked this pull request as draft September 22, 2025 13:07
@scott-xu scott-xu marked this pull request as ready for review September 22, 2025 13:58
@scott-xu scott-xu marked this pull request as draft September 22, 2025 14:06
@scott-xu scott-xu marked this pull request as ready for review September 23, 2025 11:51
Copy link
Collaborator

@Rob-Hague Rob-Hague left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm otherwise

internal abstract partial class KeyExchangeEC
{
private sealed class BclImpl : Impl
protected internal sealed class BclImpl : Impl
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit, here and elsewhere

Suggested change
protected internal sealed class BclImpl : Impl
protected sealed class BclImpl : Impl

{
base.Start(session, message, sendClientInitMessage);
#if NET
if (System.OperatingSystem.IsWindowsVersionAtLeast(10))
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is it all versions of windows 10?

{
private readonly ECDomainParameters _domainParameters;
private readonly ECDHCBasicAgreement _keyAgreement;
private readonly ECDHBasicAgreement _keyAgreement;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what does this change do?

@Rob-Hague
Copy link
Collaborator

Rob-Hague commented Sep 26, 2025

actually, it is not working on my win10 22H2 machine (connected aborted). develop branch works fine, using curve25519-sha256

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants