Commit graph

9 commits

Author SHA1 Message Date
Poovendhan Selvaraj
1d7a2c9f08 common: cmd_aes: Add print for derived key value
Signed-off-by: Poovendhan Selvaraj <quic_poovendh@quicinc.com>
Change-Id: I5c51e7c7307f3b661ff6ce756845ee0225cc69f2
(cherry picked from commit 9dea41ab451ebc2c462a7d8b08cebf49ff12b9ca)
(cherry picked from commit 238d9a95bc)
2024-08-04 22:47:28 -07:00
Hariharan K
8038e4bccb cmd_aes: Add clear key support in u-boot
Adding support for clearing an existing
derived key.

Change-Id: I6e6c8718696aa7ae29cf9ec0429b9c90c074f62d
Signed-off-by: Hariharan K <quic_harihk@quicinc.com>
2024-06-18 21:00:28 -07:00
Poovendhan Selvaraj
985efbba31 drivers: qseecom: Add new SCM call for AES 128 bytes context length
A new SCM has been added in TZ to support AES 128 byte context length.
Updated aes driver to add the same. Added new command as mentioned
below for 128 byte context length.
derive_aes_256_max_ctxt_key 0x2 0x20 0x41000000 0x80

Note: This new SCM call has been introduced since initial SCM call does not
derive keys the same way as Linux Fscrypt feature (128 byte context length)

Signed-off-by: Poovendhan Selvaraj <quic_poovendh@quicinc.com>
Change-Id: Ie71fc0e9b3c0b0d01995745bb61cd2d82f07eb85
2024-03-11 20:19:37 +05:30
Poovendhan Selvaraj
d13425c049 cmd_aes : Increase Context length to 128 from 64 bytes
Add support to increase context length if tz supports
128 bytes context length else fall back to old method.

Signed-off-by: Poovendhan Selvaraj <quic_poovendh@quicinc.com>
Change-Id: Ieded2c0139152e82011f792e91b875548fd29251
2024-02-28 15:39:06 +05:30
Poovendhan Selvaraj
d91a2f05c9 aes: Add aes 256 support for ipq5332 platform
ipq5332 is a TME-L based platform in which before
encrypt/decrypt, we are required to derive a key
handle.

This patch adds support for the same.

Change-Id: I28b327611b62381542086d6d599c4a0195525aca
Signed-off-by: Poovendhan Selvaraj <quic_poovendh@quicinc.com>
(cherry picked from commit e15df34ac8)
2024-02-28 15:35:50 +05:30
Poovendhan Selvaraj
5e509e9a2c aes : Add fix to read correct value from ram address for derive_aes_256_key cmd
Change-Id: I0e3080b641b3b050655fdbb626273ec14cbc6aa2
Signed-off-by: Poovendhan Selvaraj <quic_poovendh@quicinc.com>
2023-08-10 05:11:03 -07:00
Selvam Sathappan Periakaruppan
e33184de89 aes: Add aes 256 support for ipq9574 platform
ipq9574 is a TME-L based platform in which before
encrypt/decrypt, we are required to derive a key
handle.

This patch adds support for the same.

Change-Id: I583cee87607af2ab6461b429830cb8ff43cc44d4
Signed-off-by: Selvam Sathappan Periakaruppan <quic_speriaka@quicinc.com>
2022-04-06 07:55:50 -07:00
Karthick Jeyaraman
a6ca8dd013 IPQ807x: Implement SCM interface for AES 256
Encryptio/Decryption

	- For encryption/decryption, plain data/
	  encrypted date has to be written to memory
	  directly using mw command along with
	  ivadata, type and mode
	- Implemented new uboot command "aes_256"
	  to receive the memory address where the
	  above data is written to
	- Perfom basic sanity check against the data
	  received and send them to secure world through
	  scm calls
	- This is supported only for HK/CYP, hence not
	  implemented for TZ running in 32bit mode

Change-Id: I589a15025cd248cf5792f13ea435c5c5b64c6066
Signed-off-by: Karthick Jeyaraman <kjeyaram@codeaurora.org>
2020-08-05 06:48:06 -07:00
Marek Vasut
b401b73d02 aes: Add 'aes' command to access AES-128-CBC
Add simple 'aes' command, which allows using the AES-128-CBC encryption
and decryption functions from U-Boot command line.

Signed-off-by: Marek Vasut <marex@denx.de>
2014-03-21 16:43:58 -04:00