[PATCH v1] Crypt and decrypt files using password in keystore.
Sascha Hauer
s.hauer at pengutronix.de
Mon Apr 23 01:39:26 PDT 2018
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
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
More information about the barebox
mailing list