From: Richard Retanubun <richardretanubun@ruggedcom.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] sha256_crypt for uboot
Date: Mon, 9 Jul 2012 09:50:05 -0400 [thread overview]
Message-ID: <4FFAE18D.3080809@ruggedcom.com> (raw)
In-Reply-To: <20120705115952.11c4574d@aari01-12>
On 05/07/12 05:59 AM, Albert ARIBAUD wrote:
Hi Albert,
Thanks for responding, I realize most people are probably away on summer holiday.
>
> Can't speak for Wolfgang of course, but my main question would be why
> would U-Boot need to identify users when its payload OS can do this
> with much more ease and flexibility?
> IOW, what use case are you considering?
The primary concern here is the power of u-boot CLI. Once here, someone can manually load
and boot the payload OS in a different mode that can bypass any user identification.
Thus, we aim to add the ability uboot to identify users, much like the payload OS does
before granting access to its CLI (if the user interrupts the boot process).
So far I got sha256_crypt() and sha512_crypt() working (sha512 is a bit slow due
to non-arch optimized string lib functions, but its working okay).
If there is interest in sha512, I can send it as a separate patch.
One question to the mailing list though, the sha256_context struct that exist in u-boot
typedef struct {
uint32_t total[2];
uint32_t state[8];
uint8_t buffer[64];
} sha256_context;
Is a little different from the one in libc (i.e. it adds buflen and has a 128 char buffer)
struct sha256_ctx {
uint32_t H[8];
uint32_t total[2];
uint32_t buflen;
char buffer[128]; /* NB: always correctly aligned for uint32_t. */
};
I can't seem to find mainlined boards that uses sha256.h (I am sure there are private ones)
Is it okay if I update the sha256.[ch] API to track the implementation from libc?
-- Richard Retanubun --
next prev parent reply other threads:[~2012-07-09 13:50 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-06-27 14:46 [U-Boot] sha256_crypt for uboot Richard Retanubun
2012-07-05 9:59 ` Albert ARIBAUD
2012-07-09 13:50 ` Richard Retanubun [this message]
2012-07-09 14:12 ` Albert ARIBAUD
2012-07-09 14:55 ` Richard Retanubun
2012-07-09 15:56 ` Albert ARIBAUD
2012-07-09 19:38 ` Wolfgang Denk
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=4FFAE18D.3080809@ruggedcom.com \
--to=richardretanubun@ruggedcom.com \
--cc=u-boot@lists.denx.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