mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Trent Piepho <tpiepho@kymetacorp.com>
To: Marc Kleine-Budde <mkl@pengutronix.de>
Cc: "barebox@lists.infradead.org" <barebox@lists.infradead.org>,
	"kernel@pengutronix.de" <kernel@pengutronix.de>
Subject: Re: [PATCH v2 2/3] crypto: add RSA support
Date: Thu, 7 Jan 2016 22:03:10 +0000	[thread overview]
Message-ID: <1452204201.4474.115.camel@rtred1test09.kymeta.local> (raw)
In-Reply-To: <1452099691-28645-3-git-send-email-mkl@pengutronix.de>

On Wed, 2016-01-06 at 18:01 +0100, Marc Kleine-Budde wrote:
> +
> +static void rsa_convert_big_endian(uint32_t *dst, const uint32_t *src, int len)
> +{
> +	int i;
> +
> +	for (i = 0; i < len; i++)
> +		dst[i] = fdt32_to_cpu(src[len - 1 - i]);
> +}
> +


> +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 */
> +	uint64_t exponent;	/* public exponent */

This says little endian, but it looks like it's really CPU endian, i.e.
on a big endian system it would be big endian.
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

  reply	other threads:[~2016-01-07 22:04 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-06 17:01 [PATCH v2 0/3] FIT Support Marc Kleine-Budde
2016-01-06 17:01 ` [PATCH v2 1/3] crypto: add digest_alloc_by_algo() Marc Kleine-Budde
2016-01-06 17:01 ` [PATCH v2 2/3] crypto: add RSA support Marc Kleine-Budde
2016-01-07 22:03   ` Trent Piepho [this message]
2016-01-08  7:47     ` Sascha Hauer
2016-01-06 17:01 ` [PATCH v2 3/3] bootm: add initial FIT support Marc Kleine-Budde
2016-01-11  9:19   ` Sascha Hauer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1452204201.4474.115.camel@rtred1test09.kymeta.local \
    --to=tpiepho@kymetacorp.com \
    --cc=barebox@lists.infradead.org \
    --cc=kernel@pengutronix.de \
    --cc=mkl@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox