From e466f25ecfa356137523ee597b9fc6ab0da5df22 Mon Sep 17 00:00:00 2001 From: Yigit Sever Date: Wed, 14 Apr 2021 03:27:27 +0300 Subject: [WIP] Initial implementation of user auth There is a dance involved and everything Write down specs for RSA and AES, padding scheme, ugh. --- src/schema.rs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'src/schema.rs') 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 { passwd: String, } -// TODO: this will arrive encrypted <13-04-21, yigit> // +/// The plaintext of the initial user authentication request #[derive(Serialize, Deserialize, Debug, PartialEq)] pub struct AuthRequest { pub student_id: String, @@ -186,6 +186,13 @@ pub struct AuthRequest { pub public_key: String, } +/// Ciphertext of the initial authentication request, or what we will receive +#[derive(Serialize, Deserialize, Debug)] +pub struct InitialAuthRequest { + pub c: String, + pub key: String, +} + lazy_static! { static ref OUR_STUDENTS: HashSet<(&'static str, &'static str)> = { [ -- cgit v1.2.3-70-g09d2