aboutsummaryrefslogtreecommitdiff
path: root/qapi/cryptodev.json
blob: 04d0e21d209db11ff232b636f0caf7b9f2049e48 (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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
# -*- 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.

##
# = Cryptography devices
##

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

##
# @QCryptodevBackendServiceType:
#
# The supported service types of a crypto device.
#
# @cipher: Symmetric Key Cipher service
#
# @hash: Hash service
#
# @mac: Message Authentication Codes service
#
# @aead: Authenticated Encryption with Associated Data service
#
# @akcipher: Asymmetric Key Cipher service
#
# Since: 8.0
##
{ 'enum': 'QCryptodevBackendServiceType',
  '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',
  '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 information 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']}