xref: /openbmc/qemu/qapi/cryptodev.json (revision b86c6ba6)
1# -*- Mode: Python -*-
2# vim: filetype=python
3#
4# This work is licensed under the terms of the GNU GPL, version 2 or later.
5# See the COPYING file in the top-level directory.
6
7##
8# = Cryptography devices
9##
10
11##
12# @QCryptodevBackendAlgType:
13#
14# The supported algorithm types of a crypto device.
15#
16# @sym: symmetric encryption
17#
18# @asym: asymmetric Encryption
19#
20# Since: 8.0
21##
22{ 'enum': 'QCryptodevBackendAlgType',
23  'prefix': 'QCRYPTODEV_BACKEND_ALG',
24  'data': ['sym', 'asym']}
25
26##
27# @QCryptodevBackendServiceType:
28#
29# The supported service types of a crypto device.
30#
31# Since: 8.0
32##
33{ 'enum': 'QCryptodevBackendServiceType',
34  'prefix': 'QCRYPTODEV_BACKEND_SERVICE',
35  'data': ['cipher', 'hash', 'mac', 'aead', 'akcipher']}
36
37##
38# @QCryptodevBackendType:
39#
40# The crypto device backend type
41#
42# @builtin: the QEMU builtin support
43#
44# @vhost-user: vhost-user
45#
46# @lkcf: Linux kernel cryptographic framework
47#
48# Since: 8.0
49##
50{ 'enum': 'QCryptodevBackendType',
51  'prefix': 'QCRYPTODEV_BACKEND_TYPE',
52  'data': ['builtin', 'vhost-user', 'lkcf']}
53
54##
55# @QCryptodevBackendClient:
56#
57# Information about a queue of crypto device.
58#
59# @queue: the queue index of the crypto device
60#
61# @type: the type of the crypto device
62#
63# Since: 8.0
64##
65{ 'struct': 'QCryptodevBackendClient',
66  'data': { 'queue': 'uint32',
67            'type': 'QCryptodevBackendType' } }
68
69##
70# @QCryptodevInfo:
71#
72# Information about a crypto device.
73#
74# @id: the id of the crypto device
75#
76# @service: supported service types of a crypto device
77#
78# @client: the additional information of the crypto device
79#
80# Since: 8.0
81##
82{ 'struct': 'QCryptodevInfo',
83  'data': { 'id': 'str',
84            'service': ['QCryptodevBackendServiceType'],
85            'client': ['QCryptodevBackendClient'] } }
86
87##
88# @query-cryptodev:
89#
90# Returns information about current crypto devices.
91#
92# Returns: a list of @QCryptodevInfo
93#
94# Since: 8.0
95##
96{ 'command': 'query-cryptodev', 'returns': ['QCryptodevInfo']}
97