All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] mkfs.ubifs: Fix IV selection
@ 2018-11-07 20:21 Richard Weinberger
  2018-11-07 20:21 ` [PATCH 2/2] mkfs.ubifs: Store compr_size in correct endianness Richard Weinberger
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Richard Weinberger @ 2018-11-07 20:21 UTC (permalink / raw)
  To: linux-mtd; +Cc: david.oberhollenzer, hs, Richard Weinberger

We need to check for AES being in 128-cbc mode and not 256-cbc.
fscrypt supports only 128-cbc and 256-xts so far.

Signed-off-by: Richard Weinberger <richard@nod.at>
---
 ubifs-utils/mkfs.ubifs/crypto.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ubifs-utils/mkfs.ubifs/crypto.c b/ubifs-utils/mkfs.ubifs/crypto.c
index 9c6073ec00f9..cd68e372601f 100644
--- a/ubifs-utils/mkfs.ubifs/crypto.c
+++ b/ubifs-utils/mkfs.ubifs/crypto.c
@@ -152,7 +152,7 @@ static ssize_t encrypt_block(const void *plaintext, size_t size,
 	iv.index = cpu_to_le64(block_index);
 	memset(iv.padding, 0, sizeof(iv.padding));
 
-	if (cipher == EVP_aes_256_cbc()) {
+	if (cipher == EVP_aes_128_cbc()) {
 		tweak = alloca(ivsize);
 		gen_essiv_salt(&iv, FS_IV_SIZE, key, key_len, tweak);
 	} else {
-- 
2.19.1

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH 2/2] mkfs.ubifs: Store compr_size in correct endianness.
  2018-11-07 20:21 [PATCH 1/2] mkfs.ubifs: Fix IV selection Richard Weinberger
@ 2018-11-07 20:21 ` Richard Weinberger
  2018-11-08  5:28   ` Heiko Schocher
  2018-11-08  5:28 ` [PATCH 1/2] mkfs.ubifs: Fix IV selection Heiko Schocher
  2018-11-09 13:36 ` David Oberhollenzer
  2 siblings, 1 reply; 6+ messages in thread
From: Richard Weinberger @ 2018-11-07 20:21 UTC (permalink / raw)
  To: linux-mtd; +Cc: david.oberhollenzer, hs, Richard Weinberger

compr_size has to be in LE16.

Signed-off-by: Richard Weinberger <richard@nod.at>
---
 ubifs-utils/mkfs.ubifs/fscrypt.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ubifs-utils/mkfs.ubifs/fscrypt.c b/ubifs-utils/mkfs.ubifs/fscrypt.c
index 6d2b650d626d..118c11c5a4ca 100644
--- a/ubifs-utils/mkfs.ubifs/fscrypt.c
+++ b/ubifs-utils/mkfs.ubifs/fscrypt.c
@@ -125,7 +125,7 @@ int encrypt_data_node(struct fscrypt_context *fctx, unsigned int block_no,
 	void *inbuf, *outbuf, *crypt_key;
 	size_t ret, pad_len = round_up(length, FS_CRYPTO_BLOCK_SIZE);
 
-	dn->compr_size = length;
+	dn->compr_size = cpu_to_le16(length);
 
 	inbuf = xzalloc(pad_len);
 	outbuf = xzalloc(pad_len);
-- 
2.19.1

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH 1/2] mkfs.ubifs: Fix IV selection
  2018-11-07 20:21 [PATCH 1/2] mkfs.ubifs: Fix IV selection Richard Weinberger
  2018-11-07 20:21 ` [PATCH 2/2] mkfs.ubifs: Store compr_size in correct endianness Richard Weinberger
@ 2018-11-08  5:28 ` Heiko Schocher
  2018-11-09 13:36 ` David Oberhollenzer
  2 siblings, 0 replies; 6+ messages in thread
From: Heiko Schocher @ 2018-11-08  5:28 UTC (permalink / raw)
  To: Richard Weinberger; +Cc: linux-mtd, david.oberhollenzer

Hello Richard,

Am 07.11.2018 um 21:21 schrieb Richard Weinberger:
> We need to check for AES being in 128-cbc mode and not 256-cbc.
> fscrypt supports only 128-cbc and 256-xts so far.
> 
> Signed-off-by: Richard Weinberger <richard@nod.at>
> ---
>   ubifs-utils/mkfs.ubifs/crypto.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)

Thanks! Fixes my problems with encryption on imx6 based board.

Tested-by: Heiko Schocher <hsdenx.de>

bye,
Heiko
-- 
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-52   Fax: +49-8142-66989-80   Email: hs@denx.de

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 2/2] mkfs.ubifs: Store compr_size in correct endianness.
  2018-11-07 20:21 ` [PATCH 2/2] mkfs.ubifs: Store compr_size in correct endianness Richard Weinberger
@ 2018-11-08  5:28   ` Heiko Schocher
  2018-11-09 13:38     ` David Oberhollenzer
  0 siblings, 1 reply; 6+ messages in thread
From: Heiko Schocher @ 2018-11-08  5:28 UTC (permalink / raw)
  To: Richard Weinberger; +Cc: linux-mtd, david.oberhollenzer

Hello Richard,

Am 07.11.2018 um 21:21 schrieb Richard Weinberger:
> compr_size has to be in LE16.
> 
> Signed-off-by: Richard Weinberger <richard@nod.at>
> ---
>   ubifs-utils/mkfs.ubifs/fscrypt.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)

Thanks! Fixes my problems with encryption on imx6 based board.

Tested-by: Heiko Schocher <hsdenx.de>

bye,
Heiko
-- 
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-52   Fax: +49-8142-66989-80   Email: hs@denx.de

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 1/2] mkfs.ubifs: Fix IV selection
  2018-11-07 20:21 [PATCH 1/2] mkfs.ubifs: Fix IV selection Richard Weinberger
  2018-11-07 20:21 ` [PATCH 2/2] mkfs.ubifs: Store compr_size in correct endianness Richard Weinberger
  2018-11-08  5:28 ` [PATCH 1/2] mkfs.ubifs: Fix IV selection Heiko Schocher
@ 2018-11-09 13:36 ` David Oberhollenzer
  2 siblings, 0 replies; 6+ messages in thread
From: David Oberhollenzer @ 2018-11-09 13:36 UTC (permalink / raw)
  To: linux-mtd; +Cc: Richard Weinberger, hs

Applied to mtd-utils.git master.

Thanks,

David

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 2/2] mkfs.ubifs: Store compr_size in correct endianness.
  2018-11-08  5:28   ` Heiko Schocher
@ 2018-11-09 13:38     ` David Oberhollenzer
  0 siblings, 0 replies; 6+ messages in thread
From: David Oberhollenzer @ 2018-11-09 13:38 UTC (permalink / raw)
  To: linux-mtd; +Cc: hs, Richard Weinberger

Applied to mtd-utils.git master.

Thanks,

David

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2018-11-09 13:38 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-11-07 20:21 [PATCH 1/2] mkfs.ubifs: Fix IV selection Richard Weinberger
2018-11-07 20:21 ` [PATCH 2/2] mkfs.ubifs: Store compr_size in correct endianness Richard Weinberger
2018-11-08  5:28   ` Heiko Schocher
2018-11-09 13:38     ` David Oberhollenzer
2018-11-08  5:28 ` [PATCH 1/2] mkfs.ubifs: Fix IV selection Heiko Schocher
2018-11-09 13:36 ` David Oberhollenzer

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.