Generated banner for Doca Sha Offload Engine
Generated logo for Doca Sha Offload Engine

Doca Sha Offload Engine

NVIDIAOfficialCreated by NVIDIA

  • Skill
  • Tool integration
  • Software development
  • Apache-2.0
  • Medium risk

From the author

Use this skill when wiring the DOCA SHA Offload Engine (an OpenSSL ENGINE) into an existing OpenSSL pipeline to offload one-shot SHA-1, SHA-256, or SHA-512 (EVP_Digest) onto DOCA SHA hardware without rewriting against doca-sha. Covers engine load mechanics (`openssl engine dynamic`, `set_pci_addr` ctrl, `-engine_impl`), the SHA-224 negative test that proves offload engaged, the message-size window where offload beats CPU SHA, and engine-vs-library selection. Trigger even when the user does not say "DOCA SHA Offload Engine" or "OpenSSL ENGINE" — typical implicit phrasings: "speed up openssl SHA on BlueField", "offload SHA without code changes", "is openssl using the accelerator or falling back to software", "prove DOCA SHA actually ran", "openssl dgst hashed but I'm not sure it was offloaded". Refuse and route elsewhere for new SHA pipelines (use doca-sha), MD5 / SHA-3 / SHA-224 / HMAC-SHA offload, incremental hashing via chained `EVP_DigestUpdate`, or OpenSSL PROVIDER authoring.
— the description by NVIDIA

AutoGineer summary

Written by AutoGineer from the skill’s own files, not by the author

The DOCA SHA Offload Engine is an OpenSSL ENGINE that enables hardware-accelerated SHA hashing for existing OpenSSL-based applications without requiring source code modifications. It specifically targets one-shot SHA-1, SHA-256, and SHA-512 operations via the EVP_Digest interface. This skill provides guidance on loading the engine, configuring the PCIe address, verifying that offload is active, and determining when hardware acceleration provides a performance benefit over CPU-based hashing.

What it does

  • Provides mechanics for loading the engine into OpenSSL pipelines.
  • Explains how to configure the engine using the set_pci_addr control command.
  • Outlines verification patterns to confirm offload is active versus software fallback.
  • Defines the supported SHA algorithms and the engine's behavior for unsupported types.
  • Offers guidance on comparing performance between the engine and standard CPU SHA.
  • Details the engine-vs-library selection criteria for new versus existing pipelines.

When to use it

  • When you need to accelerate SHA hashing in an existing OpenSSL-based application.
  • When you want to avoid rewriting code to use the native doca-sha library.
  • When you need to verify if your current OpenSSL pipeline is successfully using the DPU hardware.
  • When you are evaluating if the message-size of your workload benefits from hardware offload.
  • When you need to troubleshoot engine loading or performance issues on a BlueField-2 DPU.

Advantages

  • Enables hardware acceleration without modifying existing application source code.
  • Integrates seamlessly with standard OpenSSL EVP_Digest workflows.
  • Provides clear verification tests to ensure offload is actually occurring.
  • Allows for performance optimization by identifying the optimal message-size window.
  • Maintains compatibility with standard OpenSSL engine loading mechanisms.

Usage examples

“How can I offload SHA-256 in my existing OpenSSL application without rewriting it?”
The agent will guide you through loading the libdoca_sha_offload_engine.so shared object into your OpenSSL pipeline using the engine dynamic interface.
“How do I verify that my OpenSSL command is actually using the DOCA SHA engine?”
The agent will instruct you to perform a negative test using an unsupported digest like SHA-224 to ensure the engine does not silently fall back to software.
“Is the DOCA SHA engine faster than CPU SHA for my 4KB data blocks?”
The agent will provide the openssl speed comparison pattern to help you measure the performance impact on your specific hardware and workload.

Install

  1. Download the skill as a ZIP:

    https://autogineer.com/agent-skills/nvidia/doca-sha-offload-engine/download
  2. Unzip it into the cross-client skills folder of your project:

    mkdir -p .agents/skills && unzip doca-sha-offload-engine.zip -d .agents/skills

Documentation by NVIDIA

DOCA SHA Offload Engine

Examples

  • “Can I offload SHA in an existing OpenSSL pipeline without rewriting?” — this is in scope. Load the engine; do not start a new doca-sha pipeline here.

  • “How do I prove OpenSSL used DOCA SHA, not CPU SHA?” — use the SHA-224 negative test; do not treat a successful digest as proof of offload.

