summaryrefslogtreecommitdiff
path: root/crypto/xor.c
diff options
context:
space:
mode:
authorDenis Kenzior <denkenz@gmail.com>2018-10-09 17:48:25 +0100
committerJames Morris <james.morris@microsoft.com>2018-10-26 09:30:46 +0100
commit6cdd0568289d49f137e37e4cc010e2bc4c4e4b9c (patch)
treef1f3d1bafc9effaf415bbe04f9f3f217779600f4 /crypto/xor.c
parente160c236c5f5582708f2935e4bcbbe9505072933 (diff)
downloadlinux-crypto-6cdd0568289d49f137e37e4cc010e2bc4c4e4b9c.tar.gz
linux-crypto-6cdd0568289d49f137e37e4cc010e2bc4c4e4b9c.zip
KEYS: asym_tpm: Implement pkey_query [ver #2]
This commit implements the pkey_query operation. This is accomplished by utilizing the public key portion to obtain max encryption size information for the operations that utilize the public key (encrypt, verify). The private key size extracted from the TPM_Key data structure is used to fill the information where the private key is used (decrypt, sign). The kernel uses a DER/BER format for public keys and does not support setting the key via the raw binary form. To get around this a simple DER/BER formatter is implemented which stores the DER/BER formatted key and exponent in a temporary buffer for use by the crypto API. The only exponent supported currently is 65537. This holds true for other Linux TPM tools such as 'create_tpm_key' and trousers-openssl_tpm_engine. Signed-off-by: Denis Kenzior <denkenz@gmail.com> Signed-off-by: David Howells <dhowells@redhat.com> Tested-by: Marcel Holtmann <marcel@holtmann.org> Reviewed-by: Marcel Holtmann <marcel@holtmann.org> Signed-off-by: James Morris <james.morris@microsoft.com>
Diffstat (limited to 'crypto/xor.c')
0 files changed, 0 insertions, 0 deletions