You are on page 1of 25

‫التشفير التطبيقي‬

‫المحاضرة ‪٣‬‬
CHAPTER 3

SYMMETRIC CIPHERS
Encryption - Cipher

Plain Text Encryption Cipher Text Decryption Plain Text


Algorithm Algorithm

Key A Key B

‫ التشفير هو طريقة لتشفير الرسائل‬Cipher is a method for encrypting messages • 3


Encryption algorithms are standardized & published •
‫تم توحيد ونشر خوارزميات التشفير‬
The key which is an input to the algorithm is secret •
‫المفتاح الذي يعد أحد المدخالت في الخوارزمية سري‬
Key is a string of numbers or characters •
‫المفتاح هو سلسلة من األرقام أو األحرف‬
If same key is used for encryption & decryption the algorithm •
is called symmetric
‫ فإن الخوارزمية تسمى متماثل‬، ‫إذا تم استخدام نفس المفتاح للتشفير وفك التشفير‬
If different keys are used for encryption & decryption the •
algorithm is called asymmetric
‫ فإن الخوارزمية تسمى غير متماثلة‬، ‫إذا تم استخدام مفاتيح مختلفة للتشفير وفك التشفير‬

4
BREAKING AN ENCRYPTION SCHEME
‫كسر نظام التشفير‬

:known-plaintext attack •
:cipher-text only attack • ‫• هجوم نص عادي معروف‬

:‫• هجوم النص المشفر فقط‬ The intruder has plaintext


corresponding to ciphertext
The intruder has ciphertext •
‫الدخيل لديه نص عادي يتوافق مع النص المشفر‬
he can analyze
:chosen-plaintext attack •
‫الدخيل لديه نص مشفر يمكنه تحليله‬
:‫• هجوم نص عادي مختار‬
‫ طريقتان‬:two approaches • The intruder can get ciphertext for
brute force: search through all keys • chosen plaintext
‫البحث من خالل جميع المفاتيح‬
‫مكن للدخيل الحصول على نص مشفر لنص‬
statistical analysis •
‫عادي مختار‬
‫• تحليل احصائي‬
5
Symmetric encryption, or single-key encryption, was the •
only type of encryption in use prior to the development of
.public key encryption in the 1970s
‫ هو النوع الوحيد من‬، ‫ أو التشفير أحادي المفتاح‬، ‫• كان التشفير المتماثل‬
.‫التشفير المستخدم قبل تطوير تشفير المفتاح العام في السبعينيات‬

6
BASICS OF SYMMETRIC ENCRYPTION

Some Basic Terminology


Plaintext - original message •
Ciphertext - coded message •
. Cipher - algorithm for transforming plaintext to ciphertext •

‫بعض المصطلحات األساسية‬


‫ الرسالة األصلية‬- ‫• نص عادي‬
‫ رسالة مشفرة للتشفير‬- ‫• نص مشفر‬
.‫• خوارزمية لتحويل النص العادي إلى نص مشفر‬
7
BASI CS OF SYMMETRI C ENCRYPTI ON
‫أساسيات التشفير المتماثل‬

Key - info used in cipher known only to sender/receiver •


‫ المتلقي‬/ ‫ المعلومات المستخدمة في التشفير المعروفة فقط للمرسل‬- ‫• المفتاح‬
Encipher (encrypt) - converting plaintext to ciphertext •
‫ تحويل نص عادي إلى نص مشفر‬- )‫• تشفير (تشفير‬
Decipher (decrypt) - recovering ciphertext from plaintext •
‫ استعادة النص المشفر من نص عادي‬- )‫• فك (فك التشفير‬

8
SYMMETRIC (SECRET) KEY
A and B share a secret key •
‫ في مفتاح سري‬B ‫ و‬A ‫• يشترك‬
Encryption – Plaintext message is encrypted and decrypted with a , b •
a , b ‫ يتم تشفير رسالة النص العادي وفك تشفيرها باستخدام‬- ‫التشفير‬
Authentication – A proves to B that he knows a , b (e.g. a password) •
)‫" (مثل كلمة المرور‬a , b“ ‫ يثبت "أ" لـ "ب" أنه يعرف‬- ‫• المصادقة‬

9
BASICS OF SYMMETRIC ENCRYPTION

Symmetric Encryption Principles


‫• مبادئ التشفير المتماثل‬
A symmetric encryption scheme has 5 ingredients •

‫ مكونات‬5 ‫• يتكون نظام التشفير المتماثل من‬

10
SYMMETRIC ENCRYPTION
(SECRET KEY ENCRYPTION)

:Plaintext •
:Encryption algorithm •
:Secret key •
:Ciphertext •
:Decryption algorithm •
‫• نص عادي‬
‫• خوارزمية التشفير‬
‫• المفتاح السري‬
‫• نص مشفر‬
‫• خوارزمية فك التشفير‬
11
BASICS OF SYMMETRIC ENCRYPTION

Plaintext
This is the original intelligible message or data that is •
.fed into the algorithm as input
‫• هذه هي الرسالة أو البيانات األصلية الواضحة التي يتم إدخالها في‬
.‫الخوارزمية كمدخالت‬
Encryption Algorithm
It performs various substitutions and transformations on •
.the plaintext
.‫• يقوم بإجراء استبداالت وتحوالت مختلفة على النص الصريح‬

12
BASICS OF SYMMETRIC ENCRYPTION

Secret Key
It is also input to the encryption algorithm. The key is a value independent of •
.the plaintext and of the algorithm

‫ المفتاح هو قيمة مستقلة عن النص‬.‫• كما أنه يدخل في خوارزمية التشفير‬


‫العادي والخوارزمية‬

13
BASICS OF SYMMETRIC ENCRYPTION

