YASFORCODE
A simplified, illustrated guide to my master's thesis on secure e-voting with blockchain.شرح مبسط ومصور لرسالتي في الماجستير عن التصويت الإلكتروني الآمن بسلسلة الكتل
Written and illustrated by Yasser Ahmed.كتابة ورسم ياسر أحمد

We're used to voting at polling stations. Staff check who we are, then we drop our choice into a sealed box. But what if we could vote from home, with one click?اعتدنا أن نصوت في مراكز الاقتراع يتحقق الموظف من هويتنا ثم نضع اختيارنا في صندوق مغلق لكن ماذا لو أردنا التصويت من المنزل بضغطة زر

Behind that click sit some big questions. How do we stop someone voting in another person's name? How does your choice stay secret? How would we catch someone changing votes after they're recorded? Let's start with a simple situation.خلف تلك الضغطة أسئلة كبيرة كيف نمنع أحدا من التصويت باسم غيره وكيف يبقى اختيارك سرا وكيف نكتشف من يغير الأصوات بعد تسجيلها ولنبدأ بموقف بسيط

01

What stops someone else voting in your name?ما الذي يمنع شخصا آخر من التصويت باسمك

Imagine someone got hold of Ahmed's password and tried to vote in his name. How does the system make sure it isn't Ahmed?تخيل أن شخصا حصل على كلمة مرور أحمد وحاول التصويت باسمه كيف يتأكد النظام من أنه ليس أحمد

It's like the airport officer who compares a traveller's face with their passport photo. At registration the system saves 128 numbers that describe the face, then compares them with a fresh photo at voting time.الأمر يشبه موظف المطار الذي يقارن وجه المسافر بصورة جوازه فعند التسجيل يحفظ النظام 128 قيمة رقمية تمثل خصائص الوجه ثم يقارنها بصورة جديدة عند التصويت

FIG_002[ FACE ENCODING ][ بصمة الوجه ]2021 128

But the face match isn't the only identity check.لكن مطابقة الوجه ليست الخطوة الوحيدة للتحقق من الهوية

02

One more step to confirm who the voter isخطوة إضافية للتأكد من هوية الناخب

Once Ahmed's face matches, the system emails him a temporary code, just as some apps do when you log in.بعد نجاح مطابقة وجه أحمد يرسل النظام رمزا مؤقتا إلى بريده الإلكتروني تماما كما تفعل بعض التطبيقات عند تسجيل الدخول

FIG_003[ ONE-TIME CODE ][ رمز التحقق ]2021 OTP · @ 4 8 1 9 0 7

Ahmed enters the code, and the system also checks that he hasn't voted before, so he can't vote twice.يدخل أحمد الرمز ويتأكد النظام أيضا من أنه لم يصوت سابقا حتى لا يتمكن من التصويت مرتين

With the checks passed, Ahmed can choose his candidate, and protecting his vote begins.وبعد اجتياز التحقق يستطيع أحمد اختيار مرشحه لتبدأ مرحلة حماية صوته

03

How does your choice stay secret?كيف يبقى اختيارك سريا

When Ahmed votes, his choice becomes electronic data. If that data were left exposed, anyone who reached it could read it.عندما يصوت أحمد يتحول اختياره إلى بيانات إلكترونية ولو كانت هذه البيانات مكشوفة فقد يستطيع من يصل إليها معرفة محتواها

So the system encrypts the vote data with AES, as if we'd put the message in a box that only the right key can open.لهذا يستخدم النظام خوارزمية AES لتشفير بيانات التصويت وكأننا وضعنا الرسالة داخل صندوق لا يفتح إلا بمفتاح مناسب

FIG_009[ ENCRYPTION ][ التشفير ]2021AES-128ID42|CAND-B|2022KEYID42|CAND-B|2022PLAINTEXT · READABLEنص مقروء2C35A4DF25348106D34C0431CB0602A6CIPHERTEXT · UNREADABLEنص مشفر لا يقرأ دون المفتاح

Once encrypted, the vote is ready to be stored in the system's records.وبعد تشفير الصوت يصبح جاهزا للحفظ ضمن سجلات النظام

04

Where are the votes kept?أين تحفظ الأصوات

Picture a notebook where votes are written page after page, with every page tied to the one before it by a digital mark.تخيل دفترا تسجل فيه الأصوات صفحة بعد أخرى لكن كل صفحة مرتبطة بالتي سبقتها بعلامة رقمية

That's the simple idea behind a blockchain. The system groups voting transactions into linked blocks, and creating each one goes through a calculation called proof of work.هذه هي الفكرة المبسطة لسلسلة الكتل إذ يجمع النظام معاملات التصويت في كتل مترابطة ويمر إنشاؤها بعملية حسابية تسمى إثبات العمل

These links let the system check its records and spot any changes made to them.وهذا الترابط يسمح للنظام بفحص السجلات واكتشاف التغييرات التي قد تطرأ عليها

FIG_004[ LINKED BLOCKS ][ كتل مترابطة ]2021 #0041 #0042 #0043
FIG_001[ VOTE BLOCK ][ كتلة الأصوات ]2021 00 00 EA CC C9 A0 F1 41 0E 6D D6 60 5D 0D E7 25 40 8D 7A 9A AE AB B6 11 3A 0B 1B 0B 47 5C D2 58BLOCK HASHبصمة الكتلة 45,693NONCEالرقم العشوائي 2C 25 D3 CB 35 34 4C 06 A4 81 04 02 DF 06 31 A6ENCRYPTED VOTESالأصوات المشفرة 2022-10-10 17:38:34TIMESTAMPالطابع الزمني 17 62 71 EA 22 F5 5F 31 29 6F 38 2F 69 40 22 F4 0A D4 EF F1 2E F2 88 51 27 59 A1 C2 DC 9C 9B 2DPREVIOUS HASHبصمة الكتلة السابقة BLOCK #0042BLOCK HEADERرأس الكتلة
05

