forked from Mellanox/pka
-
Notifications
You must be signed in to change notification settings - Fork 1
/
README.tests
133 lines (96 loc) · 4.84 KB
/
README.tests
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
© 2023 NVIDIA Corporation & affiliates.
License: BSD-3-Clause
BlueField PKA Tests Suite
Author, Khalil Blaiech <[email protected]>
===============================================================================
Overview
===============================================================================
The BlueField PKA Tests Suite consists of a set of tests application, an
independent set of test routines that run against the API implementation
and verifies that it correctly implements all of the defined APIs at a
functional level.
The BlueField PKA Tests Suite is intended to be used solely for QA and
verification purposes. Tests wouldn't be exposed to customers nor users.
===============================================================================
Important Notes
===============================================================================
* The PKA tests suite requires the PKA libraries and drivers installed.
Look at 'README' to build and install PKA libraries and drivers.
===============================================================================
How to build
===============================================================================
To build and install PKA tests:
# cd <pka_tests_dir>
# make
# make install
Test applications should be installed into '<pka_install_dir>/bin'.
===============================================================================
Validation tests
===============================================================================
Example of usage:
# ./pka_test_validation -c 8 -r 4 -s 1
syntax: pka_test_validation [--help|-h] [--mode|-m MODE]
[--sync|-s SYNC] --cpu NUM --ring NUM
Mandatory parameters:
-c, --cpu NUM CPU count.
-r, --ring NUM Ring count.
Optional parameters:
-m, --mode MODE Application mode
0: single process mode (default)
1: multi process mode
-s, --sync SYNC Synchronization mode for multithread operations
0: none of operations are lock-free
1: all operations are lock-free (default)
-h, --help Display help and exit.
===============================================================================
Power usage tests
===============================================================================
Example of usage:
# ./pka_test_power -r 16 -t 10 -k 4
syntax: pka_test_power [--help|-h] [--time|-t SECONDS]
[--key|-k SIZE] --ring NUM
Mandatory parameters:
-r, --ring NUM Ring count.
Optional parameters:
-t, --time SECONDS Number of seconds to run.
-k, --key SIZE Key size in Kbits:
0: RSA 2048 bits (default)
1: RSA 4096 bits
-h, --help Display help and exit.
===============================================================================
Performance tests
===============================================================================
Example of usage:
# ./pka_test_perforamce -c MOD_EXP -e little -k 1 -m 100 -n 4 -q 10 \
> -t 1 -o 1 -v 0 -y no
syntax: pka_test_performance OPTIONS
Where OPTIONS can be:
-b <bit_len> primary bit_len to use
-e ( big | little ) endianness of the interface
-h print this message and exit
-k <num_keys> num of different key subsystems to make
-m <runs_per_test> num of runs of each test per thread
-n <num_tests> num of tests (per key subsystem) to make
-q <cmds_outstanding>number of cmds each thread keeps in play
-r report the per thread stats/results
-s <second_bit_len> secondary bit_len for some cryptosystems
-t <num_threads> number of threads/tiles to use
-o <num_rings> number of PKA rings to use
-v <verbosity> verbosity level - in range 0-3
-y ( yes | no ) check_results if set to yes
-c <test_kind> name of the test kind. One of:
ADD, SUBTRACT, MULTIPLY, DIVIDE, DIV_MOD, MODULO
SHIFT_LEFT, SHIFT_RIGHT, MOD_INVERT
MOD_EXP, RSA_MOD_EXP, RSA_VERIFY, RSA_MOD_EXP_WITH_CRT
ECC_ADD, ECC_DOUBLE, ECC_MULTIPLY
ECDSA_GEN, ECDSA_VERIFY, ECDSA_GEN_VERIFY
DSA_GEN, DSA_VERIFY, DSA_GEN_VERIFY
The default command line options (except for -b and -s) are:
'-c MOD_EXP -e little -k 1 -m 100 -n 4 -q 10 -t 1 -o 1 -v 0 -y no'
The defaults for '-b' and '-s' depend upon the test name (as
given by '-c') as follows:
a) the default for '-b' is 1024 for all tests except
for the ECC_* tests and ECDSA_* tests when it is 256.
b) the default for -s is 33 for RSA_VERIFY, 'bit_len - 1'
for DIVIDE, DIV_MOD, MODULO, and DSA_* tests, 'bit_len / 2'
for the ECDSA_* tests and unused for for all other tests.