Skip to content

Commit afad734

Browse files
committed
Big proofread w/ many adjustments
1 parent 79f70ad commit afad734

10 files changed

+106
-92
lines changed

gpsw06-abe/src/gpsw06_abe.rs

+5-3
Original file line numberDiff line numberDiff line change
@@ -134,15 +134,17 @@ where
134134
}
135135

136136
/// internal recursive helper to ease key generation
137-
fn keygen_node<'key>(
137+
fn keygen_node<'attr, 'key>(
138138
privkey: &GpswAbePrivate,
139139
pubkey: &GpswAbePublic,
140-
tree_arr: AccessStructure<'key, 'key>,
140+
tree_arr: AccessStructure<'attr, 'key>,
141141
tree_ptr: u8,
142142
parent_poly: &Polynomial,
143143
index: F,
144144
rng: &mut dyn RngCore,
145-
) -> Vec<(u8, G1), consts::U30> {
145+
) -> Vec<(u8, G1), consts::U30>
146+
where 'attr: 'key
147+
{
146148
// own polynomial at x = 0. Exactly q_parent(index).
147149
let q_of_zero = parent_poly.eval(index);
148150
let own_node = &tree_arr[tree_ptr as usize];

thesis/build/main.pdf

227 Bytes
Binary file not shown.

thesis/chapters/01_introduction.tex

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ \chapter{Introduction}\label{chapter:introduction}
1515

1616
The objective of this thesis is to assess to what extent \acrshort{abe} can be practically applied on such constrained devices running ARM Cortex-M4 processors.
1717
To this end, an \acrshort{abe} library is developed using the Rust programming language.
18-
This library is then tested and evaluated on the nRF52840 SoC with a 64\,MHz ARM Cortex M4 processor and 256\,KB of RAM.
18+
This library is then tested and evaluated on the nRF52840 SoC with a 64\,MHz ARM Cortex-M4 processor and 256\,KB of RAM.
1919
In addition, this thesis aims to give an easy-to-understand explanation of \acrshort{abe} and how it can be implemented.
2020

2121
\input{figures/01_system_architecture}

thesis/chapters/03_related-work.tex

+1-1
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ \section{Implementation on constrained devices}
106106
This is significantly lower than the security level of the 224-bit MNT curve from the PBC library (around 128 bits)~\cite{akinyele_self-protecting_2010} and the curves used in this thesis (around 100 bits).
107107

108108
Scott~\cite{scott_deployment_2020} provides a fast implementation of a 254-bit BN curve (the same as used in this thesis) in the \emph{MIRACL Core Cryptographic Library}~\cite{scott_miracl_nodate}.
109-
They also evaluate their library on the same SoC as used in this thesis (nRF52840, 64\,MHz ARM Cortex M4 CPU) and compute a pairing of the 254-bit BN curve in 635\,ms \cite[Table~4]{scott_deployment_2020}.
109+
They also evaluate their library on the same SoC as used in this thesis (nRF52840, 64\,MHz ARM Cortex-M4 CPU) and compute a pairing of the 254-bit BN curve in 635\,ms \cite[Table~4]{scott_deployment_2020}.
110110
Only the pairing implementation is tested and evaluated, the authors do not implement an \acrshort{abes}.
111111

112112
~

thesis/chapters/04_constructions.tex

+26-22
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,14 @@ \chapter{Evaluated ABE schemes}\label{chapter:constructions}
1313
The scheme by \citeauthor{yao_lightweight_2015} was chosen for its unique approach without bilinear pairings. Because pairings are computationally expensive, this promises better performance.
1414

1515
\section{Goyal, Pandey, Sahai and Waters, 2006}
16-
This scheme was the first \acrshort{abes} with expressive \glspl{access-policy}. Policies are associated with the key (\acrshort{kp-abe}).
17-
It was described by Goyal, Pandey, Sahai and Waters \cite{goyal_attribute-based_2006} in 2006. This scheme will be referred to as GPSW.
16+
This scheme was described by Goyal, Pandey, Sahai and Waters \cite{goyal_attribute-based_2006} in 2006 and will be referred to as GPSW.
17+
It was the first \acrshort{abes} with expressive \glspl{access-policy}.
1818

1919
Goyal~et.~al. extend the earlier work from Sahai and Waters~\cite{sahai_fuzzy_2005} to allow arbitrary access structures expressed by \glspl{access-tree}, not just ``k-out-of-n'' attributes.
2020
They are the first to use Shamir's Secret Sharing hierarchically in the \gls{access-tree} as described in section~\ref{sec:lss-in-access-trees}.
2121

22-
The GPSW scheme encrypts a message represented by a point of the bilinear pairing's target group $\mathbb{G}_T$.
22+
Policies are associated with the key (\acrshort{kp-abe}).
23+
The scheme encrypts messages represented by an element of the bilinear pairing's target group $\mathbb{G}_T$.
2324
It is a \gls{small-universe} construction.
2425

2526
The definition of the scheme in this chapter differs from the original construction in the use of an asymmetric pairing ($e: \mathbb{G}_1 \times \mathbb{G}_2 \rightarrow \mathbb{G}_T$) instead of a symmetric pairing ($e: \mathbb{G}_1 \times \mathbb{G}_1 \rightarrow \mathbb{G}_T$).
@@ -29,24 +30,26 @@ \section{Goyal, Pandey, Sahai and Waters, 2006}
2930
Originally, a symmetric pairing is used, so the pairing inputs can be swapped freely.
3031
As we want to improve the speed of the encryption, we swap the two groups to use $\mathbb{G}_1$ for the group elements associated with ciphertexts.
3132
Elements of $\mathbb{G}_1$ are shorter than elements of $\mathbb{G}_2$ and thus the operations are faster to compute.
32-
33+
\\
3334
% To speed up encryption and decryption, the plaintext is not encrypted with the GPSW \acrshort{abes} directly.
3435
% Instead, a random group element is chosen and encrypted under GPSW (i.e. a $k \in \mathbb{G}_T$).
3536
% This element is hashed to obtain an symmetric key, which is then used to encrypt the plaintext with AES-GCM (an \acrshort{aead} mode of operation).
3637
% The ciphertext now consists of the GPSW-encrypted group element plus the AES-GCM ciphertext.
3738

38-
~\\
3939

40-
Let $\mathbb{G}_1$ and $\mathbb{G}_2$ be bilinear groups of prime order $q$. Let $P$ be a generator of $\mathbb{G}_1$ and $Q$ be a generator of $\mathbb{G}_2$. Let $e: \mathbb{G}_1 \times \mathbb{G}_2 \rightarrow \mathbb{G}_T$ be a bilinear map.
40+
41+
Let $\mathbb{G}_1$ and $\mathbb{G}_2$ be bilinear groups of prime order $q$.
42+
Let $P$ be a generator of $\mathbb{G}_1$ and $Q$ be a generator of $\mathbb{G}_2$.
43+
Let $e: \mathbb{G}_1 \times \mathbb{G}_2 \rightarrow \mathbb{G}_T$ be a bilinear pairing.
4144

4245
Note that $\mathbb{G}_1$ and $\mathbb{G}_2$ are written additively, but $\mathbb{G}_T$ is written using multiplicative notation.
4346
This corresponds to the interface of the bilinear pairing library used in this thesis.\\
4447

4548
\noindent \emph{Setup}~\cite{goyal_attribute-based_2006}.
4649
The attribute universe is defined as $\text{U} = \{1, 2, \dots, n\}$ and is fixed.
47-
For every attribute $i \in U$, choose uniformly at random a secret number $t_i \in \mathbb{Z}_q$.
50+
For every attribute $i \in U$, choose a secret number $t_i \in \mathbb{Z}_q$ uniformly at random.
4851
Then the public key of attribute $i$ is $T_i = t_1 \cdot P$.
49-
Also, choose uniformly at random the private $y \in \mathbb{Z}_p$, from which the public key $Y = e(P, Q)^y$ is derived.
52+
Also, choose a random private $y \in \mathbb{Z}_p$, from which the public $Y = e(P, Q)^y$ is derived.
5053

5154
Publish $PK=(Y, T_1, \dots, T_n)$ as the public key, privately save $MK = (y, t_1, \dots, t_n)$ as the master key.
5255
\\
@@ -60,16 +63,16 @@ \section{Goyal, Pandey, Sahai and Waters, 2006}
6063
Return the ciphertext as $E = (\omega, E', \{E_i | i \in \omega\})$
6164
\\
6265

63-
\noindent \emph{KeyGen($\Gamma$, MK)}~\cite{goyal_attribute-based_2006}.
64-
Input: \gls{access-tree} $\Gamma$ and master key $MK$.
66+
\noindent \emph{KeyGen($\mathcal{T}$, MK)}~\cite{goyal_attribute-based_2006}.
67+
Input: \gls{access-tree} $\mathcal{T}$ and master key $MK$.
6568

66-
For each node $u$ in the \gls{access-tree} $\Gamma$, recursively define polynomials $q_u(x)$ with degree $(d_u - 1)$, starting from the root.
69+
For each node $u$ in the \gls{access-tree} $\mathcal{T}$, recursively define polynomials $q_u(x)$ with degree $(d_u - 1)$, starting from the root.
6770

6871
For the root $r$, set $q_r(0) = s$ and randomly choose $d_r -1$ other points to determine the polynomial $q_r(x)$.
6972
Then, for any other node $u$, including leaf nodes, set $q_u(0) = q_{\text{parent}(x)}(\text{index}(x))$ and choose $d_u -1$ other points at random to define the polynomial.
7073
For all leaf nodes $u$, create a secret share $D_u = q_x(0) \cdot t_i^{-1} \cdot Q$ where $i = \text{att}(x)$.
7174

72-
The set of these secret shares is the decryption key $D = \{D_u | u \text{ leaf node of } \Gamma\}$.
75+
The set of these secret shares is the decryption key $D = \{D_u | u \text{ leaf node of } \mathcal{T}\}$.
7376
\\
7477

7578
\noindent \emph{Decrypt(E, D)}~\cite{goyal_attribute-based_2006}.
@@ -91,7 +94,7 @@ \section{Goyal, Pandey, Sahai and Waters, 2006}
9194
Then compute with $i = \text{index}(z)$ and $S'_u = \{\text{index}(z) | z \in S_u\}$.
9295
\begin{equation}
9396
\begin{split}
94-
F_u &= \prod_{z \in S_u} F_z^{\Delta_{i,S'_u}(0)}\\
97+
\text{DecryptNode}(E, D, v) &= \prod_{z \in S_u} F_z^{\Delta_{i,S'_u}(0)}\\
9598
&= \prod_{z \in S_u} (e(P,Q)^{s\cdot q_z(0)})^{\Delta_{i,S'_u}(0)}\\
9699
&= \prod_{z \in S_u} (e(P,Q)^{s\cdot q_{\text{parent}(z)}(\text{index}(z))})^{\Delta_{i,S'_u}(0)}\\
97100
&= \prod_{z \in S_u} e(P,Q)^{s\cdot q_u(i) \cdot \Delta_{i,S'_u}(0)}\\
@@ -117,11 +120,11 @@ \section{Yao, Chen and Tian 2015}\label{sec:yct}
117120
In 2019, Tan, Yeow and Hwang \cite{tan_enhancement_2019} proposed an enhancement, fixing a flaw in the scheme and extending it to be a hierarchical KP-ABE scheme.
118121

119122
Yao, Chen and Tian's ABE scheme (hereafter written just YCT) is a KP-ABE scheme that does not use any bilinear pairing operations.
120-
Instead, the only operation performed on Elliptic Curves are point-scalar multiplication~\cite{yao_lightweight_2015}.
123+
Instead, the only operations performed on \glspl{ec} are point-scalar multiplication~\cite{yao_lightweight_2015}.
121124
% This makes it especially useful for our resource-constrained context, as bilinear pairings are significantly more costly in terms of computation and memory.
122125

123126
As opposed to other ABE schemes based on pairings, YCT uses a hybrid approach similar to the Elliptic Curve Integrated Encryption Standard (ECIES):
124-
The actual encryption of the plaintext is done by a symmetric cipher, for which the key is derived from a curve point determined by the YCT scheme~\cite{yao_lightweight_2015}.
127+
The actual encryption of the plaintext is done by a \gls{privkes}, for which the key is derived from a curve point determined by the YCT scheme~\cite{yao_lightweight_2015}.
125128
If a key's \gls{access-structure} is satisfied by a certain ciphertext, this curve point and thus the symmetric encryption key can be reconstructed, allowing for decryption.
126129

127130
The original description of this scheme uses the x- and y-coordinates as keys for separate encryption and authentication mechanisms.
@@ -133,7 +136,8 @@ \section{Yao, Chen and Tian 2015}\label{sec:yct}
133136
$r_l$ is a random seed value that differs for each layer $l$ of the \gls{access-tree}~\cite{tan_enhancement_2019}.
134137
In our implementation, HMAC-SHA3-512 is used as the \acrshort{prf}.\\
135138

136-
Let $\mathbb{G}$ be a group of order $q$ with generator $G$. The four algorithms of the YCT scheme are defined as follows: \\
139+
Let $\mathbb{G}$ be a group of order $q$ with generator $G$. The four algorithms of the YCT scheme are defined as follows:
140+
\\
137141

138142
\noindent \emph{Setup}~\cite{yao_lightweight_2015}.
139143
The attribute universe is defined as $\text{U} = \{1, 2, \dots, n\}$ and is fixed.
@@ -158,19 +162,19 @@ \section{Yao, Chen and Tian 2015}\label{sec:yct}
158162

159163
Return the ciphertext $CM = (\omega, c, \text{mac}_m, \{C_i | i \in \omega\})$\\
160164

161-
\noindent \emph{KeyGen($\Gamma$, MK)}~\cite{yao_lightweight_2015}.
162-
Input: \glspl{access-tree} $\Gamma$ and master key $MK$.
165+
\noindent \emph{KeyGen($\mathcal{T}$, MK)}~\cite{yao_lightweight_2015,tan_enhancement_2019}.
166+
Input: \glspl{access-tree} $\mathcal{T}$ and master key $MK$.
163167

164168
For each layer $l = 0, 1, \dots$ of the \gls{access-tree}, generate a random seed value $r_l \in \mathcal{K}_{PRF}$ from the PRF's key space.
165169

166-
For each node $u$ in the \gls{access-tree} $\Gamma$, recursively define polynomials $q_u(x)$ with degree $(d_u - 1)$, starting from the root.
170+
For each node $u$ in the \gls{access-tree} $\mathcal{T}$, recursively define polynomials $q_u(x)$ with degree $(d_u - 1)$, starting from the root.
167171

168172
For the root $r$, set $q_r(0) = s$ and randomly choose $(d_r - 1)$ other points to determine the polynomial $q_r(x)$.
169173
Then, for any other node $u$ (including leafs), set $q_u(0) = q_{\text{parent}(u)}(\text{index}'(u))$ and choose $(d_u -1)$ other points for $q_u$, similar to above.
170174

171-
Whenever $u$ is a leaf node, use $q_u(x)$ to define a secret share $D_u = \frac{q_u(0)}{s_i}$; where $i = \text{attr}(u)$, $s_i$ the randomly chosen secret number from \emph{Setup} and $s_i^{-1}$ the inverse of $s_i$ in $\mathbb{Z}_q^*$.
175+
Whenever $u$ is a leaf node, use $q_u(x)$ to define a secret share $D_u = q_u(0) \cdot s_i^{-1}$; where $i = \text{attr}(u)$, $s_i$ the randomly chosen secret number from \emph{Setup} and $s_i^{-1}$ the inverse of $s_i$ in $\mathbb{Z}_q^*$.
172176

173-
Return the generated key as $D = (\{D_u | u \text{ leaf node of } \Gamma\}, \{r_0, r_1, \dots \})$.
177+
Return the generated key as $D = (\{D_u | u \text{ leaf node of } \mathcal{T}\}, \{r_0, r_1, \dots \})$.
174178
\\
175179

176180
\noindent \emph{Decrypt(CM, D, PK)}~\cite{yao_lightweight_2015}. Input: Ciphertext $CM$, decryption key $D$ and public key $PK$.
@@ -207,7 +211,7 @@ \section{Yao, Chen and Tian 2015}\label{sec:yct}
207211

208212
The equality $(*)$ holds because $\sum_{v \in \omega'_u} \Delta_{\omega'_u, i}(0) \cdot q_u(i) = q_u(0)$ is exactly the lagrange interpolation polynomial $q_u(x)$ at $x = 0$ with respect to the points $\{(index(v), q_v(0)) | v \in \omega_u\}$.
209213

210-
This means for the root $r$ of the \gls{access-tree} $\Gamma$, we have
214+
This means for the root $r$ of the \gls{access-tree} $\mathcal{T}$, we have
211215
\begin{equation*}
212216
\text{DecryptNode}(CM, D, r) = q_r(0) \cdot k \cdot G = s \cdot k \cdot G = (k'_x, k'_y)
213217
\end{equation*}

0 commit comments

Comments
 (0)