PROTECTING THE VOTEحماية الصوت وحفظه / DIGITAL FINGERPRINTSالبصمة الرقمية
YASFORCODE
0.4K WORDS | SIMPLIFIED FROM MY 2021 MASTER'S THESIS | YASSER AHMED378 كلمة | مبسط من رسالة ماجستير 2021 | ياسر أحمد

How does a digital fingerprint reveal any change?كيف تكشف البصمة الرقمية أي تغيير

SHA-256 turns any data into a 64-character fingerprint. Change one letter and the fingerprint changes, and the link to the next block breaks.تحول SHA-256 أي بيانات إلى بصمة من 64 خانة فإن تغير حرف واحد تغيرت البصمة وانكسر الرابط مع الكتلة التالية

SHA-256ID42|CAND-B|2022A04DCAD9E07A19F63997CF29…ID42|CAND-C|2022683B64B0E6141530556A1F13…

Imagine you sent someone a file and wanted to be sure their copy was no different from the original. One way is to compute a digital fingerprint of the file on your side, compute it again on theirs, and compare the two.تخيل أنك أرسلت ملفا إلى شخص ثم أردت التأكد من أن النسخة التي وصلت إليه لم تختلف عن الأصل فإحدى الطرق هي حساب بصمة رقمية للملف عندك ثم حسابها عنده ومقارنة النتيجتين

A blockchain uses the same idea, at the level of records and blocks.والفكرة ذاتها تستخدم في سلسلة الكتل لكن على مستوى السجلات والكتل

What is a digital fingerprint?ما البصمة الرقمية

A fingerprint, or hash1, is computed by a mathematical function from some data. Short data or long, the result has a fixed length. The project uses SHA-2562, which returns 256 bits, usually written as 64 hexadecimal characters.البصمة ناتج تحسبه دالة رياضية1 من بيانات معينة ولا يهم إن كانت البيانات قصيرة أو طويلة فالدالة ترجع نتيجة بطول ثابت ويستخدم المشروع خوارزمية SHA-2562 التي ترجع 256 بت وتمثل غالبا في 64 خانة ست عشرية

INPUT · ANY SIZEالمدخل · أي حجمOUTPUT · ALWAYS 256 BITSالمخرج · 256 بت دائماB1 CHARACTERحرف واحدDF7E70E5021544F4834BBEE64A9E3789FEBC4BE81470DF629CAD6DDB03320A5CID42|CAND-B|202216 CHARACTERS16 حرفاA04DCAD9E07A19F63997CF2936886A934F0CAE5FB7928B98CF6F4F6E345C2693Elections are the basic…A WHOLE PARAGRAPHفقرة كاملة4BABCA6EF22F65110C0CDAE37174964FBCF699DE3ED52A321D364EDADFD7BC8B

Enter the same data the same way and you get the same fingerprint. Change one letter or digit and the fingerprint is expected to change dramatically and unpredictably.إذا أدخلنا البيانات نفسها بالطريقة نفسها نحصل على البصمة نفسها وإذا غيرنا حرفا أو رقما في المدخل فمن المتوقع أن تتغير البصمة تغيرا كبيرا يصعب التنبؤ به

But a fingerprint isn't encryption. Encryption hides data so it can be recovered later with a key. A fingerprint has no "decrypt" step that brings the original back; it's a tool for comparing and detecting changes, not a container for the message.لكن البصمة ليست تشفيرا فالتشفير يقصد منه إخفاء البيانات ثم استعادتها بمفتاح أما البصمة فلا توجد فيها عملية فك تعيد النص الأصلي منها إنها أداة مقارنة واكتشاف تغييرات لا وعاء يحتفظ بمضمون الرسالة ليسترجعه لاحقا

ENCRYPTION · TWO-WAYالتشفير في الاتجاهينVOTEالصوتKEYبالمفتاحKEYبالمفتاح2C35A4DF25348106D34C…CAN BE UNDONEيمكن عكسهFINGERPRINT · ONE-WAYالبصمة في اتجاه واحدVOTEالصوتSHA-256SHA-256a04dcad9e07a19f63997…NO WAY BACKلا طريق للعودة

