Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AEAD AES-256 GCM is reported as not available on Ryzen 9 CPU #4

Open
kcrg opened this issue Dec 17, 2024 · 0 comments
Open

AEAD AES-256 GCM is reported as not available on Ryzen 9 CPU #4

kcrg opened this issue Dec 17, 2024 · 0 comments

Comments

@kcrg
Copy link

kcrg commented Dec 17, 2024

Hi,

I’m encountering a problem where crypto_aead_aes256gcm_is_available() always returns 0 when using DSharpPlus.Natives.Sodium on a Ryzen 9 5900X machine. This results in the exception message:

The current hardware is not compatible with AEAD AES-256 GCM, a requirement for VoiceNext support.

However, Ryzen 9 CPUs definitely support AES-NI instructions, so hardware incompatibility shouldn’t be the issue.

Steps to Reproduce:

  1. Use DSharpPlus.VoiceNext in a .NET project with the DSharpPlus.Natives.Sodium package.
  2. Run the Discord bot on a system with a Ryzen 9 CPU (e.g., 5900X).
  3. Observe the bot immediately crash on startup with the above exception.

Expected Behavior:

  • AES-256 GCM should be detected as supported on Ryzen 9 hardware, allowing VoiceNext to initialize successfully.

Actual Behavior:

  • crypto_aead_aes256gcm_is_available() indicates AES is not supported, causing VoiceNext initialization to fail.

Workaround:

  • Switching to the official libsodium NuGet package resolves the issue, confirming that the hardware is actually compatible and that the error occurs only when using DSharpPlus.Natives.Sodium.

Possible Cause:

  • The libsodium native binary in DSharpPlus.Natives.Sodium may be compiled without AES-GCM support or could be targeting an unexpected architecture.

Environment:

  • CPU: AMD Ryzen 9 5900X
  • .NET Version: 9
  • DSharpPlus: Latest version
  • OS: Windows 11 x64 (and possibly others)

Thank you!

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

No branches or pull requests

1 participant