SlideShare a Scribd company logo
1 of 11
Download to read offline
Computer Security (46349)
Formative Assessment 2
Classical Cryptography and Digital Encryption
(Overview)
Damaine Fabion Franklin
Student #: R2104D12054733
07/15/2023
Part 1 – Questions (30 marks)
1. What is the purpose of encryption? [4 Marks]
Ans: Encryption is a process of converting plaintext data into unreadable cyphertext
using a mathematical algorithm known as a cipher which when received by the intended
recipient can only be converted back to plain text with the right cryptographic key.
2. Describe the following terms: (a) plaintext, (b) ciphertext, (c) cipher, (d) encrypt, (e)
decrypt, (f) key [6 Marks]
Ans: Plaintext is the text that is readable prior to encryption, whereas ciphertext is the
conversion of plaintext into unreadable codes using an algorithm known as a cipher. A
cipher is a method or algorithm used to encrypt the plaintext and decrypt the ciphertext.
The effectiveness of the encryption is dependent on the cipher used, which can be AES,
RSA, Triple DES, or Blowfish. To encrypt and decrypt refers to the methods of coding
and decoding data using a pair of public and private keys. In cryptography, a key refers to
a public key that is shared and a private key that is kept confidential. In the encryption
and decryption processes, both keys are utilized. These keys can function as either a
symmetric or an asymmetric pair when combined.
3. Describe the steps of symmetric-key encryption [4 Marks]
• Step 1: the sender encrypts the plaintext message with a secret key.
• Step 2: the encrypted message is converted to unintelligible ciphertext which
cannot be read by anyone during transit.
• Ste 3: the recipient decrypts the ciphertext back to its original plaintext with the
same key used for encryption.
• Step 4: With symmetric key encryption, only the sender and receiver have access
to the data, as both parties share the same private key used for encryption and
decryption.
4. What is the difference between a substitution and a transposition cipher? [2 Marks]
Ans: Substitution and transposition ciphers are both forms of symmetric ciphers;
however, a substitution cipher is one in which the letters of a plaintext retain their
position but changes their identity by being replaced with other letters using a shift
number. On the other hand, transposition ciphers do the opposite whereby the letters of a
plaintext retain their identity by changing their position. For example, substitution cipher
(A, B, C) shift key = 2, will be (C, D, E), also transposition cipher of the word (SECRET)
would be (SCEERT).
5. List 3 different classical substitution ciphers [1 Mark]
Ans: Caesar Cipher, Porta Cipher, and Four-Square Cipher
6. List 3 different classical transposition ciphers [1 Mark]
Ans: Rail-Fence, Scytale Cipher, and Route Cipher.
7. Discuss the limitations of symmetric encryption [5 Marks]
Ans:
• symmetric encryption does not guarantee data confidentiality, integrity, and
authentication since the same key used for both encryption and decryption must
be shared.
• Symmetric encryption does not guarantee nonrepudiation since anyone with the
key can easily decrypt the message which may cause an argument between the
sender and receiver.
• A new secret key must be generated and shared each time communication takes
place. This creates an issue with the security and privacy of the keys.
8. Describe the asymmetric encryption process using digital signatures [5 marks]
Ans:
• Step 1: a plaintext message is generated.
• Step 2: The plaintext message is then run through a hashing algorithm (SHA-1,
SHA-256, MD5) which results in a particular digest.
• Step 3: the message digest is then encrypted with the sender’s private key.
• Step 4: the result of the encrypted digest is the signature of the message.
• Step 5: both the signature and message are then transmitted to the intended
recipient.
• Step 6: On the receiving end the recipient uses the sender’s public key to decrypt
the digital signature for verification which will result in the sender’s original
digest.
• Finally, the recipient then calculates a hash of the message and if the sender’s
digest matches the recipient’s digest, then it proves that the message was digitally
signed by the intended sender and the content of the message was unchanged.
9. What is a Hash Function and why is it useful? [2 Marks]
Ans: A hash function is an algorithm used to convert plaintext data of any size to a hash
value of a particular length. A hash function is useful because it protects data from
unauthorized changes, thereby preserving its integrity.
Part 2 - Practical Exercises (70 marks)
For these practical exercises, you will have to encrypt some text using classical cryptography
algorithms and then you will be tasked with creating and sharing a secret digital message by key
pair generation.
Exercise 1
1. Encrypt your first name using any classical substitution cipher.
• Plaintext: Damaine
• Alphabet: English
• Shift Key: #3
• Cipher: Caesar Cipher
• Ciphertext: Damaine (GDPDLQH)
A B C D E F G H I J K L M
D G H L P
N O P Q R S T U V W X Y Z
Q
Note: See steps on the next page
• Step 1: Caesar cipher was chosen for the encryption process.
• Step 2: The shift key chosen was the number 3.
• Step 3: The letters of the English alphabet were arrayed and tabulated as a cryptogram.
The table shows the mapping between each plaintext character and the corresponding
ciphertext character.
• Step 4: the shift key was then used to change the identity of each letter in my first name
by 3 letters to the right.
• Step 4: the result is the ciphertext for my first name.
• Step 5: to decrypt the ciphertext, the process should be done in the reversing order by
shifting each ciphertext letter back by the same shift key number used.
2. Encrypt your last name using any classical transposition cipher.
• Plaintext: Franklin
• Cipher: rail-fence cipher
F A K I
R N L N
• Ciphertext: Franklin (FAKIRNLN)
• Step 1: The encryption begins by determining the number of rows as the key for this
cipher.
• Step 2: The plaintext ‘FRANKLIN’ is then written in rows in a zigzag pattern.
• Step 3: Each plaintext was written diagonally until reaching the end of the plaintext.
• Step 4: The ciphertext was then generated by writing the text in the top row followed by
the bottom to get ‘FAKIRNLN’.
Exercise 2
Using the gpg package, you will need to create a secret message/communication and exchange
keys with a colleague using public key encryption.
➢ Generating key pair using gpg (secret key passphrase: secret12345)
➢ Verifying GPG public and secret key pairs
Creating The Sender and Receiver User Accounts
➢ I have decided to create two separate accounts on my Kali Linux system, one account shall
have the public key and the other shall have the private key.
• Account 1 - Username: bclarke | password: 12345 (public key user)
• Account 2 – username: rbrown | password: 12345 (Private Key owner)
➢ Exporting public and private keys.
• Step 1: gpg --export -a john > public.key | gpg --export-secret-key -a john > private key
Verification of public key Block
➢ Switching to the bclarke account to perform encryption with the public key.
• bclarke does not yet have the public key, therefore I would need to import the public key
to the directory.
➢ Now that bclarke has the public key I will now create an encrypted folder with a secure
message and share it with rbrown who will decrypt it with the private key.
• Folder with plaintext data
• Encrypting the folder with the public key.
• Verification of encrypted folder next to the folder with plaintext secure message.
• This encrypted folder will now be shared with rbrown for decryption with the private
key.
• First, I need to import the private key to rbrown account directory.
• Decrypting the encrypted folder with the private key
➢ Output
➢ It appears I hit a stone at this final stage, and I am unable to resolve it. However, I found out
that the public key used to encrypt the file may have a corrupted data packet missing.
Overtime I will make the effort to improve on this lab and master data encryption technique.
END OF LAB

