aboutsummaryrefslogtreecommitdiff
path: root/qapi/cryptodev.json
blob: f33f96a69203995c4bf48c611e39ead4049b77b4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
# -*- Mode: Python -*-
# vim: filetype=python
#
# This work is licensed under the terms of the GNU GPL, version 2 or later.
# See the COPYING file in the top-level directory.

##
# @QCryptodevBackendAlgType:
#
# The supported algorithm types of a crypto device.
#
# @sym: symmetric encryption
# @asym: asymmetric Encryption
#
# Since: 8.0
##
{ 'enum': 'QCryptodevBackendAlgType',
  'prefix': 'QCRYPTODEV_BACKEND_ALG',
  'data': ['sym', 'asym']}

##
# @QCryptodevBackendServiceType:
#
# The supported service types of a crypto device.
#
# Since: 8.0
##
{ 'enum': 'QCryptodevBackendServiceType',
  'prefix': 'QCRYPTODEV_BACKEND_SERVICE',
  'data': ['cipher', 'hash', 'mac', 'aead', 'akcipher']}

##
# @QCryptodevBackendType:
#
# The crypto device backend type
#
# @builtin: the QEMU builtin support
# @vhost-user: vhost-user
# @lkcf: Linux kernel cryptographic framework
#
# Since: 8.0
##
{ 'enum': 'QCryptodevBackendType',
  'prefix': 'QCRYPTODEV_BACKEND_TYPE',
  'data': ['builtin', 'vhost-user', 'lkcf']}

##
# @QCryptodevBackendClient:
#
# Information about a queue of crypto device.
#
# @queue: the queue index of the crypto device
#
# @type: the type of the crypto device
#
# Since: 8.0
##
{ 'struct': 'QCryptodevBackendClient',
  'data': { 'queue': 'uint32',
            'type': 'QCryptodevBackendType' } }

##
# @QCryptodevInfo:
#
# Information about a crypto device.
#
# @id: the id of the crypto device
#
# @service: supported service types of a crypto device
#
# @client: the additional infomation of the crypto device
#
# Since: 8.0
##
{ 'struct': 'QCryptodevInfo',
  'data': { 'id': 'str',
            'service': ['QCryptodevBackendServiceType'],
            'client': ['QCryptodevBackendClient'] } }

##
# @query-cryptodev:
#
# Returns information about current crypto devices.
#
# Returns: a list of @QCryptodevInfo
#
# Since: 8.0
##
{ 'command': 'query-cryptodev', 'returns': ['QCryptodevInfo']}