commit 3dbfb38d41fb0b9c43f799729e840b1b2c8c86ee
parent 02374b9a7d54252eaa7eabf93a804d8f9c63dd04
Author: Casaburi Johannes <johannes.casaburi@students.bfh.ch>
Date: Fri, 7 Jun 2024 13:38:23 +0200
truncate json examples
Diffstat:
4 files changed, 31 insertions(+), 23 deletions(-)
diff --git a/doc/thesis/chapters/implementation/donau.tex b/doc/thesis/chapters/implementation/donau.tex
@@ -8,7 +8,8 @@ The detailed REST API specificatoin of the Donau backend is publicy available at
The \texttt{GET /keys} request returns all valid donation unit public keys offered by the Donau, as well as the Donau's current EdDSA public signing key. Donation unit keys are used by the Donau to sign blinded messages for an issue receipt request. The signing key is primarily used to create the donation statement signature for the donor (see section \ref{donor_requests_a_donation_statement_from_the_donau}).
%TODO
-The following is an example response of a \lstinline{curl 127.0.0.1:8080/keys} command.
+The following is an example response of a \lstinline{curl 127.0.0.1:8080/keys} command. Some parts of the following example respones are truncated (denoted by \texttt{...}) to make them more readable.
+
\begin{lstlisting}
{
"version": "0:0:0",
@@ -22,7 +23,7 @@ The following is an example response of a \lstinline{curl 127.0.0.1:8080/keys} c
"stamp_expire": {
"t_s": 1718279156
},
- "key": "CFV2PY8164E231XZSQK30K8R6CBQ83DK2GSC2CXMKSA1YAK6Z6R0"
+ "key": "CFV2PY8164E231XZSQK30K8R6CBQ..."
},
{
...
@@ -32,9 +33,7 @@ The following is an example response of a \lstinline{curl 127.0.0.1:8080/keys} c
{
"donation_unit_pub": {
"cipher": "RSA",
- "rsa_public_key": "020000YC7XK99SYSVFMAM6ANFECMQSK8ASBW4MFNTE9QWVBYPVX76DQBK14CDJPE1HC12NMXWWWSGKC0W93ZXV
- 2JBB6A2TSHXPJCWA4FQ19M967PZ3YZP1M8PA71GDGMME7K2SSXSW9GJ9038NJP4D04FGD94AATPFWEM1J9Y1PYB
- X140THJSSA0VNEDANQ2Q8ARJN09D2M0F8M5KN9G2001"
+ "rsa_public_key": "020000YC7XK99S..."
},
"year": 2024,
"lost": false,
@@ -43,7 +42,7 @@ The following is an example response of a \lstinline{curl 127.0.0.1:8080/keys} c
{
"donation_unit_pub": {
"cipher": "CS",
- "cs_public_key": "7SKRQGBSEPBG24TC2PGXWEBVXHE579ZZBN8CAX6XGCHNSDKE4V9G"
+ "cs_public_key": "7SKRQGBSEPBG24..."
},
"year": 2024,
"lost": false,
@@ -72,7 +71,7 @@ The following is an example response of a \lstinline{curl 127.0.0.1:8080/chariti
{
"charities": [
{
- "charity_pub": "ABETNXT9ZF606FRF3WD5N6G2XVD5QHDP2PTQD4GSX4VEN2YYG2C0",
+ "charity_pub": "ABETNXT9ZF606FRF3WD5...",
"url": "example.com",
"name": "example",
"max_per_year": "EUR:10",
@@ -86,7 +85,7 @@ The following is an example response of a \lstinline{curl 127.0.0.1:8080/chariti
To insert a charity a POST request can be sent using \lstinline{curl -d @charity.json -X POST http://127.0.0.1:8080/charities}.
\begin{lstlisting}[title=charity.json]
{
- "charity_pub": "ABETNXT9ZF606FRF3WD5N6G2XVD5QHDP2PTQD4GSX4VEN2YYG2C0",
+ "charity_pub": "ABETNXT9ZF606FRF3WD5...",
"charity_name": "mycharity",
"charity_url": "mycharity.example.com",
"max_per_year": "EUR:1000",
@@ -103,7 +102,6 @@ The response consists of the charity ID generated by the database.
\end{lstlisting}
-
\subsubsection{\texttt{/batch-issue}}
Only recognized charities are allowed to issue receipts for their donors (see section \ref{validation}).
An \texttt{POST} issue receipt request includes an array of \texttt{BKP}s. A \texttt{BKP} consists of a \texttt{BUDI} and a hash of a public donation unit key (see section \ref{notation_and_definitions}).
@@ -112,22 +110,24 @@ After the Donau checked the signature from the charity it signs the \texttt{BUDI
\begin{figure}[ht]
\includegraphics[width=1\textwidth]{donau_flow_issue_receipt}
-%\caption{flow chart issue receipt} \label{fig:donau_flow_issue_receipt}
+\caption{flow chart issue receipt} \label{fig:donau_flow_issue_receipt}
\end{figure}
-The following is an example response of a \lstinline{curl -d @issue.json -X POST http://127.0.0.1:8080/batch-issue/1} request. The number at the end of the URL stands for the charity id.
+The following is an example response of a \\
+\lstinline{curl -d @issue.json -X POST http://127.0.0.1:8080/batch-issue/1} request. The number at the end of the URL is the charity ID.
+
\begin{lstlisting}[title=issue.json]
{
"budikeypairs": [
{
- "h_donaton_unit_pub": "130C2KDHTAFDQFB8XED01235X3XNEFK3WTSF00NDW9G3NJ3BTFMWTTMC5CR0774CCFRGBMAK46JPPDVYKX2G76R8GSAYZ5470DA5T30",
+ "h_donaton_unit_pub": "130C2KDHTAFDQFB8XED...",
"blinded_udi": {
"cipher": "RSA",
- "rsa_blinded_identifier": "AXPTEE24W28S9XNKB4KNTN5N4C25FG869GT6FQ5S8H3MDYJYRNFJB7MG6VEXQTWQ5QSEYGDK255EF6ATCQRSDM70JVTSQ7X6W5P6VND4GGP08ET48S47REG98A4TM972KPBQG25YDYZFCTB6854P6JQ0W10SEPHF66T2WCY9FJ9ZG99R364CXWAW79S8BCH758756V53C5HAR"
+ "rsa_blinded_identifier": "AXPTEE24W28S9XN..."
}
}
],
- "charity_sig": "JEJ0QMDXD416XKSK1SG0DETJEHEMPRY2X4TD80FT4EA0ZQSBADBM1RFB9T7N4F8XQKPW80EQMEDGBM592PMVDJ31PJC0YR0XF87EP28",
+ "charity_sig": "JEJ0QMDXD416XKSK1SG0DETJEH...",
"year": 2024
}
\end{lstlisting}
@@ -138,7 +138,7 @@ The following is an example response of a \lstinline{curl -d @issue.json -X POST
{
"blinded_signature": {
"cipher": "RSA",
- "blinded_rsa_signature": "16XHNWSCDRVKHFVH47NF8RGNYY5SB02FWSS5G8762C77RP9SK2RBRJT95SA4YV1A7PDX5T1D0R060KPHHTD1ZRV5CJHBNA50GD6RJ1RREYFPVJ13YP4XFV061YDKD3YMB9N3WTFAQPZ82ZBNR9YX8V47G6X7BHX9ZVC0NG9YHXB7PRNNPJSF0VNDR5T3B9RXC5ZTND5PSB8RW"
+ "blinded_rsa_signature": "16XHNWSCDRVKHF..."
}
}
],
@@ -157,36 +157,41 @@ Even the donation statement will not be returned after a submit request, a donat
\begin{figure}[ht]
\includegraphics[width=1\textwidth]{donau_flow_submit_receipt}
-%\caption{flow chart submit receipt} \label{fig:donau_flow_submit_receipt}
+\caption{flow chart submit receipt} \label{fig:donau_flow_submit_receipt}
\end{figure}
-The following is an example of a \lstinline{curl -d @submit.json -X POST http://127.0.0.1:8080/batch-submit} request. If successful, the Donau returns a HTTP 201 status code with an empty response.
+The following is an example of a \\
+\lstinline{curl -d @submit.json -X POST http://127.0.0.1:8080/batch-submit} request. If successful, the Donau returns the \texttt{HTTP 201} status code with an empty response.
\begin{lstlisting}[title=submit.json]
{
- "h_donor_tax_id": "N2NYR2SFNGZSS388R2SB0VKNWP8VCYJWQ93WR3RCCS38Y7DPPQEVEN31PNZA3RBZ3TWGPRQ6SAF1SMJ93S1R55R95271Y7TS5F5E388",
+ "h_donor_tax_id": "N2NYR2SFNGZSS388R2SB0VK...",
"donation_year": 2024,
"donation_receipts": [
{
- "h_donaton_unit_pub": "130C2KDHTAFDQFB8XED01235X3XNEFK3WTSF00NDW9G3NJ3BTFMWTTMC5CR0774CCFRGBMAK46JPPDVYKX2G76R8GSAYZ5470DA5T30",
+ "h_donaton_unit_pub": "130C2KDHTAFDQFB8X...",
"nonce": "JEQC39G",
"donation_unit_sig":
{
"cipher": "RSA",
- "rsa_signature": "GQBXPNE4JT5W53T3CVP6EAKD60XQZ75VJSJSKMNDRZA0Z00ZTC0BX6NWWRK9P7TZWZ3SFFE9B8PP1469SRQDABDNQM188CMP179VVEDMC8AAKZ3WTVC6QH58N9K9HJ6S34M405G0951GM750N4GGVMQXVTQ9VTZ006F2FXJ7655ZPNQ3KA32C1F6KXWHATSWGCJ051XJ30232"
+ "rsa_signature": "GQBXPNE4JT5W53T3CVP6E..."
}
}
]
}
\end{lstlisting}
-The following is an example response of a \lstinline{curl http://127.0.0.1:8080/donation-statement/2024/N2NYR2SFNGZSS388R2SB0VKNWP8VCYJWQ93WR3RCCS38Y7DPPQEVEN31PNZA3RBZ3TWGPRQ6SAF1SMJ93S1R55R95271Y7TS5F5E388} request.The last parameter of the URL is the salted and hashed tax id.
+The following is an example response of a \\
+\lstinline{curl http://127.0.0.1:8080/donation-statement/2024/N2NYR2SFNGZSS388R2SB...} \\
+request.
+
+The last parameter of the URL is the salted hash of the donor tax ID.
\begin{lstlisting}
{
"total": "EUR:15",
- "donation_statement": "C1JVDP25AR001W5AHMAZRZR000RAS38NZHZG007R57XWF7BZ0004602ZAN9JWNAM8RPKG04XFW000C5CHMAZRZR0000AH9WF88K56NR",
- "donau_pub": "63f62b7901311c2187bfcde6304d183317740db31432c133b49e541f2a66f9b0"
+ "donation_statement": "C1JVDP25AR001W5AHMAZ...",
+ "donau_pub": "63f62b7901311c2187bfcde6304d1..."
}
\end{lstlisting}
\subsection{Donau Client}
diff --git a/doc/thesis/include/settings.tex b/doc/thesis/include/settings.tex
@@ -17,6 +17,7 @@
\usepackage{tikz}
\usepackage{parskip}
\usepackage[toc,sort=use]{glossaries}
+\usepackage{caption}
% Abstract
\patchcmd{\abstract}{\null\vfil}{}{}{}
@@ -45,6 +46,7 @@
basicstyle=\ttfamily\small,
breakatwhitespace=false,
breaklines=true,
+ postbreak=\mbox{\textcolor{red}{$\hookrightarrow$}\space},
captionpos=b,
commentstyle=\color{commentsColor}\textit,
deletekeywords={...},
diff --git a/doc/thesis/thesis.pdf b/doc/thesis/thesis.pdf
Binary files differ.
diff --git a/doc/thesis/thesis.tex b/doc/thesis/thesis.tex
@@ -53,5 +53,6 @@
\addcontentsline{toc}{chapter}{Bibliography}
\printglossaries
+\listoffigures
\end{document}