More Related Content

Similar to Classical Cryptography and Digital Encryption

UNIT 4 CRYPTOGRAPHIC SYSTEMS.pptx
UNIT 4  CRYPTOGRAPHIC SYSTEMS.pptxUNIT 4  CRYPTOGRAPHIC SYSTEMS.pptx
UNIT 4 CRYPTOGRAPHIC SYSTEMS.pptxssuserd5e356
 
Introduction to cryptography part1-final
Introduction to cryptography  part1-finalIntroduction to cryptography  part1-final
Introduction to cryptography part1-finalTaymoor Nazmy
 
Cryptography and Network Security
Cryptography and Network SecurityCryptography and Network Security
Cryptography and Network SecurityPa Van Tanku
 
Cryptography & Steganography
Cryptography & SteganographyCryptography & Steganography
Cryptography & SteganographyAnimesh Shaw
 
Cryptography and network security Nit701
Cryptography and network security Nit701Cryptography and network security Nit701
Cryptography and network security Nit701Amit Pathak
 
Cryptography and steganography lesson and discription.pptx
Cryptography and steganography lesson and discription.pptxCryptography and steganography lesson and discription.pptx
Cryptography and steganography lesson and discription.pptxRobertCarreonBula
 
Cryptography 1
Cryptography 1Cryptography 1
Cryptography 1bhanu7161
 
