|
ReactOS 0.4.17-dev-1190-g4c812f4
|
#include <stdio.h>#include <ntstatus.h>#include <windows.h>#include <bcrypt.h>#include <ncrypt.h>#include <wincrypt.h>#include "wine/test.h"
Go to the source code of this file.
Classes | |
| struct | hash_test |
| struct | ecdh_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_hash_block_length(a, b) _test_hash_block_length(__LINE__,a,b) |
| #define | test_alg_name(a, b) _test_alg_name(__LINE__,a,b) |
| #define | RACE_TEST_COUNT 200 |
Variables | |
| static UCHAR | ULONG |
| 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 | ecc521Privkey [] |
| static BYTE | eccPubkey [] |
| static BYTE | certHash [] |
| static BYTE | certSignature [] |
| static BYTE | cert521Signature [] |
| 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 UCHAR | legacy_rsa_key [] |
| static const UCHAR | hash_prepend [][2] = {{0xca, 0xfe}, {0xf0, 0x0d}} |
| static BYTE | dh_pubkey [] |
| static BYTE | dh_privkey [] |
| static BYTE | dh_secret [] |
| static BYTE | dh_hashed_secret [] |
| static BYTE | dh_hashed_secret_prepended [] |
| BCryptBuffer | dh_hash_param_buffers [] |
| BCryptBuffer | dh_hash_param_buffers_prepended [] |
| BCryptBufferDesc | dh_hash_params |
| BCryptBufferDesc | dh_hash_params_prepended |
| 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 182 of file bcrypt.c.
Definition at line 170 of file bcrypt.c.
Definition at line 122 of file bcrypt.c.
Definition at line 996 of file bcrypt.c.
Referenced by test_BCryptEncrypt().
Definition at line 110 of file bcrypt.c.
Referenced by test_BcryptDeriveKeyPBKDF2(), test_BcryptHash(), and test_hash().
| START_TEST | ( | bcrypt | ) |
Definition at line 5581 of file bcrypt.c.
Definition at line 709 of file bcrypt.c.
Referenced by START_TEST().
Definition at line 602 of file bcrypt.c.
Referenced by START_TEST().
Definition at line 4290 of file bcrypt.c.
Referenced by START_TEST().
Definition at line 4352 of file bcrypt.c.
Referenced by START_TEST().
Definition at line 1720 of file bcrypt.c.
Referenced by START_TEST().
Definition at line 4437 of file bcrypt.c.
Referenced by START_TEST().
Definition at line 529 of file bcrypt.c.
Referenced by START_TEST().
Definition at line 1051 of file bcrypt.c.
Referenced by START_TEST().
Definition at line 4253 of file bcrypt.c.
Referenced by START_TEST().
Definition at line 4092 of file bcrypt.c.
Referenced by START_TEST().
Definition at line 770 of file bcrypt.c.
Referenced by START_TEST().
Definition at line 33 of file bcrypt.c.
Referenced by START_TEST().
Definition at line 75 of file bcrypt.c.
Referenced by START_TEST().
Definition at line 431 of file bcrypt.c.
Referenced by START_TEST().
Definition at line 4124 of file bcrypt.c.
Referenced by START_TEST().
Definition at line 5547 of file bcrypt.c.
Referenced by START_TEST().
Definition at line 3914 of file bcrypt.c.
Referenced by START_TEST().
Definition at line 4567 of file bcrypt.c.
Referenced by START_TEST().
Definition at line 3552 of file bcrypt.c.
Referenced by START_TEST().
Definition at line 3356 of file bcrypt.c.
Referenced by test_ECDH().
Definition at line 2303 of file bcrypt.c.
Referenced by START_TEST().
Definition at line 207 of file bcrypt.c.
Referenced by test_hashes().
Definition at line 370 of file bcrypt.c.
Referenced by START_TEST().
Definition at line 5374 of file bcrypt.c.
Referenced by START_TEST().
Definition at line 2127 of file bcrypt.c.
Referenced by START_TEST().
Definition at line 5130 of file bcrypt.c.
Referenced by START_TEST().
Definition at line 5101 of file bcrypt.c.
Referenced by START_TEST().
Definition at line 571 of file bcrypt.c.
Referenced by START_TEST().
Definition at line 2974 of file bcrypt.c.
Referenced by START_TEST().
Definition at line 2709 of file bcrypt.c.
Referenced by START_TEST().
Definition at line 3221 of file bcrypt.c.
Referenced by START_TEST().
Definition at line 4667 of file bcrypt.c.
Referenced by START_TEST().
Definition at line 5235 of file bcrypt.c.
Referenced by START_TEST().
|
static |
Definition at line 2290 of file bcrypt.c.
Referenced by test_ECDSA().
|
static |
Definition at line 2276 of file bcrypt.c.
Referenced by test_ECDSA().
|
static |
Definition at line 2281 of file bcrypt.c.
Referenced by test_ECDSA().
| BYTE coefficient[512/16] |
Definition at line 2642 of file bcrypt.c.
Referenced by CRYPT_AsnDecodeRsaPrivKey(), export_private_key_impl(), export_rsa_key(), SymCryptMlDsaPolyElementDecode(), SymCryptMlDsaPolyElementEncode(), SymCryptMlDsaSignedCoefficientModQ(), SymCryptMlKemPolyElementCompressAndEncode(), SymCryptMlKemPolyElementDecodeAndDecompress(), SymCryptMlKemPolyElementSampleCBDFromBytes(), and test_decodeRsaPrivateKey().
| BCryptBuffer dh_hash_param_buffers[] |
| BCryptBuffer dh_hash_param_buffers_prepended[] |
| BCryptBufferDesc dh_hash_params |
| BCryptBufferDesc dh_hash_params_prepended |
Definition at line 3907 of file bcrypt.c.
Referenced by test_DH().
|
static |
|
static |
|
static |
Definition at line 3828 of file bcrypt.c.
Referenced by test_DH().
|
static |
Definition at line 3807 of file bcrypt.c.
Referenced by test_DH().
|
static |
Definition at line 3854 of file bcrypt.c.
Referenced by test_DH().
Definition at line 517 of file bcrypt.c.
Referenced by test_BcryptDeriveKeyPBKDF2().
|
static |
|
static |
|
static |
|
static |
|
static |
| ULONG dk_len |
Definition at line 514 of file bcrypt.c.
Referenced by test_BcryptDeriveKeyPBKDF2().
|
static |
Definition at line 4518 of file bcrypt.c.
Referenced by test_DSA().
|
static |
Definition at line 4529 of file bcrypt.c.
Referenced by test_DSA().
|
static |
Definition at line 4523 of file bcrypt.c.
Referenced by test_DSA().
|
static |
Definition at line 4546 of file bcrypt.c.
Referenced by test_DSA().
|
static |
Definition at line 2246 of file bcrypt.c.
Referenced by test_ECDSA().
|
static |
Definition at line 2234 of file bcrypt.c.
Referenced by test_ECDSA().
|
static |
Definition at line 2267 of file bcrypt.c.
Referenced by test_ECDSA().
|
static |
Definition at line 994 of file bcrypt.c.
Referenced by encrypt_race_thread(), and test_BCryptEncrypt().
| BYTE exp1[512/16] |
Definition at line 2640 of file bcrypt.c.
Referenced by test_pubexp(), and test_SystemFunction003().
| BYTE exp2[512/16] |
Definition at line 2641 of file bcrypt.c.
Referenced by Test_ofuncs(), test_pubexp(), and test_SystemFunction003().
Definition at line 3354 of file bcrypt.c.
Referenced by test_ECDH_alg().
| ULONGLONG iterations |
Definition at line 513 of file bcrypt.c.
Referenced by BCryptDeriveKeyPBKDF2(), find_next_pci_vendor_capability(), key_derivation_pbkdf2(), SymCryptPbkdf2Derive(), and test_BcryptDeriveKeyPBKDF2().
|
static |
Definition at line 2950 of file bcrypt.c.
Referenced by test_RSA().
|
static |
|
static |
Definition at line 494 of file bcrypt.c.
Referenced by _CZipAskPassword(), ADsOpenObject(), Authenticate_Authenticate(), canonicalize_password(), CredPackAuthenticationBufferW(), CredUnPackAuthenticationBufferW(), do_authorization(), DP_IF_EnumSessions(), DP_MSG_ForwardPlayerCreation(), DP_SecureOpen(), 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(), NS_SendSessionRequestBroadcast(), 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(), receiveAddForwardRequest_(), receiveEnumSessionsRequest_(), 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(), WshNetwork2_AddPrinterConnection(), WshNetwork2_MapNetworkDrive(), XMLHTTPRequest_open(), zipOpenNewFileInZip3(), zipOpenNewFileInZip3_64(), zipOpenNewFileInZip4(), and zipOpenNewFileInZip4_64().
| BYTE prime1[512/16] |
Definition at line 2638 of file bcrypt.c.
Referenced by CRYPT_AsnDecodeRsaPrivKey(), test_decodeRsaPrivateKey(), and test_pubexp().
| BYTE prime2[512/16] |
Definition at line 2639 of file bcrypt.c.
Referenced by CRYPT_AsnDecodeRsaPrivKey(), test_decodeRsaPrivateKey(), and test_pubexp().
| BYTE private_exp[512/8] |
Definition at line 2643 of file bcrypt.c.
Referenced by export_private_key_impl(), and export_rsa_key().
| UCHAR* pwd |
Definition at line 515 of file bcrypt.c.
Referenced by BCryptDeriveKeyPBKDF2(), CRYPT_LMhash(), 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 511 of file bcrypt.c.
Referenced by BCryptDeriveKeyPBKDF2(), and test_BcryptDeriveKeyPBKDF2().
| const struct { ... } rfc6070[] |
Referenced by test_BcryptDeriveKeyPBKDF2().
Definition at line 2701 of file bcrypt.c.
Referenced by test_rsa_encrypt().
|
static |
Definition at line 2609 of file bcrypt.c.
Referenced by test_RSA().
|
static |
Definition at line 2569 of file bcrypt.c.
Referenced by test_RSA(), and test_RSA_SIGN().
| struct { ... } rsaLegacyPrivateBlob |
Referenced by test_rsa_encrypt().
|
static |
Definition at line 2595 of file bcrypt.c.
Referenced by test_RSA(), and test_rsa_encrypt().
| RSAPUBKEY rsapubkey |
Definition at line 2636 of file bcrypt.c.
Referenced by CNG_ImportRSAPubKey().
|
static |
Definition at line 4104 of file bcrypt.c.
Referenced by test_BCryptSignHash().
|
static |
Definition at line 2547 of file bcrypt.c.
Referenced by test_RSA(), test_rsa_encrypt(), and test_RSA_SIGN().
|
static |
Definition at line 2684 of file bcrypt.c.
Referenced by test_RSA().
|
static |
Definition at line 2575 of file bcrypt.c.
Referenced by test_RSA(), and test_RSA_SIGN().
|
static |
Definition at line 495 of file bcrypt.c.
Referenced by BCryptDeriveKeyPBKDF2(), BLAKE2_PACKED(), hkdf_finalize(), key_derivation_pbkdf2(), load_encryption_key(), sec_hash_48(), test_BcryptDeriveKeyPBKDF2(), test_HKDF(), test_PBKDF2(), test_rc2(), test_rc4(), test_RC4_salt(), and test_RC4_session_key().
| ULONG salt_len |
Definition at line 512 of file bcrypt.c.
Referenced by BCryptDeriveKeyPBKDF2(), hkdf_finalize(), key_derivation_pbkdf2(), and test_BcryptDeriveKeyPBKDF2().