xref: /openbmc/qemu/qapi/cryptodev.json (revision cde3c425)
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# @cipher: Symmetric Key Cipher service
31#
32# @hash: Hash service
33#
34# @mac: Message Authentication Codes service
35#
36# @aead: Authenticated Encryption with Associated Data service
37#
38# @akcipher: Asymmetric Key Cipher service
39#
40# Since: 8.0
41##
42{ 'enum': 'QCryptodevBackendServiceType',
43  'data': ['cipher', 'hash', 'mac', 'aead', 'akcipher']}
44
45##
46# @QCryptodevBackendType:
47#
48# The crypto device backend type
49#
50# @builtin: the QEMU builtin support
51#
52# @vhost-user: vhost-user
53#
54# @lkcf: Linux kernel cryptographic framework
55#
56# Since: 8.0
57##
58{ 'enum': 'QCryptodevBackendType',
59  'data': ['builtin', 'vhost-user', 'lkcf']}
60
61##
62# @QCryptodevBackendClient:
63#
64# Information about a queue of crypto device.
65#
66# @queue: the queue index of the crypto device
67#
68# @type: the type of the crypto device
69#
70# Since: 8.0
71##
72{ 'struct': 'QCryptodevBackendClient',
73  'data': { 'queue': 'uint32',
74            'type': 'QCryptodevBackendType' } }
75
76##
77# @QCryptodevInfo:
78#
79# Information about a crypto device.
80#
81# @id: the id of the crypto device
82#
83# @service: supported service types of a crypto device
84#
85# @client: the additional information of the crypto device
86#
87# Since: 8.0
88##
89{ 'struct': 'QCryptodevInfo',
90  'data': { 'id': 'str',
91            'service': ['QCryptodevBackendServiceType'],
92            'client': ['QCryptodevBackendClient'] } }
93
94##
95# @query-cryptodev:
96#
97# Returns information about current crypto devices.
98#
99# Returns: a list of @QCryptodevInfo
100#
101# Since: 8.0
102##
103{ 'command': 'query-cryptodev', 'returns': ['QCryptodevInfo']}
104