exchange

Base system with REST service to issue digital coins, run by the payment service provider
Log | Files | Refs | Submodules | README | LICENSE

appendix.tex (29357B)


      1 \appendix
      2 
      3 \chapter{Installation}
      4 These installation instructions are meant to run the code developed within this thesis for development- and review-purposes.
      5 For a comprehensive installation instruction follow the Taler documentation
      6 \cite{taler-documentation}.
      7 
      8 \begin{bfhNoteBox}
      9     These instructions are used and tested on Ubuntu 21.10.
     10 \end{bfhNoteBox}
     11 
     12 \section{Dependencies and Setup}
     13 The following dependencies need to be installed for GNUnet and Taler Exchange:
     14 \setupLinuxPrompt{student}
     15 \begin{ubuntu}
     16 sudo apt update
     17 sudo apt install git curl build-essential gcc automake make \ texinfo autoconf uncrustify libtool pkgconf gettext gnutls-bin \ libcurl4-gnutls-dev libgcrypt20-dev libidn2-dev libjansson-dev \ libnss3-dev sqlite pipenv libltdl-dev libsodium-dev libpq-dev \ autopoint libunistring-dev libextractor-dev libpng-dev \ libpulse-dev libsqlite3-dev recutils python3-jinja2 sqlite yapf3 \ postgresql libpq-dev wget libmicrohttpd-dev
     18 export LD\_LIBRARY\_PATH=/usr/local/lib
     19 \end{ubuntu}
     20 
     21 \begin{bfhBox}[BFH-MediumBlue]{Install in a container}
     22 The installation can also be done in a docker or podman container with the ubuntu:21.10 image:
     23 \setupLinuxPrompt{student}
     24 \begin{ubuntu}
     25 podman run -it --name talertest ubuntu:21.10
     26 \end{ubuntu}
     27 \end{bfhBox}
     28 
     29 \section{Install GNUnet Core}
     30 GNUnet core is both a dependency of the Taler exchange and where we implemented the Clause Blind Schnorr Signature Scheme.
     31 \setupLinuxPrompt{student}
     32 \begin{ubuntu}
     33 git clone https://git.gnunet.org/gnunet.git
     34 cd gnunet
     35 ./bootstrap
     36 ./configure --enable-benchmarks --prefix=/usr/local
     37 make
     38 make install
     39 make check # Run optionally to verify installation and run tests
     40 \end{ubuntu}
     41 
     42 To run benchmarks run:
     43 \setupLinuxPrompt{student}
     44 \begin{ubuntu}
     45 ./src/util/perf_crypto_cs
     46 ./src/util/perf_crypto_rsa
     47 \end{ubuntu}
     48 
     49 \section{Install Taler Exchange}
     50 \begin{bfhWarnBox}
     51 Ensure that the current user has privileges in postgresql.
     52 One possible way to do this is:\\
     53 (where [user] has to be replaced with the name of the system user running the tests)
     54 \setupLinuxPrompt{student}
     55 \begin{ubuntu}
     56 service postgresql start
     57 sudo su
     58 su - postgres
     59 psql
     60 CREATE ROLE [user] LOGIN SUPERUSER;
     61 CREATE DATABASE [user] OWNER [user];
     62 exit
     63 \end{ubuntu}
     64 \end{bfhWarnBox}
     65 
     66 The Taler exchange can be installed as followed:
     67 \setupLinuxPrompt{student}
     68 \begin{ubuntu}
     69 service postgresql start
     70 createdb talercheck
     71 git clone https://git.taler.net/exchange.git
     72 cd exchange
     73 ./bootstrap
     74 ./configure --with-gnunet=/usr/local --prefix=/usr/local
     75 ./make
     76 ./make install
     77 ./make check # Run optionally to verify installation and run tests
     78 \end{ubuntu}
     79 
     80 To execute the security module benchmarks run:
     81 \setupLinuxPrompt{student}
     82 \begin{ubuntu}
     83 cd src/util
     84 ./test_helper_cs
     85 ./test_helper_rsa
     86 \end{ubuntu}
     87 
     88 \chapter{Performance Measurements}
     89 \label{chap:app-perf}
     90 
     91 \section{AMD Ryzen 7 PRO 5850U (Notebook)}
     92 Detailed comparison of each operation can be found in table \ref{tab:comp-sign-amd-ryzen-7}.
     93 \begin{bfhBox}[BFH-MediumBlue]{Setup}
     94 	CPU: 8-core AMD Ryzen 7 PRO 5850U \\
     95     Architecture: amd64 \\
     96     OS: Ubuntu 21.10 Linux 5.13.0-25-generic \#26-Ubuntu SMP Fri Jan 7 15:48:31 UTC 2022 x86\_64 x86\_64 x86\_64 GNU/Linux \\
     97     libsodium:amd64 version: 1.0.18-1build1 \\ 
     98     libgcrypt:amd64 version: 1.8.7-5ubuntu2 
     99 \end{bfhBox}
    100 
    101 \begin{table}[h]
    102     \centering
    103     \colorlet{BFH-table}{BFH-MediumBlue!10}
    104     \colorlet{BFH-tablehead}{BFH-MediumBlue!50}
    105     \setupBfhTabular
    106     \begin{tabular}{llr}
    107         \rowcolor{BFH-tablehead}
    108         \textbf{Signature Scheme} & \textbf{Operation} & \textbf{Speed} \\\hline
    109         CS & 10x key generation & 0.204 ms \\\hline
    110         RSA 1024 bit & 10x key generation & 126 ms \\\hline
    111         RSA 2048 bit & 10x key generation & 903 ms \\\hline
    112         RSA 3072 bit & 10x key generation & 2684 ms \\\hline
    113         RSA 4096 bit & 10x key generation & 10 000 ms \\\hline
    114         \hline
    115         CS & 10x r0, r1 derive and R1,R2 calculation & 0.444 ms \\\hline
    116         CS & 10x derivation of blinding secrets & 0.094 ms \\\hline
    117         CS & 10x blinding & 3.332 ms \\\hline
    118         RSA 1024 bit & 10x blinding & 1.282 ms \\\hline
    119         RSA 2048 bit & 10x blinding & 3.012 ms \\\hline
    120         RSA 3072 bit & 10x blinding & 5 ms \\\hline
    121         RSA 4096 bit & 10x blinding & 9 ms \\\hline
    122         \hline
    123         CS & 10x signing & 0.077 ms \\\hline
    124         RSA 1024 bit & 10x signing & 7 ms \\\hline
    125         RSA 2048 bit & 10x signing & 34 ms \\\hline
    126         RSA 3072 bit & 10x signing & 86 ms \\\hline
    127         RSA 4096 bit & 10x signing & 183 ms \\\hline
    128         \hline
    129         CS & 10x unblinding & 0.001 ms \\\hline
    130         RSA 1024 bit & 10x unblinding & 2.991 ms \\\hline
    131         RSA 2048 bit & 10x unblinding & 10 ms \\\hline
    132         RSA 3072 bit & 10x unblinding & 24 ms \\\hline
    133         RSA 4096 bit & 10x unblinding & 44 ms \\\hline
    134         \hline
    135         CS & 10x verifying & 1.358 ms \\\hline
    136         RSA 1024 bit & 10x verifying & 0.876 ms \\\hline
    137         RSA 2048 bit & 10x verifying & 1.836 ms \\\hline
    138         RSA 3072 bit & 10x verifying & 3.075 ms \\\hline
    139         RSA 4096 bit & 10x verifying & 5 ms \\\hline
    140     \end{tabular}
    141     \caption{Comparison on AMD Ryzen 7}
    142     \label{tab:comp-sign-amd-ryzen-7}
    143 \end{table}
    144 
    145 \section{Intel(R) Core(TM) i7-8565U}
    146 Detailed comparison of each operation can be found in table \ref{tab:comp-sign-intel-i7}.
    147 \begin{bfhBox}[BFH-MediumBlue]{Setup}
    148 	CPU: 8-core  Intel(R) Core(TM) i7-8565U CPU @ 1.80GHz \\
    149     Architecture: amd64 \\
    150     OS: Ubuntu 21.10 Linux 5.13.0-25-generic \#26-Ubuntu SMP Fri Jan 7 15:48:31 UTC 2022 x86\_64 x86\_64 x86\_64 GNU/Linux \\
    151     libsodium:amd64 version: 1.0.18-1build1 \\ 
    152     libgcrypt:amd64 version: 1.8.7-5ubuntu2 
    153 \end{bfhBox}
    154 
    155 \begin{table}[ht]
    156     \centering
    157     \colorlet{BFH-table}{BFH-MediumBlue!10}
    158     \colorlet{BFH-tablehead}{BFH-MediumBlue!50}
    159     \setupBfhTabular
    160     \begin{tabular}{llr}
    161         \rowcolor{BFH-tablehead}
    162         \textbf{Signature Scheme} & \textbf{Operation} & \textbf{Speed} \\\hline
    163         CS & 10x key generation & 1.05 ms \\\hline
    164         RSA 1024 bit & 10x key generation & 189 ms \\\hline
    165         RSA 2048 bit & 10x key generation & 1555 ms \\\hline
    166         RSA 3072 bit & 10x key generation & 5000 ms \\\hline
    167         RSA 4096 bit & 10x key generation & 11 000 ms \\\hline
    168         \hline
    169         CS & 10x r0, r1 derive and R1,R2 calculation & 2.261 ms \\\hline
    170         CS & 10x derivation of blinding secrets & 0.521 ms \\\hline
    171         CS & 10x blinding & 13 ms \\\hline
    172         RSA 1024 bit & 10x blinding & 2.6 ms \\\hline
    173         RSA 2048 bit & 10x blinding & 4.12 ms \\\hline
    174         RSA 3072 bit & 10x blinding & 7 ms \\\hline
    175         RSA 4096 bit & 10x blinding & 11 ms \\\hline
    176         \hline
    177         CS & 10x signing & 0.405 ms \\\hline
    178         RSA 1024 bit & 10x signing & 9 ms \\\hline
    179         RSA 2048 bit & 10x signing & 44 ms \\\hline
    180         RSA 3072 bit & 10x signing & 108 ms \\\hline
    181         RSA 4096 bit & 10x signing & 216 ms \\\hline
    182         \hline
    183         CS & 10x unblinding & 0.005 ms \\\hline
    184         RSA 1024 bit & 10x unblinding & 3.353 ms \\\hline
    185         RSA 2048 bit & 10x unblinding & 12 ms \\\hline
    186         RSA 3072 bit & 10x unblinding & 27 ms \\\hline
    187         RSA 4096 bit & 10x unblinding & 47 ms \\\hline
    188         \hline
    189         CS & 10x verifying & 4.413 ms \\\hline
    190         RSA 1024 bit & 10x verifying & 1.202 ms \\\hline
    191         RSA 2048 bit & 10x verifying & 2.304 ms \\\hline
    192         RSA 3072 bit & 10x verifying & 4.094 ms \\\hline
    193         RSA 4096 bit & 10x verifying & 6 ms \\\hline
    194     \end{tabular}
    195     \caption{Comparison on Intel(R) Core(TM) i7-8565U}
    196     \label{tab:comp-sign-intel-i7}
    197 \end{table}
    198 
    199 \section{AMD Ryzen Threadripper 1950X 16-Core Processor}
    200 Detailed comparison of each operation can be found in table \ref{tab:comp-sign-amd-threadripper}.
    201 \begin{bfhBox}[BFH-MediumBlue]{Setup}
    202 	CPU: AMD Ryzen Threadripper 1950X 16-Core Processor \\
    203     Architecture: amd64 \\
    204     OS: Linux 5.13.0-trunk-amd64 \#1 SMP Debian 5.13.12-1~exp1
    205     (2021-08-20) x86\_64 GNU/Linux \\
    206     libsodium:amd64 version: 1.9.4-5 \\ 
    207     libgcrypt:amd64 version: 1.0.18-1 
    208 \end{bfhBox}
    209 
    210 \begin{table}[ht]
    211     \centering
    212     \colorlet{BFH-table}{BFH-MediumBlue!10}
    213     \colorlet{BFH-tablehead}{BFH-MediumBlue!50}
    214     \setupBfhTabular
    215     \begin{tabular}{llr}
    216         \rowcolor{BFH-tablehead}
    217         \textbf{Signature Scheme} & \textbf{Operation} & \textbf{Speed} \\\hline
    218         CS & 10x key generation & 0.442 ms \\\hline
    219         RSA 1024 bit & 10x key generation & 145 ms \\\hline
    220         RSA 2048 bit & 10x key generation & 1167 ms \\\hline
    221         RSA 3072 bit & 10x key generation & 6000 ms \\\hline
    222         RSA 4096 bit & 10x key generation & 11 000 ms \\\hline
    223         \hline
    224         CS & 10x r0, r1 derive and R1,R2 calculation &  1.043 ms \\\hline
    225         CS & 10x derivation of blinding secrets & 0.242 ms \\\hline
    226         CS & 10x blinding & 7 ms \\\hline
    227         RSA 1024 bit & 10x blinding &  2.258 ms \\\hline
    228         RSA 2048 bit & 10x blinding &  4.744 ms \\\hline
    229         RSA 3072 bit & 10x blinding &  9 ms \\\hline
    230         RSA 4096 bit & 10x blinding &  14 ms \\\hline
    231         \hline
    232         CS & 10x signing &  0.270 ms \\\hline
    233         RSA 1024 bit & 10x signing &  10 ms \\\hline
    234         RSA 2048 bit & 10x signing &  47 ms \\\hline
    235         RSA 3072 bit & 10x signing &  119 ms \\\hline
    236         RSA 4096 bit & 10x signing &  248 ms \\\hline
    237         \hline
    238         CS & 10x unblinding & 0.003 ms \\\hline
    239         RSA 1024 bit & 10x unblinding &  4.086 ms \\\hline
    240         RSA 2048 bit & 10x unblinding &  14 ms \\\hline
    241         RSA 3072 bit & 10x unblinding &  34 ms \\\hline
    242         RSA 4096 bit & 10x unblinding &  60 ms \\\hline
    243         \hline
    244         CS & 10x verifying & 2.392 ms \\\hline
    245         RSA 1024 bit & 10x verifying &  1.137 ms \\\hline
    246         RSA 2048 bit & 10x verifying &  2.797 ms \\\hline
    247         RSA 3072 bit & 10x verifying &  5 ms \\\hline
    248         RSA 4096 bit & 10x verifying &  7 ms \\\hline
    249     \end{tabular}
    250     \caption{Comparison on AMD Ryzen Threadripper 1950X}
    251     \label{tab:comp-sign-amd-threadripper}
    252 \end{table}
    253 
    254 \section{Intel(R) Xeon(R) CPU E5-2630}
    255 Detailed comparison of each operation can be found in table \ref{tab:comp-sign-intel-xeon}.
    256 \begin{bfhBox}[BFH-MediumBlue]{Setup}
    257 	CPU: Intel(R) Xeon(R) CPU E5-2630 0 @ 2.30GHz \\
    258     Architecture: amd64 \\
    259     OS:  Linux 5.10.0-8-amd64 \#1 SMP Debian 5.10.46-4 (2021-08-03) x86\_64\\
    260     libsodium:amd64 version:  1.0.18-1\\ 
    261     libgcrypt:amd64 version:  1.8.7-6
    262 \end{bfhBox}
    263 
    264 \begin{table}[ht]
    265     \centering
    266     \colorlet{BFH-table}{BFH-MediumBlue!10}
    267     \colorlet{BFH-tablehead}{BFH-MediumBlue!50}
    268     \setupBfhTabular
    269     \begin{tabular}{llr}
    270         \rowcolor{BFH-tablehead}
    271         \textbf{Signature Scheme} & \textbf{Operation} & \textbf{Speed} \\\hline
    272         CS & 10x key generation & 0.606 ms \\\hline
    273         RSA 1024 bit & 10x key generation & 329 ms \\\hline
    274         RSA 2048 bit & 10x key generation & 3210 ms \\\hline
    275         RSA 3072 bit & 10x key generation & 12 000 ms \\\hline
    276         RSA 4096 bit & 10x key generation & 40 000 ms \\\hline
    277         \hline
    278         CS & 10x r0, r1 derive and R1,R2 calculation &  1.527 ms \\\hline
    279         CS & 10x derivation of blinding secrets &  0.329 ms \\\hline
    280         CS & 10x blinding & 9 ms \\\hline
    281         RSA 1024 bit & 10x blinding &  4.026 ms \\\hline
    282         RSA 2048 bit & 10x blinding &  9 ms \\\hline
    283         RSA 3072 bit & 10x blinding &  18 ms \\\hline
    284         RSA 4096 bit & 10x blinding &  27 ms \\\hline
    285         \hline
    286         CS & 10x signing &  0.274 ms \\\hline
    287         RSA 1024 bit & 10x signing &  21 ms \\\hline
    288         RSA 2048 bit & 10x signing &  96 ms \\\hline
    289         RSA 3072 bit & 10x signing &  237 ms \\\hline
    290         RSA 4096 bit & 10x signing &  482 ms \\\hline
    291         \hline
    292         CS & 10x unblinding &  0.004 ms \\\hline
    293         RSA 1024 bit & 10x unblinding & 7 ms \\\hline
    294         RSA 2048 bit & 10x unblinding & 25 ms \\\hline
    295         RSA 3072 bit & 10x unblinding & 58 ms \\\hline
    296         RSA 4096 bit & 10x unblinding & 99 ms \\\hline
    297         \hline
    298         CS & 10x verifying & 4.334 ms \\\hline
    299         RSA 1024 bit & 10x verifying & 2.190 ms \\\hline
    300         RSA 2048 bit & 10x verifying & 5 ms \\\hline
    301         RSA 3072 bit & 10x verifying & 11 ms \\\hline
    302         RSA 4096 bit & 10x verifying & 14 ms \\\hline
    303     \end{tabular}
    304     \caption{Comparison on Intel(R) Xeon(R) CPU E5-2630}
    305     \label{tab:comp-sign-intel-xeon}
    306 \end{table}
    307 
    308 \section{Intel(R) Pentium(R) 3558U}
    309 Detailed comparison of each operation can be found in table \ref{tab:comp-sign-intel-pentium}.
    310 \begin{bfhBox}[BFH-MediumBlue]{Setup}
    311 	CPU: Intel(R) Pentium(R) 3558U @ 1.70GHz \\
    312     Architecture: amd64 \\
    313     OS: Linux 5.10.0-8-amd64 \#1 SMP Debian 5.10.46-3 (2021-07-28) x86\_64\\
    314     libsodium:amd64 version:  1.0.18-1\\ 
    315     libgcrypt:amd64 version:  1.8.7-6
    316 \end{bfhBox}
    317 
    318 \begin{table}[ht]
    319     \centering
    320     \colorlet{BFH-table}{BFH-MediumBlue!10}
    321     \colorlet{BFH-tablehead}{BFH-MediumBlue!50}
    322     \setupBfhTabular
    323     \begin{tabular}{llr}
    324         \rowcolor{BFH-tablehead}
    325         \textbf{Signature Scheme} & \textbf{Operation} & \textbf{Speed} \\\hline
    326         CS & 10x key generation & 0.53 ms \\\hline
    327         RSA 1024 bit & 10x key generation & 524 ms \\\hline
    328         RSA 2048 bit & 10x key generation & 3357 ms \\\hline
    329         RSA 3072 bit & 10x key generation & 15 000 ms \\\hline
    330         RSA 4096 bit & 10x key generation & 37 000 ms \\\hline
    331         \hline
    332         CS & 10x r0, r1 derive and R1,R2 calculation & 1.375 ms \\\hline
    333         CS & 10x derivation of blinding secrets & 0.349 ms \\\hline
    334         CS & 10x blinding & 8 ms \\\hline
    335         RSA 1024 bit & 10x blinding & 4.86 ms \\\hline
    336         RSA 2048 bit & 10x blinding & 11 ms \\\hline
    337         RSA 3072 bit & 10x blinding & 19 ms \\\hline
    338         RSA 4096 bit & 10x blinding & 31 ms \\\hline
    339         \hline
    340         CS & 10x signing &  0.283 ms \\\hline
    341         RSA 1024 bit & 10x signing & 26 ms \\\hline
    342         RSA 2048 bit & 10x signing & 117 ms \\\hline
    343         RSA 3072 bit & 10x signing & 292 ms \\\hline
    344         RSA 4096 bit & 10x signing & 571 ms \\\hline
    345         \hline
    346         CS & 10x unblinding & 0.003 ms \\\hline
    347         RSA 1024 bit & 10x unblinding & 8 ms \\\hline
    348         RSA 2048 bit & 10x unblinding & 30 ms \\\hline
    349         RSA 3072 bit & 10x unblinding & 67 ms \\\hline
    350         RSA 4096 bit & 10x unblinding & 111 ms \\\hline
    351         \hline
    352         CS & 10x verifying & 3.769 ms \\\hline
    353         RSA 1024 bit & 10x verifying & 2.616 ms \\\hline
    354         RSA 2048 bit & 10x verifying & 6 ms \\\hline
    355         RSA 3072 bit & 10x verifying & 11 ms \\\hline
    356         RSA 4096 bit & 10x verifying & 17 ms \\\hline
    357     \end{tabular}
    358     \caption{Comparison on Intel(R) Pentium(R) 3558U}
    359     \label{tab:comp-sign-intel-pentium}
    360 \end{table}
    361 
    362 
    363 \section{arm64}
    364 Detailed comparison of each operation can be found in table \ref{tab:comp-sign-arm64}.
    365 \begin{bfhBox}[BFH-MediumBlue]{Setup}
    366 	CPU:  8-core arm64\\
    367     Architecture: ARM64 \\
    368     OS: Linux ten64 5.11.0-31-generic \#33+testsfp1 SMP Mon Aug 23 16:07:41 UTC 2021 aarch64 aarch64 aarch64 GNU/Linux \\
    369     libsodium:arm64 version: 1.8.7-2ubuntu2.1  \\ 
    370     libgcrypt:arm64 version: 1.0.18-1
    371 \end{bfhBox}
    372 
    373 \begin{table}[ht]
    374     \centering
    375     \colorlet{BFH-table}{BFH-MediumBlue!10}
    376     \colorlet{BFH-tablehead}{BFH-MediumBlue!50}
    377     \setupBfhTabular
    378     \begin{tabular}{llr}
    379         \rowcolor{BFH-tablehead}
    380         \textbf{Signature Scheme} & \textbf{Operation} & \textbf{Speed} \\\hline
    381         CS & 10x key generation & 2.896 ms \\\hline
    382         RSA 1024 bit & 10x key generation & 839 ms \\\hline
    383         RSA 2048 bit & 10x key generation & 8000 ms \\\hline
    384         RSA 3072 bit & 10x key generation & 17 000 ms \\\hline
    385         RSA 4096 bit & 10x key generation & 82 000 ms \\\hline
    386         \hline
    387         CS & 10x r0, r1 derive and R1,R2 calculation & 6 ms \\\hline
    388         CS & 10x derivation of blinding secrets & 0.713 ms \\\hline
    389         CS & 10x blinding & 23 ms \\\hline
    390         RSA 1024 bit & 10x blinding & 11 ms \\\hline
    391         RSA 2048 bit & 10x blinding & 28 ms \\\hline
    392         RSA 3072 bit & 10x blinding & 51 ms \\\hline
    393         RSA 4096 bit & 10x blinding & 81 ms \\\hline
    394         \hline
    395         CS & 10x signing & 0.321 ms \\\hline
    396         RSA 1024 bit & 10x signing &  57 ms \\\hline
    397         RSA 2048 bit & 10x signing & 263 ms \\\hline
    398         RSA 3072 bit & 10x signing & 685 ms \\\hline
    399         RSA 4096 bit & 10x signing & 1385 ms \\\hline
    400         \hline
    401         CS & 10x unblinding & 0.006 ms \\\hline
    402         RSA 1024 bit & 10x unblinding &  23 ms \\\hline
    403         RSA 2048 bit & 10x unblinding &  79 ms \\\hline
    404         RSA 3072 bit & 10x unblinding & 171 ms \\\hline
    405         RSA 4096 bit & 10x unblinding & 296 ms \\\hline
    406         \hline
    407         CS & 10x verifying & 11ms \\\hline
    408         RSA 1024 bit & 10x verifying &  5 ms \\\hline
    409         RSA 2048 bit & 10x verifying & 15 ms \\\hline
    410         RSA 3072 bit & 10x verifying & 27 ms \\\hline
    411         RSA 4096 bit & 10x verifying & 45 ms \\\hline
    412     \end{tabular}
    413     \caption{Comparison on arm64}
    414     \label{tab:comp-sign-arm64}
    415 \end{table}
    416 
    417 \section{AMD Ryzen Embedded R1606G}
    418 Detailed comparison of each operation can be found in table \ref{tab:comp-sign-amd-embedded}.
    419 \begin{bfhBox}[BFH-MediumBlue]{Setup}
    420 	CPU: 4-core AMD Ryzen Embedded R1606G with Radeon Vega Gfx\\
    421     Architecture: amd64 \\
    422     OS: Linux computer 5.13.0-25-generic \#26-Ubuntu SMP Fri Jan 7 15:48:31 UTC 2022 x86\_64 x86\_64 x86\_64 GNU/Linux\\
    423     libsodium:amd64 version: 1.8.7-5ubuntu2  \\ 
    424     libgcrypt:amd64 version: 1.0.18-1build1
    425 \end{bfhBox}
    426 
    427 \begin{table}[ht]
    428     \centering
    429     \colorlet{BFH-table}{BFH-MediumBlue!10}
    430     \colorlet{BFH-tablehead}{BFH-MediumBlue!50}
    431     \setupBfhTabular
    432     \begin{tabular}{llr}
    433         \rowcolor{BFH-tablehead}
    434         \textbf{Signature Scheme} & \textbf{Operation} & \textbf{Speed} \\\hline
    435         CS & 10x key generation & 2.373 ms \\\hline
    436         RSA 1024 bit & 10x key generation & 184 ms \\\hline
    437         RSA 2048 bit & 10x key generation & 2132 ms \\\hline
    438         RSA 3072 bit & 10x key generation & 8000 ms \\\hline
    439         RSA 4096 bit & 10x key generation & 21 000 ms \\\hline
    440         \hline
    441         CS & 10x r0, r1 derive and R1,R2 calculation & 1.09 ms \\\hline
    442         CS & 10x derivation of blinding secrets & 0.43 ms \\\hline
    443         CS & 10x blinding & 6 ms \\\hline
    444         RSA 1024 bit & 10x blinding & 3.886 ms \\\hline
    445         RSA 2048 bit & 10x blinding & 7 ms \\\hline
    446         RSA 3072 bit & 10x blinding & 14 ms \\\hline
    447         RSA 4096 bit & 10x blinding & 23 ms \\\hline
    448         \hline
    449         CS & 10x signing & 0.379 ms \\\hline
    450         RSA 1024 bit & 10x signing & 15 ms \\\hline
    451         RSA 2048 bit & 10x signing & 71 ms \\\hline
    452         RSA 3072 bit & 10x signing & 177 ms \\\hline
    453         RSA 4096 bit & 10x signing & 357 ms \\\hline
    454         \hline
    455         CS & 10x unblinding & 0.001 ms \\\hline
    456         RSA 1024 bit & 10x unblinding & 6 ms \\\hline
    457         RSA 2048 bit & 10x unblinding & 24 ms \\\hline
    458         RSA 3072 bit & 10x unblinding & 53 ms \\\hline
    459         RSA 4096 bit & 10x unblinding & 93 ms \\\hline
    460         \hline
    461         CS & 10x verifying & 2.610 ms \\\hline
    462         RSA 1024 bit & 10x verifying & 2.303 ms \\\hline
    463         RSA 2048 bit & 10x verifying & 4.386 ms \\\hline
    464         RSA 3072 bit & 10x verifying & 7 ms \\\hline
    465         RSA 4096 bit & 10x verifying & 11 ms \\\hline
    466     \end{tabular}
    467     \caption{Comparison on AMD Ryzen Embedded R1606G}
    468     \label{tab:comp-sign-amd-embedded}
    469 \end{table}
    470 
    471 \section{risc64}
    472 Detailed comparison of each operation can be found in table \ref{tab:comp-sign-risc64}.
    473 \begin{bfhBox}[BFH-MediumBlue]{Setup}
    474 	CPU:  4-core risc64 processor\\
    475     OS: Linux risc-v-unleashed-000 5.11.0-1022-generic \#23~20.04.1-Ubuntu SMP Thu Oct 21 10:16:27 UTC 2021 riscv64 riscv64 riscv64 GNU/Linux\\
    476     libsodium:riscv64 version: 1.8.7-5ubuntu2  \\ 
    477     libgcrypt:riscv64 version: 1.0.18-1build1
    478 \end{bfhBox}
    479 
    480 \begin{table}[ht]
    481     \centering
    482     \colorlet{BFH-table}{BFH-MediumBlue!10}
    483     \colorlet{BFH-tablehead}{BFH-MediumBlue!50}
    484     \setupBfhTabular
    485     \begin{tabular}{llr}
    486         \rowcolor{BFH-tablehead}
    487         \textbf{Signature Scheme} & \textbf{Operation} & \textbf{Speed} \\\hline
    488         CS & 10x key generation & 4.144 ms \\\hline
    489         RSA 1024 bit & 10x key generation & 2923 ms \\\hline
    490         RSA 2048 bit & 10x key generation & 28 000 ms \\\hline
    491         RSA 3072 bit & 10x key generation & 174 000 ms \\\hline
    492         RSA 4096 bit & 10x key generation & 600 000 ms \\\hline
    493         \hline
    494         CS & 10x r0, r1 derive and R1,R2 calculation & 10 ms \\\hline
    495         CS & 10x derivation of blinding secrets & 2.514 ms \\\hline
    496         CS & 10x blinding & 72 ms \\\hline
    497         RSA 1024 bit & 10x blinding & 37 ms \\\hline
    498         RSA 2048 bit & 10x blinding & 93 ms \\\hline
    499         RSA 3072 bit & 10x blinding & 170 ms \\\hline
    500         RSA 4096 bit & 10x blinding & 277 ms \\\hline
    501         \hline
    502         CS & 10x signing & 1.697 ms \\\hline
    503         RSA 1024 bit & 10x signing & 215 ms \\\hline
    504         RSA 2048 bit & 10x signing & 1040 ms \\\hline
    505         RSA 3072 bit & 10x signing & 2883 ms \\\hline
    506         RSA 4096 bit & 10x signing & 5000 ms \\\hline
    507         \hline
    508         CS & 10x unblinding & 0.022 ms \\\hline
    509         RSA 1024 bit & 10x unblinding & 62 ms \\\hline
    510         RSA 2048 bit & 10x unblinding & 150 ms \\\hline
    511         RSA 3072 bit & 10x unblinding & 275 ms \\\hline
    512         RSA 4096 bit & 10x unblinding & 431 ms \\\hline
    513         \hline
    514         CS & 10x verifying & 29 ms \\\hline
    515         RSA 1024 bit & 10x verifying & 22 ms \\\hline
    516         RSA 2048 bit & 10x verifying & 54 ms \\\hline
    517         RSA 3072 bit & 10x verifying & 99 ms \\\hline
    518         RSA 4096 bit & 10x verifying & 166 ms \\\hline
    519     \end{tabular}
    520     \caption{Comparison on risc64}
    521     \label{tab:comp-sign-risc64}
    522 \end{table}
    523 
    524 \section{POWER9}
    525 Detailed comparison of each operation can be found in table \ref{tab:comp-sign-POWER9}.
    526 \begin{bfhBox}[BFH-MediumBlue]{Setup}
    527 	CPU:  176-core power9\\
    528     architecture: pp64le \\
    529     OS: Linux power9 5.11.0-34-generic \#36-Ubuntu SMP Thu Aug 26 19:19:54 UTC 2021 ppc64le ppc64le ppc64le GNU/Linux \\
    530     libsodium:a::ppc64el version: 1.8.7-2ubuntu2.1  \\ 
    531     libgcrypt::ppc64el version: 1.0.18-1
    532 \end{bfhBox}
    533 
    534 \begin{table}[ht]
    535     \centering
    536     \colorlet{BFH-table}{BFH-MediumBlue!10}
    537     \colorlet{BFH-tablehead}{BFH-MediumBlue!50}
    538     \setupBfhTabular
    539     \begin{tabular}{llr}
    540         \rowcolor{BFH-tablehead}
    541         \textbf{Signature Scheme} & \textbf{Operation} & \textbf{Speed} \\\hline
    542         CS & 10x key generation & 0.275 ms \\\hline
    543         RSA 1024 bit & 10x key generation & 290 ms \\\hline
    544         RSA 2048 bit & 10x key generation & 3743 ms \\\hline
    545         RSA 3072 bit & 10x key generation & 15 000 ms \\\hline
    546         RSA 4096 bit & 10x key generation & 45 000 ms \\\hline
    547         \hline
    548         CS & 10x r0, r1 derive and R1,R2 calculation & 0.749 ms \\\hline
    549         CS & 10x derivation of blinding secrets & 0.267 ms \\\hline
    550         CS & 10x blinding & 4.996 ms \\\hline
    551         RSA 1024 bit & 10x blinding & 3.952 ms \\\hline
    552         RSA 2048 bit & 10x blinding & 10 ms \\\hline
    553         RSA 3072 bit & 10x blinding & 17 ms \\\hline
    554         RSA 4096 bit & 10x blinding & 27 ms \\\hline
    555         \hline
    556         CS & 10x signing & 0.221 ms \\\hline
    557         RSA 1024 bit & 10x signing & 25 ms \\\hline
    558         RSA 2048 bit & 10x signing & 135 ms \\\hline
    559         RSA 3072 bit & 10x signing & 381 ms \\\hline
    560         RSA 4096 bit & 10x signing & 762 ms \\\hline
    561         \hline
    562         CS & 10x unblinding & 0.002 ms \\\hline
    563         RSA 1024 bit & 10x unblinding & 9 ms \\\hline
    564         RSA 2048 bit & 10x unblinding & 34 ms \\\hline
    565         RSA 3072 bit & 10x unblinding & 80 ms \\\hline
    566         RSA 4096 bit & 10x unblinding & 141 ms \\\hline
    567         \hline
    568         CS & 10x verifying & 2.458 ms \\\hline
    569         RSA 1024 bit & 10x verifying & 2.365 ms \\\hline
    570         RSA 2048 bit & 10x verifying & 6 ms \\\hline
    571         RSA 3072 bit & 10x verifying & 10 ms \\\hline
    572         RSA 4096 bit & 10x verifying & 16 ms \\\hline
    573     \end{tabular}
    574     \caption{Comparison on POWER9}
    575     \label{tab:comp-sign-POWER9}
    576 \end{table}
    577 
    578 \section{ARMv7 Processor}
    579 Detailed comparison of each operation can be found in table \ref{tab:comp-sign-armv7}.
    580 \begin{bfhBox}[BFH-MediumBlue]{Setup}
    581 	CPU:  8-core ARMv7 Processor rev 3 (v7l)
    582     Architecture: armv7 \\
    583     OS: Linux odroidxu4 4.14.150-odroidxu4 \#2 SMP PREEMPT Mon Oct 28 08:07:45 CET 2019 armv7l GNU/Linux\\
    584     libsodium:armhf version: 1.9.4-5   \\ 
    585     libgcrypt:armhf version: 1.0.18-1
    586 \end{bfhBox}
    587 
    588 \begin{table}[ht]
    589     \centering
    590     \colorlet{BFH-table}{BFH-MediumBlue!10}
    591     \colorlet{BFH-tablehead}{BFH-MediumBlue!50}
    592     \setupBfhTabular
    593     \begin{tabular}{llr}
    594         \rowcolor{BFH-tablehead}
    595         \textbf{Signature Scheme} & \textbf{Operation} & \textbf{Speed} \\\hline
    596         CS & 10x key generation & 1.719 ms \\\hline
    597         RSA 1024 bit & 10x key generation & 1050 ms \\\hline
    598         RSA 2048 bit & 10x key generation & 8000 ms \\\hline
    599         RSA 3072 bit & 10x key generation & 53 000 ms \\\hline
    600         RSA 4096 bit & 10x key generation & 159 000 ms \\\hline
    601         \hline
    602         CS & 10x r0, r1 derive and R1,R2 calculation & 3.621 ms \\\hline
    603         CS & 10x derivation of blinding secrets & 0.514 ms \\\hline
    604         CS & 10x blinding & 24 ms \\\hline
    605         RSA 1024 bit & 10x blinding & 10 ms \\\hline
    606         RSA 2048 bit & 10x blinding & 26 ms \\\hline
    607         RSA 3072 bit & 10x blinding & 45 ms \\\hline
    608         RSA 4096 bit & 10x blinding & 78 ms \\\hline
    609         \hline
    610         CS & 10x signing & 0.481 ms \\\hline
    611         RSA 1024 bit & 10x signing & 87 ms \\\hline
    612         RSA 2048 bit & 10x signing & 385 ms \\\hline
    613         RSA 3072 bit & 10x signing & 1038 ms \\\hline
    614         RSA 4096 bit & 10x signing & 2073 ms \\\hline
    615         \hline
    616         CS & 10x unblinding & 0.008 ms \\\hline
    617         RSA 1024 bit & 10x unblinding & 26 ms \\\hline
    618         RSA 2048 bit & 10x unblinding & 90 ms \\\hline
    619         RSA 3072 bit & 10x unblinding & 195 ms \\\hline
    620         RSA 4096 bit & 10x unblinding & 344 ms \\\hline
    621         \hline
    622         CS & 10x verifying & 11 ms \\\hline
    623         RSA 1024 bit & 10x verifying & 5 ms \\\hline
    624         RSA 2048 bit & 10x verifying & 15 ms \\\hline
    625         RSA 3072 bit & 10x verifying & 28 ms \\\hline
    626         RSA 4096 bit & 10x verifying & 42 ms \\\hline
    627     \end{tabular}
    628     \caption{Comparison on ARMv7}
    629     \label{tab:comp-sign-armv7}
    630 \end{table}
    631 
    632 
    633 \section{Performance of the Security Module}
    634 These performance measurements are only done on one hardware setup.
    635 The performance tests of the cryptographic routines are more meaningful, the architecture of the Taler exchange could change a lot.
    636 Furthermore, there could be made performance improvements at costs of security by doing the operations requiring the private keys directly in the httpd process.
    637 Because of security reasons, the current design with the security module makes a lot of sense. 
    638 It has to be kept in mind that the following performance benchmarks are interesting to see, but could vary a lot with changes inside the codebase.
    639 The performance of the signatures with the security module can be found in table \ref{tab:comp-sign-full}
    640 \begin{bfhBox}[BFH-MediumBlue]{Setup}
    641 	CPU: 8-core AMD Ryzen 7 PRO 5850U \\
    642     OS: Ubuntu 21.10 Linux 5.13.0-25-generic \#26-Ubuntu SMP Fri Jan 7 15:48:31 UTC 2022 x86\_64 x86\_64 x86\_64 GNU/Linux \\
    643     libsodium version: 1.0.18-1build1 \\ 
    644     libgcrypt version: 1.8.7-5ubuntu2 
    645 \end{bfhBox}
    646 
    647 \begin{table}[ht]
    648     \centering
    649     \colorlet{BFH-table}{BFH-MediumBlue!10}
    650     \colorlet{BFH-tablehead}{BFH-MediumBlue!50}
    651     \setupBfhTabular
    652     \begin{tabular}{lll}
    653         \rowcolor{BFH-tablehead}
    654         \textbf{Signature Scheme} & \textbf{Test} & \textbf{Speed} \\\hline
    655         CS & 100 sequential signature operations & 2.591 ms \\\hline
    656         RSA 1024 bit & 100 sequential signature operations & 79 ms \\\hline
    657         RSA 2048 bit & 100 sequential signature operations & 350 ms \\\hline
    658         RSA 3072 bit & 100 sequential signature operations & 893 ms \\\hline
    659         RSA 4092 & 100 sequential signature operations & 1811 ms \\\hline
    660         \hline
    661         CS & 100 parallel signature operations & 14 ms \\\hline
    662         RSA 1024 bit & 100 parallel signature operations & 125 ms \\\hline
    663         RSA 2048 bit & 100 parallel signature operations & 573ms \\\hline
    664         RSA 3072 bit & 100 parallel signature operations & 1420 ms \\\hline
    665         RSA 4092 & 100 parallel signature operations & 3279 ms \\\hline
    666         \hline
    667         CS & 800 parallel signature operations & 19 ms \\\hline
    668         RSA 1024 bit & 800 parallel signature operations & 137 ms \\\hline
    669         RSA 2048 bit & 800 parallel signature operations & 653 ms \\\hline
    670         RSA 3072 bit & 800 parallel signature operations & 1451 ms \\\hline
    671         RSA 4092 & 800 parallel signature operations & 3388 ms \\\hline
    672     \end{tabular}
    673     \caption{Performance comparison of the security module}
    674     \label{tab:comp-sign-full}
    675 \end{table}
    676 
    677 \input{content/appendix/rsa-redesign.tex}