[PATCH v1] Crypt and decrypt files using password in keystore.

Gerd Pauli gp at high-consulting.de
Mon Apr 23 05:52:50 PDT 2018


Hi Sascha,

This is not the same as in Linux Cryptop Api. The goal of this command
and library is to provide a compatible command with the ccrypt tool
from linux.
https://packages.debian.org/stretch/ccrypt
It is not intended to write a standard AES Crypting Tool.

Please tell me if this is useful for merging like this. 
Then i clean up some spaces in the code and send again ( checkscript ).

If not. Sorry for the dust :-)

Am Montag, den 23.04.2018, 10:39 +0200 schrieb Sascha Hauer:
> Hi Gerd,
> 
> On Fri, Apr 20, 2018 at 10:01:14AM +0200, Gerd Pauli wrote:
> > Adds ccryptlib library in crypto which implements a
> > stream cipher based on the block cipher Rijndael,
> > the candidate for the AES standard.
> > Compatible with the ccrypt tool in linux
> > from Peter Selinger.
> > 
> > +BAREBOX_CMD_START(ccrypt)
> > +.cmd	= do_ccrypt,
> > +	BAREBOX_CMD_DESC("Crypt and Decrypt Files")
> > +	BAREBOX_CMD_OPTS("[-e|-d] -k NAME SRC DST")
> > +        BAREBOX_CMD_GROUP(CMD_GRP_MISC)
> > +	BAREBOX_CMD_HELP(cmd_ccrypt_help)
> > +	BAREBOX_CMD_END
> > diff --git a/crypto/Kconfig b/crypto/Kconfig
> > index 6d65c24d4..08669a2de 100644
> > --- a/crypto/Kconfig
> > +++ b/crypto/Kconfig
> > @@ -101,4 +101,11 @@ config CRYPTO_KEYSTORE
> >  	  This is a simple keystore, which can be used to pass
> > keys
> >  	  between several components via simple interface.
> >  
> > +config CRYPTO_CCRYPTLIB
> > +        bool "ccryptlib"
> > +        help
> > +          This option provides functions implementing a stream
> > cipher based
> > +          on the block cipher rijandel.
> > +          The cipher is based on Peter Selingers ccrypt
> > implementation.
> > +
> >  endmenu
> > diff --git a/crypto/Makefile b/crypto/Makefile
> > index a7240d1d6..1231bc76d 100644
> > --- a/crypto/Makefile
> > +++ b/crypto/Makefile
> > @@ -14,3 +14,4 @@ obj-$(CONFIG_DIGEST_SHA512_GENERIC)	+=
> > sha4.o
> >  obj-$(CONFIG_CRYPTO_PBKDF2)	+= pbkdf2.o
> >  obj-$(CONFIG_CRYPTO_RSA)	+= rsa.o
> >  obj-$(CONFIG_CRYPTO_KEYSTORE)	+= keystore.o
> > +obj-$(CONFIG_CRYPTO_CCRYPTLIB)  += ccryptlib.o
> > diff --git a/crypto/ccryptlib.c b/crypto/ccryptlib.c
> > new file mode 100644
> > index 000000000..78f0ac843
> > --- /dev/null
> > +++ b/crypto/ccryptlib.c
> 
> Is this the same as the Linux Kernel has in crypto/aes_generic.c? If
> yes, then please use it. If no, then why not? ;)
> 
> Generally any crypto code should integrate into the barebox crypto
> API
> (which is basically the same as the Linux crypto API). This is the
> main
> road blocker that must be removed before we can merge this into
> barebox.
> 
> Sascha
> 
> 

CU
--
Gerd




More information about the barebox mailing list