xref: /openbmc/qemu/qapi/cryptodev.json (revision 6a0e10b7)
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# @QCryptodevBackendAlgoType:
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': 'QCryptodevBackendAlgoType',
23  'data': ['sym', 'asym']}
24
25##
26# @QCryptodevBackendServiceType:
27#
28# The supported service types of a crypto device.
29#
30# Since: 8.0
31##
32{ 'enum': 'QCryptodevBackendServiceType',
33  'data': ['cipher', 'hash', 'mac', 'aead', 'akcipher']}
34
35##
36# @QCryptodevBackendType:
37#
38# The crypto device backend type
39#
40# @builtin: the QEMU builtin support
41#
42# @vhost-user: vhost-user
43#
44# @lkcf: Linux kernel cryptographic framework
45#
46# Since: 8.0
47##
48{ 'enum': 'QCryptodevBackendType',
49  'data': ['builtin', 'vhost-user', 'lkcf']}
50
51##
52# @QCryptodevBackendClient:
53#
54# Information about a queue of crypto device.
55#
56# @queue: the queue index of the crypto device
57#
58# @type: the type of the crypto device
59#
60# Since: 8.0
61##
62{ 'struct': 'QCryptodevBackendClient',
63  'data': { 'queue': 'uint32',
64            'type': 'QCryptodevBackendType' } }
65
66##
67# @QCryptodevInfo:
68#
69# Information about a crypto device.
70#
71# @id: the id of the crypto device
72#
73# @service: supported service types of a crypto device
74#
75# @client: the additional information of the crypto device
76#
77# Since: 8.0
78##
79{ 'struct': 'QCryptodevInfo',
80  'data': { 'id': 'str',
81            'service': ['QCryptodevBackendServiceType'],
82            'client': ['QCryptodevBackendClient'] } }
83
84##
85# @query-cryptodev:
86#
87# Returns information about current crypto devices.
88#
89# Returns: a list of @QCryptodevInfo
90#
91# Since: 8.0
92##
93{ 'command': 'query-cryptodev', 'returns': ['QCryptodevInfo']}
94