From: Albert ARIBAUD Date: Thu, 5 Jul 2012 11:59:52 +0200 Subject: [U-Boot] sha256_crypt for uboot In-Reply-To: <4FEB1CE1.609@ruggedcom.com> References: <4FEB1CE1.609@ruggedcom.com> Message-ID: <20120705115952.11c4574d@aari01-12> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi Richard, On Wed, 27 Jun 2012 10:46:57 -0400, Richard Retanubun wrote: > Hello, > > I am working on a project to allow uboot to authenticate users by > using the same sha256_crypt function that Linux user-space use for > libcrypt [ref] http://www.akkadia.org/drepper/SHA-crypt.txt > > We chose sha256 because uboot already have support for doing sha256 > hashes, I am wondering about a few things: 1. Has this been attempted > before? > > 2. If I want to make a test command for a proof of concept using > crypt(), how do I modify the Makefile to allow a command to > statically link to libcrypt? hacking it into the Makefile's > $(PLATFORM_LIBS)? > > 3. Once I am done porting sha256_crypt to use it using the facilities > uboot has, is there any hope of getting this mainlined when I am > done? If there is a policy to not unnecessarily add crypto algorithm, > then I'll just keep it all in one file to reduce risk of merge > conflict. If there is interest to mainline this, then I'll stage the > supporting functions that uboot does not have yet (mempcpy, stpcpy, > etc) into separate files. 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? > Thank you for everyone's time Amicalement, -- Albert.