Information System Security.pptx
Information System  Security.pptxInformation System  Security.pptx
Information System Security.pptxGIT
 
Iaetsd enhanced cryptography algorithm for providing
Iaetsd enhanced cryptography algorithm for providingIaetsd enhanced cryptography algorithm for providing
Iaetsd enhanced cryptography algorithm for providingIaetsd Iaetsd
 

Similar to Classical Cryptography and Digital Encryption (20)

Symmetric
SymmetricSymmetric
Symmetric
 
UNIT 4 CRYPTOGRAPHIC SYSTEMS.pptx
UNIT 4  CRYPTOGRAPHIC SYSTEMS.pptxUNIT 4  CRYPTOGRAPHIC SYSTEMS.pptx
UNIT 4 CRYPTOGRAPHIC SYSTEMS.pptx
 
encrption.PDF
encrption.PDFencrption.PDF
encrption.PDF
 
encrption.PDF
encrption.PDFencrption.PDF
encrption.PDF
 
encrption.PDF
encrption.PDFencrption.PDF
encrption.PDF
 
Introduction to cryptography part1-final
Introduction to cryptography  part1-finalIntroduction to cryptography  part1-final
Introduction to cryptography part1-final
 
Network security
Network securityNetwork security
Network security
 
Cryptography and Network Security
Cryptography and Network SecurityCryptography and Network Security
Cryptography and Network Security
 
Cns 1
Cns 1Cns 1
Cns 1
 
Cryptography
CryptographyCryptography
Cryptography
 
Cryptography & Steganography
Cryptography & SteganographyCryptography & Steganography
Cryptography & Steganography
 
Cryptography and network security Nit701
Cryptography and network security Nit701Cryptography and network security Nit701
Cryptography and network security Nit701
 
Encryption
EncryptionEncryption
Encryption
 
Cryptography
CryptographyCryptography
Cryptography
 
Cryptography and steganography lesson and discription.pptx
Cryptography and steganography lesson and discription.pptxCryptography and steganography lesson and discription.pptx
Cryptography and steganography lesson and discription.pptx
 
Cryptography 1
Cryptography 1Cryptography 1
Cryptography 1
 
Slidecast - Workshop
Slidecast - WorkshopSlidecast - Workshop
Slidecast - Workshop
 
Information System Security.pptx
Information System  Security.pptxInformation System  Security.pptx
Information System Security.pptx
 
Iaetsd enhanced cryptography algorithm for providing
Iaetsd enhanced cryptography algorithm for providingIaetsd enhanced cryptography algorithm for providing
Iaetsd enhanced cryptography algorithm for providing
 
CNS - Unit - 4 - Public Key Cryptosystem
CNS - Unit - 4 - Public Key Cryptosystem CNS - Unit - 4 - Public Key Cryptosystem
CNS - Unit - 4 - Public Key Cryptosystem
 

More from DamaineFranklinMScBE

Digital Forensics Assignment One UEL and Unicaf
Digital Forensics Assignment One UEL and UnicafDigital Forensics Assignment One UEL and Unicaf
Digital Forensics Assignment One UEL and UnicafDamaineFranklinMScBE
 
