- 19 10月, 2016 1 次提交
-
-
由 Gonglei 提交于
It can't guarantee all cipher modes are supported if one cipher algorithm is supported by a backend. Let's extend qcrypto_cipher_supports() to take both the algorithm and mode as parameters. Signed-off-by: NGonglei <arei.gonglei@huawei.com> Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
- 12 9月, 2016 1 次提交
-
-
由 Daniel P. Berrange 提交于
Several error messages print out the raw enum value, which is less than helpful to users, as these values are not documented, nor stable across QEMU releases. Switch to use the enum string instead. The nettle impl also had two typos where it mistakenly said "algorithm" instead of "mode", and actually reported the algorithm value too. Reviewed-by: NMarkus Armbruster <armbru@redhat.com> Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
- 17 3月, 2016 2 次提交
-
-
由 Daniel P. Berrange 提交于
Introduce 'XTS' as a permitted mode for the cipher APIs. With XTS the key provided must be twice the size of the key normally required for any given algorithm. This is because the key will be split into two pieces for use in XTS mode. Reviewed-by: NEric Blake <eblake@redhat.com> Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Daniel P. Berrange 提交于
The built-in and nettle cipher backends for AES maintain two separate AES contexts, one for encryption and one for decryption. This is going to be inconvenient for the future code dealing with XTS, so wrap them up in a single struct so there is just one pointer to pass around for both encryption and decryption. Reviewed-by: NEric Blake <eblake@redhat.com> Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
- 29 1月, 2016 1 次提交
-
-
由 Peter Maydell 提交于
Clean up includes so that osdep.h is included first and headers which it implies are not included manually. This commit was created with scripts/clean-includes. Signed-off-by: NPeter Maydell <peter.maydell@linaro.org> Message-id: 1453832250-766-3-git-send-email-peter.maydell@linaro.org
-
- 23 10月, 2015 2 次提交
-
-
由 Daniel P. Berrange 提交于
When encrypting/decrypting data, the plaintext/ciphertext buffers are required to be a multiple of the cipher block size. If this is not done, nettle will abort and gcrypt will report an error. To get consistent behaviour add explicit checks upfront for the buffer sizes. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Daniel P. Berrange 提交于
If no IV is provided, then use a default IV of all-zeros instead of crashing. This gives parity with gcrypt and nettle backends. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
- 27 7月, 2015 1 次提交
-
-
由 Daniel P. Berrange 提交于
The qcrypto_cipher_decrypt_aes method was using the wrong key material, and passing the wrong mode. This caused it to incorrectly decrypt ciphertext. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com> Message-Id: <1437740634-6261-1-git-send-email-berrange@redhat.com> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
- 09 7月, 2015 1 次提交
-
-
由 Paolo Bonzini 提交于
This was dereferencing a pointer before checking if it was NULL. Reported-by: NChristian Borntraeger <borntraeger@de.ibm.com> Reported-by: NAurelien Jarno <aurelien@aurel32.net> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
- 08 7月, 2015 1 次提交
-
-
由 Daniel P. Berrange 提交于
Introduce a generic cipher API and an implementation of it that supports only the built-in AES and DES-RFB algorithms. The test suite checks the supported algorithms + modes to validate that every backend implementation is actually correctly complying with the specs. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com> Message-Id: <1435770638-25715-5-git-send-email-berrange@redhat.com> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-