What if someone tries to change a recorded vote?ماذا لو حاول أحد تغيير صوت مسجل

Imagine someone changed a stored result from 150 votes to 151. The difference looks tiny, but it changes the data's digital fingerprint.تخيل أن شخصا غير نتيجة محفوظة من 150 صوتا إلى 151 قد يبدو الفرق بسيطا لكنه يغير البصمة الرقمية للبيانات

FIG_005[ SHA-256 ][ SHA-256 ]2021SHA-256ID42|CAND-B|2022A04DCAD9E07A19F63997CF29…ID42|CAND-C|2022683B64B0E6141530556A1F13…

The system calculates these fingerprints with SHA-256. Because the blocks are linked, editing an old block shows up when the links between them are checked.يستخدم النظام خوارزمية SHA-256 لحساب هذه البصمات ولأن الكتل مترابطة فإن تعديل كتلة قديمة يظهر عند التحقق من الروابط بينها

And so the vote's journey is complete, from checking its owner to protecting and recording it.وهكذا تكتمل رحلة الصوت من التحقق من صاحبه إلى حمايته وتسجيله

06

From the idea to the master's thesisمن الفكرة إلى رسالة الماجستير

These stages are the basis of the master's thesis I completed in 2021, Secure & Transparent E-voting with Blockchain.هذه المراحل هي أساس رسالة الماجستير التي أنجزتها عام 2021 بعنوان التصويت الإلكتروني الآمن والشفاف باستخدام سلسلة الكتل

In it I brought together face recognition, identity verification, encryption and blockchain, then tested the system's performance and the limits of the experiment.جمعت فيها بين التعرف على الوجه والتحقق من الهوية والتشفير وسلسلة الكتل ثم اختبرت أداء النظام وحدود التجربة

And I built this site to explain these ideas in plain language, with examples close to real life, no technical background needed.وأنشأت هذا الموقع لأشرح هذه الأفكار بلغة بسيطة وأمثلة قريبة من الواقع دون الحاجة إلى خلفية تقنية مسبقة

Let's start at the root: why is e-voting a challenge?لنبدأ من أصل المشكلة لماذا يعد التصويت الإلكتروني تحديا
SECURE VOTEالتصويت الآمن
FIG_006[ BALLOT BOX ][ صندوق الاقتراع ]2021 A · B · C SECURE VOTE VOTE · CAND-B2C35A4DF2534…ENCRYPTED BALLOTالورقة المشفرةBALLOTSأوراق الاقتراعSLOTفتحة الصندوقAES LOCKقفل التشفيرBALLOT BOXصندوق الاقتراع

About the thesisعن الرسالة

Master of Technology in Computer Networks and Information Security, University of Technology, Jaipur, 2021. Supervised by Dr. Madhumay Sen, Associate Professor of Computer Science.ماجستير التقنية في شبكات الحاسوب وأمن المعلومات من جامعة التقنية في جايبور عام 2021 بإشراف الدكتور مادهوماي سين أستاذ علوم الحاسوب المشارك

Start readingابدأ القراءة

Table of Contents.الفهرسV1.0

13 CHAPTERS13 فصلا · 5.7K WORDS5679 كلمة

2. THE WHOLE SYSTEMالنظام كاملا

3. PROVING WHO YOU AREإثبات هوية الناخب

4. PROTECTING THE VOTEحماية الصوت وحفظه

The thesis:الرسالةSECURE & TRANSPARENT E-VOTING WITH BLOCKCHAINالتصويت الإلكتروني الآمن والشفاف بسلسلة الكتل
PAGESالصفحات73
CHAPTERSالفصول6
FIGURESالرسوم9
REFERENCESالمراجع18
YEARالسنة2021
FIELDالتخصصCNIS
FIG_007[ BLOCKCHAIN ][ سلسلة الكتل ]2021 HASH C02C0B PREV 000000 #0000 HASH 7DC96F PREV C02C0B #0001 HASH 4814D9 PREV 7DC96F #0002 HASH 76A827 PREV 4814D9 #0003GENESIS BLOCKالكتلة الأولىBLOCK HASHبصمة الكتلةPREVIOUS HASHبصمة الكتلة السابقةNEW BLOCKكتلة جديدة
  • Is this the full thesis?هل هذه هي الرسالة كاملة
  • Can anyone see how I voted?هل يستطيع أحد معرفة لمن صوت
  • How does it know it's really me?كيف يتأكد النظام أنني أنا
  • Why a private blockchain?لماذا سلسلة كتل خاصة
  • Who supervised the thesis?من أشرف على الرسالة
  • Why simplify the thesis?لماذا هذا الشرح المبسط

Common Questions.أسئلة شائعة

IN:سؤال
OUT:جواب

Start readingابدأ القراءة

13 short chapters, from why e-voting is hard to the numbers from the tests.13 فصلا قصيرا من صعوبة التصويت الإلكتروني إلى أرقام الاختبار

Read the first chapterاقرأ الفصل الأول
FIG_008[ AES ROUND ][ جولة التشفير ]2021 ADD ROUND KEYإضافة مفتاح الجولة MIX COLUMNSخلط الأعمدة SHIFT ROWSإزاحة الصفوف SUB BYTESاستبدال البايتات STATEالحالة
***