LEGAL AND REGULATORY STRUCTURE PREVAILING IN THE UK RELATED TO DATA PRIVACY A...
LEGAL AND REGULATORY STRUCTURE PREVAILING IN THE UK RELATED TO DATA PRIVACY A...LEGAL AND REGULATORY STRUCTURE PREVAILING IN THE UK RELATED TO DATA PRIVACY A...
LEGAL AND REGULATORY STRUCTURE PREVAILING IN THE UK RELATED TO DATA PRIVACY A...DamaineFranklinMScBE
 
Formative Task 3: Social Engineering Attacks
Formative Task 3: Social Engineering AttacksFormative Task 3: Social Engineering Attacks
Formative Task 3: Social Engineering AttacksDamaineFranklinMScBE
 
Identity, Authentication, and Access Control
Identity, Authentication, and Access ControlIdentity, Authentication, and Access Control
Identity, Authentication, and Access ControlDamaineFranklinMScBE
 
Is online education an effective replacement for traditional classroom teaching?
Is online education an effective replacement for traditional classroom teaching?Is online education an effective replacement for traditional classroom teaching?
Is online education an effective replacement for traditional classroom teaching?DamaineFranklinMScBE
 
What is The Role of Students in Online Courses?
What is The Role of Students in Online Courses?What is The Role of Students in Online Courses?
What is The Role of Students in Online Courses?DamaineFranklinMScBE
 

More from DamaineFranklinMScBE (14)

Digital Forensics Assignment One UEL and Unicaf
Digital Forensics Assignment One UEL and UnicafDigital Forensics Assignment One UEL and Unicaf
Digital Forensics Assignment One UEL and Unicaf
 
LEGAL AND REGULATORY STRUCTURE PREVAILING IN THE UK RELATED TO DATA PRIVACY A...
LEGAL AND REGULATORY STRUCTURE PREVAILING IN THE UK RELATED TO DATA PRIVACY A...LEGAL AND REGULATORY STRUCTURE PREVAILING IN THE UK RELATED TO DATA PRIVACY A...
LEGAL AND REGULATORY STRUCTURE PREVAILING IN THE UK RELATED TO DATA PRIVACY A...
 
Security Management
Security ManagementSecurity Management
Security Management
 
Security Management
Security ManagementSecurity Management
Security Management
 
Formative Task 3: Social Engineering Attacks
Formative Task 3: Social Engineering AttacksFormative Task 3: Social Engineering Attacks
Formative Task 3: Social Engineering Attacks
 
Identity, Authentication, and Access Control
Identity, Authentication, and Access ControlIdentity, Authentication, and Access Control
Identity, Authentication, and Access Control
 
ebay_data_breach
ebay_data_breachebay_data_breach
ebay_data_breach
 
Ebay cyber attack
Ebay cyber attackEbay cyber attack
Ebay cyber attack
 
Is online education an effective replacement for traditional classroom teaching?
Is online education an effective replacement for traditional classroom teaching?Is online education an effective replacement for traditional classroom teaching?
Is online education an effective replacement for traditional classroom teaching?
 
What is The Role of Students in Online Courses?
What is The Role of Students in Online Courses?What is The Role of Students in Online Courses?
What is The Role of Students in Online Courses?
 
Case Study.pdf
Case Study.pdfCase Study.pdf
Case Study.pdf
 
Computer Security - Case Study
Computer Security - Case StudyComputer Security - Case Study
Computer Security - Case Study
 
IT & Internet Law
IT & Internet LawIT & Internet Law
IT & Internet Law
 
IT and Internet Law
IT and Internet LawIT and Internet Law
IT and Internet Law
 

Recently uploaded

Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...EduSkills OECD
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfciinovamais
 
