Hi Daniel,
On 2017/2/8 18:53, Daniel P. Berrange wrote:
> On Wed, Feb 08, 2017 at 06:46:04PM +0800, Longpeng (Mike) wrote:
>> Hi Daniel,
>>
>> I was writing AF_ALG-backed for QEMU crypto these days, I think there're more
>> than two ways to implements it.
>>
way you'd prefer, or do you have any better
suggestion?
Thanks!
--
Regards,
Longpeng(Mike)
On 2017/1/10 21:30, Daniel P. Berrange wrote:
> On Tue, Jan 10, 2017 at 12:17:48PM +, Gonglei (Arei) wrote:
>>>
>>>>>
>>>>>>
>>>>>>>
Hi Daniel,
On 2017/2/9 18:11, Daniel P. Berrange wrote:
> On Thu, Feb 09, 2017 at 10:58:55AM +0800, Longpeng (Mike) wrote:
>> Hi Daniel,
>>
>> So...you prefer approach 1 with a driver-table dispatch layer, right?
>> And this implies that we must either rename some
As qvring_indirect_desc_setup() wouldn't initialize last vring_desc,
so it's filled with dirty data, this might cause virtio backend broken.
For example, the last bit of this vring_desc's flags might be 1, so
virtqueue_read_next_desc() would report "Desc next is ***".
Signed-off-by
Hi Stefan,
On 2017/1/16 22:13, Stefan Hajnoczi wrote:
> On Sat, Jan 14, 2017 at 05:59:36PM +0800, Longpeng(Mike) wrote:
..
>> diff --git a/tests/libqos/virtio.c b/tests/libqos/virtio.c
>> index ec30cb9..b29c69e 100644
>> --- a/tests/libqos/virtio.c
>>
Hi Eduardo,
On 2016/9/6 2:53, Eduardo Habkost wrote:
> On Fri, Sep 02, 2016 at 10:22:55AM +0800, Longpeng(Mike) wrote:
> [...]
>> ---
>> Changes since v2:
>> - add more useful commit mesage.
>> - rename "compat-cache" to "l3-cache-shared
Signed-off-by: Longpeng(Mike) <longpe...@huawei.com>
---
hw/i386/pc_piix.c| 17 ++---
hw/i386/pc_q35.c | 16 +---
include/hw/compat.h | 2 ++
include/hw/i386/pc.h | 3 +++
4 files changed, 32 insertions(+), 6 deletions(-)
diff --git a/hw/i386/pc_piix.
.2%~33.1%(avg:15.7%).
Signed-off-by: Longpeng(Mike) <longpe...@huawei.com>
---
include/hw/i386/pc.h | 9 +
target-i386/cpu.c| 49 -
target-i386/cpu.h| 6 ++
3 files changed, 59 insertions(+), 5 deletions(-)
diff --git a/include/h
_COMPAT_2_7.
- fix a "intentionally introducde bug": make intel's and amd's consistently.
- fix the CPUID.(EAX=4, ECX=3):EAX[25:14].
- test the performance if vcpus running on sparate sockets: with L3 cache,
the performance improves 7.2%~33.1%(avg: 15.7%).
---
Longpeng(Mike) (2):
pc:
Signed-off-by: Longpeng(Mike) <longpe...@huawei.com>
---
hw/i386/pc_piix.c| 16 +---
hw/i386/pc_q35.c | 13 +++--
include/hw/compat.h | 2 ++
include/hw/i386/pc.h | 3 +++
4 files changed, 29 insertions(+), 5 deletions(-)
diff --git a/hw/i386/pc_piix.c b/h
.2%~33.1%(avg:15.7%).
Signed-off-by: Longpeng(Mike) <longpe...@huawei.com>
---
include/hw/i386/pc.h | 9 +
target-i386/cpu.c| 49 -
target-i386/cpu.h| 6 ++
3 files changed, 59 insertions(+), 5 deletions(-)
diff --git a/include/h
_COMPAT_2_7.
- fix a "intentionally introducde bug": make intel's and amd's consistently.
- fix the CPUID.(EAX=4, ECX=3):EAX[25:14].
- test the performance if vcpus running on sparate sockets: with L3 cache,
the performance improves 7.2%~33.1%(avg: 15.7%).
---
Longpeng(Mike) (2):
pc:
.2%~33.1%(avg:15.7%).
Signed-off-by: Longpeng(Mike) <longpe...@huawei.com>
---
Changes since v2:
- add more useful commit mesage.
- rename "compat-cache" to "l3-cache-shared".
Changes since v1:
- fix the compat problem: set compat_props on PC_COMPAT_2_7.
- fix a
Hi Michael,
On 2016/9/1 21:27, Michael S. Tsirkin wrote:
> On Thu, Sep 01, 2016 at 02:58:05PM +0800, l00371263 wrote:
>> From: "Longpeng(Mike)" <longpe...@huawei.com>
>>
>> Some software algorithms are based on the hardware's cache info, for example,
&g
From: "Longpeng(Mike)" <longp...@huawei2.com>
Some software algorithms are based on the hardware's cache info, for example,
for x86 linux kernel, when cpu1 want to wakeup a task on cpu2, cpu1 will trigger
a resched IPI and told cpu2 to do the wakeup if they don't share low level
c
Hi Michael,
On 2016/9/3 6:52, Michael S. Tsirkin wrote:
> On Fri, Sep 02, 2016 at 10:22:55AM +0800, Longpeng(Mike) wrote:
>> From: "Longpeng(Mike)" <longp...@huawei2.com>
>>
>> Some software algorithms are based on the hardware's cache info, for example,
&g
Hi Eduardo,
On 2016/8/30 22:25, Eduardo Habkost wrote:
> On Mon, Aug 29, 2016 at 09:17:02AM +0800, Longpeng (Mike) wrote:
>> This patch presents virtual L3 cache info for virtual cpus.
>
> Just changing the L3 cache size in the CPUID code will make
> guests see a different ca
> target-i386: turn off CPU.l3-cache only for 2.7 and older machine
> types
>
> include/hw/i386/pc.h | 10 +-
> 1 file changed, 5 insertions(+), 5 deletions(-)
>
You're right, thank you for correcting my mistakes :)
--
Regards,
Longpeng(Mike)
This will used by the next patch.
Signed-off-by: Longpeng(Mike) <longpe...@huawei.com>
---
hw/i386/pc_piix.c| 16 +---
hw/i386/pc_q35.c | 13 +++--
include/hw/i386/pc.h | 3 +++
3 files changed, 27 insertions(+), 5 deletions(-)
diff --git a/hw/i386/pc_piix.
.2%~33.1%(avg:15.7%).
Signed-off-by: Longpeng(Mike) <longpe...@huawei.com>
---
include/hw/i386/pc.h | 9 +
target-i386/cpu.c| 49 -
target-i386/cpu.h| 6 ++
3 files changed, 59 insertions(+), 5 deletions(-)
diff --git a/include/h
parate sockets: with L3 cache,
the performance improves 7.2%~33.1%(avg: 15.7%).
Longpeng(Mike) (2):
pc: Add 2.8 machine
target-i386: present virtual L3 cache info for vcpus
hw/i386/pc_piix.c| 16 +---
hw/i386/pc_q35.c | 13 +++--
include/hw/i386
topology is "1*socket 8*cores 2*threads".
After present virtual L3 cache info for VM, the amounts of RES IPI in guest
reduce 85%.
Signed-off-by: Longpeng(Mike) <longpe...@huawei.com>
---
target-i386/cpu.c | 34 +++---
1 file changed, 27 insertions(+), 7
On 2016/12/8 17:33, Daniel P. Berrange wrote:
> On Thu, Dec 08, 2016 at 10:33:28AM +0800, Longpeng(Mike) wrote:
>> Libgcrypt and nettle support 3des-ede, so this patch add 3des-ede
>> support when using libgcrypt or nettle.
>>
>> Signed-off-by: Longpeng(
Since QEMU has been supported cryptodev, so it is necessary to support
more crypto algorithms(i.e. hmac,aead) in QEMU backend.
This patchset add HMAC algorithms support.
Longpeng(Mike) (7):
qapi: crypto: add defination about HMAC algorithms
crypto: add HMAC algorithms framework
configure
This patch add HMAC algorithms testcases
Signed-off-by: Longpeng(Mike) <longpe...@huawei.com>
---
tests/Makefile.include | 2 +
tests/test-crypto-hmac.c | 162 +++
2 files changed, 164 insertions(+)
create mode 100644 tests/test-crypto-
This item will be used for support libcrypt-backed HMAC algorithms.
Support for hmac has been added in Libgcrypt 1.6.0, but we cannot
use pkg-config to get libcrypt's version. However we can make a
in configure to know whether current libcrypt support hmac.
Signed-off-by: Longpeng(Mike) <lon
This patch add glibc-backed HMAC algorithms support
Signed-off-by: Longpeng(Mike) <longpe...@huawei.com>
---
crypto/hmac-glib.c | 119 +
1 file changed, 119 insertions(+)
diff --git a/crypto/hmac-glib.c b/crypto/hmac-glib.c
index 4
This patch introduce HMAC algorithms relevant defination, they will
be used by the following patch.
Signed-off-by: Longpeng(Mike) <longpe...@huawei.com>
---
qapi/crypto.json | 17 +
1 file changed, 17 insertions(+)
diff --git a/qapi/crypto.json b/qapi/crypto.json
index f
This patch add nettle-backed HMAC algorithms support
Signed-off-by: Longpeng(Mike) <longpe...@huawei.com>
---
crypto/hmac-nettle.c | 118 +--
1 file changed, 115 insertions(+), 3 deletions(-)
diff --git a/crypto/hmac-nettle.c b/crypt
Since QEMU has been supported cryptodev, so it is necessary to support
more crypto algorithms(i.e. hmac,aead) in QEMU backend.
This patchset add HMAC algorithms support.
---
Changes since v1:
- check whether algorithm is supported in testcase [build test]
---
Longpeng(Mike) (7):
qapi
This patch add HMAC algorithms based on libgcrypt support
Signed-off-by: Longpeng(Mike) <longpe...@huawei.com>
---
crypto/hmac-gcrypt.c | 138 +++
1 file changed, 138 insertions(+)
diff --git a/crypto/hmac-gcrypt.c b/crypto/hmac-gcrypt.c
This patch introduce HMAC algorithms framework.
Signed-off-by: Longpeng(Mike) <longpe...@huawei.com>
---
crypto/Makefile.objs | 4 ++
crypto/hmac-gcrypt.c | 44 ++
crypto/hmac-glib.c | 44 ++
crypto/hmac-nettle.c | 44 ++
crypto/hmac.c
This patch add glibc-backed HMAC algorithms support
Signed-off-by: Longpeng(Mike) <longpe...@huawei.com>
---
crypto/hmac-glib.c | 119 +
1 file changed, 119 insertions(+)
diff --git a/crypto/hmac-glib.c b/crypto/hmac-glib.c
index 4
This patch add HMAC algorithms testcases
Signed-off-by: Longpeng(Mike) <longpe...@huawei.com>
---
tests/Makefile.include | 2 +
tests/test-crypto-hmac.c | 166 +++
2 files changed, 168 insertions(+)
create mode 100644 tests/test-crypto-
This patch introduce HMAC algorithms relevant defination, they will
be used by the following patch.
Signed-off-by: Longpeng(Mike) <longpe...@huawei.com>
---
qapi/crypto.json | 17 +
1 file changed, 17 insertions(+)
diff --git a/qapi/crypto.json b/qapi/crypto.json
index f
This patch introduce HMAC algorithms framework.
Signed-off-by: Longpeng(Mike) <longpe...@huawei.com>
---
crypto/Makefile.objs | 4 ++
crypto/hmac-gcrypt.c | 44 ++
crypto/hmac-glib.c | 44 ++
crypto/hmac-nettle.c | 44 ++
crypto/hmac.c
This patch add HMAC algorithms based on libgcrypt support
Signed-off-by: Longpeng(Mike) <longpe...@huawei.com>
---
crypto/hmac-gcrypt.c | 138 +++
1 file changed, 138 insertions(+)
diff --git a/crypto/hmac-gcrypt.c b/crypto/hmac-gcrypt.c
This patch add nettle-backed HMAC algorithms support
Signed-off-by: Longpeng(Mike) <longpe...@huawei.com>
---
crypto/hmac-nettle.c | 118 +--
1 file changed, 115 insertions(+), 3 deletions(-)
diff --git a/crypto/hmac-nettle.c b/crypt
This item will be used for support libcrypt-backed HMAC algorithms.
Support for hmac has been added in Libgcrypt 1.6.0, but we cannot
use pkg-config to get libcrypt's version. However we can make a
in configure to know whether current libcrypt support hmac.
Signed-off-by: Longpeng(Mike) <lon
This patch add glibc-backed HMAC algorithms support
Signed-off-by: Longpeng(Mike) <longpe...@huawei.com>
---
crypto/hmac-glib.c | 99 --
1 file changed, 97 insertions(+), 2 deletions(-)
diff --git a/crypto/hmac-glib.c b/crypto/hmac-
This patch introduce HMAC algorithms framework.
Signed-off-by: Longpeng(Mike) <longpe...@huawei.com>
---
crypto/Makefile.objs | 4 ++
crypto/hmac-gcrypt.c | 45 ++
crypto/hmac-glib.c | 44 ++
crypto/hmac-nettle.c | 45 ++
crypto/hmac.c
This patch add nettle-backed HMAC algorithms support
Signed-off-by: Longpeng(Mike) <longpe...@huawei.com>
---
crypto/hmac-nettle.c | 136 +--
1 file changed, 133 insertions(+), 3 deletions(-)
diff --git a/crypto/hmac-nettle.c b/crypt
n testcase [build test]
---
Longpeng(Mike) (6):
configure: add CONFIG_GCRYPT_HMAC item
crypto: add HMAC algorithms framework
crypto: support HMAC algorithms based on libgcrypt
crypto: support HMAC algorithms based on glibc
crypto: support HMAC algorithms based on nettle
crypto: add HMAC
Hi Daniel,
Thanks for your review, and I fix them as your suggestion in V3,
please review V3 when you're free. :)
Regards,
On 2016/12/12 18:31, Daniel P. Berrange wrote:
> On Mon, Dec 12, 2016 at 04:08:12PM +0800, Longpeng(Mike) wrote:
>> This patch add HMAC algorithms testcases
>
This patch add HMAC algorithms based on libgcrypt support
Signed-off-by: Longpeng(Mike) <longpe...@huawei.com>
---
crypto/hmac-gcrypt.c | 111 ++-
1 file changed, 109 insertions(+), 2 deletions(-)
diff --git a/crypto/hmac-gcrypt.c b/crypt
This item will be used for support libcrypt-backed HMAC algorithms.
Support for hmac has been added in Libgcrypt 1.6.0, but we cannot
use pkg-config to get libcrypt's version. However we can make a
in configure to know whether current libcrypt support hmac.
Signed-off-by: Longpeng(Mike) <lon
This patch add HMAC algorithms testcases
Signed-off-by: Longpeng(Mike) <longpe...@huawei.com>
---
tests/Makefile.include | 2 +
tests/test-crypto-hmac.c | 266 +++
2 files changed, 268 insertions(+)
create mode 100644 tests/test-crypto-
implicit declaration of
> function ‘g_hmac_new’
> /tmp/qemu-test/src/crypto/hmac-glib.c:74: warning: nested extern declaration
> of ‘g_hmac_new’
> /tmp/qemu-test/src/crypto/hmac-glib.c:76: error: ‘QCryptoHmacGlib’ has no
> member named ‘ghmac’
> /tmp/qemu-test/src/crypto/hmac-glib.c: In function ‘qcrypto_hmac_free’:
> /tmp/qemu-test/src/crypto/hmac-glib.c:99: warning: implicit declaration of
> function ‘g_hmac_unref’
> /tmp/qemu-test/src/crypto/hmac-glib.c:99: warning: nested extern declaration
> of ‘g_hmac_unref’
> /tmp/qemu-test/src/crypto/hmac-glib.c:99: error: ‘QCryptoHmacGlib’ has no
> member named ‘ghmac’
> /tmp/qemu-test/src/crypto/hmac-glib.c: In function ‘qcrypto_hmac_bytesv’:
> /tmp/qemu-test/src/crypto/hmac-glib.c:118: warning: implicit declaration of
> function ‘g_hmac_update’
> /tmp/qemu-test/src/crypto/hmac-glib.c:118: warning: nested extern declaration
> of ‘g_hmac_update’
> /tmp/qemu-test/src/crypto/hmac-glib.c:118: error: ‘QCryptoHmacGlib’ has no
> member named ‘ghmac’
> /tmp/qemu-test/src/crypto/hmac-glib.c:136: warning: implicit declaration of
> function ‘g_hmac_get_digest’
> /tmp/qemu-test/src/crypto/hmac-glib.c:136: warning: nested extern declaration
> of ‘g_hmac_get_digest’
> /tmp/qemu-test/src/crypto/hmac-glib.c:136: error: ‘QCryptoHmacGlib’ has no
> member named ‘ghmac’
> make: *** [crypto/hmac-glib.o] Error 1
> make: *** Waiting for unfinished jobs
> CC hw/bt/hci-csr.o
> make[1]: *** [docker-run] Error 2
> make[1]: Leaving directory `/var/tmp/patchew-tester-tmp-9oq6lvoc/src'
> make: *** [docker-run-test-quick@centos6] Error 2
> === OUTPUT END ===
>
> Test command exited with code: 2
>
>
> ---
> Email generated automatically by Patchew [http://patchew.org/].
> Please send your feedback to patchew-de...@freelists.org
--
Regards,
Longpeng(Mike)
This patch add nettle-backed HMAC algorithms support
Signed-off-by: Longpeng(Mike) <longpe...@huawei.com>
---
crypto/hmac-nettle.c | 136 +--
1 file changed, 133 insertions(+), 3 deletions(-)
diff --git a/crypto/hmac-nettle.c b/crypt
t. [Daniel]
- rewrite testcase based on test-crypto-hash. [Daniel]
Changes since v1:
- check whether algorithm is supported in testcase [build test]
---
Longpeng(Mike) (6):
configure: add CONFIG_GCRYPT_HMAC item
crypto: add HMAC algorithms framework
crypto: support HMAC algorithms based on
This patch add HMAC algorithms testcases
Signed-off-by: Longpeng(Mike) <longpe...@huawei.com>
---
tests/Makefile.include | 2 +
tests/test-crypto-hmac.c | 266 +++
2 files changed, 268 insertions(+)
create mode 100644 tests/test-crypto-
This patch add glib-backed HMAC algorithms support
Signed-off-by: Longpeng(Mike) <longpe...@huawei.com>
---
crypto/hmac-glib.c | 122 +
1 file changed, 122 insertions(+)
diff --git a/crypto/hmac-glib.c b/crypto/hmac-glib.c
index 3
This patch introduce HMAC algorithms framework.
Signed-off-by: Longpeng(Mike) <longpe...@huawei.com>
---
crypto/Makefile.objs | 4 ++
crypto/hmac-gcrypt.c | 45 ++
crypto/hmac-glib.c | 44 ++
crypto/hmac-nettle.c | 45 ++
crypto/hmac.c
Hi Daniel,
On 2016/12/13 17:35, Daniel P. Berrange wrote:
> On Tue, Dec 13, 2016 at 03:01:47PM +0800, Longpeng(Mike) wrote:
>> Since QEMU has been supported cryptodev, so it is necessary to support
>> more crypto algorithms(i.e. hmac,aead) in QEMU backend.
>>
>> This p
This item will be used for support libcrypt-backed HMAC algorithms.
Support for hmac has been added in Libgcrypt 1.6.0, but we cannot
use pkg-config to get libcrypt's version. However we can make a
in configure to know whether current libcrypt support hmac.
Signed-off-by: Longpeng(Mike) <lon
This patch add HMAC algorithms based on libgcrypt support
Signed-off-by: Longpeng(Mike) <longpe...@huawei.com>
---
crypto/hmac-gcrypt.c | 111 ++-
1 file changed, 109 insertions(+), 2 deletions(-)
diff --git a/crypto/hmac-gcrypt.c b/crypt
Single-DES is obsolete and it's broken/useless for decades, we should
remove it in cryptodev, as suggested by Daniel.
Guest who wants to use this obsolete cipher alg will use its built-in
implementation instead.
Signed-off-by: Longpeng(Mike) <longpe...@huawei.com>
---
backends/cry
Hi Eric,
On 2016/12/6 3:15, Eric Blake wrote:
> On 12/05/2016 02:59 AM, Longpeng(Mike) wrote:
>> This patch add standart DES support.
>
> s/standart/standard/
>
>>
>> Signed-off-by: Longpeng(Mike) <longpe...@huawei.com>
>> ---
>
>> +++
This patch add 3des-ede support for cryptodev. However this is effective
only when backend using libgcrypt/nettle, because cipher-builtin doesn't
support 3des-ede yet.
Signed-off-by: Longpeng(Mike) <longpe...@huawei.com>
---
backends/cryptodev-builtin.c | 12
1 file chang
Libgcrypt and nettle support 3des-ede, so this patch add 3des-ede
support when using libgcrypt or nettle.
Signed-off-by: Longpeng(Mike) <longpe...@huawei.com>
---
crypto/cipher-gcrypt.c | 6 ++
crypto/cipher-nettle.c | 37 +
crypto/ci
On 2016/12/7 17:19, Longpeng (Mike) wrote:
>
>
> On 2016/12/7 16:52, Gonglei (Arei) wrote:
>
>>> -Original Message-
>>> From: longpeng
>>> Sent: Wednesday, December 07, 2016 4:34 PM
>>> To: berra...@redhat.com; ebl...@redhat.com; ar
This patchset add 3DES-EDE support when using gcrypt/nettle.
Due to the virtio-crypto has been supportted, the guest can use
various cipher-algo including 3DES-EDE.
Longpeng(Mike) (2):
crypto: add 3des-ede support when using libgcrypt/nettle
cryptodev: add 3des-ede support
backends
(H); Zhoujian (jay, Euler); longpeng
>> Subject: [PATCH for-2.9 1/2] crypto: add 3des-ede support when using
>> libgcrypt/nettle
>>
>> Libgcrypt and nettle support 3des-ede, so this patch add 3des-ede
>> support when using libgcrypt or nettle.
>>
>> Si
Hi Daniel,
On 2016/12/7 17:37, Daniel P. Berrange wrote:
> On Wed, Dec 07, 2016 at 04:33:41PM +0800, Longpeng(Mike) wrote:
..
>> diff --git a/qapi/crypto.json b/qapi/crypto.json
>> index 5c9d7d4..848b6cd 100644
>> --- a/qapi/crypto.json
>> +++ b/qapi/cr
Libgcrypt and nettle support 3des-ede, so this patch add 3des-ede
support when using libgcrypt or nettle.
Signed-off-by: Longpeng(Mike) <longpe...@huawei.com>
---
Changes since v1:
- rename 3des-ede to 3des. [Daniel]
- add (since 2.9) in comment. [Gonglei]
- add ctr(3des) te
This patch add 3des-ede support for cryptodev. However this is effective
only when backend using libgcrypt/nettle, because cipher-builtin doesn't
support 3des-ede yet.
Signed-off-by: Longpeng(Mike) <longpe...@huawei.com>
---
Changes since v1:
- split the original pathset. [G
d the last VRingDesc in qvring_indirect_desc_setup().
Signed-off-by: Longpeng(Mike) <longpe...@huawei.com>
---
tests/libqos/virtio.c | 8
1 file changed, 8 insertions(+)
diff --git a/tests/libqos/virtio.c b/tests/libqos/virtio.c
index ec30cb9..b29c69e 100644
--- a/tests/libqos/virt
ECB mode cipher doesn't need IV, if we setiv for it then qemu
crypto API would report "Expected IV size 0 not **", so we should
setiv only when the cipher algos really need.
Signed-off-by: Longpeng(Mike) <longpe...@huawei.com>
---
backends/cryptodev-builtin.c | 10 ++
1
Hi Daniel,
On 2016/12/5 17:18, Daniel P. Berrange wrote:
> On Mon, Dec 05, 2016 at 04:59:38PM +0800, Longpeng(Mike) wrote:
..
>> diff --git a/qapi/crypto.json b/qapi/crypto.json
>> index 5c9d7d4..d403ab9 100644
>> --- a/qapi/crypto.json
>> +++ b/qapi/cr
This patch add xts(aes) support.
Signed-off-by: Longpeng(Mike) <longpe...@huawei.com>
Reviewed-by: Gonglei <arei.gong...@huawei.com>
---
backends/cryptodev-builtin.c | 8
1 file changed, 8 insertions(+)
diff --git a/backends/cryptodev-builtin.c b/backends/cryptodev-bui
As the key length of xts(aes) is different with other mode of aes,
so we should check specially in cryptodev_builtin_get_aes_algo, if
it is xts mode.
Signed-off-by: Longpeng(Mike) <longpe...@huawei.com>
---
backends/cryptodev-builtin.c | 47 +++-
This patchset firstly fix a bug in cryptodev_builtin_get_aes_algo, and
then add xts(aes) algorithm support.
---
Changes since v1:
- change macro's defination. [Arei]
---
Longpeng(Mike) (2):
cryptodev: fix the check of aes algorithm
cryptodev: add xts(aes) support
backends/cryptodev
The cryptodev use DES-RFB for ecb(des) currently, we should use
standard DES for cryptodev instead.
Signed-off-by: Longpeng(Mike) <longpe...@huawei.com>
---
backends/cryptodev-builtin.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/backends/cryptodev-builtin.c b/ba
This patch add standart DES support.
Signed-off-by: Longpeng(Mike) <longpe...@huawei.com>
---
crypto/cipher-gcrypt.c | 3 +++
crypto/cipher-nettle.c | 13 ++---
crypto/cipher.c| 5 -
qapi/crypto.json | 2 +-
4 files changed, 18 insertions(+), 5 deletions(-)
As we have added standart DES support when using gcrypt/nettle,
so this patch add a testcase for standard ecb(des).
Note: the data is copied from linux-kernel's tcrypt module.
Signed-off-by: Longpeng(Mike) <longpe...@huawei.com>
---
tests/test-crypto-cipher.c | 11 +++
1 file c
Hi Daniel,
On 2016/12/5 17:24, Daniel P. Berrange wrote:
> On Mon, Dec 05, 2016 at 04:59:40PM +0800, Longpeng(Mike) wrote:
..
>> {
>> +.path = "/crypto/cipher/des-ecb",
>> +.alg = QCRYPTO_CIPHER_ALG_DES,
>> +.mode = QCRY
This patchset firstly fix a bug in cryptodev_builtin_get_aes_algo, and
then add xts(aes) algorithm support.
Longpeng(Mike) (2):
cryptodev: fix the check of aes algorithm
cryptodev: add xts(aes) support
backends/cryptodev-builtin.c | 55 +---
1 file
This patch add xts(aes) support.
Signed-off-by: Longpeng(Mike) <longpe...@huawei.com>
---
backends/cryptodev-builtin.c | 8
1 file changed, 8 insertions(+)
diff --git a/backends/cryptodev-builtin.c b/backends/cryptodev-builtin.c
index 9dec6b8..ecad565 100644
--- a/backends/cry
As the key length of xts(aes) is different with other mode of aes,
so we should check specially in cryptodev_builtin_get_aes_algo, if
it is xts mode.
Signed-off-by: Longpeng(Mike) <longpe...@huawei.com>
---
backends/cryptodev-builtin.c | 47 +++-
including standard DES.
Longpeng(Mike) (3):
crypto: add standard des support
cryptodev: switch to standard des
tests: crypto: add testcase for standard des(ecb)
backends/cryptodev-builtin.c | 2 +-
crypto/cipher-gcrypt.c | 3 +++
crypto/cipher-nettle.c | 13 ++---
crypto
56;
>> +} else if (key_len == AES_KEYSIZE_256) { /* equals AES_KEYSIZE_128_XTS
>> */
>
> So I think you can:
> #define AES_KEYSIZE_128_XTS AES_KEYSIZE_256
All right, I send a V2 later. :)
>
>
> Regards,
> -Gonglei
>
..
>
--
Regards,
Longpeng(Mike)
This patch add gcrypt-backed AEAD algorithms support
Signed-off-by: Longpeng(Mike) <longpe...@huawei.com>
---
crypto/aead-gcrypt.c | 173 +--
1 file changed, 167 insertions(+), 6 deletions(-)
diff --git a/crypto/aead-gcrypt.c b/crypt
This item will be used for gcrypt/nettle backed AEAD algorithms.
It's hardly to decide which version of gcrypt/nettle started
supporting AEAD algorithms, but it's easily for us to making
a test in configure to know whether current gcrypt/nettle
support AEAD.
Signed-off-by: Longpeng(Mike) <lon
This patch introduce AEAD algorithms framework.
We currently plan to support six basic AEAD algorithms,
ccm(aes128/192/256) and gcm(aes128/192/256), so we need
to add ccm/gcm mode in qapi/crypto.json simultaneously.
Signed-off-by: Longpeng(Mike) <longpe...@huawei.com>
---
crypto/Makefil
,
and it will be used by the virtio-crypto in the near future.
---
Longpeng(Mike) (6):
configure: add CONFIG_GCRYPT/NETTLE_AEAD item
crypto: add AEAD algorithms framework
crypto: implement nettle-backed AEAD algorithms
crypto: implement gcrypt-backed AEAD algorithms
crypto: implement
This patch add some AEAD algorithms testcases
Signed-off-by: Longpeng(Mike) <longpe...@huawei.com>
---
tests/Makefile.include | 2 +
tests/test-crypto-aead.c | 357 +++
2 files changed, 359 insertions(+)
create mode 100644 tests/test-crypto-
This patch add nettle-backed AEAD algorithms
Signed-off-by: Longpeng(Mike) <longpe...@huawei.com>
---
crypto/aead-nettle.c | 174 ---
1 file changed, 167 insertions(+), 7 deletions(-)
diff --git a/crypto/aead-nettle.c b/crypto/aead-nettle.c
If currently gcrypt/nettle doesn't support AEAD alg, then
we should implement some no-op funcs.
Signed-off-by: Longpeng(Mike) <longpe...@huawei.com>
---
crypto/aead.c | 44 ++--
1 file changed, 42 insertions(+), 2 deletions(-)
diff --git a/crypto/ae
This patch introduce AEAD algorithms framework.
We currently plan to support six basic AEAD algorithms,
ccm(aes128/192/256) and gcm(aes128/192/256), so we need
to add ccm/gcm mode in qapi/crypto.json simultaneously.
Signed-off-by: Longpeng(Mike) <longpe...@huawei.com>
---
crypto/Makefil
If currently gcrypt/nettle doesn't support AEAD alg, then
we should implement some no-op funcs.
Signed-off-by: Longpeng(Mike) <longpe...@huawei.com>
---
crypto/aead.c | 44 ++--
1 file changed, 42 insertions(+), 2 deletions(-)
diff --git a/crypto/ae
This patch add gcrypt-backed AEAD algorithms support
Signed-off-by: Longpeng(Mike) <longpe...@huawei.com>
---
crypto/aead-gcrypt.c | 173 +--
1 file changed, 167 insertions(+), 6 deletions(-)
diff --git a/crypto/aead-gcrypt.c b/crypt
Since QEMU has been supported cryptodev, so it is necessary to support
more crypto algorithms(i.e. hmac,aead) in QEMU backend.
We have already added HMAC support, and this patchset adds AEAD algos
support.
Longpeng(Mike) (6):
configure: add CONFIG_GCRYPT/NETTLE_AEAD item
crypto: add AEAD
This patch add some AEAD algorithms testcases
Signed-off-by: Longpeng(Mike) <longpe...@huawei.com>
---
tests/Makefile.include | 2 +
tests/test-crypto-aead.c | 357 +++
2 files changed, 359 insertions(+)
create mode 100644 tests/test-crypto-
This item will be used for gcrypt/nettle backed AEAD algorithms.
It's hardly to decide which version of gcrypt/nettle started
supporting AEAD algorithms, but it's easily for us to making
a test in configure to know whether current gcrypt/nettle
support AEAD.
Signed-off-by: Longpeng(Mike) <lon
This patch add nettle-backed AEAD algorithms
Signed-off-by: Longpeng(Mike) <longpe...@huawei.com>
---
crypto/aead-nettle.c | 174 ---
1 file changed, 167 insertions(+), 7 deletions(-)
diff --git a/crypto/aead-nettle.c b/crypto/aead-nettle.c
that Catalin
didn't do it, so I'm confuse about wether it is need to add a AF_ALG backend.
Do you have any suggestion? Thanks :)
--
Regards,
Longpeng(Mike)
Hi Daniel,
On 2017/1/6 19:28, Daniel P. Berrange wrote:
> On Thu, Jan 05, 2017 at 08:49:37AM +0800, Longpeng(Mike) wrote:
>> This patch introduce AEAD algorithms framework.
>
> So AEAD is essentially just encryption with extra metadata on
> input and output stages. As
Hi Daniel,
Can you pick this patch together ?
[PATCH for-2.9 v4 1/6] configure: add CONFIG_GCRYPT_HMAC item
Or it will be picked by somebody else ?
:)
On 2016/12/21 22:35, Daniel P. Berrange wrote:
> From: "Longpeng(Mike)" <longpe...@huawei.com>
>
> This patch
On 2017/4/10 23:01, Eric Blake wrote:
> On 04/10/2017 03:59 AM, Longpeng(Mike) wrote:
>> Refactors the qcrypto_cipher_free(), splits it into two parts. One
>> is gcrypt/nettle__cipher_free_ctx() to free the special context.
>
> Your mail forgot to include 'In-Reply
Extracts qcrypto_cipher_ctx_new() from qcrypto_cipher_new() for
glib-backend impls.
Signed-off-by: Longpeng(Mike) <longpe...@huawei.com>
---
crypto/cipher-builtin.c | 101 ++--
1 file changed, 55 insertions(+), 46 deletions(-)
diff --git a/
1 - 100 of 537 matches
Mail list logo