diff --git a/README.md b/README.md new file mode 100644 index 0000000..f4d1f21 --- /dev/null +++ b/README.md @@ -0,0 +1,272 @@ +# OpenSSL Benchmark Wrapper + +## Description + +This wrapper facilitates the automated execution of the OpenSSL speed benchmark. OpenSSL speed is a built-in benchmarking tool that measures the throughput and operations-per-second of various cryptographic algorithms, including symmetric ciphers, hash functions, and asymmetric key operations. + +The wrapper provides: +- Automated OpenSSL speed benchmark execution across multiple cryptographic algorithms. +- Configurable thread counts with automatic CPU-aware interval generation. +- Configurable run duration per algorithm. +- Multi-iteration testing with averaged results. +- Result collection, processing, and verification. +- CSV and JSON output formats. +- System configuration metadata capture. +- Integration with test_tools framework. +- Optional Performance Co-Pilot (PCP) integration. + +## Command-Line Options + +``` +OpenSSL Options: + --run_time : Duration in seconds for each algorithm test. Defaults to 60. + --threads : Comma-separated list of thread counts to test with. + If not set, automatically generates intervals based on CPU count (up to 8 intervals). + --tests : Space-separated list of OpenSSL algorithms to benchmark. + Defaults to: chacha20-poly1305 sha256 sha512 chacha20 rsa4096 aes-128-gcm aes-256-gcm + +General test_tools options: + --home_parent : Parent home directory. If not set, defaults to current working directory. + --host_config : Host configuration name, defaults to current hostname. + --iterations : Number of times to run the test, defaults to 1. + --run_user: User that is actually running the test on the test system. Defaults to current user. + --sys_type: Type of system working with (aws, azure, hostname). Defaults to hostname. + --sysname: Name of the system running, used in determining config files. Defaults to hostname. + --tuned_setting: Used in naming the results directory. For RHEL, defaults to current active tuned profile. + For non-RHEL systems, defaults to 'none'. + --use_pcp: Enable Performance Co-Pilot monitoring during test execution. + --tools_git : Git repo to retrieve the required tools from. + Default: https://github.com/redhat-performance/test_tools-wrappers + --usage: Display this usage message. +``` + +## What the Script Does + +The `openssl.sh` script performs the following workflow: + +1. **Environment Setup**: + - Clones the test_tools-wrappers repository if not present (default: ~/test_tools). + - Sources error codes and general setup utilities. + - Gathers system hardware information. + +2. **Package Installation**: + - Installs required dependencies via package_tool. + - Dependencies are defined in openssl.json for different OS variants. + +3. **Thread Configuration**: + - If `--threads` is not specified, detects CPU count via `nproc`. + - Generates thread intervals automatically using the test_tools `generate_intervals` utility. + - Caps at 8 intervals for systems with 8 or more CPUs. + +4. **Test Execution**: + - Iterates through each configured thread count. + - For each thread count, runs `openssl speed` against every algorithm in the test list. + - Uses `-evp` flag for all algorithms except rsa4096 (which uses direct mode). + - Runs each algorithm for the configured duration (default: 60 seconds per algorithm). + - Records start and end timestamps for each algorithm run. + - Skips thread/iteration combinations that already have output files. + - Executes for specified number of iterations (`--iterations`). + +5. **Data Collection**: + - Captures raw output from each iteration in `results__iter__threads.data` files. + - Extracts performance metrics: + - For symmetric ciphers and hashes: throughput in operations per second. + - For rsa4096: sign, verify, encrypt, and decrypt operations per second. + - Optionally records PCP performance data during execution. + +6. **Result Processing**: + - Averages results across all iterations for each algorithm/thread combination. + - Generates CSV file with configuration metadata and performance data. + - Creates JSON output for verification. + - Validates results against Pydantic schema (results_schema.py). + +7. **Verification**: + - Validates results against Pydantic schema ensuring: + - All test names match expected enum values. + - Thread count is a positive integer. + - Operations per second is a positive integer. + - Timestamps are valid datetime objects. + - Uses csv_to_json and verify_results from test_tools. + +8. **Output**: + - Saves all raw output files, processed CSV/JSON, and system metadata. + - Optionally saves PCP performance data. + - Archives results to configured storage location via save_results. + +## Dependencies + +**General packages required**: openssl + +To run: +```bash +git clone +cd openssl-wrapper/openssl +./openssl.sh +``` + +The script will automatically detect your CPU configuration and run all default algorithms. + +## The OpenSSL Speed Benchmark + +OpenSSL speed measures the cryptographic throughput of the system's OpenSSL installation. It tests how quickly the CPU can perform various cryptographic operations, which is critical for TLS/SSL performance, disk encryption, and secure communications. + +### Algorithms Tested + +1. **chacha20-poly1305**: Authenticated encryption cipher combining ChaCha20 stream cipher with Poly1305 MAC. Widely used in TLS 1.3, especially on platforms without AES hardware acceleration. + +2. **sha256**: SHA-2 family hash function producing 256-bit digests. Used extensively in TLS certificates, digital signatures, and data integrity verification. + +3. **sha512**: SHA-2 family hash function producing 512-bit digests. Often faster than SHA-256 on 64-bit platforms due to native 64-bit operations. + +4. **chacha20**: Stream cipher designed as a high-speed alternative to AES. Performs well on platforms without dedicated AES instructions. + +5. **rsa4096**: RSA asymmetric key operations with 4096-bit keys. Tests four distinct operations: + - **sign**: Private key signing operations per second. + - **verify**: Public key verification operations per second. + - **encrypt**: Public key encryption operations per second. + - **decrypt**: Private key decryption operations per second. + +6. **aes-128-gcm**: AES in Galois/Counter Mode with 128-bit keys. Authenticated encryption widely used in TLS, benefits heavily from AES-NI hardware instructions. + +7. **aes-256-gcm**: AES in Galois/Counter Mode with 256-bit keys. Higher security level than AES-128, with slightly lower throughput. + +### Performance Metrics + +Each algorithm reports: + +1. **ops_per_sec**: Operations (or bytes) processed per second. For symmetric ciphers and hashes, this is throughput in bytes/sec. For RSA, this is operations/sec. + +2. **threads**: The number of parallel threads used for the test. + +Results are reported for each algorithm at each thread count, allowing analysis of both single-threaded performance and multi-threaded scaling. + +## Output Files + +The results directory contains: + +- **results_openssl.csv**: CSV file with all algorithm performance metrics, including columns: Test, threads, ops_per_sec, Start_Date, End_Date +- **results_openssl.json**: JSON file with validated results data +- **results_\_iter_\_threads.data**: Raw output files from each test iteration/thread combination +- **test_results_report**: Detailed test execution report +- **meta_data\*.yml**: System metadata (CPU info, memory, kernel version) +- **PCP data** (if --use_pcp option used): Performance Co-Pilot monitoring data + +## Examples + +### Basic run with defaults +```bash +./openssl.sh +``` +This runs with: +- All default algorithms (chacha20-poly1305, sha256, sha512, chacha20, rsa4096, aes-128-gcm, aes-256-gcm) +- 60-second run time per algorithm +- Automatically determined thread counts based on CPU count +- 1 iteration + +### Run with custom thread counts +```bash +./openssl.sh --threads 1,2,4,8 +``` +Tests each algorithm at 1, 2, 4, and 8 threads specifically. + +### Run specific algorithms only +```bash +./openssl.sh --tests "aes-128-gcm aes-256-gcm" +``` +Benchmarks only AES-GCM algorithms, skipping all others. + +### Run with longer duration per algorithm +```bash +./openssl.sh --run_time 120 +``` +Runs each algorithm for 120 seconds instead of the default 60 seconds, producing more stable results. + +### Run multiple iterations +```bash +./openssl.sh --iterations 3 +``` +Runs the complete test suite 3 times and averages the results for consistency validation. + +### Run with PCP monitoring +```bash +./openssl.sh --use_pcp +``` +Collects Performance Co-Pilot data during the run for detailed performance analysis. + +### Combination example +```bash +./openssl.sh --iterations 3 --run_time 120 --threads 1,4,8,16 --tests "sha256 aes-256-gcm" --use_pcp +``` +Runs SHA-256 and AES-256-GCM for 120 seconds each at 1, 4, 8, and 16 threads, repeats 3 times, and collects PCP data. + +## How Thread Scaling Works + +When `--threads` is not specified, the wrapper automatically generates thread counts: + +1. Detects the number of CPUs via `nproc`. +2. Determines the number of intervals (capped at 8). +3. Uses `generate_intervals` to create evenly spaced thread counts from 1 up to the total CPU count. + +For example, on a 32-core system, the generated thread counts might be: 1 4 8 12 16 20 24 28 32. + +This allows measuring how each algorithm scales with increasing parallelism on the specific hardware. + +## How Result Averaging Works + +When running multiple iterations (--iterations > 1): + +1. Each iteration produces a complete set of results for all algorithms at all thread counts. +2. Raw results are saved in separate `results__iter__threads.data` files. +3. The wrapper extracts metrics from each iteration and sums them. +4. Final results are the arithmetic mean across all iterations. + +This approach: +- Reduces impact of transient system effects. +- Provides more reliable performance measurements. +- Helps identify result variance across runs. + +## Return Codes + +The script uses standardized error codes from test_tools error_codes: +- **0 (E_SUCCESS)**: Success +- **101**: Git clone failure (test_tools) +- **E_GENERAL**: General execution errors +- **E_USAGE**: Invalid usage/arguments + +## Notes + +### Supported Platforms +- **Linux**: x86_64 and aarch64 architectures +- **OS Support**: RHEL (dependencies defined in openssl.json) + +### EVP vs Direct Mode +- Most algorithms are tested using the `-evp` flag, which routes through the OpenSSL EVP (Envelope) API. This is the recommended interface and engages hardware acceleration (e.g., AES-NI). +- RSA4096 is tested in direct mode (without `-evp`) as it uses the asymmetric key API, which reports sign/verify/encrypt/decrypt metrics separately. + +### Performance Considerations +- **AES-NI**: Systems with AES-NI hardware instructions will show significantly higher AES-GCM throughput. Check with `grep aes /proc/cpuinfo`. +- **ChaCha20**: Performs well on platforms without AES hardware acceleration, making it a good comparison point. +- **RSA4096**: Asymmetric operations are orders of magnitude slower than symmetric operations. Sign and decrypt (private key operations) are much slower than verify and encrypt (public key operations). +- Run multiple iterations (`--iterations 3` or higher) for reliable results. +- Ensure system is idle during testing for best consistency. + +### Performance Tips +- Run multiple iterations (`--iterations 3+`) to verify consistency. +- Ensure system is idle (no other workloads) for best results. +- Disable CPU frequency scaling (use performance governor) for reproducible results. +- Consider the active tuned profile on RHEL systems. +- Use longer run times (`--run_time 120`) for more stable per-algorithm measurements. +- PCP monitoring (`--use_pcp`) adds minimal overhead but provides detailed metrics. + +### Troubleshooting +- If openssl is not found, ensure the openssl package is installed. +- If results seem inconsistent, run more iterations and check system load during testing. +- Use `--use_pcp` to collect detailed performance counters for analysis. +- Check `results_*_iter_*_threads.data` files for detailed error messages from `openssl speed`. +- Verify hardware acceleration support: `openssl engine` and `grep -E 'aes|avx' /proc/cpuinfo`. + +## References + +- OpenSSL Documentation: https://www.openssl.org/docs/ +- OpenSSL Speed Manual: https://www.openssl.org/docs/man3.0/man1/openssl-speed.html +- test_tools Framework: https://github.com/redhat-performance/test_tools-wrappers diff --git a/openssl.json b/openssl.json new file mode 100644 index 0000000..c4fea84 --- /dev/null +++ b/openssl.json @@ -0,0 +1,7 @@ +{ + "dependencies": { + "rhel": [ + "openssl" + ] + } +} diff --git a/openssl/openmetrics_openssl_reset.txt b/openssl/openmetrics_openssl_reset.txt new file mode 100644 index 0000000..73124f2 --- /dev/null +++ b/openssl/openmetrics_openssl_reset.txt @@ -0,0 +1,18 @@ +iteration 0 +running 0 +numthreads 0 +runtime 0 +throughput 0 +latency 0 +runlog 0 +IterationsPerSec 0 +aes_128_gcm NaN +aes_256_gcm NaN +chacha20 NaN +chacha20_poly1305 NaN +rsa4096_decr NaN +rsa4096_encr NaN +rsa4096_sign NaN +rsa4096_verify NaN +sha256 NaN +sha512 NaN diff --git a/openssl/openssl.sh b/openssl/openssl.sh new file mode 100755 index 0000000..02e0b0c --- /dev/null +++ b/openssl/openssl.sh @@ -0,0 +1,357 @@ +#!/bin/bash +# +# License +# +#================================================= +# Copyright (C) July 9, 2026 David Valin dvalin@redhat.com +#================================================= +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# +# This script automates the execution of openssl. It will determine the +# set of default run parameters based on the system configuration. +# + +#================================================= +openssl_wrapper_version="v1.00" +test_name=openssl +#================================================= +results_file="results_${test_name}.csv" +arguments="$@" +script_dir=$(realpath $(dirname $0)) +pcpdir="" +threads="" +run_time=60 +tests="chacha20-poly1305 sha256 sha512 chacha20 rsa4096 aes-128-gcm aes-256-gcm" +test_list="" +# rsa4096 no -evp option + +exit_out() +{ + echo $1 + exit $2 +} + +if [ ! -f "/tmp/${test_name}.out" ]; then + command="${0} $@" + echo $command + $command &> /tmp/${test_name}.out + rtc=$? + cat /tmp/${test_name}.out + rm /tmp/${test_name}.out + exit $rtc +fi + +curdir=$(dirname $(realpath $0)) +if [[ $0 == "./"* ]]; then + chars=`echo $0 | awk -v RS='/' 'END{print NR-1}'` + if [[ $chars == 1 ]]; then + run_dir=`pwd` + else + run_dir=`echo $0 | cut -d'/' -f 1-${chars} | cut -d'.' -f2-` + run_dir="${curdir}${run_dir}" + fi +elif [[ $0 != "/"* ]]; then + dir=`echo $0 | rev | cut -d'/' -f2- | rev` + run_dir="${curdir}/${dir}" +else + chars=`echo $0 | awk -v RS='/' 'END{print NR-1}'` + run_dir=`echo $0 | cut -d'/' -f 1-${chars}` + if [[ $run_dir != "/"* ]]; then + run_dir=${curdir}/${run_dir} + fi +fi +cd $run_dir + +show_usage=0 + +TOOLS_BIN="$HOME/test_tools" +export TOOLS_BIN + +usage() +{ + echo "Usage $1:" + echo "--run_time x: run tests for x seconds, default is ${run_time}" + echo "--threads y: comma seprated list of the number of threads to run. Default is" + echo " 1 to the number of cpus, 4 intervals." + echo "--tests y: comma seprated list of tests to run, default is ${tests}." + echo "--usage: This usage message" + source $TOOLS_BIN/general_setup --usage + exit $E_USAGE +} + + +attempt_tools_generic() +{ + method="$1" + if [[ ! -d "$TOOLS_BIN" ]]; then + $method ${tools_git}/archive/refs/heads/main.zip + if [[ $? -eq 0 ]]; then + unzip -q main.zip + mv test_tools-wrappers-main ${TOOLS_BIN} + rm main.zip + fi +fi +} + +attempt_tools_git() +{ + if [[ ! -d "$TOOLS_BIN" ]]; then + git clone $tools_git "$TOOLS_BIN" + if [ $? -ne 0 ]; then + exit_out "Error: pulling git $tools_git failed." 101 + fi + fi +} + +install_test_tools() +{ + # + # Clone the repo that contains the common code and tools + # + tools_git=https://github.com/redhat-performance/test_tools-wrappers + found=0 + for arg in "$@"; do + if [ $found -eq 1 ]; then + tools_git=$arg + found=0 + fi + if [[ $arg == "--tools_git" ]]; then + found=1 + fi + + # + # We do the usage check here, as we do not want to be calling + # the common parsers then checking for usage here. Doing so will + # result in the script exiting with out giving the test options. + # + if [[ $arg == "--usage" ]]; then + show_usage=1 + fi + done + + # + # Check to see if the test tools directory exists. If it does, we do not need to + # clone the repo. + # + attempt_tools_generic "wget" + attempt_tools_generic "curl -L -O " + attempt_tools_git + + if [ $show_usage -eq 1 ]; then + usage $1 + fi +} + +install_test_tools "$@" + +# +# Variables set by general setup. +# +# TOOLS_BIN: points to the tool directory +# to_home_root: home directory +# to_configuration: configuration information +# to_times_to_run: number of times to run the test +# to_run_label: Label for the run +# to_user: User on the test system running the test +# to_sys_type: for results info, basically aws, azure or local +# to_sysname: name of the system +# to_tuned_setting: tuned setting +# + +pushd $curdir 2> /dev/null +source "$TOOLS_BIN/general_setup" "$@" +popd 2> /dev/null +# Gather hardware information +$TOOLS_BIN/gather_data ${curdir} + +execute_openssl() +{ + iteration=$1 + for thrds in $threads; do + out_file=results_${iteration}_iter_${thrds}_threads.data + if [[ -f $out_file ]]; then + continue + fi + for tst in $test_list; do + if [[ $to_use_pcp -eq 1 ]]; then + start_pcp_subset + results2pcp_multiple "iteration:${iteration},numthreads:${thrds}" + fi + if [[ $tst == rsa4096 ]]; then + options="-seconds $run_time -multi $thrds" + else + options="-seconds $run_time -multi $thrds -evp" + fi + file=results_${iteration}_iter_${thrds}_threads.data + start_time=$(retrieve_time_stamp) + openssl speed ${options} $tst &>> $file + end_time=$(retrieve_time_stamp) + echo start_time_${tst} $start_time >> $file + echo end_time_${tst} $end_time >> $file + if [[ $tst != "rsa4096" ]]; then + tst_out=$(echo $tst | sed "s/-/_/g") + value=$(grep -i ^"$tst " $file | rev | cut -d' ' -f 1 | rev | sed "s/k//g") + results2pcp_multiple "$tst_out:$value" + else + value=$(grep -i "^rsa " $file | rev | cut -d' ' -f 1 | rev) + results2pcp_add_value "rsa4096_decr:$value" + value=$(grep -i "^rsa " $file | tr -s ' ' | rev | cut -d' ' -f 2 | rev) + results2pcp_add_value "rsa4096_encr:$value" + value=$(grep -i "^rsa " $file | tr -s ' ' | rev | cut -d' ' -f 3 | rev) + results2pcp_add_value "rsa4096_verify:$value" + value=$(grep -i "^rsa " $file | tr -s ' ' | rev | cut -d' ' -f 4 | rev) + results2pcp_add_value "rsa4096_sign:$value" + results2pcp_add_value_commit + fi + reset_pcp_om + stop_pcp_subset + done + done +} + +create_csv_file() +{ + $TOOLS_BIN/test_header_info --front_matter --results_file $results_file --host $to_configuration --sys_type $to_sys_type --tuned $to_tuned_setting --results_version $GIT_VERSION --test_name $test_name --field_header "Test,threads,ops_per_sec" + for thr in $threads; do + files=$(ls results_*_iter_${thr}_threads.data) + for test in ${test_list}; do + test_out=$(echo $test | sed "s/-/_/g") + # + # Time stamp for multiple runs are meaningless in the csv file, but we add it to keep the time fields + # present across all wrapper csv files. + # + start_time=$(grep "start_time_$test" results_1_iter_${thr}_threads.data | cut -d' ' -f 2 | tail -1 ) + end_time=$(grep "end_time_$test" results_1_iter_${thr}_threads.data | cut -d' ' -f 2 | tail -1 ) + if [[ $test != "rsa4096" ]]; then + value=$(grep -i ^"$test " $files | rev | cut -d' ' -f 1 | rev | sed "s/k//g" | paste -sd '+' - | bc) + value=$(echo "$value/${to_times_to_run}" | bc) + echo $test_out,$thr,$value,$start_time,$end_time >> $results_file + else + value=$(grep -i "^rsa " $files | rev | cut -d' ' -f 1 | rev | paste -sd '+' - | bc) + decr_sec=$(echo "$value/${to_times_to_run}" | bc) + worker=$(grep -i "^rsa " $files | tr -s ' ' | rev) + value=$(echo $worker | cut -d' ' -f 2 | rev | paste -sd '+' - | bc) + encr_sec=$(echo "$value/${to_times_to_run}" | bc) + value=$(echo $worker | cut -d' ' -f 3 | rev | paste -sd '+' - | bc) + verify_sec=$(echo "$value/${to_times_to_run}" | bc) + value=$(echo $worker | cut -d' ' -f 4 | rev | paste -sd '+' - | bc) + sign_sec=$(echo "$value/${to_times_to_run}" | bc) + echo ${test_out}_sign,$thr,$sign_sec,$start_time,$end_time >> $results_file + echo ${test_out}_verify,$thr,$verify_sec,$start_time,$end_time >> $results_file + echo ${test_out}_encr,$thr,$encr_sec,$start_time,$end_time >> $results_file + echo ${test_out}_decr,$thr,$decr_sec,$start_time,$end_time >> $results_file + fi + done + done +} + +ARGUMENT_LIST=( + "run_time" + "threads" + "tests" +) + +NO_ARGUMENTS=( + "usage" +) + +# read arguments +opts=$(getopt \ + --longoptions "$(printf "%s:," "${ARGUMENT_LIST[@]}")" \ + --longoptions "$(printf "%s," "${NO_ARGUMENTS[@]}")" \ + --name "$(basename "$0")" \ + --options "h" \ + -- "$@" +) + +eval set --$opts + +while [[ $# -gt 0 ]]; do + case "$1" in + --run_time) + run_time=$2 + shift 2 + ;; + --threads) + threads=$2 + shift 2 + ;; + --tests) + tests=$2 + shift 2 + ;; + --usage) + usage $0 + ;; + -h) + usage $0 + ;; + --) + break + ;; + *) + echo option not found $1 + usage $0 + ;; + esac +done + +if [[ $threads == "" ]]; then + cpus=$(nproc) + if [[ $cpus -lt 8 ]]; then + intervals=$cpus + else + intervals=8 + fi + threads=$(${TOOLS_BIN}/generate_intervals --interval $intervals --max_value $cpus) +fi +threads=$(echo $threads | sed "s/,/ /g") + +package_tool --no_packages $to_no_pkg_install --wrapper_config $curdir/../openssl.json + +# Get PCP setup if we're using it +if [[ $to_use_pcp -eq 1 ]]; then + source $TOOLS_BIN/pcp/pcp_commands.inc + setup_pcp + pcp_cfg=$TOOLS_BIN/pcp/default.cfg + pcpdir=/tmp/pcp_`date "+%Y.%m.%d-%H.%M.%S"` + echo "Start PCP" + echo start_pcp ${pcpdir}/ ${test_name} $pcp_cfg + start_pcp ${pcpdir}/ ${test_name} $pcp_cfg + echo returned from start_pcp +fi + +rm -rf *csv res*data +if [[ $test_list == "" ]]; then + test_list="$tests" +else + test_list=$(echo "$test_list" | sed "s/,/ /g") +fi +for iter in $(seq 1 1 $to_times_to_run); do + execute_openssl $iter +done +create_csv_file + +# Shutdown PCP and clean up after ourselves +if [[ $to_use_pcp -eq 1 ]]; then + stop_pcp + shutdown_pcp +fi +$TOOLS_BIN/csv_to_json $to_json_flags --csv_file ${results_file} --output_file results_${test_name}.json +$TOOLS_BIN/verify_results $to_verify_flags --schema_file $script_dir/results_schema.py --class_name openssl_Results --file results_${test_name}.json + +${TOOLS_BIN}/save_results --curdir $curdir --home_root $to_home_root --other_files "*_summary,run*log,test_results_report,${pcpdir}" --results $results_file --test_name $test_name --tuned_setting=$to_tuned_setting --version $openssl_wrapper_version --user $to_user +exit $E_SUCCESS diff --git a/openssl/results_schema.py b/openssl/results_schema.py new file mode 100644 index 0000000..ce8a142 --- /dev/null +++ b/openssl/results_schema.py @@ -0,0 +1,23 @@ +import pydantic +import datetime + +from enum import Enum + +class Benchmark(Enum): + aes_128_gcm = "aes_128_gcm" + aes_256_gcm = "aes_256_gcm" + chacha20 = "chacha20" + chacha20_poly1305 = "chacha20_poly1305" + rsa4096_decr = "rsa4096_decr" + rsa4096_encr = "rsa4096_encr" + rsa4096_sign = "rsa4096_sign" + rsa4096_verify = "rsa4096_verify" + sha256 = "sha256" + sha512 = "sha512" + +class openssl_Results (pydantic.BaseModel): + Test: Benchmark + threads: int = pydantic.Field(gt=0) + ops_per_sec: int = pydantic.Field(gt=0) + Start_Date: datetime.datetime + End_Date: datetime.datetime