Student login on Anyboli platform.helpin
Student login on Anyboli platform.helpinStudent login on Anyboli platform.helpin
Student login on Anyboli platform.helpinRaunakKeshri1
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxNirmalaLoungPoorunde1
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdfssuser54595a
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdfQucHHunhnh
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesFatimaKhan178732
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityGeoBlogs
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingTechSoup
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104misteraugie
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactPECB
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfchloefrazer622
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docxPoojaSen20
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxiammrhaywood
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxGaneshChakor2
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformChameera Dedduwage
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Krashi Coaching
 

Recently uploaded (20)

Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
Student login on Anyboli platform.helpin
Student login on Anyboli platform.helpinStudent login on Anyboli platform.helpin
Student login on Anyboli platform.helpin
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptx
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and Actinides
 
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptxINDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
 
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global Impact
 
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdfTataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdf
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docx
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptx
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy Reform
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
 

Classical Cryptography and Digital Encryption

  • 1. Computer Security (46349) Formative Assessment 2 Classical Cryptography and Digital Encryption (Overview) Damaine Fabion Franklin Student #: R2104D12054733 07/15/2023
  • 2. Part 1 – Questions (30 marks) 1. What is the purpose of encryption? [4 Marks] Ans: Encryption is a process of converting plaintext data into unreadable cyphertext using a mathematical algorithm known as a cipher which when received by the intended recipient can only be converted back to plain text with the right cryptographic key. 2. Describe the following terms: (a) plaintext, (b) ciphertext, (c) cipher, (d) encrypt, (e) decrypt, (f) key [6 Marks] Ans: Plaintext is the text that is readable prior to encryption, whereas ciphertext is the conversion of plaintext into unreadable codes using an algorithm known as a cipher. A cipher is a method or algorithm used to encrypt the plaintext and decrypt the ciphertext. The effectiveness of the encryption is dependent on the cipher used, which can be AES, RSA, Triple DES, or Blowfish. To encrypt and decrypt refers to the methods of coding and decoding data using a pair of public and private keys. In cryptography, a key refers to a public key that is shared and a private key that is kept confidential. In the encryption and decryption processes, both keys are utilized. These keys can function as either a symmetric or an asymmetric pair when combined. 3. Describe the steps of symmetric-key encryption [4 Marks] • Step 1: the sender encrypts the plaintext message with a secret key. • Step 2: the encrypted message is converted to unintelligible ciphertext which cannot be read by anyone during transit. • Ste 3: the recipient decrypts the ciphertext back to its original plaintext with the same key used for encryption. • Step 4: With symmetric key encryption, only the sender and receiver have access to the data, as both parties share the same private key used for encryption and decryption.
  • 3. 4. What is the difference between a substitution and a transposition cipher? [2 Marks] Ans: Substitution and transposition ciphers are both forms of symmetric ciphers; however, a substitution cipher is one in which the letters of a plaintext retain their position but changes their identity by being replaced with other letters using a shift number. On the other hand, transposition ciphers do the opposite whereby the letters of a plaintext retain their identity by changing their position. For example, substitution cipher (A, B, C) shift key = 2, will be (C, D, E), also transposition cipher of the word (SECRET) would be (SCEERT). 5. List 3 different classical substitution ciphers [1 Mark] Ans: Caesar Cipher, Porta Cipher, and Four-Square Cipher 6. List 3 different classical transposition ciphers [1 Mark] Ans: Rail-Fence, Scytale Cipher, and Route Cipher. 7. Discuss the limitations of symmetric encryption [5 Marks] Ans: • symmetric encryption does not guarantee data confidentiality, integrity, and authentication since the same key used for both encryption and decryption must be shared. • Symmetric encryption does not guarantee nonrepudiation since anyone with the key can easily decrypt the message which may cause an argument between the sender and receiver. • A new secret key must be generated and shared each time communication takes place. This creates an issue with the security and privacy of the keys. 8. Describe the asymmetric encryption process using digital signatures [5 marks] Ans: • Step 1: a plaintext message is generated. • Step 2: The plaintext message is then run through a hashing algorithm (SHA-1, SHA-256, MD5) which results in a particular digest. • Step 3: the message digest is then encrypted with the sender’s private key. • Step 4: the result of the encrypted digest is the signature of the message. • Step 5: both the signature and message are then transmitted to the intended recipient.
  • 4. • Step 6: On the receiving end the recipient uses the sender’s public key to decrypt the digital signature for verification which will result in the sender’s original digest. • Finally, the recipient then calculates a hash of the message and if the sender’s digest matches the recipient’s digest, then it proves that the message was digitally signed by the intended sender and the content of the message was unchanged. 9. What is a Hash Function and why is it useful? [2 Marks] Ans: A hash function is an algorithm used to convert plaintext data of any size to a hash value of a particular length. A hash function is useful because it protects data from unauthorized changes, thereby preserving its integrity. Part 2 - Practical Exercises (70 marks) For these practical exercises, you will have to encrypt some text using classical cryptography algorithms and then you will be tasked with creating and sharing a secret digital message by key pair generation. Exercise 1 1. Encrypt your first name using any classical substitution cipher. • Plaintext: Damaine • Alphabet: English • Shift Key: #3 • Cipher: Caesar Cipher • Ciphertext: Damaine (GDPDLQH) A B C D E F G H I J K L M D G H L P N O P Q R S T U V W X Y Z Q Note: See steps on the next page
  • 5. • Step 1: Caesar cipher was chosen for the encryption process. • Step 2: The shift key chosen was the number 3. • Step 3: The letters of the English alphabet were arrayed and tabulated as a cryptogram. The table shows the mapping between each plaintext character and the corresponding ciphertext character. • Step 4: the shift key was then used to change the identity of each letter in my first name by 3 letters to the right. • Step 4: the result is the ciphertext for my first name. • Step 5: to decrypt the ciphertext, the process should be done in the reversing order by shifting each ciphertext letter back by the same shift key number used. 2. Encrypt your last name using any classical transposition cipher. • Plaintext: Franklin • Cipher: rail-fence cipher F A K I R N L N • Ciphertext: Franklin (FAKIRNLN) • Step 1: The encryption begins by determining the number of rows as the key for this cipher. • Step 2: The plaintext ‘FRANKLIN’ is then written in rows in a zigzag pattern. • Step 3: Each plaintext was written diagonally until reaching the end of the plaintext. • Step 4: The ciphertext was then generated by writing the text in the top row followed by the bottom to get ‘FAKIRNLN’.
  • 6. Exercise 2 Using the gpg package, you will need to create a secret message/communication and exchange keys with a colleague using public key encryption. ➢ Generating key pair using gpg (secret key passphrase: secret12345) ➢ Verifying GPG public and secret key pairs
  • 7. Creating The Sender and Receiver User Accounts ➢ I have decided to create two separate accounts on my Kali Linux system, one account shall have the public key and the other shall have the private key. • Account 1 - Username: bclarke | password: 12345 (public key user) • Account 2 – username: rbrown | password: 12345 (Private Key owner)
  • 8. ➢ Exporting public and private keys. • Step 1: gpg --export -a john > public.key | gpg --export-secret-key -a john > private key Verification of public key Block ➢ Switching to the bclarke account to perform encryption with the public key. • bclarke does not yet have the public key, therefore I would need to import the public key to the directory.
  • 9. ➢ Now that bclarke has the public key I will now create an encrypted folder with a secure message and share it with rbrown who will decrypt it with the private key. • Folder with plaintext data • Encrypting the folder with the public key.
  • 10. • Verification of encrypted folder next to the folder with plaintext secure message. • This encrypted folder will now be shared with rbrown for decryption with the private key. • First, I need to import the private key to rbrown account directory.
  • 11. • Decrypting the encrypted folder with the private key ➢ Output ➢ It appears I hit a stone at this final stage, and I am unable to resolve it. However, I found out that the public key used to encrypt the file may have a corrupted data packet missing. Overtime I will make the effort to improve on this lab and master data encryption technique. END OF LAB