commit 2e735f9c6b44d1f0b9c8cd97d3b7ad2aedc11497
parent a7f4fac4dfd1f0269e92da78aee1ccbfba19c223
Author: Casaburi Johannes <johannes.casaburi@students.bfh.ch>
Date: Mon, 27 May 2024 18:54:59 +0200
thesis: added db description
Diffstat:
3 files changed, 59 insertions(+), 2 deletions(-)
diff --git a/doc/thesis/chapters/implementation/implementation.tex b/doc/thesis/chapters/implementation/implementation.tex
@@ -31,17 +31,71 @@ Even the donation statement will not be returned after a submit request, a donat
The REST client removes some of the complexity of sending requests to the Donau Server. It converts request parameters into JSON and parses JSON responses into a usable C format. What the exact queries are and how they look like is already described in the chapter xx Donau REST API.
\subsection{Donau Database}
-The physical database model of the Donau looks like this:
+The Donau database is shown in the figure below:
\begin{figure}[ht]
\includegraphics[width=1\textwidth]{db_physical_model}
\caption{database physical model} \label{fig:db_physical_model}
\end{figure}
\subsubsection{charities}
+Each registered charity has an entry in this table.
+\begin{itemize}
+ \item \texttt{charity\_id:} Unique ID generated by the database.
+ \item \texttt{charity\_pub:} Charity EdDSA public key
+ \item \texttt{charity\_name:} Name of the charity
+ \item \texttt{charity\_url:} Charity URL
+ \item \texttt{max\_per\_year:} The annual donation limit according to local law.
+ \item \texttt{receipts\_to\_date:} The current amount of donations in the current year. Reset to 0 when incrementing the \texttt{current\_year}.
+ \item \texttt{current\_year:} Current year
+\end{itemize}
+
\subsubsection{donation\_units}
+Table containing all the valid donation units the Donau knows about.
+\begin{itemize}
+ \item \texttt{donation\_unit\_serial:} Unique ID generated by the database.
+ \item \texttt{h\_donation\_unit\_pub:} Hash value of the donation unit public key \texttt{donation\_unit\_pub}
+ \item \texttt{donation\_unit\_pub:} The donation unit public key. Is either an RSA or CS public key.
+ \item \texttt{validity\_year:} The year, for which the donation unit is valid.
+ \item \texttt{value:} The amount and currency that this donation unit represents.
+\end{itemize}
+
\subsubsection{donau\_sign\_keys}
+Contains all Donau EdDSA signing keys.
+\begin{itemize}
+ \item \texttt{dsk\_serial:} Unique ID generated by the database.
+ \item \texttt{donau\_pub:} Donau EdDSA public key.
+ \item \texttt{valid\_from:} Year the signing key becomes valid.
+ \item \texttt{expire\_sign:} Year the signing key becomes invalid.
+ \item \texttt{expire\_legal:} Year the signing key legaly expires.
+\end{itemize}
+
\subsubsection{receipts\_issued}
+Contains all issued donation receipts sent to the Donau.
+\begin{itemize}
+ \item \texttt{receipt\_id:} Unique ID generated by the database.
+ \item \texttt{blinded\_sig:} Array of blinded signatures. These are the \texttt{BKP}'s the Donau blind signed.
+ \item \texttt{charity\_id:} The ID of the charity that received the donation.
+ \item \texttt{receipt\_hash:} Hash value over all the blinded donation receipt received plus the hash of the donation units public key.
+ \item \texttt{amount:} The amount and currency this donation receipt contains.
+\end{itemize}
+
\subsubsection{receipts\_submitted}
+Contains all submitted donation receipts sent to the Donor.
+\begin{itemize}
+ \item \texttt{receipt\_id:} Unique ID generated by the database.
+ \item \texttt{h\_tax\_number:} The hash of the tax number and salt.
+ \item \texttt{nonce:} The nonce used in the \texttt{Unique Donor Identifier}
+ \item \texttt{donation\_unit\_pub:} Reference to public key used to sign.
+ \item \texttt{donation\_unit\_sig:} The unblided signature the Donau made.
+ \item \texttt{donation\_year:} The year the donation was made.
+\end{itemize}
+
\subsubsection{history}
+History of the yearly donations for each charity.
+\begin{itemize}
+ \item \texttt{charity\_id:} Unique ID generated by the database.
+ \item \texttt{final\_amount:} The final amount that was donated to the charity
+ \item \texttt{donation\_year:} The year in which the donations where made.
+\end{itemize}
\section{Android Verification App}
The android app is part of the verification process used by the tax authority to check the donation statement (see xx).
diff --git a/doc/thesis/chapters/intro/introduction.tex b/doc/thesis/chapters/intro/introduction.tex
@@ -1,5 +1,8 @@
\section{Motivation}
-Donations can often be deducted from taxes. To do so, the donor may need to present some sort of evidence in form of a receipt. Donations receipts are often sensitive data, which may not want to be shared. To anonymously donate to a charity and bind the donation to the donor for tax deduction is not possible. Furthermore, the process of checking receipts can be time consuming and involves a disproportionate amount of effort for the tax authorities. It can also be annoying for donor, which have to find all the donation receipts of the year when the tax return is made.
+To be able to donate to a charity and deduct that donation from taxes, it is often required to provide evidence. The donor would have to present said evidence in form of a donation receipt which would include information about both the donor and charity. The donor may want to keep this information private and only provide a receipt that proves that a certain amount was indeed donated to a recognized charity.
+
+%fixme
+Verifying donations with the current system can be time consuming, involving a disproportionate amount of effort for the tax authorities. The donor has to keep track of the donation receipt which may get lost.
\section{Goals}
The aim of this bachelor thesis is to assess the current situation in the area of donation deduction and to formulate and implement a solution for the problems described above. The main goals are the following:
diff --git a/doc/thesis/thesis.pdf b/doc/thesis/thesis.pdf
Binary files differ.