Quick answer (answer from this file)

  1. Device gate first. The DOCA SHA engine exists only on BlueField-2; BlueField-3 has no SHA acceleration engine (public DOCA SHA guide), so there is nothing to offload there: say so and stop.

  2. Load probe: openssl engine dynamic -pre NO_VCHECK:1 -pre SO_PATH:<engine .so> -pre LOAD -vvv -t -c.

  3. Positive test: openssl dgst -sha256 -engine <engine .so> -engine_impl <file> reports the engine was set.

  4. Negative test: an unsupported digest (-sha224) must fail with the engine selected; it must not silently fall back.

  5. Performance: compare openssl speed -evp sha256 with and without the engine (add -async_jobs for parallelism). Report measured numbers only; never quote numbers from memory.

Instructions

Follow Loading order below. Open the tasks companion for configure / run. Open the capabilities companion for when offload wins and how to verify it. Do not open every companion file.

Where to start: This is a tool skill for the OpenSSL ENGINE installed by the doca-sha-offload-engine package under ${DOCA_DIR}/tools/doca_sha_offload_engine/ as libdoca_sha_offload_engine.so, next to its engine_readme.md. It is not a CLI — it is a shared object loaded by an OpenSSL-based application or by openssl itself, that re-routes SHA-1 / SHA-256 / SHA-512 (one-shot only, via the EVP_Digest interface) onto the DOCA SHA hardware path. Open the tasks companion and start at ## configure for the PCIe-address configuration and the OpenSSL prerequisites; jump to ## run for the “load the engine and prove it actually runs” flow. Open the capabilities companion when the question is what the engine actually offloads vs falls back to, when the engine is a perf win vs not, or how to verify offload actually engaged. If DOCA is not installed yet, route to doca-setup/SKILL.md first. If the user is building a new SHA pipeline from scratch (not wrapping an existing OpenSSL-based one), this skill is the wrong surface — route to ../../libs/doca-sha/SKILL.md (doca-sha/SKILL.md) instead.

Example questions this skill answers well

The CLASSES of doca-sha-offload-engine questions this skill is built to answer, each with one worked example. The class is the load-bearing piece; the worked example is one instance.

  • “I have an existing OpenSSL-based pipeline doing SHA; can I offload the SHA to DOCA without rewriting the app?” — worked example: “the app uses EVP_DigestInit_ex / EVP_DigestUpdate / EVP_DigestFinal_ex against EVP_sha256(); can I drop in DOCA-SHA offload via an engine load?”. Answered by the “when this engine is the right surface” rule in the capabilities companion

    • the engine-load mechanics in the tasks companion.

  • “Did the engine actually load? Or did OpenSSL just fall back to software SHA?” — worked example: “my openssl dgst invocation completed; how do I know DOCA SHA actually did the work and OpenSSL did not silently use the software path?”. Answered by the “prove the engine actually ran” pattern in the capabilities companion (the SHA-224 negative test and the -engine_impl flag) + the verification flow in the tasks companion.

  • “For what message-size range is the engine offload a win vs CPU SHA?” — worked example: “my pipeline hashes 4 KB blocks at a time; is the engine a win there, or does the round-trip to DOCA SHA cost more than the CPU hash itself?”. Answered by the message-size-window rule in the capabilities companion

    • the openssl speed perf-comparison pattern in the tasks companion.

  • “What SHA algorithms does the engine actually support — and what happens for the ones it does not?” — worked example: “my pipeline mixes SHA-1, SHA-256, SHA-512, and SHA-224 — what does the engine do for each?”. Answered by the algorithm-coverage matrix in the capabilities companion.

  • “Should I use this engine, or call doca-sha directly?” — worked example: “I am writing a new service from scratch; does the engine save me work or does it add complexity I do not need?”. Answered by the “engine vs library” selection table in the capabilities companion.

  • “What OpenSSL versions does the engine require, and what about OpenSSL 3.x's deprecation of the ENGINE API?” — worked example: “my host has OpenSSL 3.0; will the engine still load?”. Answered by the version overlay in the capabilities companion (verified surface: the engine is documented for OpenSSL 1.1.1f on Ubuntu 20.04 and OpenSSL 3.0.2 on Ubuntu 22.04 per the shipped engine_readme.md).

