|
ReactOS 0.4.17-dev-806-gffa4164
|
#include <wine/config.h>#include <wine/port.h>#include <ntstatus.h>#include <windef.h>#include <winbase.h>#include <ntsecapi.h>#include <bcrypt.h>#include <wine/debug.h>#include <wine/unicode.h>#include <wine/library.h>
Go to the source code of this file.
Macros | |
| #define | WIN32_NO_STATUS |
| #define | MAX_HASH_OUTPUT_BYTES 64 |
| #define | MAX_HASH_BLOCK_BITS 1024 |
| #define | HMAC_PAD_LEN 64 |
Variables | |
| static HINSTANCE | instance |
| struct { | |
| const WCHAR * name | |
| ULONG class | |
| ULONG object_length | |
| ULONG hash_length | |
| ULONG block_bits | |
| } | builtin_algorithms [] |
| static const struct algorithm | pseudo_algorithms [] |
| #define HMAC_PAD_LEN 64 |
Definition at line 2392 of file bcrypt_main.c.
| #define MAX_HASH_BLOCK_BITS 1024 |
Definition at line 102 of file bcrypt_main.c.
| #define MAX_HASH_OUTPUT_BYTES 64 |
Definition at line 101 of file bcrypt_main.c.
| #define WIN32_NO_STATUS |
Definition at line 25 of file bcrypt_main.c.
|
static |
Definition at line 1355 of file bcrypt_main.c.
Referenced by key_import().
|
static |
Definition at line 1552 of file bcrypt_main.c.
Referenced by key_export().
| NTSTATUS WINAPI BCryptAddContextFunction | ( | ULONG | table, |
| const WCHAR * | ctx, | ||
| ULONG | iface, | ||
| const WCHAR * | func, | ||
| ULONG | pos | ||
| ) |
Definition at line 50 of file bcrypt_main.c.
| NTSTATUS WINAPI BCryptAddContextFunctionProvider | ( | ULONG | table, |
| const WCHAR * | ctx, | ||
| ULONG | iface, | ||
| const WCHAR * | func, | ||
| const WCHAR * | provider, | ||
| ULONG | pos | ||
| ) |
Definition at line 56 of file bcrypt_main.c.
| NTSTATUS WINAPI BCryptCloseAlgorithmProvider | ( | BCRYPT_ALG_HANDLE | handle, |
| DWORD | flags | ||
| ) |
Definition at line 421 of file bcrypt_main.c.
Referenced by assembly_get_pubkey_token(), CNG_CalcHash(), CryptHashCertificate2(), and test_VerifySignature().
| NTSTATUS WINAPI BCryptCreateHash | ( | BCRYPT_ALG_HANDLE | handle, |
| BCRYPT_HASH_HANDLE * | ret_handle, | ||
| UCHAR * | object, | ||
| ULONG | object_len, | ||
| UCHAR * | secret, | ||
| ULONG | secret_len, | ||
| ULONG | flags | ||
| ) |
Definition at line 951 of file bcrypt_main.c.
Referenced by CNG_CalcHash(), CryptHashCertificate2(), and test_VerifySignature().
| NTSTATUS WINAPI BCryptDecrypt | ( | BCRYPT_KEY_HANDLE | handle, |
| UCHAR * | input, | ||
| ULONG | input_len, | ||
| void * | padding, | ||
| UCHAR * | iv, | ||
| ULONG | iv_len, | ||
| UCHAR * | output, | ||
| ULONG | output_len, | ||
| ULONG * | ret_len, | ||
| ULONG | flags | ||
| ) |
Definition at line 2318 of file bcrypt_main.c.
| NTSTATUS WINAPI BCryptDeriveKey | ( | BCRYPT_SECRET_HANDLE | handle, |
| const WCHAR * | kdf, | ||
| BCryptBufferDesc * | desc, | ||
| UCHAR * | output, | ||
| ULONG | output_len, | ||
| ULONG * | ret_len, | ||
| ULONG | flags | ||
| ) |
Definition at line 2673 of file bcrypt_main.c.
| NTSTATUS WINAPI BCryptDeriveKeyCapi | ( | BCRYPT_HASH_HANDLE | handle, |
| BCRYPT_ALG_HANDLE | halg, | ||
| UCHAR * | key, | ||
| ULONG | keylen, | ||
| ULONG | flags | ||
| ) |
Definition at line 2393 of file bcrypt_main.c.
| NTSTATUS WINAPI BCryptDeriveKeyPBKDF2 | ( | BCRYPT_ALG_HANDLE | handle, |
| UCHAR * | pwd, | ||
| ULONG | pwd_len, | ||
| UCHAR * | salt, | ||
| ULONG | salt_len, | ||
| ULONGLONG | iterations, | ||
| UCHAR * | dk, | ||
| ULONG | dk_len, | ||
| ULONG | flags | ||
| ) |
Definition at line 2518 of file bcrypt_main.c.
| NTSTATUS WINAPI BCryptDestroyHash | ( | BCRYPT_HASH_HANDLE | handle | ) |
Definition at line 1009 of file bcrypt_main.c.
Referenced by CNG_CalcHash(), CryptHashCertificate2(), and test_VerifySignature().
| NTSTATUS WINAPI BCryptDestroyKey | ( | BCRYPT_KEY_HANDLE | handle | ) |
Definition at line 2261 of file bcrypt_main.c.
Referenced by cng_verify_msg_signature(), CNG_VerifySignature(), test_verify_ecc_signature(), test_VerifySignature(), and testImportPublicKey().
| NTSTATUS WINAPI BCryptDestroySecret | ( | BCRYPT_SECRET_HANDLE | handle | ) |
Definition at line 2563 of file bcrypt_main.c.
| NTSTATUS WINAPI BCryptDuplicateHash | ( | BCRYPT_HASH_HANDLE | handle, |
| BCRYPT_HASH_HANDLE * | handle_copy, | ||
| UCHAR * | object, | ||
| ULONG | objectlen, | ||
| ULONG | flags | ||
| ) |
Definition at line 975 of file bcrypt_main.c.
| NTSTATUS WINAPI BCryptDuplicateKey | ( | BCRYPT_KEY_HANDLE | handle, |
| BCRYPT_KEY_HANDLE * | handle_copy, | ||
| UCHAR * | object, | ||
| ULONG | object_len, | ||
| ULONG | flags | ||
| ) |
Definition at line 2145 of file bcrypt_main.c.
| NTSTATUS WINAPI BCryptEncrypt | ( | BCRYPT_KEY_HANDLE | handle, |
| UCHAR * | input, | ||
| ULONG | input_len, | ||
| void * | padding, | ||
| UCHAR * | iv, | ||
| ULONG | iv_len, | ||
| UCHAR * | output, | ||
| ULONG | output_len, | ||
| ULONG * | ret_len, | ||
| ULONG | flags | ||
| ) |
Definition at line 2272 of file bcrypt_main.c.
| NTSTATUS WINAPI BCryptEnumAlgorithms | ( | ULONG | type, |
| ULONG * | ret_count, | ||
| BCRYPT_ALGORITHM_IDENTIFIER ** | ret_list, | ||
| ULONG | flags | ||
| ) |
Definition at line 175 of file bcrypt_main.c.
| NTSTATUS WINAPI BCryptEnumContextFunctions | ( | ULONG | table, |
| const WCHAR * | ctx, | ||
| ULONG | iface, | ||
| ULONG * | buflen, | ||
| CRYPT_CONTEXT_FUNCTIONS ** | buffer | ||
| ) |
Definition at line 77 of file bcrypt_main.c.
| NTSTATUS WINAPI BCryptExportKey | ( | BCRYPT_KEY_HANDLE | export_key_handle, |
| BCRYPT_KEY_HANDLE | encrypt_key_handle, | ||
| const WCHAR * | type, | ||
| UCHAR * | output, | ||
| ULONG | output_len, | ||
| ULONG * | size, | ||
| ULONG | flags | ||
| ) |
Definition at line 2089 of file bcrypt_main.c.
| NTSTATUS WINAPI BCryptFinalizeKeyPair | ( | BCRYPT_KEY_HANDLE | handle, |
| ULONG | flags | ||
| ) |
Definition at line 2056 of file bcrypt_main.c.
| NTSTATUS WINAPI BCryptFinishHash | ( | BCRYPT_HASH_HANDLE | handle, |
| UCHAR * | output, | ||
| ULONG | size, | ||
| ULONG | flags | ||
| ) |
Definition at line 1058 of file bcrypt_main.c.
Referenced by CNG_CalcHash(), CryptHashCertificate2(), and test_VerifySignature().
Definition at line 84 of file bcrypt_main.c.
| NTSTATUS WINAPI BCryptGenerateKeyPair | ( | BCRYPT_ALG_HANDLE | handle, |
| BCRYPT_KEY_HANDLE * | ret_handle, | ||
| ULONG | key_len, | ||
| ULONG | flags | ||
| ) |
Definition at line 2038 of file bcrypt_main.c.
| NTSTATUS WINAPI BCryptGenerateSymmetricKey | ( | BCRYPT_ALG_HANDLE | handle, |
| BCRYPT_KEY_HANDLE * | ret_handle, | ||
| UCHAR * | object, | ||
| ULONG | object_len, | ||
| UCHAR * | secret, | ||
| ULONG | secret_len, | ||
| ULONG | flags | ||
| ) |
Definition at line 2023 of file bcrypt_main.c.
| NTSTATUS WINAPI BCryptGenRandom | ( | BCRYPT_ALG_HANDLE | handle, |
| UCHAR * | buffer, | ||
| ULONG | count, | ||
| ULONG | flags | ||
| ) |
Definition at line 316 of file bcrypt_main.c.
Definition at line 432 of file bcrypt_main.c.
| NTSTATUS WINAPI BCryptGetProperty | ( | BCRYPT_HANDLE | handle, |
| const WCHAR * | prop, | ||
| UCHAR * | buffer, | ||
| ULONG | count, | ||
| ULONG * | res, | ||
| ULONG | flags | ||
| ) |
Definition at line 856 of file bcrypt_main.c.
Referenced by CNG_CalcHash(), CryptHashCertificate2(), and test_VerifySignature().
| NTSTATUS WINAPI BCryptHash | ( | BCRYPT_ALG_HANDLE | handle, |
| UCHAR * | secret, | ||
| ULONG | secret_len, | ||
| UCHAR * | input, | ||
| ULONG | input_len, | ||
| UCHAR * | output, | ||
| ULONG | output_len | ||
| ) |
Definition at line 1091 of file bcrypt_main.c.
Referenced by assembly_get_pubkey_token().
| NTSTATUS WINAPI BCryptHashData | ( | BCRYPT_HASH_HANDLE | handle, |
| UCHAR * | input, | ||
| ULONG | size, | ||
| ULONG | flags | ||
| ) |
Definition at line 1020 of file bcrypt_main.c.
Referenced by CNG_CalcHash(), CryptHashCertificate2(), and test_VerifySignature().
| NTSTATUS WINAPI BCryptImportKey | ( | BCRYPT_ALG_HANDLE | handle, |
| BCRYPT_KEY_HANDLE | decrypt_key_handle, | ||
| const WCHAR * | type, | ||
| BCRYPT_KEY_HANDLE * | ret_handle, | ||
| UCHAR * | object, | ||
| ULONG | object_len, | ||
| UCHAR * | input, | ||
| ULONG | input_len, | ||
| ULONG | flags | ||
| ) |
Definition at line 2069 of file bcrypt_main.c.
| NTSTATUS WINAPI BCryptImportKeyPair | ( | BCRYPT_ALG_HANDLE | handle, |
| BCRYPT_KEY_HANDLE | decrypt_key_handle, | ||
| const WCHAR * | type, | ||
| BCRYPT_KEY_HANDLE * | ret_handle, | ||
| UCHAR * | input, | ||
| ULONG | input_len, | ||
| ULONG | flags | ||
| ) |
Definition at line 2193 of file bcrypt_main.c.
Referenced by CNG_ImportECCPubKey(), and CNG_ImportRSAPubKey().
| NTSTATUS WINAPI BCryptKeyDerivation | ( | BCRYPT_KEY_HANDLE | handle, |
| BCryptBufferDesc * | desc, | ||
| UCHAR * | output, | ||
| ULONG | output_size, | ||
| ULONG * | ret_len, | ||
| ULONG | flags | ||
| ) |
Definition at line 2697 of file bcrypt_main.c.
| NTSTATUS WINAPI BCryptOpenAlgorithmProvider | ( | BCRYPT_ALG_HANDLE * | handle, |
| const WCHAR * | id, | ||
| const WCHAR * | implementation, | ||
| DWORD | flags | ||
| ) |
Definition at line 372 of file bcrypt_main.c.
Referenced by assembly_get_pubkey_token(), CNG_CalcHash(), CryptHashCertificate2(), and test_VerifySignature().
| NTSTATUS WINAPI BCryptRegisterProvider | ( | const WCHAR * | provider, |
| ULONG | flags, | ||
| CRYPT_PROVIDER_REG * | reg | ||
| ) |
Definition at line 89 of file bcrypt_main.c.
| NTSTATUS WINAPI BCryptRemoveContextFunction | ( | ULONG | table, |
| const WCHAR * | ctx, | ||
| ULONG | iface, | ||
| const WCHAR * | func | ||
| ) |
Definition at line 64 of file bcrypt_main.c.
| NTSTATUS WINAPI BCryptRemoveContextFunctionProvider | ( | ULONG | table, |
| const WCHAR * | ctx, | ||
| ULONG | iface, | ||
| const WCHAR * | func, | ||
| const WCHAR * | provider | ||
| ) |
Definition at line 70 of file bcrypt_main.c.
| NTSTATUS WINAPI BCryptSecretAgreement | ( | BCRYPT_KEY_HANDLE | privkey_handle, |
| BCRYPT_KEY_HANDLE | pubkey_handle, | ||
| BCRYPT_SECRET_HANDLE * | ret_handle, | ||
| ULONG | flags | ||
| ) |
Definition at line 2530 of file bcrypt_main.c.
| NTSTATUS WINAPI BCryptSetProperty | ( | BCRYPT_HANDLE | handle, |
| const WCHAR * | prop, | ||
| UCHAR * | value, | ||
| ULONG | size, | ||
| ULONG | flags | ||
| ) |
Definition at line 2365 of file bcrypt_main.c.
| NTSTATUS WINAPI BCryptSignHash | ( | BCRYPT_KEY_HANDLE | handle, |
| void * | padding, | ||
| UCHAR * | input, | ||
| ULONG | input_len, | ||
| UCHAR * | output, | ||
| ULONG | output_len, | ||
| ULONG * | ret_len, | ||
| ULONG | flags | ||
| ) |
Definition at line 2216 of file bcrypt_main.c.
Definition at line 95 of file bcrypt_main.c.
| NTSTATUS WINAPI BCryptVerifySignature | ( | BCRYPT_KEY_HANDLE | handle, |
| void * | padding, | ||
| UCHAR * | hash, | ||
| ULONG | hash_len, | ||
| UCHAR * | signature, | ||
| ULONG | signature_len, | ||
| ULONG | flags | ||
| ) |
Definition at line 2239 of file bcrypt_main.c.
Referenced by cng_verify_msg_signature(), CNG_VerifySignature(), and test_VerifySignature().
|
static |
Definition at line 1680 of file bcrypt_main.c.
Referenced by key_import_pair().
|
static |
Definition at line 361 of file bcrypt_main.c.
Referenced by BCryptOpenAlgorithmProvider().
|
static |
Definition at line 2620 of file bcrypt_main.c.
Referenced by BCryptDeriveKey().
|
static |
Definition at line 2472 of file bcrypt_main.c.
Referenced by BCryptDeriveKeyPBKDF2(), and BCryptKeyDerivation().
|
static |
Definition at line 2587 of file bcrypt_main.c.
Referenced by BCryptDeriveKey().
Definition at line 415 of file bcrypt_main.c.
Referenced by BCryptCloseAlgorithmProvider(), BCryptDestroySecret(), hash_destroy(), and key_destroy().
Definition at line 2744 of file bcrypt_main.c.
|
static |
Definition at line 443 of file bcrypt_main.c.
Referenced by get_alg_property(), and get_hash_property().
|
static |
Definition at line 482 of file bcrypt_main.c.
Referenced by get_alg_property(), and get_key_property().
|
static |
Definition at line 522 of file bcrypt_main.c.
Referenced by get_alg_property(), and get_key_property().
|
inlinestatic |
Definition at line 296 of file bcrypt_main.c.
Referenced by BCryptCreateHash(), BCryptDeriveKeyPBKDF2(), BCryptGenerateKeyPair(), BCryptGenerateSymmetricKey(), BCryptGenRandom(), BCryptHash(), BCryptImportKey(), BCryptImportKeyPair(), derive_key_hash(), and get_hash_alg().
|
static |
Definition at line 635 of file bcrypt_main.c.
Referenced by BCryptGetProperty(), get_block_size(), and key_symmetric_generate().
|
static |
Definition at line 809 of file bcrypt_main.c.
Referenced by get_key_property().
|
static |
|
static |
Definition at line 2601 of file bcrypt_main.c.
Referenced by BCryptKeyDerivation(), and derive_key_hash().
|
inlinestatic |
Definition at line 301 of file bcrypt_main.c.
Referenced by BCryptDeriveKeyCapi(), BCryptDestroyHash(), BCryptDuplicateHash(), BCryptFinishHash(), and BCryptHashData().
|
static |
|
inlinestatic |
Definition at line 306 of file bcrypt_main.c.
Referenced by BCryptDecrypt(), BCryptDestroyKey(), BCryptDuplicateKey(), BCryptEncrypt(), BCryptExportKey(), BCryptFinalizeKeyPair(), BCryptImportKey(), BCryptKeyDerivation(), BCryptSecretAgreement(), BCryptSignHash(), and BCryptVerifySignature().
|
static |
Definition at line 824 of file bcrypt_main.c.
Referenced by BCryptGetProperty().
|
static |
Definition at line 274 of file bcrypt_main.c.
Referenced by Array_concat(), Array_every(), Array_filter(), Array_forEach(), Array_map(), Array_reduce(), Array_some(), Array_sort(), array_this(), arraybuf_this(), ArrayConstr_isArray(), BCryptGetProperty(), BCryptSetProperty(), bind_event_target(), boolval_this(), create_enumerator(), create_regexp_var(), create_signature(), dataview_this(), date_this(), debugstr_jsval(), disp_call_value_with_caller(), DispatchEx_GetTypeInfo(), enumerator_this(), Error_toString(), exprval_call(), Function_apply(), function_this(), gc_process_linked_val(), gc_run(), get_alg_object(), get_hash_object(), get_key_object(), get_map_this(), get_secret_object(), get_set_this(), get_weakmap_this(), HostFunction_call(), init_dispex_from_constr(), interp_call(), interp_call_eval(), interp_carray_set(), interp_forin(), interp_in(), interp_instanceof(), interp_new(), interp_obj_prop(), InterpretedFunction_call(), invoke_prop_func(), is_function_prop(), iterate_map(), jsdisp_define_properties(), JSON_parse(), JSON_stringify(), jsval_copy(), jsval_map_compare(), jsval_release(), jsval_strict_equal(), jsval_to_variant(), maybe_to_primitive(), numberval_this(), Object_create(), Object_defineGetter(), Object_defineProperties(), Object_defineProperty(), Object_defineSetter(), Object_freeze(), Object_getOwnPropertyDescriptor(), Object_getPrototypeOf(), Object_isExtensible(), Object_isFrozen(), Object_isPrototypeOf(), Object_isSealed(), object_keys(), Object_preventExtensions(), Object_seal(), Object_set_proto_(), regexp_this(), RegExpConstr_value(), set_error_value(), stack_pop_object(), stack_topn_exprval(), String_match(), String_replace(), String_search(), String_split(), string_this(), stringify(), to_locale_string(), to_object(), to_primitive(), to_property_descriptor(), transform_json_object(), typeof_string(), unwind_exception(), vbarray_this(), WeakMap_delete(), WeakMap_get(), WeakMap_has(), and WeakMap_set().
|
static |
Definition at line 615 of file bcrypt_main.c.
Referenced by get_alg_property().
|
static |
Definition at line 580 of file bcrypt_main.c.
Referenced by get_alg_property().
|
static |
Definition at line 594 of file bcrypt_main.c.
Referenced by get_alg_property().
|
inlinestatic |
Definition at line 311 of file bcrypt_main.c.
Referenced by BCryptDeriveKey(), and BCryptDestroySecret().
|
static |
Definition at line 926 of file bcrypt_main.c.
Referenced by BCryptCreateHash(), derive_key_pbkdf2(), and hash_single().
Definition at line 1002 of file bcrypt_main.c.
Referenced by BCryptDestroyHash(), derive_key_pbkdf2(), and hash_single().
Definition at line 1034 of file bcrypt_main.c.
Referenced by BCryptDeriveKeyCapi(), BCryptFinishHash(), hash_single(), and pbkdf2().
Definition at line 889 of file bcrypt_main.c.
Referenced by BCryptDeriveKeyCapi(), hash_create(), and hash_finalize().
|
static |
Definition at line 1074 of file bcrypt_main.c.
Referenced by BCryptHash(), and derive_key_hash().
|
inlinestatic |
Definition at line 269 of file bcrypt_main.c.
Referenced by BCryptCloseAlgorithmProvider(), BCryptGenRandom(), BCryptSetProperty(), and get_object().
Definition at line 143 of file bcrypt_main.c.
Referenced by BCryptDecrypt(), and BCryptEncrypt().
|
static |
Definition at line 1119 of file bcrypt_main.c.
Referenced by key_symmetric_set_vector().
Definition at line 153 of file bcrypt_main.c.
Referenced by BCryptSignHash(), and BCryptVerifySignature().
Definition at line 137 of file bcrypt_main.c.
Referenced by BCryptDecrypt(), BCryptEncrypt(), get_key_property(), key_destroy(), and key_duplicate().
|
static |
Definition at line 1104 of file bcrypt_main.c.
Referenced by BCryptGenerateKeyPair(), and key_import_pair().
Definition at line 1167 of file bcrypt_main.c.
Referenced by aes_unwrap(), aes_wrap(), BCryptDestroyKey(), BCryptDestroySecret(), BCryptSecretAgreement(), and key_import_pair().
Definition at line 2105 of file bcrypt_main.c.
Referenced by BCryptDuplicateKey(), and BCryptSecretAgreement().
|
static |
Definition at line 1589 of file bcrypt_main.c.
Referenced by BCryptExportKey().
|
static |
Definition at line 1394 of file bcrypt_main.c.
Referenced by BCryptImportKey().
|
static |
Definition at line 1727 of file bcrypt_main.c.
Referenced by BCryptImportKeyPair(), and key_import_pair().
|
static |
Definition at line 1143 of file bcrypt_main.c.
Referenced by aes_unwrap(), aes_wrap(), and key_symmetric_generate().
|
static |
Definition at line 1234 of file bcrypt_main.c.
Referenced by aes_unwrap(), and BCryptDecrypt().
|
static |
Definition at line 1449 of file bcrypt_main.c.
Referenced by aes_wrap(), and BCryptEncrypt().
|
static |
Definition at line 1189 of file bcrypt_main.c.
Referenced by BCryptGenerateSymmetricKey(), and key_import().
|
static |
Definition at line 1126 of file bcrypt_main.c.
Referenced by key_symmetric_decrypt(), and key_symmetric_encrypt().
Definition at line 158 of file bcrypt_main.c.
Referenced by BCryptEnumAlgorithms().
|
static |
Definition at line 2436 of file bcrypt_main.c.
Referenced by derive_key_pbkdf2().
|
static |
Definition at line 2165 of file bcrypt_main.c.
Referenced by BCryptImportKeyPair().
|
static |
Definition at line 672 of file bcrypt_main.c.
Referenced by BCryptSetProperty().
|
static |
Definition at line 742 of file bcrypt_main.c.
Referenced by BCryptSetProperty().
| WINE_DEFAULT_DEBUG_CHANNEL | ( | bcrypt | ) |
| ULONG block_bits |
Definition at line 111 of file bcrypt_main.c.
| const struct { ... } builtin_algorithms[] |
Referenced by BCryptEnumAlgorithms(), BCryptHash(), BCryptOpenAlgorithmProvider(), derive_key_hash(), derive_key_pbkdf2(), generic_alg_property(), is_agreement_key(), is_asymmetric_encryption_key(), is_signature_key(), and is_symmetric_key().
| ULONG class |
Definition at line 108 of file bcrypt_main.c.
| ULONG hash_length |
Definition at line 110 of file bcrypt_main.c.
Referenced by generic_alg_property().
|
static |
Definition at line 48 of file bcrypt_main.c.
Referenced by DllMain().
Definition at line 107 of file bcrypt_main.c.
| ULONG object_length |
Definition at line 109 of file bcrypt_main.c.
Referenced by generic_alg_property().
Definition at line 212 of file bcrypt_main.c.
Referenced by get_object().