Why SHA-256 suits this jobلماذا تصلح SHA-256 لهذا الغرض

Good cryptographic hash functions have important properties: the same input always gives the same output; it's hard to recover an input from its fingerprint; it's hard to find two different inputs with the same fingerprint; and a small change spreads across the whole result.لأن دوال البصمة المشفرة الجيدة تتمتع بخصائص مهمة ثبات الناتج لنفس المدخل وصعوبة استرجاع مدخل مناسب من بصمته وصعوبة إيجاد مدخلين مختلفين لهما البصمة نفسها وانتشار أثر التغيير الصغير على النتيجة

DETERMINISTICثابتة النتيجةSame input, same hashالمدخل نفسه يعطي البصمة نفسهاEvery single timeفي كل مرةQUICKسريعةFast to computeسريعة الحسابFor any messageلأي رسالةONE-WAYباتجاه واحدCan't be reversedلا يمكن عكسهاOnly guessing worksلا ينفع إلا التخمينAVALANCHEأثر الانهيارOne letter changes it allحرف واحد يغير كل شيءNo two inputs alikeلا يتشابه مدخلان

This isn't absolute mathematical impossibility. It means computationally very hard, given current knowledge and tools.ومن المهم ألا نفهم ذلك على أنه استحالة رياضية مطلقة بل أنه صعب حسابيا إلى حد كبير وفق المعرفة والأدوات المتاحة

How are the blocks linked?كيف ترتبط الكتل ببعضها

Take three consecutive blocks. The second stores the first block's fingerprint, and the third stores the second's. If a transaction in the second block changed, its computed fingerprint would change, and comparing it with the link stored in the third block would show the difference.افترض أن لدينا ثلاث كتل متتالية تحفظ الكتلة الثانية بصمة الكتلة الأولى وتحفظ الثالثة بصمة الثانية فلو تغيرت معاملة في الكتلة الثانية لتغيرت البصمة المحسوبة لها وعند مقارنة هذه البصمة بالرابط المحفوظ في الكتلة الثالثة يظهر الاختلاف

#0DATAالبياناتgenesisPREVالسابقة00000000HASHالبصمةB23CD718#1DATAالبياناتCAND-APREVالسابقةB23CD718HASHالبصمة5ACA0F6A#2DATAالبياناتCAND-BCAND-CPREVالسابقة5ACA0F6AHASHالبصمةB4FCED3B5B0DFEB4#3DATAالبياناتCAND-APREVالسابقةB4FCED3BHASHالبصمةA01E90CFEDIT ONE VOTE IN BLOCK 2 AND EVERY LINK AFTER IT BREAKSعدل صوتا واحدا في الكتلة 2 فتنكسر كل الروابط بعدها

So we can detect that the chain is no longer consistent with its earlier state. That's more accurate than calling the data "impossible to change": an attacker may alter data and recompute the links, but the inconsistency shows as long as we have a trusted chain or fingerprint to compare against.إذن يمكن كشف أن السلسلة لم تعد متسقة مع حالتها السابقة وهذا أدق من القول إن البيانات مستحيل تغييرها فمن الناحية التقنية قد يحاول مهاجم تعديل بيانات وإعادة حساب روابط لكننا نستطيع كشف الاختلال إذا امتلكنا سلسلة أو بصمة موثوقة نقارن بها

Is this enough to protect the chain?هل هذا يكفي لحماية السلسلة

No. Whoever controls the chain's data can try to recompute the fingerprints after every change. So the system adds one more condition that makes creating a block take computational work: proof of work.لا فمن يتحكم ببيانات السلسلة يستطيع أن يحاول إعادة حساب البصمات بعد كل تعديل لهذا يضيف النظام شرطا آخر يجعل إنشاء الكتل يتطلب عملا حسابيا هو إثبات العمل

This chapter corresponds to section 3.3.3 of the original thesis.هذا الفصل يقابل القسم 3.3.3 في الرسالة الأصلية
0.00