crypto: decouple curve25519 and idgen from random pool#18679
Merged
xiaoxiang781216 merged 1 commit intoapache:masterfrom Apr 7, 2026
Merged
crypto: decouple curve25519 and idgen from random pool#18679xiaoxiang781216 merged 1 commit intoapache:masterfrom
xiaoxiang781216 merged 1 commit intoapache:masterfrom
Conversation
This commit modularizes the curve25519 and idgen implementations in the crypto subsystem. Previously, curve25519.c and idgen.c were only compiled when CONFIG_CRYPTO_RANDOM_POOL was enabled. However, cryptosoft.c (used by software cipher support) has a direct dependency on curve25519 functions. This caused linker errors (undefined reference to curve25519) when software crypto was enabled but the random pool was disabled. Changes: - Introduce hidden Kconfig options CRYPTO_CURVE25519 and CRYPTO_IDGEN. - Make CRYPTO_RANDOM_POOL select both CRYPTO_IDGEN and CRYPTO_CURVE25519. - Make CRYPTO_CRYPTODEV_SOFTWARE_CRYPTO/KEYMGMT select CRYPTO_CURVE25519. - Update CMakeLists.txt and Makefile to use the new config flags. This ensures that required algorithms are automatically included in the build regardless of whether the entropy pool is enabled. Signed-off-by: karaketir16 <osmankaraketir@gmail.com>
acassis
approved these changes
Apr 6, 2026
Contributor
acassis
left a comment
There was a problem hiding this comment.
@karaketir16 thank you very much! Welcome aboard!
xiaoxiang781216
approved these changes
Apr 6, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This commit modularizes the curve25519 and idgen implementations in the crypto subsystem.
Previously, curve25519.c and idgen.c were only compiled when CONFIG_CRYPTO_RANDOM_POOL was enabled. However, cryptosoft.c (used by software cipher support) has a direct dependency on curve25519 functions. This caused linker errors (undefined reference to curve25519) when software crypto was enabled but the random pool was disabled.
Changes:
This ensures that required algorithms are automatically included in the build regardless of whether the entropy pool is enabled.