xref: /openbmc/qemu/qapi/cryptodev.json (revision 55872c70)
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  'data': ['builtin', 'vhost-user', 'lkcf']}
52
53##
54# @QCryptodevBackendClient:
55#
56# Information about a queue of crypto device.
57#
58# @queue: the queue index of the crypto device
59#
60# @type: the type of the crypto device
61#
62# Since: 8.0
63##
64{ 'struct': 'QCryptodevBackendClient',
65  'data': { 'queue': 'uint32',
66            'type': 'QCryptodevBackendType' } }
67
68##
69# @QCryptodevInfo:
70#
71# Information about a crypto device.
72#
73# @id: the id of the crypto device
74#
75# @service: supported service types of a crypto device
76#
77# @client: the additional information of the crypto device
78#
79# Since: 8.0
80##
81{ 'struct': 'QCryptodevInfo',
82  'data': { 'id': 'str',
83            'service': ['QCryptodevBackendServiceType'],
84            'client': ['QCryptodevBackendClient'] } }
85
86##
87# @query-cryptodev:
88#
89# Returns information about current crypto devices.
90#
91# Returns: a list of @QCryptodevInfo
92#
93# Since: 8.0
94##
95{ 'command': 'query-cryptodev', 'returns': ['QCryptodevInfo']}
96