… Secret Key
The algorithm will produce a different output depending •
.on the specific key being used at the time
‫• ستنتج الخوارزمية ناتًج ا مختلًف ا اعتماًد ا على المفتاح المحدد المستخدم في‬
‫ذلك الوقت‬
The exact substitutions and transformations performed •
.depend on the key
‫• تعتمد عمليات االستبدال والتحويالت الدقيقة التي يتم إجراؤها على‬
.‫المفتاح‬

14
BASICS OF SYMMETRIC ENCRYPTION

Ciphertext
This is the scrambled message produced as output. It •
depends on the plaintext and the secret key. For a given
message, two different keys will produce two different
.ciphertexts ( is unintelligible)
‫ يعتمد ذلك على النص العادي‬.‫• هذه هي الرسالة المختلطة التي تم إنتاجها كناتج‬
‫ سينتج مفتاحان مختلفان نصين‬، ‫ بالنسبة لرسالة معينة‬.‫والمفتاح السري‬
)‫مشفرين مختلفين (غير مفهوم‬

15
BASICS OF SYMMETRIC ENCRYPTION

Decryption algorithm
This is essentially the encryption algorithm run in •
.reverse
‫• هذا هو أساًس ا خوارزمية التشفير التي تعمل في االتجاه المعاكس‬
It takes the ciphertext and the secret key and produces •
.the original plaintext
.‫• يأخذ النص المشفر والمفتاح السري وينتج النص العادي األصلي‬

16
BASICS OF SYMMETRIC ENCRYPTION

Model of Symmetric Encryption

17
BASICS OF SYMMETRIC ENCRYPTION

Requirements
Two requirements for secure use of symmetric encryption •

‫• متطلبان لالستخدام اآلمن للتشفير المتماثل‬

18
BASICS OF SYMMETRIC ENCRYPTION

.We need a strong encryption algorithm . : ‫أوال‬


.‫نحن بحاجة إلى خوارزمية تشفير قوية‬
An opponent should be unable to decrypt ciphertext
or discover the key even if he is in possession of a no.
of ciphertexts together with the plaintext that
.produced each ciphertext
‫• يجب أال يتمكن الخصم من فك تشفير النص المشفر أو اكتشاف المفتاح‬
‫ من النصوص المشفرة مع النص الصريح‬."‫حتى لو كان بحوزته "ال‬
.‫الذي ينتج كل نص مشفر‬

19
BASICS OF SYMMETRIC ENCRYPTION

Sender and receiver must have obtained copies of . : ‫ثانيا‬


the secret key in a secure fashion and must keep the key
.secure
‫يجب أن يكون المرسل والمتلقي قد حصلوا على نسخ من المفتاح السري بطريقة‬
.‫آمنة ويجب أن يحافظوا على أمان المفتاح‬
If someone discovers the key and knows the algorithm, all
.communication using this key is readable
‫ فإن كل االتصاالت التي‬، ‫إذا اكتشف شخص ما المفتاح وكان يعرف الخوارزمية‬
.‫تستخدم هذا المفتاح يمكن قراءتها‬

20
BASICS OF SYMMETRIC ENCRYPTION

The security of symmetric encryption depends on the •


secrecy of the key, not the secrecy of the algorithm
‫• يعتمد أمان التشفير المتماثل على سرية المفتاح وليس على سرية‬
‫الخوارزمية‬

21
BASICS OF SYMMETRIC ENCRYPTION

It is impractical to decrypt a message on the basis of the •


ciphertext plus knowledge of the encryption/decryption
.algorithm
‫• من غير العملي فك تشفير رسالة على أساس النص المشفر باإلضافة إلى‬
.‫ فك التشفير‬/ ‫معرفة خوارزمية التشفير‬
.This makes it feasible for widespread use •
.‫• هذا يجعلها مجدية لالستخدام على نطاق واسع‬

22
BASICS OF SYMMETRIC ENCRYPTION

Manufacturers can and have developed low-cost chip •


.implementations of data encryption algorithms
‫• يمكن للمصنعين وقد طوروا تطبيقات شرائح منخفضة التكلفة لخوارزميات‬
.‫تشفير البيانات‬
These chips are widely available and incorporated into a •
.number of products
.‫• هذه الرقائق متاحة على نطاق واسع ومدمجة في عدد من المنتجات‬

23
REQUIREMENTS FOR SECURITY
Strong encryption - if an opponent who knows the algorithm and has access to •
one or more ciphertext would be unable to decipher the ciphertext or figure
.out the key
‫ إذا كان الخصم الذي يعرف الخوارزمية ولديه وصول إلى نص مشفر واحد أو أكثر غير‬- ‫• تشفير قوي‬
.‫قادر على فك تشفير النص المشفر أو معرفة المفتاح‬

Sender and receiver must have obtained copies of the secret key in a secure •
.fashion and must keep the key secure
‫• يجب أن يكون المرسل والمتلقي قد حصلوا على نسخ من المفتاح السري بطريقة آمنة ويجب أن‬
.‫يحافظوا على أمان المفتاح‬

24
:Attack of encryption is done via two means •
:‫• هجوم التشفير يتم عبر وسيلتين‬
Cryptanalysis: based on some knowledge of the algorithm, and •
several plaintext-ciphertext samples, trying to deduce the plaintext of
.a ciphertext or deduce the secret key
، ‫ والعديد من عينات النص المشفر‬، ‫ استناًد ا إلى بعض المعرفة بالخوارزمية‬:‫• تحليل التشفير‬
.‫في محاولة الستنتاج نص عادي لنص مشفر أو استنتاج المفتاح السري‬

Brute-force: try every possible key on a piece of ciphertext •


‫ جرب كل مفتاح ممكن على قطعة من النص المشفر‬:‫• القوة الغاشمة‬

25

You might also like