mirror of
https://github.com/torvalds/linux.git
synced 2024-11-25 21:51:40 +00:00
3d16af0b4c
DCP (Data Co-Processor) is able to derive private keys for a fused random seed, which can be referenced by handle but not accessed by the CPU. Similarly, DCP is able to store arbitrary keys in four dedicated key slots located in its secure memory area (internal SRAM). These keys can be used to perform AES encryption. Expose these derived keys and key slots through the crypto API via their handle. The main purpose is to add DCP-backed trusted keys. Other use cases are possible too (see similar existing paes implementations), but these should carefully be evaluated as e.g. enabling AF_ALG will give userspace full access to use keys. In scenarios with untrustworthy userspace, this will enable en-/decryption oracles. Co-developed-by: Richard Weinberger <richard@nod.at> Signed-off-by: Richard Weinberger <richard@nod.at> Co-developed-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at> Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at> Signed-off-by: David Gstir <david@sigma-star.at> Acked-by: Herbert Xu <herbert@gondor.apana.org.au> Reviewed-by: Jarkko Sakkinen <jarkko@kernel.org> Signed-off-by: Jarkko Sakkinen <jarkko@kernel.org>
21 lines
490 B
C
21 lines
490 B
C
/* SPDX-License-Identifier: GPL-2.0-only */
|
|
/*
|
|
* Copyright (C) 2021 sigma star gmbh
|
|
*
|
|
* Specifies paes key slot handles for NXP's DCP (Data Co-Processor) to be used
|
|
* with the crypto_skcipher_setkey().
|
|
*/
|
|
|
|
#ifndef MXS_DCP_H
|
|
#define MXS_DCP_H
|
|
|
|
#define DCP_PAES_KEYSIZE 1
|
|
#define DCP_PAES_KEY_SLOT0 0x00
|
|
#define DCP_PAES_KEY_SLOT1 0x01
|
|
#define DCP_PAES_KEY_SLOT2 0x02
|
|
#define DCP_PAES_KEY_SLOT3 0x03
|
|
#define DCP_PAES_KEY_UNIQUE 0xfe
|
|
#define DCP_PAES_KEY_OTP 0xff
|
|
|
|
#endif /* MXS_DCP_H */
|