Repository navigation
Commit 561a5c2
drivers/vhost: add asymmetric support to vhost-crypto
Handle the AKCIPHER service on the crypto backend: RSA
encrypt/decrypt/sign/verify, ECDSA sign/verify/genkey and ECDH key
generation and shared-secret derivation, replayed as crypto_kinvoke()
calls against the locally registered key backends. RSA keys arrive
DER-encoded and are parsed once per session into the cryptodev
parameter slots; ECDSA and ECDH keys and signatures are raw field
elements sized by the curve table.
Sessions now carry either the symmetric descriptor chain or the
asymmetric key material, decided once at CREATE_SESSION, and the RSA
DER scratch buffer is sized by the new
CONFIG_DRIVERS_VHOST_CRYPTO_RSA_KEYBUF_SIZE.
Signed-off-by: makejian <makejian@xiaomi.com>1 parent c1842f2 commit 561a5c2
2 files changed
Lines changed: 747 additions & 31 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
115 | 115 | | |
116 | 116 | | |
117 | 117 | | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
118 | 131 | | |
119 | 132 | | |
120 | 133 | | |
| |||
0 commit comments