mirror of
https://github.com/reactos/reactos.git
synced 2026-09-09 19:03:52 +08:00
Sync bcrypt/bcrypt winetest with latest wine. Implement all functionality with mbedtls. DSA is my implementation based on libtomcrypt implementation as mbedtls does not support DSA. All failing tests are wine_todo * [BCRYPT] Split implementations in different files. Add internal header. Add precompiled header. These changes are needed to make bcrypt more wine compatible * [BCRYPT] Update to latest bcrypt from wine. Add their gnutls implementation with small changes. Add missing function in the other implementations returning STATUS_NOT_IMPLEMENTED. WARNING! gnutls is modified just visually and is n ot compiled locally as we don't have gnutls in ReactOS for a long time and we depend on mbedtls implementation. * [BCRYPT] Remove forgotten code. Remove hmac BOOL and use hash->flags for hmac * [BCRYPT] Remove some dead code. Move flag defines in header. Use constant for flag * [BCRYPT][WINETEST] Update bcrypt wine test to current version. On windows it executes 23114 tests successfully * [MBEDTLS] Activate MD2 and MD4 hashing algorithms * [MBEDTLS] Export additional MD functions * [BCRYPT][WINETEST] Disable not implemented method tests * [BCRYPT] Remove unneeded headers * [BCRYPT] Fix some struct variables and add a hash method * [BCRYPT] Update common crypto implementation * [MBEDTLS] Expose AES CFB8 * [MBEDTLS] Export simetric encryption/decryption functions * [BCRYPT] Implement symetric encryption/decryption * [BCRYPT][WINETEST] Activate symetric encryption/decryption tests. From 22541 Only 3 fail on wine_todo * [BCRYPT][WINETEST] Disable pbkdf tests. They crash calling function with ULONGLONG parameter * [MBEDTLS] Export additional functions * [BCRYPT] Expand private data size * [BCRYPT] Implement asymetric encryption/decryption. NOTE: DSA is NOT supported by mbedtls, so it is not implemented here * [MBEDTLS] Disable range check for mbedtls_dhm_calc_secret for ReactOS. It fails tests for key derivation * [BCRYPT][WINETEST] Enable all tests * [BCRYPT] Update exports * [MBEDTLS] Add DSA implementation. It is my implementation based on libtomcrypt and adapted to mbedtls. It is NOT part of mbedtls! * [BCRYPT] Implement DSA encryption/decryption. Use union for cipher/pk/dh/dsa keys to lower memory used for a key. Lower PRIVATE_DATA_SIZE accordingly. * [BCRYPT] Fix missed cleanup on error paths. Fixed missed DSA key reinitialization. Change some error codes to STATUS_NO_MEMORY. Minor formatting * [WINESYNC] Update bcrypt sync status * [MBEDTLS] Fix double export and move an export for readability * [BCRYPT] Enable ARC4 (RC4) algorithm * [BCRYPT] Extend private data size to fit x64 * [WINESYNC] Update WINESYNC.txt to exclude commit hash --------- Co-authored-by: Justin Miller <justin.miller@reactos.org>
Free headers and libraries for the Win32 API
Originally written by Anders Norlander
Last known and not working email: <anorland@hem2.passagen.se>
Now maintained by MinGW Developers
Send bug reports and questions to MinGW-users@lists.sourceforge.net
URL: http://www.mingw.org
* License 2.0
You are free to use, modify and copy this package as long as this
README.w32api file is included unmodified with any distribution, source or
binary, of this package. No restrictions are imposed on any package or
product using or incorporating this package. You are free to license your
package as you see fit.
You may not restrict others freedoms as set forth in the above paragraph.
You may distribute this library as part of another package or as a
modified package if and only if you do *not* restrict others freedoms as
set forth in the above paragraph as it concerns this package. You do have
the right to restrict uses of any package using this package.
This package is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* What is it?
This is a free set of headers and import libraries for the Win32
API. The library differs from the GNU Windows32 library in that I
have tried to use a file structure that mirrors Microsoft's. I
don't like having *all* definitions in one single header as in the
GNU Windows32 library, I want a clean separation between different
parts of the API.
Daniel Guerrero Miralles contributed the DirectX 6.1 import
libraries and DirectX GUID definitions.
See the files NOTES and TODO for what needs to be done.
* Size does matter
Since the WIN32 API is severely bloated (as most MS products seem to
be) the headers are designed to be as compact as possible, while
still being readable, in order to minimize parsing time.
The convention is to omit parameter names for function prototypes,
no excessive white space. Struct/union members are indented with tab
characters to make them readable. Comment only when necessary.
If you are contributing a patch please follow the above mentioned
convention. Make sure your editor does not convert tabs to spaces.
* What do I need to use it?
The library is intended for use with egcs 1.1 or later but it is
possible to use with some other tools as well (although it is not
very useful). LCC-Win32, MSVC and Borland C++ 5.01 or higher may
work as well. The import libraries are for GNU tools only.
The library requires egcs 1.1 or later, since the `#pragma pack'
feature is used. Mumit Khan provides egcs patches and binaries for
win32 at `http://www.xraylith.wisc.edu/~khan/software/gnu-win32/'.
If you are going to use C++ COM objects, you will need a version of
egcs that recognizes the `comobject' attribute and then define
HAVE_COMOBJECT when compiling your program. Antonio Mendes de
Oliveira Neto has a prebuilt version at
`http://li.facens.br/EGCS-WIN32/english/index.html'. Note that this
is very experimental. If you want to use COM objects in C++ but with
C interfaces you must define CINTERFACE.
Objective-C programs cannot use COM functionality because of
conflicts between the interface define and the Objective-C
@interface directive. There is also a conflict between the windows
Obj-C BOOL types. To avoid this conflict you should use WINBOOL in
all places where you would use BOOL in a C/C++ windows program. If
you include any windows headers *after* `windows.h' you must use the
method outlined below:
/* non-windows includes */
#include <objc/objc.h>
...
/* windows specific headers */
#include <windows.h>
#define BOOL WINBOOL
#include <commctrl.h>
...
#undef BOOL
...
/* include other headers */