lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240916085741.1636554-1-quic_mdalam@quicinc.com>
Date: Mon, 16 Sep 2024 14:27:38 +0530
From: Md Sadre Alam <quic_mdalam@...cinc.com>
To: <axboe@...nel.dk>, <song@...nel.org>, <yukuai3@...wei.com>,
        <agk@...hat.com>, <snitzer@...nel.org>, <mpatocka@...hat.com>,
        <adrian.hunter@...el.com>, <quic_asutoshd@...cinc.com>,
        <ritesh.list@...il.com>, <ulf.hansson@...aro.org>,
        <andersson@...nel.org>, <konradybcio@...nel.org>, <kees@...nel.org>,
        <gustavoars@...nel.org>, <linux-block@...r.kernel.org>,
        <linux-kernel@...r.kernel.org>, <linux-raid@...r.kernel.org>,
        <dm-devel@...ts.linux.dev>, <linux-mmc@...r.kernel.org>,
        <linux-arm-msm@...r.kernel.org>, <linux-hardening@...r.kernel.org>
CC: <quic_srichara@...cinc.com>, <quic_varada@...cinc.com>,
        <quic_mdalam@...cinc.com>
Subject: [PATCH v2 0/3] Add inline encryption support

QCOM SDCC controller having Inline Crypto Engine support
Inline Crypto Engine do encryption/decryption on fly.
dm-inlinecrypt driver will be use to do encryption/decryption
with Inline Crypto Engine. 

v2:
 * Added new driver dm-inlinecrypt
 * Dropped patch "md: dm-crypt: Set cc->iv_size to 4 bytes"
 * squash patch "blk-crypto: Add additional algo modes for Inline"
   encryption and patch "md: dm-crypt: Add additional algo modes for
   inline encryption" to the dm-inlinecrypt driver.
 * tested with dmsetup command as below
   dmsetup create test-crypt --table '0 251904 inline-crypt aes128-xts-
   plain a7f67ad520bd83b9725df6ebd76c3eeea7f67ad520bd83b9725df6ebd76c3eee 
   0 /dev/mmcblk0p27 0 1'

   dd if=/dev/urandom of=/tmp/data bs=1M count=1
   dd if=/tmp/data of=/dev/mapper/test-crypt bs=1M count=1
   dd of=/tmp/data1 if=/dev/mapper/test-crypt bs=1M count=1
   dd of=/tmp/data2 if=/dev/mmcblk0p27 bs=1M count=1
   md5sum /tmp/data*
   b45d728bfb499b6de9b12c98fbb652dd  /tmp/data
   b45d728bfb499b6de9b12c98fbb652dd  /tmp/data1
   bc4107e19cf6fc012c5b997bdd3f0de4  /tmp/data2
   dmsetup remove /dev/mapper/test-crypt

v1:
 * This series of patches add additional modes for inline encryption
   This series of patches depends on [1] Add inline encryption support for
   dm-crypt
   [1]: https://lore.kernel.org/all/b45d3b40-2587-04dc-9601-a9251dacf806@opensource.wdc.com/T/#ma01f08a941107217c93680fa25e96e8d406df790

 * These patches tested on IPQ9574 with eMMC ICE for raw partition
   encryption/decryption.

   e.g:

   dmsetup create test-crypt --table '0 251904 crypt aes128-xts-plain64
   a7f67ad520bd83b9725df6ebd76c3eeea7f67ad520bd83b9725df6ebd76c3eee 0
   /dev/mmcblk0p27 0 1 inline_crypt'

  dd if=/dev/urandom of=/tmp/data bs=1M count=1

  dd if=/tmp/data of=/dev/mapper/test-crypt bs=1M count=1

  dd of=/tmp/data1 if=/dev/mapper/test-crypt bs=1M count=1

  dd of=/tmp/data2 if=/dev/mmcblk0p27 bs=1M count=1

  md5sum /tmp/data*
  b45d728bfb499b6de9b12c98fbb652dd  /tmp/data
  b45d728bfb499b6de9b12c98fbb652dd  /tmp/data1
  bc4107e19cf6fc012c5b997bdd3f0de4  /tmp/data2

  dmsetup remove /dev/mapper/test-crypt


Md Sadre Alam (3):
  dm-inlinecrypt: Add inline encryption support
  mmc: cqhci: Add additional algo mode for inline encryption
  mmc: sdhci-msm: Add additional algo mode for inline encryption

 block/blk-crypto.c              |  21 +++
 drivers/md/Kconfig              |   8 +
 drivers/md/Makefile             |   1 +
 drivers/md/dm-inline-crypt.c    | 316 ++++++++++++++++++++++++++++++++
 drivers/mmc/host/cqhci-crypto.c |  12 ++
 drivers/mmc/host/sdhci-msm.c    |  10 +-
 drivers/soc/qcom/ice.c          |  65 ++++++-
 include/linux/blk-crypto.h      |   3 +
 8 files changed, 419 insertions(+), 17 deletions(-)
 create mode 100644 drivers/md/dm-inline-crypt.c

-- 
2.34.1


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