|
ReactOS 0.4.17-dev-806-gffa4164
|
#include <stdio.h>#include <ntstatus.h>#include <windows.h>#include <bcrypt.h>#include <wincrypt.h>#include "wine/test.h"
Go to the source code of this file.
Classes | |
| struct | hash_test |
Macros | |
| #define | WIN32_NO_STATUS |
| #define | test_object_length(a) _test_object_length(__LINE__,a) |
| #define | test_hash_length(a, b) _test_hash_length(__LINE__,a,b) |
| #define | test_alg_name(a, b) _test_alg_name(__LINE__,a,b) |
| #define | RACE_TEST_COUNT 200 |
| #define | NCRYPT_SCHANNEL_INTERFACE 0x00010002 |
Variables | |
| static | LPCWSTR |
| static | ULONG |
| static BCRYPT_HASH_HANDLE | PUCHAR |
| static | ULONGLONG |
| static | BCRYPT_KEY_HANDLE |
| static | BCRYPT_ALG_HANDLE |
| static UCHAR | password [] = "password" |
| static UCHAR | salt [] = "salt" |
| static UCHAR | long_password [] = "passwordPASSWORDpassword" |
| static UCHAR | long_salt [] = "saltSALTsaltSALTsaltSALTsaltSALTsalt" |
| static UCHAR | password_NUL [] = "pass\0word" |
| static UCHAR | salt_NUL [] = "sa\0lt" |
| static UCHAR | dk1 [] = "0c60c80f961f0e71f3a9b524af6012062fe037a6" |
| static UCHAR | dk2 [] = "ea6c014dc72d6f8ccd1ed92ace1d41f0d8de8957" |
| static UCHAR | dk3 [] = "4b007901b765489abead49d926f721d065a429c1" |
| static UCHAR | dk4 [] = "364dd6bc200ec7d197f1b85f4a61769010717124" |
| static UCHAR | dk5 [] = "3d2eec4fe41c849b80c8d83662c0e44a8b291a964cf2f07038" |
| static UCHAR | dk6 [] = "56fa6aa75548099dcc37d7f03425e0c3" |
| static UCHAR | dk7 [] = "8754c32c64b0f524fc50c00f788135de" |
| struct { | |
| ULONG pwd_len | |
| ULONG salt_len | |
| ULONGLONG iterations | |
| ULONG dk_len | |
| UCHAR * pwd | |
| UCHAR * salt | |
| const UCHAR * dk | |
| } | rfc6070 [] |
| static LONG | encrypt_race_start_barrier |
| static BYTE | eccPrivkey [] |
| static BYTE | eccPubkey [] |
| static BYTE | certHash [] |
| static BYTE | certSignature [] |
| static UCHAR | rsaPublicBlob [] |
| static UCHAR | rsaHash [] |
| static UCHAR | rsaSignature [] |
| static UCHAR | rsaPrivateBlob [] |
| static UCHAR | rsaFullPrivateBlob [] |
| struct { | |
| PUBLICKEYSTRUC header | |
| RSAPUBKEY rsapubkey | |
| BYTE modulus [512/8] | |
| BYTE prime1 [512/16] | |
| BYTE prime2 [512/16] | |
| BYTE exp1 [512/16] | |
| BYTE exp2 [512/16] | |
| BYTE coefficient [512/16] | |
| BYTE private_exp [512/8] | |
| } | rsaLegacyPrivateBlob |
| static UCHAR | rsaPublicBlobWithInvalidPublicExpSize [] |
| static const UCHAR | rsa_encrypted_no_padding [] |
| static BYTE | eccprivkey [] |
| static BYTE | ecdh_pubkey [] |
| static BYTE | ecdh_secret [] |
| BCryptBuffer | hash_param_buffers [] |
| BCryptBufferDesc | hash_params |
| static BYTE | hashed_secret [] |
| static BYTE | dh_pubkey [] |
| static BYTE | dh_privkey [] |
| static BYTE | dh_secret [] |
| static BYTE | dh_hashed_secret [] |
| BCryptBuffer | dh_hash_param_buffers [] |
| BCryptBufferDesc | dh_hash_params |
| static BYTE | rsapublic [] |
| static UCHAR | dsaHash [] |
| static UCHAR | dsaSignature [] |
| static UCHAR | dsaPublicBlob [] |
| static UCHAR | dssKey [] |
| #define test_object_length | ( | a | ) | _test_object_length(__LINE__,a) |
Definition at line 214 of file bcrypt.c.
Definition at line 166 of file bcrypt.c.
Definition at line 1005 of file bcrypt.c.
Referenced by test_BCryptEncrypt().
Definition at line 154 of file bcrypt.c.
Referenced by test_BcryptDeriveKeyPBKDF2(), test_BcryptHash(), and test_hash().
| START_TEST | ( | bcrypt | ) |
Definition at line 4526 of file bcrypt.c.
Definition at line 718 of file bcrypt.c.
Referenced by START_TEST().
Definition at line 628 of file bcrypt.c.
Referenced by START_TEST().
Definition at line 3679 of file bcrypt.c.
Referenced by START_TEST().
Definition at line 1726 of file bcrypt.c.
Referenced by START_TEST().
Definition at line 3741 of file bcrypt.c.
Referenced by START_TEST().
Definition at line 555 of file bcrypt.c.
Referenced by START_TEST().
Definition at line 1060 of file bcrypt.c.
Referenced by START_TEST().
Definition at line 3642 of file bcrypt.c.
Referenced by START_TEST().
Definition at line 3507 of file bcrypt.c.
Referenced by START_TEST().
Definition at line 779 of file bcrypt.c.
Referenced by START_TEST().
Definition at line 64 of file bcrypt.c.
Referenced by START_TEST().
Definition at line 106 of file bcrypt.c.
Referenced by START_TEST().
Definition at line 461 of file bcrypt.c.
Referenced by START_TEST().
Definition at line 3539 of file bcrypt.c.
Referenced by START_TEST().
Definition at line 3349 of file bcrypt.c.
Referenced by START_TEST().
Definition at line 3871 of file bcrypt.c.
Referenced by START_TEST().
Definition at line 3102 of file bcrypt.c.
Referenced by START_TEST().
Definition at line 2264 of file bcrypt.c.
Referenced by START_TEST().
Definition at line 238 of file bcrypt.c.
Referenced by test_hashes().
Definition at line 400 of file bcrypt.c.
Referenced by START_TEST().
Definition at line 2121 of file bcrypt.c.
Referenced by START_TEST().
Definition at line 4424 of file bcrypt.c.
Referenced by START_TEST().
Definition at line 4395 of file bcrypt.c.
Referenced by START_TEST().
Definition at line 597 of file bcrypt.c.
Referenced by START_TEST().
Definition at line 2704 of file bcrypt.c.
Referenced by START_TEST().
Definition at line 2529 of file bcrypt.c.
Referenced by START_TEST().
Definition at line 2942 of file bcrypt.c.
Referenced by START_TEST().
Definition at line 3976 of file bcrypt.c.
Referenced by START_TEST().
Definition at line 49 of file bcrypt.c.
Referenced by test_BCryptGenerateSymmetricKey().
|
static |
Definition at line 2249 of file bcrypt.c.
Referenced by test_ECDSA().
|
static |
Definition at line 2254 of file bcrypt.c.
Referenced by test_ECDSA().
| BYTE coefficient[512/16] |
Definition at line 2463 of file bcrypt.c.
Referenced by CRYPT_AsnDecodeRsaPrivKey(), and test_decodeRsaPrivateKey().
| BCryptBuffer dh_hash_param_buffers[] |
| BCryptBufferDesc dh_hash_params |
|
static |
|
static |
Definition at line 3293 of file bcrypt.c.
Referenced by test_DH().
|
static |
Definition at line 3272 of file bcrypt.c.
Referenced by test_DH().
|
static |
Definition at line 3319 of file bcrypt.c.
Referenced by test_DH().
Definition at line 543 of file bcrypt.c.
Referenced by BCryptDeriveKeyPBKDF2(), derive_key_pbkdf2(), and test_BcryptDeriveKeyPBKDF2().
|
static |
|
static |
|
static |
|
static |
|
static |
| ULONG dk_len |
Definition at line 540 of file bcrypt.c.
Referenced by BCryptDeriveKeyPBKDF2(), derive_key_pbkdf2(), and test_BcryptDeriveKeyPBKDF2().
|
static |
Definition at line 3822 of file bcrypt.c.
Referenced by test_DSA().
|
static |
Definition at line 3833 of file bcrypt.c.
Referenced by test_DSA().
|
static |
Definition at line 3827 of file bcrypt.c.
Referenced by test_DSA().
|
static |
Definition at line 3850 of file bcrypt.c.
Referenced by test_DSA().
|
static |
Definition at line 2228 of file bcrypt.c.
Referenced by test_ECDSA().
|
static |
Definition at line 3053 of file bcrypt.c.
Referenced by test_ECDH().
|
static |
Definition at line 2240 of file bcrypt.c.
Referenced by test_ECDSA().
|
static |
Definition at line 3064 of file bcrypt.c.
Referenced by test_ECDH().
|
static |
Definition at line 3074 of file bcrypt.c.
Referenced by test_ECDH().
|
static |
Definition at line 1003 of file bcrypt.c.
Referenced by encrypt_race_thread(), and test_BCryptEncrypt().
| BYTE exp1[512/16] |
Definition at line 2461 of file bcrypt.c.
Referenced by test_SystemFunction003().
| BYTE exp2[512/16] |
Definition at line 2462 of file bcrypt.c.
Referenced by Test_ofuncs(), and test_SystemFunction003().
| BCryptBuffer hash_param_buffers[] |
Definition at line 3080 of file bcrypt.c.
Referenced by test_ECDH(), and test_SecretAgreement().
| BCryptBufferDesc hash_params |
Definition at line 3089 of file bcrypt.c.
Referenced by test_ECDH(), and test_SecretAgreement().
|
static |
Definition at line 3096 of file bcrypt.c.
Referenced by test_ECDH().
| ULONGLONG iterations |
Definition at line 539 of file bcrypt.c.
Referenced by BCryptDeriveKeyPBKDF2(), derive_key_pbkdf2(), find_next_pci_vendor_capability(), pbkdf2(), and test_BcryptDeriveKeyPBKDF2().
|
static |
|
static |
Definition at line 520 of file bcrypt.c.
Referenced by _CZipAskPassword(), ADsOpenObject(), Authenticate_Authenticate(), canonicalize_password(), CredPackAuthenticationBufferW(), CredUnPackAuthenticationBufferW(), do_authorization(), event_redirect(), export_password_dlg_proc(), fill_url_components(), find_existing_credential(), HTMLXMLHttpRequest_open(), HTTP_DoAuthorization(), httprequest_open(), InternetCrackUrl_test(), InternetCreateUrlA_test(), iso_connect(), CZipCreatorImpl::JustDoIt(), main(), MAPILogon(), MAPILogonEx(), mcs_connect_start(), ntlm_AcquireCredentialsHandleW(), ntlm_InitializeSecurityContextW(), SEALED_::OnRedirect(), PFXExportCertStore(), PFXExportCertStoreEx(), PFXImportCertStore(), PFXVerifyPassword(), POP3Transport_CommandPASS(), process_redirect_pdu(), rdp2vnc_connect(), rdp_connect(), rdp_reconnect(), rdp_send_logon_info(), read_password(), rpcrt4_http_internet_connect(), sec_connect(), SECUR32_CreateNTLM1SessionKey(), ServerXMLHTTPRequest_open(), set_credentials(), set_request_credentials(), SspiPrepareForCredWrite(), SspiPromptForCredentialsW(), SystemFunction006(), test_create_delete_svc(), test_CredUIPromptForCredentials(), test_espassword(), test_HlinkCreateExtensionServices(), test_IWinHttpRequest(), test_proxy_direct(), test_queryconfig2(), test_sequence(), test_SspiEncodeStringsAsAuthIdentity(), unzOpenCurrentFile3(), unzOpenCurrentFilePassword(), UserLoginThread(), winhttp_request_SetCredentials(), WinHttpCrackUrl(), WinHttpCrackUrl_test(), WinHttpSetCredentials(), WININET_PasswordDialog(), WININET_ProxyPasswordDialog(), WININET_SetAuthorization(), WNetUseConnectionA(), WNetUseConnectionW(), XMLHTTPRequest_open(), zipOpenNewFileInZip3(), zipOpenNewFileInZip3_64(), zipOpenNewFileInZip4(), and zipOpenNewFileInZip4_64().
| BYTE prime1[512/16] |
Definition at line 2459 of file bcrypt.c.
Referenced by CRYPT_AsnDecodeRsaPrivKey(), and test_decodeRsaPrivateKey().
| BYTE prime2[512/16] |
Definition at line 2460 of file bcrypt.c.
Referenced by CRYPT_AsnDecodeRsaPrivKey(), and test_decodeRsaPrivateKey().
| UCHAR* pwd |
Definition at line 541 of file bcrypt.c.
Referenced by BCryptDeriveKeyPBKDF2(), CRYPT_LMhash(), derive_key_pbkdf2(), FTPChdir3(), GetContentsOfDialog(), GetContentsOfMenu(), InternetCrackUrlW_test(), ldap_bind_sW(), ldap_bindW(), ldap_simple_bind_sW(), ldap_simple_bindW(), MenuFill(), MenuScan(), netname2user(), StrangeMenuFill(), and test_BcryptDeriveKeyPBKDF2().
| ULONG pwd_len |
Definition at line 537 of file bcrypt.c.
Referenced by BCryptDeriveKeyPBKDF2(), derive_key_pbkdf2(), and test_BcryptDeriveKeyPBKDF2().
| const struct { ... } rfc6070[] |
Referenced by test_BcryptDeriveKeyPBKDF2().
Definition at line 2521 of file bcrypt.c.
Referenced by test_rsa_encrypt().
|
static |
Definition at line 2430 of file bcrypt.c.
Referenced by test_RSA().
|
static |
Definition at line 2390 of file bcrypt.c.
Referenced by test_RSA(), and test_RSA_SIGN().
| struct { ... } rsaLegacyPrivateBlob |
Referenced by test_rsa_encrypt().
|
static |
Definition at line 2416 of file bcrypt.c.
Referenced by test_RSA(), and test_rsa_encrypt().
| RSAPUBKEY rsapubkey |
Definition at line 2457 of file bcrypt.c.
Referenced by CNG_ImportRSAPubKey(), and convert_legacy_rsaprivate_blob().
|
static |
Definition at line 3519 of file bcrypt.c.
Referenced by test_BCryptSignHash().
|
static |
Definition at line 2368 of file bcrypt.c.
Referenced by test_RSA(), test_rsa_encrypt(), and test_RSA_SIGN().
|
static |
Definition at line 2504 of file bcrypt.c.
Referenced by test_RSA().
|
static |
Definition at line 2396 of file bcrypt.c.
Referenced by test_RSA(), and test_RSA_SIGN().
|
static |
Definition at line 521 of file bcrypt.c.
Referenced by BCryptDeriveKeyPBKDF2(), BCryptKeyDerivation(), BLAKE2_PACKED(), derive_key_pbkdf2(), load_encryption_key(), pbkdf2(), sec_hash_48(), test_BcryptDeriveKeyPBKDF2(), test_PBKDF2(), test_rc2(), and test_rc4().
| ULONG salt_len |
Definition at line 538 of file bcrypt.c.
Referenced by BCryptDeriveKeyPBKDF2(), derive_key_pbkdf2(), pbkdf2(), and test_BcryptDeriveKeyPBKDF2().