mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH 0/5] public_keys: make const
@ 2025-10-20 11:30 Sascha Hauer
  2025-10-20 11:30 ` [PATCH 1/5] public-keys: ecdsa: remove list in ecdsa keys Sascha Hauer
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: Sascha Hauer @ 2025-10-20 11:30 UTC (permalink / raw)
  To: BAREBOX

We current have a struct list_head member in struct public_key which
prevents them from being put into the readonly data section.
Move the list_head out of struct public_key so we can make the compiled in
keys const. With this we can do some further cleanup by removing the key
duplication functions.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
Sascha Hauer (5):
      public-keys: ecdsa: remove list in ecdsa keys
      public-keys: move list out of struct public_key
      public-keys: rsa: allow struct public_key to be const
      public-keys: rsa: remove unused functions
      public-keys: make const

 commands/keys.c             |  3 ++-
 common/image-fit.c          |  4 +--
 crypto/Kconfig              |  1 +
 crypto/ecdsa.c              | 18 -------------
 crypto/public-keys.c        | 61 ++++++---------------------------------------
 crypto/rsa.c                | 33 ++++++++----------------
 include/crypto/ecdsa.h      | 12 ---------
 include/crypto/public_key.h | 16 ++++++------
 include/crypto/rsa.h        | 12 ++-------
 scripts/keytoc.c            |  8 +++---
 10 files changed, 37 insertions(+), 131 deletions(-)
---
base-commit: e8bf031f85acbd792e489c8f4ecbcb770dda16ef
change-id: 20251020-public-keys-const-cf2a3007e0a6

Best regards,
-- 
Sascha Hauer <s.hauer@pengutronix.de>




^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH 1/5] public-keys: ecdsa: remove list in ecdsa keys
  2025-10-20 11:30 [PATCH 0/5] public_keys: make const Sascha Hauer
@ 2025-10-20 11:30 ` Sascha Hauer
  2025-10-20 11:30 ` [PATCH 2/5] public-keys: move list out of struct public_key Sascha Hauer
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: Sascha Hauer @ 2025-10-20 11:30 UTC (permalink / raw)
  To: BAREBOX

We have a function to iterate over ecdsa keys. This is unused and
shouldn't be necessary as we have a function to iterate over public
keys. Remove the iterator and the list entry which gives us the
possibility to put ecdsa keys into the RO data section.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
 crypto/ecdsa.c         | 18 ------------------
 include/crypto/ecdsa.h | 12 ------------
 2 files changed, 30 deletions(-)

diff --git a/crypto/ecdsa.c b/crypto/ecdsa.c
index 69c0accc9534b754a97080b6cf584b221037e821..6aaeff5c14634e3ada7319446f2f189c410a8e04 100644
--- a/crypto/ecdsa.c
+++ b/crypto/ecdsa.c
@@ -104,15 +104,6 @@ int ecdsa_verify(const struct ecdsa_public_key *key, const uint8_t *sig,
 	return _ecdsa_verify(ctx, (void *)mhash, rh, sh);
 }
 
-static LIST_HEAD(ecdsa_keys);
-
-int ecdsa_key_add(struct ecdsa_public_key *key)
-{
-	list_add_tail(&key->list, &ecdsa_keys);
-
-	return 0;
-}
-
 struct ecdsa_public_key *ecdsa_key_dup(const struct ecdsa_public_key *key)
 {
 	struct ecdsa_public_key *new;
@@ -129,12 +120,3 @@ struct ecdsa_public_key *ecdsa_key_dup(const struct ecdsa_public_key *key)
 
 	return new;
 }
-
-const struct ecdsa_public_key *ecdsa_key_next(const struct ecdsa_public_key *prev)
-{
-	prev = list_prepare_entry(prev, &ecdsa_keys, list);
-	list_for_each_entry_continue(prev, &ecdsa_keys, list)
-		return prev;
-
-	return NULL;
-}
diff --git a/include/crypto/ecdsa.h b/include/crypto/ecdsa.h
index 2e2b359d96cfd4fef6878c7a0f3045d9dbad4100..3b6bb394d960839284213729a569f5ba5b7741b6 100644
--- a/include/crypto/ecdsa.h
+++ b/include/crypto/ecdsa.h
@@ -11,18 +11,11 @@ struct ecdsa_public_key {
 	const uint64_t *x;	/* x coordinate of public key */
 	const uint64_t *y;	/* y coordinate of public key */
 	unsigned int size_bits;	/* key size in bits, derived from curve name */
-	struct list_head list;
 };
 
-const struct ecdsa_public_key *ecdsa_key_next(const struct ecdsa_public_key *prev);
-
-#define for_each_ecdsa_key(key) \
-	for (key = ecdsa_key_next(NULL); key; key = ecdsa_key_next(key))
-
 #ifdef CONFIG_CRYPTO_ECDSA
 int ecdsa_verify(const struct ecdsa_public_key *key, const uint8_t *sig,
 		 const uint32_t sig_len, const uint8_t *hash);
-int ecdsa_key_add(struct ecdsa_public_key *key);
 struct ecdsa_public_key *ecdsa_key_dup(const struct ecdsa_public_key *key);
 #else
 static inline int ecdsa_verify(const struct ecdsa_public_key *key, const uint8_t *sig,
@@ -31,11 +24,6 @@ static inline int ecdsa_verify(const struct ecdsa_public_key *key, const uint8_t
 	return -ENOSYS;
 }
 
-static inline int ecdsa_key_add(struct ecdsa_public_key *key)
-{
-	return -ENOSYS;
-}
-
 static inline struct ecdsa_public_key *ecdsa_key_dup(const struct ecdsa_public_key *key)
 {
 	return NULL;

-- 
2.47.3




^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH 2/5] public-keys: move list out of struct public_key
  2025-10-20 11:30 [PATCH 0/5] public_keys: make const Sascha Hauer
  2025-10-20 11:30 ` [PATCH 1/5] public-keys: ecdsa: remove list in ecdsa keys Sascha Hauer
