diff options
author | Yigit Sever | 2021-04-14 03:27:27 +0300 |
---|---|---|
committer | Yigit Sever | 2021-04-14 19:11:49 +0300 |
commit | edfab6ae2f97a7288ff456265050c01ff397ea8c (patch) | |
tree | e98ce8b12c1ef4d61c70944f47d87d74297a8ed3 /src/schema.rs | |
parent | a5d5ab88d3f73d0b6f5fa847df6dace90810313d (diff) | |
download | gradecoin-edfab6ae2f97a7288ff456265050c01ff397ea8c.tar.gz gradecoin-edfab6ae2f97a7288ff456265050c01ff397ea8c.tar.bz2 gradecoin-edfab6ae2f97a7288ff456265050c01ff397ea8c.zip |
[WIP] Initial implementation of user auth
There is a dance involved and everything
Write down specs for RSA and AES, padding scheme, ugh.
Diffstat (limited to 'src/schema.rs')
-rw-r--r-- | src/schema.rs | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/schema.rs b/src/schema.rs index 9e157c7..f159d83 100644 --- a/src/schema.rs +++ b/src/schema.rs | |||
@@ -178,7 +178,7 @@ pub struct MetuId { | |||
178 | passwd: String, | 178 | passwd: String, |
179 | } | 179 | } |
180 | 180 | ||
181 | // TODO: this will arrive encrypted <13-04-21, yigit> // | 181 | /// The plaintext of the initial user authentication request |
182 | #[derive(Serialize, Deserialize, Debug, PartialEq)] | 182 | #[derive(Serialize, Deserialize, Debug, PartialEq)] |
183 | pub struct AuthRequest { | 183 | pub struct AuthRequest { |
184 | pub student_id: String, | 184 | pub student_id: String, |
@@ -186,6 +186,13 @@ pub struct AuthRequest { | |||
186 | pub public_key: String, | 186 | pub public_key: String, |
187 | } | 187 | } |
188 | 188 | ||
189 | /// Ciphertext of the initial authentication request, or what we will receive | ||
190 | #[derive(Serialize, Deserialize, Debug)] | ||
191 | pub struct InitialAuthRequest { | ||
192 | pub c: String, | ||
193 | pub key: String, | ||
194 | } | ||
195 | |||
189 | lazy_static! { | 196 | lazy_static! { |
190 | static ref OUR_STUDENTS: HashSet<(&'static str, &'static str)> = { | 197 | static ref OUR_STUDENTS: HashSet<(&'static str, &'static str)> = { |
191 | [ | 198 | [ |