Re: [patch] UBIFS: Add cryptographic functionality when a key ispassed to the compress / decompress functions
From: Guillaume LECERF
Date: Tue Apr 03 2012 - 06:42:11 EST
Hi,
2012/4/3 Joel Reardon <joel@xxxxxxxxxxxxxxxx>:
> Âno_compr:
> Â Â Â Âmemcpy(out_buf, in_buf, in_len);
> Â Â Â Â*out_len = in_len;
> Â Â Â Â*compr_type = UBIFS_COMPR_NONE;
> + Â Â Â goto encrypt;
This goto seems unneeded here.
> +
> +encrypt:
> + Â Â Â if (crypto_key) {
> + Â Â Â Â Â Â Â u8 iv[UBIFS_CRYPTO_KEYSIZE];
> +
> + Â Â Â Â Â Â Â memset(iv, 0, UBIFS_CRYPTO_KEYSIZE);
> + Â Â Â Â Â Â Â ubifs_aes_crypt(out_buf, *out_len, crypto_key, iv);
> + Â Â Â }
--
Guillaume LECERF
OpenBricks developer - www.openbricks.org
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/