Commit Graph

79 Commits

Author SHA1 Message Date
Hans Leidekker d17b118f03 bcrypt: Allow importing private ECDSA keys.
Based on a patch by Derek Lesho.

Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-29 21:26:35 +02:00
Brendan Shanks e6314baa5e bcrypt: Add tests for BCryptSecretAgreement/BCryptDestroySecret/BCryptDeriveKey.
Signed-off-by: Brendan Shanks <bshanks@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-20 22:19:58 +02:00
Zebediah Figura 46eac8de74 bcrypt/tests: Fix some failures on Windows 7.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-22 16:43:12 +02:00
Hans Leidekker 7cf9a75dfa bcrypt: Add support for importing and exporting DSS private keys.
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-03 21:46:30 +02:00
Hans Leidekker c2a4a4ec3c bcrypt: Add support for BCRYPT_DSA_ALGORITHM.
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-29 20:05:30 +02:00
Hans Leidekker 0e17045288 bcrypt: Implement BCryptDeriveKeyCapi.
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-27 00:14:14 +02:00
Hans Leidekker 2bd5a8d572 bcrypt: Support retrieving the PaddingSchemes property for RSA.
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-02-17 15:05:00 +01:00
Michael Stefaniuc 7485362fa1 bcrypt/tests: Get rid of strcmp_wa().
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-02-04 21:54:01 +01:00
Derek Lesho c2840dce7f bcrypt/tests: Add tests for BCRYPT_KDF_HASH.
Signed-off-by: Derek Lesho <dlesho@codeweavers.com>
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-01-08 21:10:38 +01:00
Derek Lesho 044d585151 bcrypt/tests: Add test for BCryptSecretAgreement.
Signed-off-by: Derek Lesho <dlesho@codeweavers.com>
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-01-08 21:10:35 +01:00
Derek Lesho 741f8ae24e bcrypt: Add more BCryptSignHash tests.
Signed-off-by: Derek Lesho <dlesho@codeweavers.com>
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-06 22:30:23 +01:00
Hans Leidekker f4d6df8947 bcrypt: Avoid recreating cipher handles when the initialization vector doesn't change.
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-06 16:03:50 +01:00
Hans Leidekker 04631f9c6e bcrypt: Implement BCryptEnumAlgorithms.
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-09-30 22:24:27 +02:00
Hans Leidekker 98b230f851 bcrypt: Implement BCryptSignHash.
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-09-23 19:44:18 +02:00
Hans Leidekker 691fcebf3d bcrypt: Ignore the size parameter in BCRYPT_CHAINING_MODE setters.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=47432
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-07-05 17:38:04 +02:00
Hans Leidekker 4c649116a5 bcrypt: Add support for BCRYPT_RSA_SIGN_ALGORITHM.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=47371
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-06-17 20:47:34 +02:00
Hans Leidekker c1746612b2 bcrypt: Add stub implementations of BCryptEnumContextFunctions and BCryptFreeBuffer.
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-06-17 20:47:32 +02:00
Hans Leidekker 98ea906b96 bcrypt: Implement BCRYPT_HASH_REUSABLE_FLAG.
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-03-06 18:32:00 +01:00
Hans Leidekker f0a18f6f19 bcrypt: Implement BCryptDeriveKeyPBKDF2.
Based on a patch by Jack Grigg.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=42704
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-13 19:45:24 +01:00
Hans Leidekker 158ce169e4 bcrypt: Add support for importing and exporting ECC private keys.
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-13 19:45:24 +01:00
Hans Leidekker 5c2ac77ab7 bcrypt: Add support for importing and exporting ECC public keys.
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-13 19:45:24 +01:00
Hans Leidekker 73b695f059 bcrypt: Implement BCryptGenerate/FinalizeKeyPair for ECDH P256.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=46564
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-13 19:45:24 +01:00
Hans Leidekker 370ffa0d14 bcrypt: Clear magic bytes on destroy.
Based on a patch by Steven Noonan.

Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-12-17 10:08:03 +01:00
Hans Leidekker dc97df72ff bcrypt: Support retrieving properties from key handles.
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-12-04 10:02:25 +01:00
Michael Stefaniuc 7f99932a39 bcrypt/tests: Use the available ARRAY_SIZE() macro.
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-05-29 09:28:23 +02:00
Hans Leidekker f352837868 bcrypt: Add support for BCRYPT_OPAQUE_KEY_BLOB.
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-03-29 16:06:03 +02:00
Kimmo Myllyvirta 2154562d7e bcrypt/tests: Add simple test for RSA.
Based on patch from Bernhard Übelacker.

Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-03-26 21:06:24 +02:00
Michael Müller 19e0f97f71 bcrypt: Implement BCryptVerifySignature for ECDSA signatures.
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-03-26 21:06:13 +02:00
Michael Müller 76b6c360fa bcrypt: Implement importing of ECDSA keys.
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-03-26 21:06:04 +02:00
Michael Müller 5946973021 bcrypt/tests: Add basic test for ECDSA.
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-03-23 16:28:22 +01:00
Michael Müller d0006d05c9 bcrypt: Add support for 192 and 256 bit AES keys.
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-03-23 16:28:20 +01:00
Hans Leidekker 0c55f8faa3 bcrypt: Implement support for ECB chain mode.
Based on a patch by Sebastian Lackner.

Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-03-23 16:28:17 +01:00
Andrew Wesie 5118eb3ab5 bcrypt: Fix BCryptEncrypt with AES_GCM and no input and no output.
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-03-22 11:41:38 +01:00
Hans Leidekker aabc55c491 bcrypt/tests: Add more tests for BCryptGenerateSymmetricKey and BCryptDuplicateKey.
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-03-22 11:41:29 +01:00
Sebastian Lackner e7923d3e0d bcrypt/tests: Add tests for auth data in AES GCM mode.
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-03-22 11:41:24 +01:00
Sebastian Lackner 4f4adf6972 bcrypt/tests: Add tests for BCryptDuplicateKey.
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-03-22 11:41:16 +01:00
Michael Müller 1b999a447b bcrypt: Allow to call BCryptSetProperty on key objects.
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-03-21 10:41:24 +01:00
Michael Müller c7b46e8e3c bcrypt: Add support for computing/comparing cipher tag.
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-03-21 10:41:19 +01:00
Michael Müller 8d2b1d276d bcrypt: Implement BCryptDecrypt for AES GCM mode.
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-03-21 10:41:15 +01:00
Michael Müller 7c9291ce07 bcrypt: Implement BCryptEncrypt for AES GCM mode.
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-03-21 10:41:12 +01:00
Michael Müller 313c06bfbf bcrypt: Implement BCryptGetProperty for BCRYPT_AUTH_TAG_LENGTH.
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-03-19 13:16:32 +01:00
Michael Müller ba1ed4432c bcrypt: Implement BCryptGetProperty for BCRYPT_CHAINING_MODE.
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-03-19 13:16:32 +01:00
Michael Müller 7ec0892ab7 bcrypt: Implement BCryptSetProperty for algorithms.
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-03-19 13:16:32 +01:00
Michael Müller 3fe621b6e5 bcrypt/tests: Add tests for AES GCM mode.
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-03-19 13:15:10 +01:00
Hans Leidekker c77d5c65fb bcrypt: Partial implementation of BCryptImportKey and BCryptExportKey.
Based on a patch by Michael Müller.

Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-02-28 17:24:38 +01:00
Sebastian Lackner 1db5170f49 bcrypt: Correctly check the size in BCryptGetProperty.
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-02-28 17:24:36 +01:00
Jacek Caban e73d4e55a9 bcrypt: Added support for MD4 hashes.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-12-07 20:11:11 +01:00
Jacek Caban 85657376b3 bcrypt: Added MD2 hash support.
By adopting rsaenh implementation.

Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-12-07 20:10:28 +01:00
Jacek Caban 1d0d119716 bcrypt/tests: Use common helper for testing different hash types.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-12-07 20:09:40 +01:00
Nikolay Sivov a71062b95c bcrypt: Support BCRYPT_KEY_LENGTHS property for AES.
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-08-18 08:08:44 +09:00