When to load this skill

Load this skill when the user is — or the agent needs to — deploy the DOCA SHA Offload Engine into an OpenSSL-based pipeline on a host with DOCA installed and a SHA-capable device. Concretely:

  • Wiring the engine into an existing OpenSSL-based application or openssl CLI invocation, with the intent of no source-level code changes (or only the minimum ENGINE_load_dynamic / ENGINE_by_id block shown in the shipped engine_readme.md).

  • Verifying the engine actually engaged for the hot-path digests (the “is offload real or did OpenSSL fall back to software” question).

  • Characterizing the message-size range over which the engine is a perf win vs the CPU sha1 / sha256 / sha512 paths.

  • Deciding between “adopt the engine” (existing pipeline, minimal change) and “rewrite to doca-sha” (new pipeline, fine-grained control needed).

Do not load this skill for users building a new SHA-pipeline from scratch — route to ../../libs/doca-sha/SKILL.md (doca-sha/SKILL.md). Do not load this skill for users wanting algorithms the engine does not implement (MD5, SHA-3, SHA-224, HMAC-SHA, streaming/incremental SHA via EVP_DigestUpdate chains that the engine treats as one-shot only).

What this skill provides

This is a thin loader. Substantive material lives in two companion files:

  • the capabilities companion — what the engine offloads (verified: one-shot SHA-1, SHA-256, SHA-512 via the OpenSSL EVP_Digest high-level interface), what it does NOT offload (anything else — including SHA-224, MD5, SHA-3, HMAC-SHA, and any chained EVP_DigestInit_ex / EVP_DigestUpdate / EVP_DigestFinal_ex pattern that the engine implements by buffering and then calling DOCA SHA in one shot at Final), the engine-vs-library selection rule, the message-size-window rule for when offload is a perf win, the verified ctrl-cmd surface (set_pci_addr), the version overlay (OpenSSL ≥ 1.1.1; the shipped engine_readme.md documents testing on OpenSSL 1.1.1f and 3.0.2; OpenSSL 3.x deprecates the ENGINE API but still supports it via the legacy code path), the layered error taxonomy, the observability surface (the “prove offload engaged” pattern using the SHA-224 negative test and -engine_impl), and the safety overlay.

  • the tasks companion — step-by-step workflows for the in-scope task verbs: install, configure (PCIe address selection — the engine defaults to 03:00.0 and exposes the set_pci_addr ctrl-cmd), build (none: the package ships the engine pre-built), modify (refuses engine patching; modify the load-time invocation and the PCIe address instead), run (load the engine via openssl engine dynamic; the verification pattern; the OpenSSL programmatic ENGINE_load_dynamic block), test (the “prove the engine ran” SHA-224 negative test; the openssl speed perf comparison; the message-size window characterization), debug (walk the error taxonomy layer by layer), use (the engine-vs-library decision for the user's specific pipeline), plus a Deferred task verbs block.

The skill assumes a host where DOCA is already installed, OpenSSL ≥ 1.1.1 is present (libssl-dev or equivalent), and the deploying user can access the selected DOCA SHA PCIe device. Verify device visibility and run the engine-load smoke as that same user before integration; if either fails with a permission error, stop and route to doca-setup rather than guessing a group, ACL, or sudo policy.

What this skill deliberately does not ship

This skill is agent guidance, not a samples or scripts bundle. It deliberately does not contain — and pull requests should not add:

  • Pre-written OpenSSL ENGINE application source code beyond the verbatim block in the shipped engine_readme.md (the ENGINE_load_dynamic / ENGINE_by_id / ENGINE_ctrl_cmd_string / ENGINE_init / ENGINE_set_default_digests sequence, cross-referenced into the tasks companion). The shipped readme is the worked example.

  • A samples/, bindings/, or reference/ subtree. This is a thin loader for a shipped shared-object; substantive material lives in the shipped engine_readme.md and the doca-sha library docs.

  • Performance numbers from agent memory. The message-size-window where the engine wins is device-, firmware-, OpenSSL-version-, and workload-specific. The openssl speed comparison pattern in the tasks companion is the way to capture it on the user's actual hardware; quoting a number from memory is the cross-platform failure mode this skill exists to prevent.

  • Wrappers, parsers, or scripts in any language that consume the engine's stdout or the openssl speed output format.

Loading order

  1. Read this skill first to confirm the user's question is in scope (the user actually has an existing OpenSSL-based pipeline and wants to offload to DOCA SHA without code changes; if the user is building from scratch, route to ../../libs/doca-sha/ (doca-sha/SKILL.md)).

  2. For what the engine offloads vs falls back, the engine-vs-library selection rule, the message-size- window rule, the version overlay, the error taxonomy, the observability surface (and the prove-offload- actually-engaged pattern), and the safety overlay, see the capabilities companion.

  3. For step-by-step workflows — install, configure, build, modify, run, test, debug, use — see the tasks companion.

  • ../../libs/doca-sha/SKILL.md (doca-sha/SKILL.md) — the underlying DOCA SHA library. The engine is a thin OpenSSL-ENGINE wrapper around doca-sha; when the user needs fine-grained control over the SHA task surface (partial-hash, custom buffer permissions, cap-query for unusual message sizes), the library is the right answer. The engine wraps the one-shot task; the library exposes both one-shot and partial- hash per doca-sha/SKILL.md.

  • doca-version/SKILL.md — the canonical version-detection chain. The engine has a TWO-axis version overlay (DOCA-side and OpenSSL-side); the version skill carries the four-way match rule this skill layers on top of.

  • doca-debug/SKILL.md — the cross-cutting debug ladder. The engine surfaces its own error taxonomy; when the cause is below DOCA (driver, firmware), the taxonomy hands off here.

  • doca-setup/SKILL.md — env preparation, install verification, the libssl-dev install path, and the NGC DOCA container path.

  • doca-public-knowledge-map/SKILL.md — routing to the public DOCA SHA documentation set on docs.nvidia.com/doca/sdk/ and to the OpenSSL ENGINE / openssl-engine upstream documentation on openssl.org.

  • doca-hardware-safety/SKILL.md — the bundle-wide hardware-safety meta-policy. The engine binds to a specific PCIe device; the set_pci_addr ctrl is the artifact-specific overlay, but any host-side change underneath (firmware burn, BFB reflash) runs through the meta-policy.

Files

TASKS.md

DOCA SHA Offload Engine — Tasks

Where to start: The verbs that carry real workflow content are ## configure, ## build, ## run, ## test, ## debug, and ## use. The other verbs (install, modify) carry preconditions and a refuses-to-patch routing stub.

This file is loaded by SKILL.md after CAPABILITIES.md. It walks the agent through the task verbs every artifact in this bundle exposes (install / configure / build / modify / run / test / debug / use), then defers task verbs that do not belong here.

install

Goal: confirm the host has every precondition the engine's build + load + run sequence needs before any engine-specific work begins.

This skill does not own DOCA installation; that path lives in doca-setup/SKILL.md. The doca-sha-offload-engine-specific preconditions:

  1. doca-sha.pc is present. Run pkg-config --modversion doca-sha. If the .pc does not resolve, the installed DOCA does not include doca-sha; route to ../../libs/doca-sha/SKILL.md (doca-sha/SKILL.md) and doca-setup/SKILL.md.

  2. OpenSSL ≥ 1.1.1 is present per the shipped engine_readme.md. Verify via openssl version. OpenSSL 3.x is supported via the legacy ENGINE code path per CAPABILITIES.md ## Version compatibility.

  3. The doca-sha-offload-engine package is installed, so libdoca_sha_offload_engine.so and engine_readme.md are present under ${DOCA_DIR}/tools/doca_sha_offload_engine/. For applications that call the ENGINE API, the OpenSSL development headers are also needed (libssl-dev on Ubuntu, openssl-devel on RHEL).

  4. DOCA SHA device is visible to DOCA. doca_caps --list-devs (per ../doca-caps/TASKS.md#run (doca-caps/TASKS.md#run)) reports a device whose PCIe address the operator plans to bind via set_pci_addr. The default PCIe address in the shipped engine_readme.md is 03:00.0; the operator must confirm this matches their hardware before relying on it.

  5. The application embedding the engine has access to OpenSSL's ENGINE API. For programmatic embedding, the app must link against libcrypto; for CLI embedding the openssl binary on the host is enough.

If any precondition fails, stop and route; engine-layer diagnosis against a missing OpenSSL, a missing libssl-dev, or an absent doca-sha install wastes time.

configure

Goal: pick the PCIe address of the DOCA SHA device, the load pattern (CLI vs programmatic), and the OpenSSL algorithm coverage the deployment needs.

Steps the agent walks the user through, in order:

  1. Confirm the engine is the right surface. Walk CAPABILITIES.md ## Capabilities and modes engine-vs-library selection table. If the user is writing a new pipeline, route to ../../libs/doca-sha/SKILL.md (doca-sha/SKILL.md); if the user needs SHA-224 or another non-covered algorithm, the engine is the wrong answer.

  2. Identify the DOCA SHA PCIe address. Run doca_caps --list-devs and pick the device the workload should bind. If the host's DOCA SHA device is at 03:00.0, the engine's default works without override; otherwise the operator passes the PCIe address at load time via the set_pci_addr ctrl-cmd.

  3. Decide CLI vs programmatic load. For an openssl dgst / openssl speed driven pipeline, CLI is the right answer (no application change). For an application calling OpenSSL programmatically, the verified ENGINE_load_dynamic / ENGINE_by_id / ENGINE_ctrl_cmd_string / ENGINE_init / ENGINE_set_default_digests block from the shipped engine_readme.md is the minimum source change.

  4. Decide whether to use -engine_impl. Per CAPABILITIES.md ## Observability, -engine_impl disables OpenSSL's software fallback. In production the operator may want fallback enabled (the engine fails open to software SHA when the device is unavailable); in verification the operator wants -engine_impl (so a missed offload surfaces as an error, not a silent software hash).

  5. For openssl speed perf characterization, decide the -async_jobs and -multi values. Per the shipped engine_readme.md, the engine's perf surface depends on the OpenSSL async pipeline; the agent surfaces this to the user before they ask for a “quick benchmark” that would not exercise the engine's actual scaling shape.

  6. Confirm the engine path. ls ${DOCA_DIR}/tools/doca_sha_offload_engine/libdoca_sha_offload_engine.so.

build

The engine ships pre-built in the doca-sha-offload-engine package; there is nothing to compile:

  1. Install the package (doca-sha-offload-engine) with the DOCA install, per doca-setup/SKILL.md.

  2. Confirm the .so is present. ls ${DOCA_DIR}/tools/doca_sha_offload_engine/libdoca_sha_offload_engine.so.

  3. Set the PCIe address at load time when the DOCA SHA device is not at 03:00.0, via set_pci_addr.

  4. Read the shipped engine_readme.md next to the engine for the load, digest and openssl speed examples.

  5. Confirm transitive dependencies. Run ldd <engine.so> and verify the OpenSSL and DOCA shared objects all resolve. Missing transitive dependencies are the most common cause of layer-1 load errors per CAPABILITIES.md ## Error taxonomy.

Routing for nearby "build" questions:

  • “I want to build a PROVIDER instead of an ENGINE for OpenSSL 3.x.” → out of scope; the shipped artifact is an ENGINE, not a PROVIDER. Route to the OpenSSL upstream PROVIDERS migration guide via doca-public-knowledge-map/SKILL.md.

  • “I want to author my own ENGINE wrapping a different doca library.” → out of scope; route to doca-programming-guide TASKS.md ## build (doca-programming-guide/TASKS.md#build).

modify

Do not patch the engine. It ships pre-built; change only how it is loaded and invoked.

What the agent does modify is the load + invocation environment — the PCIe address (via the set_pci_addr ctrl-cmd), the -async_jobs / -multi knobs on openssl speed, the inclusion of -engine_impl, the OpenSSL engines configuration in openssl.cnf for system-wide loads. Treat “modify the invocation, not the engine source” as the operating mode.

Routing for nearby "modify" questions:

  • “The engine should support SHA-224 / SHA-384 / SHA-3 / HMAC-SHA.” → out of scope; that would be a source-level extension. The user can either (a) use doca-sha directly for those algorithms if the library supports them per ../../libs/doca-sha/CAPABILITIES.md (doca-sha/CAPABILITIES.md), or (b) use OpenSSL's software path for the non-covered algorithms.

  • “I want to enable the engine's debug logging.” → the engine exposes only the set_pci_addr ctrl-cmd; raise DOCA logging per doca-debug/SKILL.md.

  • “I need the engine to do incremental hashing across many EVP_DigestUpdate calls.” → the verified engine is one-shot per the shipped engine_readme.md. For true incremental hashing, route to ../../libs/doca-sha/ (doca-sha/SKILL.md) and the partial-hash task there.

run

The load + verify flow — every session goes through it. The detailed OpenSSL surface lives in the upstream OpenSSL documentation; this section names the shape of the flow, not the verbatim recipe.

Do-not-invent guard (openssl flag spellings). There is no -engine-options flag for openssl dgst — it does not exist in upstream OpenSSL. The bundle’s canonical pattern is two commands: first openssl engine dynamic -pre NO_VCHECK:1 -pre SO_PATH:<path> -pre LOAD -vvv -t -c to probe the engine, then openssl dgst -sha256 -engine <path> -engine_impl to run the digest through it. The bundle’s exact spelling is -engine_impl with an underscore — not -engine-impl with a hyphen; some OpenSSL builds may accept both, but the bundle’s verbatim form is the underscore. The engine ID is doca_sha_offload_engine; the .so is installed at ${DOCA_DIR}/tools/doca_sha_offload_engine/libdoca_sha_offload_engine.so.

  1. Confirm the .so and the environment. Per ## install, ## configure, and ## build.

  2. Probe the engine load. Run the verified openssl engine dynamic -pre NO_VCHECK:1 -pre SO_PATH:<path-to-libdoca_sha_offload_engine.so> -pre LOAD -vvv -t -c invocation per the shipped engine_readme.md. On success the output prints the engine name, the [SHA1, SHA256, SHA512] available digests, and the set_pci_addr ctrl-cmd. If the output is missing any of those, route to ## debug layer 1 or 2.

  3. Run the SHA-224 negative test first. Run openssl dgst -sha224 -engine <path> -engine_impl on a known input. The expected output is an error (SHA-224 is not in the engine's set); the error PROVES OpenSSL actually consulted the engine. If the call succeeds anyway, the engine is NOT being consulted — route to ## debug layer 4.

  4. Run a positive test. Run openssl dgst -sha256 -engine <path> -engine_impl on a known input. Expected: a correct SHA-256 hash and a stderr line matching engine "doca_sha_offload_engine" set. per the shipped engine_readme.md examples.

  5. For programmatic deployment, drop the verified load block into the application per the shipped engine_readme.md:

    ENGINE *e;
    const char *doca_engine_path = "${DOCA_DIR}/tools/doca_sha_offload_engine/libdoca_sha_offload_engine.so";
    ENGINE_load_dynamic();
    e = ENGINE_by_id(doca_engine_path);
    ENGINE_ctrl_cmd_string(e, "set_pci_addr", doca_engine_pci_addr, 0);
    ENGINE_init(e);
    ENGINE_set_default_digests(e);

    Pair it with the verified unload sequence (ENGINE_unregister_digests → ENGINE_finish → ENGINE_free). Quote these verbatim from the shipped readme; do not invent alternative function names.

  6. Plan the perf-comparison run only after the verification is green. Per ## test the agent walks an openssl speed comparison with and without the engine.

When recording the run for downstream consumers, write down: pkg-config --modversion doca-sha, openssl version, host OS / kernel / NUMA, DOCA SHA device PCIe address, the engine load output (openssl engine dynamic -vvv -t -c), the SHA-224 negative test result, the positive test result, and the -engine_impl flag's presence / absence.

test

The engine's ## test verb covers TWO loops: (a) verification — did the engine actually run — and (b) performance characterization — for what message-size mix is the engine a win.

Verification loop

The SHA-224 negative test is mandatory. Without it, the operator cannot tell whether DOCA SHA ran or whether OpenSSL silently used its software path. Per CAPABILITIES.md ## Observability prove-offload pattern:

  1. Run openssl dgst -sha224 -engine <path> -engine_impl <some-input>. Expected: error (Error setting digest per the shipped readme). If the call succeeds with a hash, OpenSSL is silently using software SHA — the engine is not being consulted. Route to ## debug layer 4.

  2. Run openssl dgst -sha256 -engine <path> -engine_impl <some-input>. Expected: a correct SHA-256 hash and a stderr line engine "doca_sha_offload_engine" set.. If this fails, route to ## debug layer 2 or 3.

  3. Repeat (2) for -sha1 and -sha512. All three should succeed.

  4. Only after all four steps pass is the engine verified.

Performance-characterization loop

Per the shipped engine_readme.md, openssl speed is the documented surface. The eval-loop overlay:

Iteration triggerWhat it looks likeWhat changes next iteration
openssl speed -evp sha1 -bytes 10000 -elapsed without the engine completes; the same command with --engine and no -async_jobs is slower or about equalRound-trip cost dominates for small messages without async batchingAdd -async_jobs 256 and re-run; the engine's async surface is what changes the picture.
Engine with -async_jobs 256 wins comfortably; engine without -async_jobs does notWorkload's deployment must enable async to benefitThe agent's recommendation is "deploy with async enabled, or move to the doca-sha library directly for finer-grained control of the parallelism shape".
Engine wins at 100 KB but not at 10 KBThe crossover point is between those sizes for this platformCapture the message-size mix the production workload actually uses; if it is dominantly below the crossover, the engine is not a win for that pipeline.
Engine wins on synchronous openssl dgst for a single large messageThe single-call path is doca-sha's natural shapeQuote the result alongside the message size; do NOT extrapolate to a workload with many small messages.
Same invocation produces different numbers across two hosts at the same DOCA versionDOCA SHA device, firmware, or NUMA delta below DOCACapture the (DOCA + OpenSSL + device + firmware + NUMA) tuple on both hosts; route through doca-version TASKS.md ## test (doca-version/TASKS.md#test).
Same invocation produces different numbers on the same host across DOCA versionsRegression signalCross-link both baselines, name the changed fields, route to doca-version TASKS.md ## debug (doca-version/TASKS.md#debug).

The agent's rule: every change to the OpenSSL invocation re-opens the loop. Re-running with -multi 8 without re-walking the -async_jobs knob first is exactly the failure mode this loop replaces.

Baseline-capture rule. When the goal is a baseline, the captured artifact must include pkg-config --modversion doca-sha, openssl version, the device PCIe address, the openssl speed command lines (engine on and engine off), the -async_jobs and -multi values, and the host's CPU SHA-NI status (for the CPU baseline).

debug

When the engine fails to load, register, or engage, walk the CAPABILITIES.md ## Error taxonomy layers in order:

  1. Load-layer. openssl engine dynamic -pre LOAD -vvv fails or the verbose output does not list the engine. Confirm the SO_PATH is the verified ${DOCA_DIR}/tools/doca_sha_offload_engine/libdoca_sha_offload_engine.so; run ldd <engine.so> to surface missing transitive dependencies; confirm OpenSSL on the host matches what the engine was built against.

  2. Register-layer. Engine loaded but the [SHA1, SHA256, SHA512] digests are not listed, or set_pci_addr is rejected, or ENGINE_set_default_digests returns 0. Confirm the PCIe address is a valid DOCA SHA device via doca_caps --list-devs; route to ../doca-caps/TASKS.md#run (doca-caps/TASKS.md#run).

  3. Runtime-layer. Engine registered, but a digest call fails. Confirm the message size against doca_sha_cap_get_max_src_buf_size per ../../libs/doca-sha/CAPABILITIES.md (doca-sha/CAPABILITIES.md); raise DOCA_LOG_LEVEL to surface the engine's internal logging.

  4. Engine-not-engaged. The openssl dgst call completed and produced a hash, but the SHA-224 negative test from ## test shows OpenSSL silently used the software path. Common causes: the engine was loaded but ENGINE_set_default_digests was not called; the application was started before the engine was registered; the OpenSSL engines config does not actually include the engine. Re-walk ## run steps 2 and 3.

  5. Version. Cross-cutting partial-install / mixed-version. Walk doca-version TASKS.md ## debug (doca-version/TASKS.md#debug) end-to-end; confirm OpenSSL and the engine were built against compatible toolchains.

  6. Cross-cutting. Cause is below DOCA. Hand off to doca-debug TASKS.md ## debug (doca-debug/TASKS.md#debug) and doca-setup TASKS.md ## debug (doca-setup/TASKS.md#debug).

In every case: quote what OpenSSL and the engine reported. Do not paraphrase the load output; do not collapse the SHA-224 test into "the engine works".

use

Goal: turn a verified engine + perf characterization into an integration decision — “do I deploy this engine or rewrite to doca-sha?”.

The decision shape this skill teaches:

  1. Confirm verification. The SHA-224 negative test from ## test is the gate; an unverified engine deployment is a deployment that silently falls back to software SHA on a moment's notice.

  2. Quote the win alongside the message-size mix. “The engine wins at 100 KB with -async_jobs 256; at 4 KB the CPU wins” is a defensible deployment recommendation; “the engine is faster” is not.

  3. For deployments where the workload's message-size mix is below the crossover, the right answer is NOT the engine. It may be doca-sha directly with a custom batching strategy, or the host's SHA-NI path, or a redesign that batches more aggressively before hashing.

  4. For deployments where the application code is fixed and cannot adopt doca-sha directly, the engine is the right answer even when the win is small — the alternative is no offload at all.

  5. Plan the deprecation path on OpenSSL 3.x. The ENGINE API is deprecated in OpenSSL 3.x in favor of PROVIDERS; the engine still works via the legacy code path per CAPABILITIES.md ## Version compatibility, but a deployment that wants to be future-proof should plan a doca-sha-direct rewrite.

  6. Per-release re-verification. Every DOCA upgrade AND every OpenSSL upgrade requires re-running the SHA-224 verification AND the openssl speed characterization. The agent does not assume a known-good deployment survives version bumps without re-testing.

Deferred task verbs

The verbs below are not doca-sha-offload-engine work and should be routed out:

  • install DOCA ⇒ doca-setup/TASKS.md.

  • author a new SHA pipeline against doca-sha directly ⇒ ../../libs/doca-sha/SKILL.md (doca-sha/SKILL.md).

  • offload algorithms the engine does not cover (SHA-224, SHA-3, MD5, HMAC-SHA) ⇒ ../../libs/doca-sha/CAPABILITIES.md (doca-sha/CAPABILITIES.md) for the library's coverage; for genuine non-coverage, route to OpenSSL's software path or to a different bundle.

  • OpenSSL PROVIDER authoring (OpenSSL 3.x long-term) ⇒ out of scope; route via doca-public-knowledge-map/SKILL.md to the OpenSSL upstream PROVIDERS migration docs on openssl.org.

  • hardware-touching changes underneath (firmware burn on the DOCA SHA device, BFB reflash) ⇒ doca-hardware-safety/SKILL.md.

Requirements and compatibility

Works with: Claude Code, Claude apps, OpenAI Codex, GitHub Copilot, Cursor, Gemini CLI, Kiro, OpenCode, Goose, Amp, Roo Code, JetBrains Junie, Factory Droid, Devin (ex-Windsurf), Mistral Vibe, OpenHands, Letta

“Works with” means the tool reads the open Agent Skills format; a skill written for one tool may use features others lack.

The author says: Requires DOCA SDK installed at /opt/mellanox/doca on Linux (Ubuntu 22.04/24.04 or RHEL/SLES) with a BlueField-2 DPU (not BF-3) attached, plus OpenSSL ≥ 1.1.1 (libssl-dev for ENGINE API callers) on the build host. The engine ships under /opt/mellanox/doca/tools/doca_sha_offload_engine/ as libdoca_sha_offload_engine.so; reads the user's local install via `pkg-config doca-sha` and inspects /opt/mellanox/doca/{lib,include,samples,applications}. The validation steps require a live DOCA install.

Security

What our scanner noticed· Medium risk

  • Large base64-encoded blobs

A static scan is not a guarantee. Skills are third-party content: review a skill before you let an agent use it.

Attribution and licence

Created by
NVIDIA
Publisher
NVIDIA (Official)
Source
NVIDIA/skills · skills/doca-sha-offload-engine · commit fce3cca
Licence
Apache License 2.0 (redistribution allowed)
  • LICENSE (added by AutoGineer from LICENSE-APACHE)
  • ATTRIBUTION.md (written by AutoGineer)
Synced

AutoGineer is not affiliated with or endorsed by NVIDIA or NVIDIA.

Download ZIP

The ZIP holds the skill’s files, its licence files and an ATTRIBUTION.md. Download doca-sha-offload-engine.zip