Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -259,3 +259,27 @@ thread-count - number of threads
```sh
evp_cipher -a AES-128-CBC -o evp_isolated 10
```

## evp_mac

Tool that computes an HMAC of random data using SHA-256 digest.
Runs for 5 seconds and prints the average execution time per computation.
Four modes of operation:
- evp_shared (default): Use EVP API and allow shared data between computations
- evp_isolated: Use EVP API and don't allow shared data between computations
- deprecated_shared: Use legacy API and allow shared data between computations
- deprecated_isolated: Use legacy API and don't allow shared data between computations

```
Usage: evp_mac [-h] [-t] [-o operation] [-u update-times] [-V] thread-count
-h - print this help output
-t - terse output
-o operation - mode of operation. One of [evp_isolated, evp_shared, deprecated_isolated, deprecated_shared] (default: evp_shared)
-u update-times - times to update (default: 1)
-V - print version information and exit
thread-count - number of threads
```

```sh
evp_mac -o evp_shared 10
```
8 changes: 8 additions & 0 deletions source/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -212,11 +212,15 @@ target_link_libraries(evp_hash PRIVATE perf)
add_executable(evp_cipher evp_cipher.c)
target_link_libraries(evp_cipher PRIVATE perf)

add_executable(evp_mac evp_mac.c)
target_link_libraries(evp_mac PRIVATE perf)

## Running tests
# Options
set(run_tests evp_fetch
evp_hash
evp_cipher
evp_mac
evp_setpeer
handshake
newrawkey
Expand Down Expand Up @@ -254,6 +258,9 @@ set(run_evp_cipher_operations
set(run_evp_cipher_algorithms
evp_cipher "" "" "-a AES-128-CBC" "-a AES-256-CBC"
CACHE STRING "Encryption algorithms for evp_cipher")
set(run_evp_mac_operations
evp_mac "" "" "-o deprecated_isolated" "-o deprecated_shared" "-o evp_isolated" "-o evp_shared"
CACHE STRING "Modes of operation for evp_mac")
set(run_evp_setpeer_keys
evp_setpeer "-k" dh ec256 ec521 x25519 all
CACHE STRING "Key types for evp_setpeer")
Expand Down Expand Up @@ -295,6 +302,7 @@ set(run_opts run_evp_fetch_pqs
run_evp_hash_algorithms
run_evp_cipher_operations
run_evp_cipher_algorithms
run_evp_mac_operations
run_evp_setpeer_keys
run_newrawkey_algos
run_pkeyread_keys
Expand Down
Loading