@ 2025-10-20 11:30 ` Sascha Hauer
  2025-10-20 11:31 ` [PATCH 3/5] public-keys: rsa: allow struct public_key to be const Sascha Hauer
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: Sascha Hauer @ 2025-10-20 11:30 UTC (permalink / raw)
  To: BAREBOX

struct public_key contains a list entry which prevents us from putting
the struct into the RO data section. Use idr to keep the list outside
the struct. With this we also no longer have to duplicate the keys but
can use them in place instead.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
 commands/keys.c             |  3 ++-
 common/image-fit.c          |  4 +--
 crypto/Kconfig              |  1 +
 crypto/public-keys.c        | 61 ++++++---------------------------------------
 include/crypto/public_key.h |  8 +++---
 5 files changed, 17 insertions(+), 60 deletions(-)

diff --git a/commands/keys.c b/commands/keys.c
index 2d85e8124ff57ecc8ef7364f083b3439e3b958e4..616d44c25a9bb092b6f3f1fb0f3ac8bd66c8f0df 100644
--- a/commands/keys.c
+++ b/commands/keys.c
@@ -5,8 +5,9 @@
 static int do_keys(int argc, char *argv[])
 {
 	const struct public_key *key;
+	int id;
 
-	for_each_public_key(key) {
+	for_each_public_key(key, id) {
 		printf("KEY: %*phN", key->hashlen, key->hash);
 
 		if (key->key_name_hint)
diff --git a/common/image-fit.c b/common/image-fit.c
index 6b44a79e9d1cb8528c08c40ea043e01364664320..a4a490b03e68acc0929ecf58b2f09f592450afc5 100644
--- a/common/image-fit.c
+++ b/common/image-fit.c
@@ -266,7 +266,7 @@ static int fit_check_signature(struct fit_handle *handle, struct device_node *si
 	const char *key_name = NULL;
 	int sig_len;
 	const char *sig_value;
-	int ret;
+	int id, ret;
 
 	sig_value = of_get_property(sig_node, "value", &sig_len);
 	if (!sig_value) {
@@ -287,7 +287,7 @@ static int fit_check_signature(struct fit_handle *handle, struct device_node *si
 		}
 	}
 
-	for_each_public_key(key) {
+	for_each_public_key(key, id) {
 		fail_reason = "verification failed";
 
 		if (key_name && !strcmp(key->key_name_hint, key_name))
diff --git a/crypto/Kconfig b/crypto/Kconfig
index a79525b4d4d1920e36b3fad367297bed1e2a5b76..dd14a2532ce630ab17f3ec195ff895297ecd09c7 100644
--- a/crypto/Kconfig
+++ b/crypto/Kconfig
@@ -129,6 +129,7 @@ config CRYPTO_ECDSA
 config CRYPTO_BUILTIN_KEYS
 	bool "builtin keys"
 	select KEYTOC
+	select IDR
 
 config CRYPTO_PUBLIC_KEYS
 	depends on CRYPTO_BUILTIN_KEYS
diff --git a/crypto/public-keys.c b/crypto/public-keys.c
index 8884e263b3655b023b17a7d3ba0e29bcf8e0ca65..6d86be8d34e164f46ccb2b53cc4c1c0ed5744987 100644
--- a/crypto/public-keys.c
+++ b/crypto/public-keys.c
@@ -6,22 +6,14 @@
 #include <crypto/rsa.h>
 #include <crypto/ecdsa.h>
 
-static LIST_HEAD(public_keys);
-
-const struct public_key *public_key_next(const struct public_key *prev)
-{
-	prev = list_prepare_entry(prev, &public_keys, list);
-	list_for_each_entry_continue(prev, &public_keys, list)
-		return prev;
-
-	return NULL;
-}
+DEFINE_IDR(public_keys);
 
 const struct public_key *public_key_get(const char *name)
 {
 	const struct public_key *key;
+	int id;
 
-	list_for_each_entry(key, &public_keys, list) {
+	for_each_public_key(key, id) {
 		if (!strcmp(key->key_name_hint, name))
 			return key;
 	}
@@ -34,42 +26,7 @@ int public_key_add(struct public_key *key)
 	if (public_key_get(key->key_name_hint))
 		return -EEXIST;
 
-	list_add_tail(&key->list, &public_keys);
-
-	return 0;
-}
-
-static struct public_key *public_key_dup(const struct public_key *key)
-{
-	struct public_key *k = xzalloc(sizeof(*k));
-
-	k->type = key->type;
-	if (key->key_name_hint)
-		k->key_name_hint = xstrdup(key->key_name_hint);
-	k->hash = xmemdup(key->hash, key->hashlen);
-	k->hashlen = key->hashlen;
-
-	switch (key->type) {
-	case PUBLIC_KEY_TYPE_RSA:
-		k->rsa = rsa_key_dup(key->rsa);
-		if (!k->rsa)
-			goto err;
-		break;
-	case PUBLIC_KEY_TYPE_ECDSA:
-		k->ecdsa = ecdsa_key_dup(key->ecdsa);
-		if (!k->ecdsa)
-			goto err;
-		break;
-	default:
-		goto err;
-	}
-
-	return k;
-err:
-	free(k->key_name_hint);
-	free(k);
-
-	return NULL;
+	return idr_alloc(&public_keys, key, 0, INT_MAX, GFP_NOWAIT);
 }
 
 int public_key_verify(const struct public_key *key, const uint8_t *sig,
@@ -92,16 +49,12 @@ extern struct public_key * __public_keys_end[];
 static int init_public_keys(void)
 {
 	struct public_key * const *iter;
+	int ret;
 
 	for (iter = __public_keys_start; iter != __public_keys_end; iter++) {
-		struct public_key *key = public_key_dup(*iter);
-
-		if (!key) {
+		ret = idr_alloc(&public_keys, *iter, 0, INT_MAX, GFP_NOWAIT);
+		if (ret)
 			pr_warn("error while adding key\n");
-			continue;
-		}
-
-		public_key_add(key);
 	}
 
 	return 0;
diff --git a/include/crypto/public_key.h b/include/crypto/public_key.h
index 7edea2d69190cb30f328510f905bab3054ad5845..3a484eced110b179c5c411c4e06c47770e965613 100644
--- a/include/crypto/public_key.h
+++ b/include/crypto/public_key.h
@@ -2,6 +2,7 @@
 #define __CRYPTO_PUBLIC_KEY_H
 
 #include <digest.h>
+#include <linux/idr.h>
 
 struct rsa_public_key;
 struct ecdsa_public_key;
@@ -13,7 +14,6 @@ enum public_key_type {
 
 struct public_key {
 	enum public_key_type type;
-	struct list_head list;
 	char *key_name_hint;
 	unsigned char *hash;
 	unsigned int hashlen;
@@ -28,8 +28,10 @@ int public_key_add(struct public_key *key);
 const struct public_key *public_key_get(const char *name);
 const struct public_key *public_key_next(const struct public_key *prev);
 
-#define for_each_public_key(key) \
-		for (key = public_key_next(NULL); key; key = public_key_next(key))
+extern struct idr public_keys;
+
+#define for_each_public_key(key, id) \
+		idr_for_each_entry(&public_keys, key, id)
 
 int public_key_verify(const struct public_key *key, const uint8_t *sig,
 		      const uint32_t sig_len, const uint8_t *hash,

-- 
2.47.3




^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH 3/5] public-keys: rsa: allow struct public_key to be const
  2025-10-20 11:30 [PATCH 0/5] public_keys: make const Sascha Hauer
  2025-10-20 11:30 ` [PATCH 1/5] public-keys: ecdsa: remove list in ecdsa keys Sascha Hauer
  2025-10-20 11:30 ` [PATCH 2/5] public-keys: move list out of struct public_key Sascha Hauer
@ 2025-10-20 11:31 ` Sascha Hauer
  2025-10-20 11:31 ` [PATCH 4/5] public-keys: rsa: remove unused functions Sascha Hauer
  2025-10-20 11:31 ` [PATCH 5/5] public-keys: make const Sascha Hauer
  4 siblings, 0 replies; 6+ messages in thread
From: Sascha Hauer @ 2025-10-20 11:31 UTC (permalink / raw)
  To: BAREBOX

The struct public_key fields will become const in the next step. Prepare
for this by rearranging rsa_of_read_key(): instead of assigning fields
to struct public_key and struct rsa_public_key and modifying them
afterwards, assign the initialized data to the (in future const) fields.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
 crypto/rsa.c | 15 ++++++++++-----
 1 file changed, 10 insertions(+), 5 deletions(-)

diff --git a/crypto/rsa.c b/crypto/rsa.c
index 13b6553c950b033bd8940b0279bfb419f08b052a..e4fc980f9187b49511d5b1a8e68d488944d9b483 100644
--- a/crypto/rsa.c
+++ b/crypto/rsa.c
@@ -384,6 +384,7 @@ static void rsa_convert_big_endian(uint32_t *dst, const uint32_t *src, int len)
 struct public_key *rsa_of_read_key(struct device_node *node)
 {
 	const void *modulus, *rr;
+	void *brr, *bmodulus;
 	const uint64_t *public_exponent;
 	int length;
 	struct public_key *key;
@@ -394,7 +395,8 @@ struct public_key *rsa_of_read_key(struct device_node *node)
 		return ERR_PTR(-EINVAL);
 
 	key = xzalloc(sizeof(*key));
-	rsa = key->rsa = xzalloc(sizeof(*rsa));
+	rsa = xzalloc(sizeof(*rsa));
+	key->rsa = rsa;
 
 	key->key_name_hint = xstrdup(node->name + 4);
 
@@ -426,11 +428,14 @@ struct public_key *rsa_of_read_key(struct device_node *node)
 
 	rsa->len /= sizeof(uint32_t) * 8;
 
-	rsa->modulus = xzalloc(RSA_MAX_KEY_BITS / 8);
-	rsa->rr = xzalloc(RSA_MAX_KEY_BITS / 8);
+	bmodulus = xzalloc(RSA_MAX_KEY_BITS / 8);
+	brr = xzalloc(RSA_MAX_KEY_BITS / 8);
 
-	rsa_convert_big_endian(rsa->modulus, modulus, rsa->len);
-	rsa_convert_big_endian(rsa->rr, rr, rsa->len);
+	rsa_convert_big_endian(bmodulus, modulus, rsa->len);
+	rsa->modulus = bmodulus;
+
+	rsa_convert_big_endian(brr, rr, rsa->len);
+	rsa->rr = brr;
 
 	err = 0;
 out:

-- 
2.47.3




^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH 4/5] public-keys: rsa: remove unused functions
  2025-10-20 11:30 [PATCH 0/5] public_keys: make const Sascha Hauer
                   ` (2 preceding siblings ...)
  2025-10-20 11:31 ` [PATCH 3/5] public-keys: rsa: allow struct public_key to be const Sascha Hauer
@ 2025-10-20 11:31 ` Sascha Hauer
  2025-10-20 11:31 ` [PATCH 5/5] public-keys: make const Sascha Hauer
  4 siblings, 0 replies; 6+ messages in thread
From: Sascha Hauer @ 2025-10-20 11:31 UTC (permalink / raw)
  To: BAREBOX

The functions to duplicate and free a rsa key are no longer used. Remove
them.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
 crypto/rsa.c         | 18 ------------------
 include/crypto/rsa.h |  8 --------
 2 files changed, 26 deletions(-)

diff --git a/crypto/rsa.c b/crypto/rsa.c
index e4fc980f9187b49511d5b1a8e68d488944d9b483..ec5bd451158c29047cfd51eb64d3c38f4671e74d 100644
--- a/crypto/rsa.c
+++ b/crypto/rsa.c
@@ -447,24 +447,6 @@ struct public_key *rsa_of_read_key(struct device_node *node)
 	return err ? ERR_PTR(err) : key;
 }
 
-void rsa_key_free(struct rsa_public_key *key)
-{
-	free(key->modulus);
-	free(key->rr);
-	free(key);
-}
-
-struct rsa_public_key *rsa_key_dup(const struct rsa_public_key *key)
-{
-	struct rsa_public_key *new;
-
-	new = xmemdup(key, sizeof(*key));
-	new->modulus = xmemdup(key->modulus, key->len * sizeof(uint32_t));
-	new->rr = xmemdup(key->rr, key->len  * sizeof(uint32_t));
-
-	return new;
-}
-
 static void rsa_init_keys_of(void)
 {
 	struct device_node *sigs, *sig;
diff --git a/include/crypto/rsa.h b/include/crypto/rsa.h
index efc8fca152743482697bbca1dd48e59519275861..fce94df094f90359ef500088277a0c1bf9130c14 100644
--- a/include/crypto/rsa.h
+++ b/include/crypto/rsa.h
@@ -37,7 +37,6 @@ struct rsa_public_key {
 struct device_node;
 
 struct public_key *rsa_of_read_key(struct device_node *node);
-void rsa_key_free(struct rsa_public_key *key);
 
 #ifdef CONFIG_CRYPTO_RSA
 /**
@@ -55,8 +54,6 @@ void rsa_key_free(struct rsa_public_key *key);
 int rsa_verify(const struct rsa_public_key *key, const uint8_t *sig,
 			  const uint32_t sig_len, const uint8_t *hash,
 			  enum hash_algo algo);
-
-struct rsa_public_key *rsa_key_dup(const struct rsa_public_key *key);
 #else
 static inline int rsa_verify(const struct rsa_public_key *key, const uint8_t *sig,
 			  const uint32_t sig_len, const uint8_t *hash,
@@ -64,11 +61,6 @@ static inline int rsa_verify(const struct rsa_public_key *key, const uint8_t *si
 {
 	return -ENOSYS;
 }
-
-static inline struct rsa_public_key *rsa_key_dup(const struct rsa_public_key *key)
-{
-	return NULL;
-}
 #endif
 
 #endif

-- 
2.47.3




^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH 5/5] public-keys: make const
  2025-10-20 11:30 [PATCH 0/5] public_keys: make const Sascha Hauer
                   ` (3 preceding siblings ...)
  2025-10-20 11:31 ` [PATCH 4/5] public-keys: rsa: remove unused functions Sascha Hauer
@ 2025-10-20 11:31 ` Sascha Hauer
  4 siblings, 0 replies; 6+ messages in thread
From: Sascha Hauer @ 2025-10-20 11:31 UTC (permalink / raw)
  To: BAREBOX

public keys should not be modified once created, so make them const.
This also has the effect that the statically initialized keys can live
in the RO data section and thus are protected from modification.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
 include/crypto/public_key.h | 8 ++++----
 include/crypto/rsa.h        | 4 ++--
 scripts/keytoc.c            | 8 ++++----
 3 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/include/crypto/public_key.h b/include/crypto/public_key.h
index 3a484eced110b179c5c411c4e06c47770e965613..5c0234acc06bd05b27cb86d62efe55f9f4e50d5c 100644
--- a/include/crypto/public_key.h
+++ b/include/crypto/public_key.h
@@ -14,13 +14,13 @@ enum public_key_type {
 
 struct public_key {
 	enum public_key_type type;
-	char *key_name_hint;
-	unsigned char *hash;
+	const char *key_name_hint;
+	const unsigned char *hash;
 	unsigned int hashlen;
 
 	union {
-		struct rsa_public_key *rsa;
-		struct ecdsa_public_key *ecdsa;
+		const struct rsa_public_key *rsa;
+		const struct ecdsa_public_key *ecdsa;
 	};
 };
 
diff --git a/include/crypto/rsa.h b/include/crypto/rsa.h
index fce94df094f90359ef500088277a0c1bf9130c14..bff25e02375d6da488981c8dbfab404e830d1f68 100644
--- a/include/crypto/rsa.h
+++ b/include/crypto/rsa.h
@@ -26,8 +26,8 @@
 struct rsa_public_key {
 	uint len;		/* len of modulus[] in number of uint32_t */
 	uint32_t n0inv;		/* -1 / modulus[0] mod 2^32 */
-	uint32_t *modulus;	/* modulus as little endian array */
-	uint32_t *rr;		/* R^2 as little endian array */
+	const uint32_t *modulus;/* modulus as little endian array */
+	const uint32_t *rr;	/* R^2 as little endian array */
 	uint64_t exponent;	/* public exponent */
 };
 
diff --git a/scripts/keytoc.c b/scripts/keytoc.c
index 074af6f0b44017572cc43be3ef559abd9fec1da3..9d6ec376c124f36e1f07f3e198bb245cfa033cd0 100644
--- a/scripts/keytoc.c
+++ b/scripts/keytoc.c
@@ -529,14 +529,14 @@ static int gen_key_ecdsa(EVP_PKEY *key, const char *key_name, const char *key_na
 
 		fprintf(outfilep, "\n};\n\n");
 
-		fprintf(outfilep, "\nstatic uint64_t %s_x[] = {", key_name_c);
+		fprintf(outfilep, "\nstatic const uint64_t %s_x[] = {", key_name_c);
 		ret = print_bignum(key_x, bits, 64);
 		if (ret)
 			return ret;
 
 		fprintf(outfilep, "\n};\n\n");
 
-		fprintf(outfilep, "static uint64_t %s_y[] = {", key_name_c);
+		fprintf(outfilep, "static const uint64_t %s_y[] = {", key_name_c);
 		ret = print_bignum(key_y, bits, 64);
 		if (ret)
 			return ret;
@@ -627,14 +627,14 @@ static int gen_key_rsa(EVP_PKEY *key, const char *key_name, const char *key_name
 
 		fprintf(outfilep, "\n};\n\n");
 
-		fprintf(outfilep, "\nstatic uint32_t %s_modulus[] = {", key_name_c);
+		fprintf(outfilep, "\nstatic const uint32_t %s_modulus[] = {", key_name_c);
 		ret = print_bignum(modulus, bits, 32);
 		if (ret)
 			return ret;
 
 		fprintf(outfilep, "\n};\n\n");
 
-		fprintf(outfilep, "static uint32_t %s_rr[] = {", key_name_c);
+		fprintf(outfilep, "static const uint32_t %s_rr[] = {", key_name_c);
 		ret = print_bignum(r_squared, bits, 32);
 		if (ret)
 			return ret;

-- 
2.47.3




^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2025-10-20 12:59 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-10-20 11:30 [PATCH 0/5] public_keys: make const Sascha Hauer
2025-10-20 11:30 ` [PATCH 1/5] public-keys: ecdsa: remove list in ecdsa keys Sascha Hauer
2025-10-20 11:30 ` [PATCH 2/5] public-keys: move list out of struct public_key Sascha Hauer
2025-10-20 11:31 ` [PATCH 3/5] public-keys: rsa: allow struct public_key to be const Sascha Hauer
2025-10-20 11:31 ` [PATCH 4/5] public-keys: rsa: remove unused functions Sascha Hauer
2025-10-20 11:31 ` [PATCH 5/5] public-keys: make const Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox