{"id":19579761,"url":"https://github.com/wolfssl/wolfasynccrypt","last_synced_at":"2025-04-27T08:31:55.083Z","repository":{"id":164117572,"uuid":"53153406","full_name":"wolfSSL/wolfAsyncCrypt","owner":"wolfSSL","description":"wolfSSL Asynchronous Cryptography","archived":false,"fork":false,"pushed_at":"2024-10-29T21:37:16.000Z","size":442,"stargazers_count":11,"open_issues_count":0,"forks_count":11,"subscribers_count":17,"default_branch":"master","last_synced_at":"2025-04-04T23:11:13.455Z","etag":null,"topics":["asynchronous","cavium","cryptography","fips","haproxy","intel","nginx","nitrox","non-blocking","octeon","quickassist","security","tls","tls13"],"latest_commit_sha":null,"homepage":"https://www.wolfssl.com","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/wolfSSL.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2016-03-04T17:31:26.000Z","updated_at":"2024-12-08T01:07:03.000Z","dependencies_parsed_at":null,"dependency_job_id":"2f12ae17-a36f-451a-9a8f-3a87322b8796","html_url":"https://github.com/wolfSSL/wolfAsyncCrypt","commit_stats":null,"previous_names":[],"tags_count":20,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wolfSSL%2FwolfAsyncCrypt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wolfSSL%2FwolfAsyncCrypt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wolfSSL%2FwolfAsyncCrypt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wolfSSL%2FwolfAsyncCrypt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wolfSSL","download_url":"https://codeload.github.com/wolfSSL/wolfAsyncCrypt/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251112541,"owners_count":21538162,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["asynchronous","cavium","cryptography","fips","haproxy","intel","nginx","nitrox","non-blocking","octeon","quickassist","security","tls","tls13"],"created_at":"2024-11-11T07:19:01.606Z","updated_at":"2025-04-27T08:31:53.566Z","avatar_url":"https://github.com/wolfSSL.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# wolfSSL / wolfCrypt Asynchronous Support\n\nThis repository contains the async.c and async.h files required for using Asynchronous Cryptography with the wolfSSL library.\n\n* The async.c file goes into `./wolfcrypt/src/`.\n* The async.h file goes into `./wolfssl/wolfcrypt/`.\n\nThis feature is enabled using:\n`./configure --enable-asynccrypt` or `#define WOLFSSL_ASYNC_CRYPT`.\n\nIf async crypto is enabled but no hardware backend is enabled or if `WOLFSSL_ASYNC_CRYPT_SW` is defined, a software backend using wolfCrypt is used instead. This software backend can simulate periodic hardware delays using the macro `WOLF_ASYNC_SW_SKIP_MOD`, which is on by default if `DEBUG_WOLFSSL` is defined.\n\n## Design\n\nEach crypto algorithm has its own `WC_ASYNC_DEV` structure, which contains a `WOLF_EVENT`, local crypto context and local hardware context.\n\nFor SSL/TLS the `WOLF_EVENT` context is the `WOLFSSL*` and the type is `WOLF_EVENT_TYPE_ASYNC_WOLFSSL`. For wolfCrypt operations the `WOLF_EVENT` context is the `WC_ASYNC_DEV*` and the type is `WOLF_EVENT_TYPE_ASYNC_WOLFCRYPT`.\n\nA generic event system has been created using a `WOLF_EVENT` structure when `HAVE_WOLF_EVENT` is defined. The event structure resides in the `WC_ASYNC_DEV`.\n\nThe asynchronous crypto system is modeled after epoll. The implementation uses `wolfSSL_AsyncPoll` or `wolfSSL_CTX_AsyncPoll` to check if any async operations are complete.\n\n## Hardware Backends\n\nSupported hardware backends:\n\n* Intel QuickAssist with QAT 1.6 or QAT 1.7 driver. See README.md in `wolfcrypt/src/port/intel/README.md`.\n* Cavium Nitrox III and V. See README.md in `wolfcrypt/src/port/cavium/README.md`.\n\n## wolfCrypt Backend\n\nThe wolfCrypt backend uses the same API as the hardware backends do. Once an asynchronous operation is initiated with the software backend, subsequent calls to `wolfSSL_AsyncPoll` will call into wolfCrypt to complete the operation. If non-blocking is enabled, for example, for ECC (via `WC_ECC_NONBLOCK`), each `wolfSSL_AsyncPoll` will do a chunk of work for the operation and return, to minimize blocking time.\n\n## API's\n\n### ```wolfSSL_AsyncPoll```\n```\nint wolfSSL_AsyncPoll(WOLFSSL* ssl, WOLF_EVENT_FLAG flags);\n```\n\nPolls the provided WOLFSSL object's reference to the WOLFSSL_CTX's event queue to see if any operations outstanding for the WOLFSSL object are done. Return the completed event count on success.\n\n### ```wolfSSL_CTX_AsyncPoll```\n```\nint wolfSSL_CTX_AsyncPoll(WOLFSSL_CTX* ctx, WOLF_EVENT** events, int maxEvents, WOLF_EVENT_FLAG flags, int* eventCount)\n```\n\nPolls the provided WOLFSSL_CTX context event queue to see if any pending events are done. If the `events` argument is provided then a pointer to the `WOLF_EVENT` will be returned up to `maxEvents`. If `eventCount` is provided then the number of events populated will be returned. The `flags` allows for `WOLF_POLL_FLAG_CHECK_HW` to indicate if the crypto backend (i.e. hardware or wolfCrypt, if the software implementation is being used) should be polled again or just return more events.\n\n### ```wolfAsync_DevOpen```\n```\nint wolfAsync_DevOpen(int *devId);\n```\n\nOpen the async device and returns an `int` device id for it.\n\n### ```wolfAsync_DevOpenThread```\n```\nint wolfAsync_DevOpenThread(int *devId, void* threadId);\n```\nOpens the async device for a specific thread. A crypto instance is assigned and thread affinity set.\n\n### ```wolfAsync_DevClose```\n```\nvoid wolfAsync_DevClose(int *devId)\n```\n\nCloses the async device.\n\n### ```wolfAsync_DevCopy```\n```\nint wolfAsync_DevCopy(WC_ASYNC_DEV* src, WC_ASYNC_DEV* dst);\n```\n\nCopy async device memory safe (not pointers to old device).\n\n### ```wolfAsync_DevCtxInit```\n```\nint wolfAsync_DevCtxInit(WC_ASYNC_DEV* asyncDev, word32 marker, void* heap, int devId);\n```\n\nInitialize the device context and open the device hardware using the provided `WC_ASYNC_DEV ` pointer, marker and device id (from wolfAsync_DevOpen).\n\n### ```wolfAsync_DevCtxFree```\n```\nvoid wolfAsync_DevCtxFree(WC_ASYNC_DEV* asyncDev);\n```\n\nCloses and free's the device context.\n\n\n### ```wolfAsync_EventInit```\n```\nint wolfAsync_EventInit(WOLF_EVENT* event, enum WOLF_EVENT_TYPE type, void* context, word32 flags);\n```\n\nInitialize an event structure with provided type and context. Sets the pending flag and the status code to `WC_PENDING_E`. Current flag options are `WC_ASYNC_FLAG_NONE` and `WC_ASYNC_FLAG_CALL_AGAIN` (indicates crypto needs called again after WC_PENDING_E).\n\n### ```wolfAsync_EventWait ```\n```\nint wolfAsync_EventWait(WOLF_EVENT* event);\n```\n\nWaits for the provided event to complete.\n\n### ```wolfAsync_EventPoll```\n```\nint wolfAsync_EventPoll(WOLF_EVENT* event, WOLF_EVENT_FLAG event_flags);\n```\n\nPolls the provided event to determine if its done.\n\n### ```wolfAsync_EventPop ```\n\n```\nint wolfAsync_EventPop(WOLF_EVENT* event, enum WOLF_EVENT_TYPE event_type);\n```\n\nThis will check the event to see if the event type matches and the event is complete. If it is then the async return code is returned. If not then `WC_NOT_PENDING_E` is returned.\n\n\n### ```wolfAsync_EventQueuePush```\n```\nint wolfAsync_EventQueuePush(WOLF_EVENT_QUEUE* queue, WOLF_EVENT* event);\n```\n\nPushes an event to the provided event queue and assigns the provided event.\n\n### ```wolfAsync_EventQueuePoll```\n```\nint wolfAsync_EventQueuePoll(WOLF_EVENT_QUEUE* queue, void* context_filter,\n    WOLF_EVENT** events, int maxEvents, WOLF_EVENT_FLAG event_flags, int* eventCount);\n```\n\nPolls all events in the provided event queue. Optionally filters by context. Will return pointers to the done events.\n\n### ```wc_AsyncHandle```\n```\nint wc_AsyncHandle(WC_ASYNC_DEV* asyncDev, WOLF_EVENT_QUEUE* queue, word32 flags);\n```\n\nThis will push the event inside asyncDev into the provided queue.\n\n### ```wc_AsyncWait```\n```\nint wc_AsyncWait(int ret, WC_ASYNC_DEV* asyncDev, word32 flags);\n```\n\nThis will wait until the provided asyncDev is done (or error).\n\n### ```wolfAsync_HardwareStart```\n```\nint wolfAsync_HardwareStart(void);\n```\n\nIf using multiple threads this allows a way to start the hardware before using `wolfAsync_DevOpen` to ensure the memory system is setup. Ensure that `wolfAsync_HardwareStop` is called on exit. Internally there is a start/stop counter, so this can be called multiple times, but stop must also be called the same number of times to shutdown the hardware.\n\n### ```wolfAsync_HardwareStop```\n```\nvoid wolfAsync_HardwareStop(void);\n```\n\nStops hardware if internal `--start_count == 0`.\n\n## Examples\n\n### TLS Server Example\n\n```c\nint devId = INVALID_DEVID;\n\nret = wolfAsync_DevOpen(\u0026devId);\nif (ret != 0) {\n    err_sys(\"Async device open failed\");\n}\nwolfSSL_CTX_SetDevId(ctx, devId);\n\ndo {\n    err = 0; /* reset error */\n    ret = wolfSSL_accept(ssl, msg, msgSz, \u0026msgSz);\n    if (ret \u003c= 0) {\n        err = wolfSSL_get_error(ssl, 0);\n        if (err == WC_PENDING_E) {\n            ret = wolfSSL_AsyncPoll(ssl, WOLF_POLL_FLAG_CHECK_HW);\n            if (ret \u003c 0) break;\n        }\n    }\n} while (err == WC_PENDING_E);\nif (ret != WOLFSSL_SUCCESS) {\n    err_sys(\"SSL_connect failed\");\n}\n\nwolfAsync_DevClose(\u0026devId);\n```\n\n### wolfCrypt RSA Example\n\n```c\nstatic int devId = INVALID_DEVID;\nRsaKey key;\n\nret = wolfAsync_DevOpen(\u0026devId);\nif (ret != 0)\n    err_sys(\"Async device open failed\");\n\nwc_InitRsaKey_ex(\u0026key, HEAP_HINT, devId);\nif (ret == 0) {\n    ret = wc_RsaPrivateKeyDecode(tmp, \u0026idx, \u0026key, (word32)bytes);\n    do {\n        ret = wc_AsyncWait(ret, \u0026key.asyncDev, WC_ASYNC_FLAG_CALL_AGAIN);\n        if (ret \u003e= 0)\n            ret = wc_RsaPublicEncrypt(in, inLen, out, outSz, \u0026key, \u0026rng);\n    } while (ret == WC_PENDING_E);\n    wc_FreeRsaKey(\u0026key);\n}\n\nwolfAsync_DevClose(\u0026devId);\n```\n\n## Build Options\n\n1. Async multi-threading can be disabled by defining `WC_NO_ASYNC_THREADING`. This only disables internal async threading functions. You are free to use other threading APIs or paradigms in your application.\n2. Software benchmarks can be disabled by defining `NO_SW_BENCH`.\n3. The `WC_ASYNC_THRESH_NONE` define can be used to disable the cipher thresholds, which are tunable values to determine at what size hardware should be used vs. software.\n4. Use `WOLFSSL_DEBUG_MEMORY` and `WOLFSSL_TRACK_MEMORY` to help debug memory issues. QAT also supports `WOLFSSL_DEBUG_MEMORY_PRINT`.\n\n\n## References\n\n### TLS Client/Server Async Example\n\nWe have a full TLS client/server async examples here:\n\n* [https://github.com/wolfSSL/wolfssl-examples/blob/master/tls/server-tls-epoll-perf.c](https://github.com/wolfSSL/wolfssl-examples/blob/master/tls/server-tls-epoll-perf.c)\n\n* [https://github.com/wolfSSL/wolfssl-examples/blob/master/tls/client-tls-perf.c](https://github.com/wolfSSL/wolfssl-examples/blob/master/tls/client-tls-perf.c)\n\n#### TLS Threaded epoll Example Building\n\n```sh\ngit clone git@github.com:wolfSSL/wolfssl-examples.git\ncd wolfssl-examples\ncd tls\n# For QuickAssist: Uncomment QAT lines at top of Makefile\nmake\n```\n\n#### TLS Threaded epoll Example Usage\n\n```sh\n$ ./client-tls-perf -?\nperf 4.5.0 (NOTE: All files relative to wolfSSL home dir)\n-?          Help, print this usage\n-p \u003cnum\u003e    Port to listen on, not 0, default 11111\n-v \u003cnum\u003e    SSL version [0-3], SSLv3(0) - TLS1.2(3)), default 3\n-l \u003cstr\u003e    Cipher suite list (: delimited)\n-c \u003cfile\u003e   Certificate file,           default ../certs/client-cert.pem\n-k \u003cfile\u003e   Key file,                   default ../certs/client-key.pem\n-A \u003cfile\u003e   Certificate Authority file, default ../certs/ca-cert.pem\n-r          Resume session\n-n \u003cnum\u003e    Benchmark \u003cnum\u003e connections\n-N \u003cnum\u003e    \u003cnum\u003e concurrent connections\n-R \u003cnum\u003e    \u003cnum\u003e bytes read from client\n-W \u003cnum\u003e    \u003cnum\u003e bytes written to client\n-B \u003cnum\u003e    Benchmark \u003cnum\u003e written bytes\n```\n\n#### TLS Threaded epoll Example Output\n\n```sh\n$ sudo ./server-tls-epoll-threaded -n 10000\n$ sudo ./client-tls-perf -n 10000\n\nwolfSSL Server Benchmark 16384 bytes\n\tNum Conns         :     10000\n\tTotal             : 18575.800 ms\n\tTotal Avg         :     1.858 ms\n\tt/s               :   538.335\n\tAccept            : 35848.428 ms\n\tAccept Avg        :     3.585 ms\n\tTotal Read bytes  : 163840000 bytes\n\tTotal Write bytes : 163840000 bytes\n\tRead              :   402.212 ms (  388.476 MBps)\n\tWrite             :   591.469 ms (  264.173 MBps)\n```\n\n## Change Log\n\n### wolfSSL Async Release v5.7.4 (Oct 29, 2024)\n* Includes all wolfSSL v5.7.4 fixes. See ChangeLog.md here: https://github.com/wolfSSL/wolfssl/blob/master/ChangeLog.md#wolfssl-release-574-oct-24-2024\n - Plus fixes for asynchronous release - SHA3/HMAC devId (https://github.com/wolfSSL/wolfssl/pull/8119)\n* Fix for Intel QuickAssist RSA Key generation exponent result. (https://github.com/wolfSSL/wolfAsyncCrypt/pull/75)\n\n### wolfSSL Async Release v5.7.0 (Mar 21, 2023)\n* Includes all wolfSSL v5.7.0 fixes. See ChangeLog.md here: https://github.com/wolfSSL/wolfssl/blob/master/ChangeLog.md#wolfssl-release-570-mar-20-2024\n\n### wolfSSL Async Release v5.6.6 (Dec 20, 2023)\n* Includes all wolfSSL v5.6.6 fixes. See ChangeLog.md here: https://github.com/wolfSSL/wolfssl/blob/master/ChangeLog.md#wolfssl-release-566-dec-19-2023\n - Plus wolfSSL PR 7085 fix for invalid `dh_ffdhe_test` for even P when using Intel QuickAssist. https://github.com/wolfSSL/wolfssl/pull/7085\n* Fix for missing `IntelQaFreeFlatBuffer` with DH enabled and no keygen. (broken in PR #71)\n* Add return code checking for wc_AsyncThreadCreate_ex in exit_fail section for pthread_attr_destroy. (PR #72)\n\n### wolfSSL Async Release v5.6.4 (Oct 30, 2023)\n* Fixes for support async with crypto or pk callbacks.\n* Rename `WC_NOT_PENDING_E` -\u003e `WC_NO_PENDING_E`\n\n### wolfSSL Async Release v5.6.3 (June 16, 2023)\n* Includes all wolfSSL v5.6.3 fixes. See ChangeLog.md here: https://github.com/wolfSSL/wolfssl/blob/master/ChangeLog.md#wolfssl-release-563-jun-16-2023\n* Add sanity check of index devId before accessing array\n* Use the blocking call from the async test\n\n### wolfSSL Async Release v5.6.0 (Mar 29, 2023)\n* Includes all wolfSSL v5.6.0 fixes. See ChangeLog.md here: https://github.com/wolfSSL/wolfssl/blob/master/ChangeLog.md#wolfssl-release-560-mar-24-2023\n* wolfAsyncCrypt github repository became public.\n\n### wolfSSL Async Release v5.5.4 (Dec 22, 2022)\n\n* Includes all wolfSSL v5.5.4 fixes. See ChangeLog.md here: https://github.com/wolfSSL/wolfssl/blob/master/ChangeLog.md#wolfssl-release-554-dec-21-2022\n* Use the `wc_ecc_shared_secret_ex` version for async test. Requires https://github.com/wolfSSL/wolfssl/pull/5868\n\n### wolfSSL Async Release v5.5.3 (Nov 8, 2022)\n\n* Includes all wolfSSL v5.5.1-v5.5.3 fixes. See ChangeLog.md here: https://github.com/wolfSSL/wolfssl/blob/master/ChangeLog.md#wolfssl-release-553-nov-2-2022\n* Fix for Intel QAT handling of sign R when cofactor is not 1. https://github.com/wolfSSL/wolfssl/pull/5737 and https://github.com/wolfSSL/wolfAsyncCrypt/pull/54\n* Fix check scalar bits for ECC cofactor. https://github.com/wolfSSL/wolfssl/pull/5737\n* Fixes for async sniffer: https://github.com/wolfSSL/wolfssl/pull/5734\n  - Handling of packets with multiple TLS messages.\n  - Multiple back to back sessions.\n  - Ensure all pending queued packets are finished before ending pcap processing.\n* Fix for various tests that do not properly handle `WC_PENDING_E`. https://github.com/wolfSSL/wolfssl/pull/5773\n* Revert \"Fix for sniffer to decode out of order packets\". https://github.com/wolfSSL/wolfssl/pull/5771\n\n### wolfSSL Async Release v5.5.0 (Sep 2, 2022)\n\n* Includes all wolfSSL v5.5.0 fixes. See ChangeLog.md here: https://github.com/wolfSSL/wolfssl/blob/master/ChangeLog.md#wolfssl-release-550-aug-30-2022\n* Fix for handling return codes from `pthread_attr_destroy`.\n* Fix for async session tickets. https://github.com/wolfSSL/wolfssl/pull/5534\n* Fix for async with OCSP non-blocking in ProcessPeerCerts. https://github.com/wolfSSL/wolfssl/pull/5539\n\n### wolfSSL Async Release v5.4.0 (July 11, 2022)\n* Fix for DH trim of leading zeros to use memmove.\n* Fix to print errors to stderr.\n* Fix to consistently return the status of failed pthreads funcs.\n* Move async device pointer (https://github.com/wolfSSL/wolfssl/pull/5149)\n\n### wolfSSL Async Release v5.3.0 (May 5, 2022)\n\n* Added Intel QuickAssist ECC Key Generation acceleration. Specifically point multiplication similar to our `wc_ecc_mulmod_ex2`.\n* Fix for building Intel QAT with SP math all\n* Fix for `error: unused function 'IntelQaFreeFlatBuffer'`.\n* Fix for handling the Koblitz curve param \"a\", which is all zeros.\n* Fixes for scan-build warnings.\n* Includes wolfSSL PR https://github.com/wolfSSL/wolfssl/pull/5101\n\n### wolfSSL Async Release v5.2.0 (Feb 21, 2022)\n\n* Adds `WC_NO_ASYNC_SLEEP` option to hide wc_AsyncSleep for platforms that do not need it.\n* Fix for async test anonymous union on some platforms (`#pragma anon_unions` and `HAVE_ANONYMOUS_INLINE_AGGREGATES`)\n* Fixes for invalidPrintfArgType_sint (cppcheck) and readability-redundant-preprocessor (clang-tidy).\n\n### wolfSSL Async Release v5.1.0 (Jan 3rd, 2022)\n\n\n### wolfSSL Async Release v5.0.0 (11/01/2021)\n\n* Fix for issue with QAT AES GCM input buffer already NUMA and not aligned.\n\n### wolfSSL Async Release v4.8.0 (07/14/2021)\n\n* Fix for new QAT 1.7 hash types warning.\n* Updated Intel QAT 1.7 build instructions.\n* Includes possible HAVE_WOLF_BIGINT leaks in PR https://github.com/wolfSSL/wolfssl/pull/4208\n\n### wolfSSL Async Release v4.7.0 (02/20/2021)\n\n* Fix for ARC4 macro typo\n\n### wolfSSL Async Release v4.6.0 (12/21/2020)\n\n* Documentation updates.\n* Fixes for Cavium Nitrox and Intel Quick Assist (wolfSSL/wolfssl#3577) with TLS v1.3\n\n### wolfSSL Async Release v4.4.0 (04/24/2020)\n\n* Fix for uninitialized `supSha3` warning.\n* Fix for use of incorrect devId for wolfSSL_SHA3_256_Init.\n* Fix for QAT with Shake256.\n* Fix for QAT example `./build.sh`.\n\n### wolfSSL Async Release v4.3.0 (12/20/2019)\n\n* Fix for async date override callback issue.\n* Updates to Octeon README.\n\n### wolfSSL Async Release v4.2.0 (10/22/2019)\n\n* Fix for QuickAssist DH Agree issue with leading zero bytes.\n* Fix for QuickAssist AES CBC issue with previous IV on back-to-back operations.\n* Updates to QuickAssist README.md for latest QAT v1.7 driver.\n* Instructions for Octeon III (CN7300) use.\n\n### wolfSSL Async Release v4.0.0 (03/25/2019)\n\n* Fix for building with QuickAssist v1.7 driver (4.4.0-00023) (was missing usdm_drv during configure with check).\n* Fix for building async with file system disabled.\n* Fix for SHA-3 runtime detection for not supported in hardware.\n\n### wolfSSL Async Release v3.15.8 (03/01/2019) - Intermediate release\n\n* Performance improvements for QuickAssist.\n* Added new build option `QAT_POLL_RESP_QUOTA` to indicate maximum number of callbacks to service per poll. The default is 0 (all), was previously 8.\n* Added useful QAT_DEBUG logging for ECC and DH operations.\n* Cleanup whitespace in quickassist.c.\n* Enhanced the Cavium macros for `CAVIUM_MAX_PENDING` and `CAVIUM_MAX_POLL` over-ridable.\n* Added build-time override for benchmark thread count `WC_ASYNC_BENCH_THREAD_COUNT`.\n* Fixes for wolfCrypt test with asynchronous support enabled and `--enable-nginx`.\n* Fix to use QAT for ECC sign and verify when SP is enabled and key was initialized with devId.\n* Fixes issues with wolfCrypt test and QAT not properly calling \"again\" for the ECC sign, verify and shared secret.\n* Correct the output for multi-threaded benchmark using `-base10` option.\n* Fixes to QAT HMAC enables in benchmark tool.\n* Adds new `NO_HW_BENCH` to support using multi-threaded software only benchmarks.\n\n### wolfSSL Async Release v3.15.7 (12/27/2018)\n\n* Fixes for various analysis warnings (https://github.com/wolfSSL/wolfssl/pull/2003).\n* Added QAT v1.7 driver support.\n* Added QAT SHA-3 support.\n* Added QAT RSA Key Generation support.\n* Added support for new usdm memory driver.\n* Added support for detecting QAT version and features.\n* Added `QAT_ENABLE_RNG` option to disable QAT TRNG/DRBG.\n* Added alternate hashing method to cache all updates (avoids using partial updates).\n\n### wolfSSL Async Release v3.15.5 (11/09/2018)\n\n* Fixes for various analysis warnings (https://github.com/wolfSSL/wolfssl/pull/1918).\n* Fix for QAT possible double free case where `ctx-\u003esymCtx` is not trapped.\n* Improved QAT debug messages when using `QAT_DEBUG`.\n* Fix for QAT RNG to allow zero length. This resolves PSS case where `wc_RNG_GenerateBlock` is called for saltLen == 0.\n\n\n### wolfSSL Async Release v3.15.3 (06/20/2018)\n\n* Fixes for fsantize tests with Cavium Nitrox V.\n* Removed typedef for `CspHandle`, since its already defined.\n* Fixes for a couple of fsanitize warnings.\n* Fix for possible leak with large request to `IntelQaDrbg`.\n\n### wolfSSL Async Release v3.14.4 (04/13/2018)\n\n* Added Nitrox V ECC.\n* Added Nitrox V SHA-224 and SHA-3\n* Added Nitrox V AES GCM\n* Added Nitrox III SHA2 384/512 support for HMAC.\n* Added error code handling for signature check failure.\n* Added error translate for `ERR_PKCS_DECRYPT_INCORRECT`\n* Added useful `WOLFSSL_NITROX_DEBUG` and show count for pending checks.\n* Cleanup of Nitrox symmetric processing to use single while loops.\n* Cleanup to only include some headers in cavium_nitrox.c port.\n* Fixes for building against Nitrox III and V SDK.\n* Updates to README.md with required CFLAGS/LDFLAGS when building without ./configure.\n* Fix for Intel QuickAssist HMAC to use software for unsupported hash algorithms.\n\n\n### wolfSSL Async Release v3.12.2 (10/22/2017)\n\n* Fix for HMAC QAT when block size aligned. The QAT HMAC final without any buffers will fail incorrectly (bug in QAT 1.6).\n* Nitrox fix for rename of `ContextType` to `context_type_t`. Updates to Nitrox README.md.\n* Workaround for `USE_QAE_THREAD_LS` issue with realloc from a different thread.\n* Fix for hashing to allow zero length. This resolves issue with new empty hash tests.\n* Fix bug with blocking async where operation was being free'd before completion. Set freeFunc prior to performing operation and check ret code in poll.\n* Fix leak with cipher symmetric context close.\n* Fix QAT_DEBUG partialState offset.\n* Fixes for symmetric context caching.\n* Refactored async event initialization so its done prior to making possible async calls.\n* Fix to resolve issue with QAT callbacks and multi-threading.\n* The cleanup is now handled in polling function and the event is only marked done from the polling thread that matches the originating thread.\n* Fix possible mem leak with multiple threads `g_qatEcdhY` and `g_qatEcdhCofactor1`.\n* Fix the block polling to use `ret` instead of `status`.\n* Change order of `IntelQaDevClear` and setting `event-\u003eret`.\n* Fixes to better handle threading with async.\n* Refactor of async event state.\n* Refactor to initialize event prior to operation (in case it finishes before adding to queue).\n* Fixes issues with AES GCM decrypt that can corrupt up to authTag bytes at end of output buffer provided.\n* Optimize the Hmac struct to replace keyRaw with ipad.\n* Enhancement to allow re-use of the symmetric context for ciphers.\n* Fixes for QuickAssist (QAT) multi-threading. Fix to not set return code until after callback cleanup.\n* Disable thread binding to specific CPU by default (enabled now with `WC_ASYNC_THREAD_BIND`).\n* Added optional define `QAT_USE_POLLING_CHECK ` to have only one thread polling at a time (not required and doesn't improve performance).\n* Reduced default QAT_MAX_PENDING for benchmark to 15 (120/num_threads).\n* Fix for IntelQaDrbg to handle buffer over 0xFFFF in length.\n* Added working DRBG and TRNG implementations for QAT.\n* Fix to set callback status after ret and output have been set. Cleanup of the symmetric context.\n* Updates to support refactored dynamic types.\n* Fix for QAT symmetric to allow NULL authTag.\n* Fix GCC 7 build warning with braces.\n* Cleanup formatting.\n\n### wolfSSL Async Release v3.11.0 (05/05/2017)\n\n* Fixes for Cavium Nitrox III/V.\n\t- Fix with possible crash when using a request Id that is already complete, due to partial submissions not marking event done.\n\t- Improvements to max buffer lengths.\n\t- Fixes to handle various return code patterns with CNN55XX-SDK.\n\t- All Nitrox V tests and benchmarks pass. Bench: RSA 2048-bit public 336,674 ops/sec and private (CRT) 66,524 ops/sec.\n\n* Intel QuickAssist support and various async fixes/improvements:\n    - Added support for Intel QuickAssist v1.6 driver with QuickAssist 8950 hardware\n\t- Added QAE memory option to use static memory list instead of dynamic list using `USE_QAE_STATIC_MEM`.\n\t- Added tracking of deallocs and made the values signed long.\n\t- Improved code for wolf header check and expanded to 16-byte alignment for performance improvement with TLS.\n\t- Added ability to override limit dev access parameters and all configurable QAT fields.\n\t- Added async simulator tests for DH, DES3 CBC and AES CBC/GCM.\n\t- Rename AsyncCryptDev to WC_ASYNC_DEV.\n\t- Refactor to move WOLF_EVENT into WC_ASYNC_DEV.\n\t- Refactor the async struct/enum names to use WC_ naming.\n\t- Refactor of the async event-\u003econtext to use WOLF_EVENT_TYPE_ASYNC_WOLFSSL or WOLF_EVENT_TYPE_ASYNC_WOLFCRYPT to indicate the type of context pointer.\n\t- Added flag to WOLF_EVENT which is used to determine if the async complete should call into operation again or goto next `WC_ASYNC_FLAG_CALL_AGAIN`.\n\t- Cleanup of the \"wolfAsync_DevCtxInit\" calls to make sure asyncDev is always cleared if invalid device id is used.\n\t- Eliminated WOLFSSL_ASYNC_CRYPT_STATE.\n\t- Removed async event type WOLF_EVENT_TYPE_ASYNC_ANY.\n\t- Enable the random extra delay option by default for simulator as it helps catch bugs.\n\t- Cleanup for async free to also check marker.\n\t- Refactor of the async wait and handle to reduce duplicate code.\n\t- Added async simulator test for RSA make key.\n\t- Added WC_ASYNC_THRESH_NONE to allow bypass of threshold for testing\n\t- Added static numbers for the async sim test types, for easier debugging of the “testDev-\u003etype” value.\n\t- Populate heap hint into asyncDev struct.\n\t- Enhancement to cache the asyncDev to improve poll performance.\n\t- Added async threading helpers and new wolfAsync_DevOpenThread.\n\t- Added WC_NO_ASYNC_THREADING to prevent async threading.\n\t- Added new API “wc_AsyncGetNumberOfCpus” for getting number of CPU’s.\n\t- Added new “wc_AsyncThreadYield” API.\n\t- Added WOLF_ASYNC_MAX_THREADS.\n\t- Added new API for wolfAsync_DevCopy.\n\t- Fix to make sure an async init failure sets the deviceId to INVALID_DEVID.\n\t- Fix for building with async threading support on Mac.\n\t- Fix for using simulator so it supports multiple threads.\n\n* Moved Intel QuickAssist and Cavium Nitrox III/V code into async repo.\n* Added new WC_ASYNC_NO_* options to allow disabling of individual async algorithms.\n\t- New defines are: WC_ASYNC_NO_CRYPT, WC_ASYNC_NO_PKI and WC_ASYNC_NO_HASH.\n\t- Additionally each algorithm has a WC_ASYNC_NO_[ALGO] define.\n\n\n### wolfSSL Async Release v3.9.8 (07/25/2016)\n\n* Asynchronous wolfCrypt and Cavium Nitrox V support.\n\n### wolfSSL Async Release v3.9.0 (03/04/2016)\n\n* Initial version with async simulator and README.md.\n\n\n## Support\n\nFor questions email wolfSSL support at support@wolfssl.com\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwolfssl%2Fwolfasynccrypt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwolfssl%2Fwolfasynccrypt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwolfssl%2Fwolfasynccrypt/lists"}