archive mirror
 help / color / mirror / Atom feed
From: Maxime Ripard <>
To: Eric Biggers <>
Cc:, Ulf Hansson <>
Subject: Help with eMMC inline encryption
Date: Wed, 17 Mar 2021 18:15:54 +0100	[thread overview]
Message-ID: <20210317171554.a4vgihqfjq2xa5cb@gilmour> (raw)

[-- Attachment #1: Type: text/plain, Size: 1198 bytes --]

Hi Eric,

I've followed your work to integrate fscrypt for an eMMC, and now that
it's been merged started to write the support for the Allwinner H6 [1]
that has an encryption / decryption engine (EMCE, page 332) for the eMMC
controller (page 495).

I have some code that does most of the work to enable it and I'm at a
point where I can run xfstests (so the accesses seem to go through the
crypto engine, and they decrypt something), but the content of the files
are off compared to the software implementation.

My first guess would be to check how the key is setup in the hardware,
but it's where I'm not really sure what's going on. It looks from the
cqhci driver that the AES-XTS key has twice the size, and it's written
in two steps for some reason? [2]

Since the AES-XTS key size allegedly supported by the driver is 256 bits
but the key size is 64 bytes, the comment makes sense, but I'm not
really sure what is happening and what I'm supposed to be doing with
that key.



[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

             reply	other threads:[~2021-03-17 17:17 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-17 17:15 Maxime Ripard [this message]
2021-03-17 18:33 ` Eric Biggers
2021-03-22 15:53   ` Maxime Ripard
2021-03-22 17:02     ` Eric Biggers
2021-03-23 10:53       ` Maxime Ripard

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210317171554.a4vgihqfjq2xa5cb@gilmour \ \ \ \ \
    --subject='Re: Help with eMMC inline encryption' \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
on how to clone and mirror all data and code used for this inbox