SlideShare a Scribd company logo
5
Most read
9
Most read
10
Most read
1
WWW.Prohackers.in
E-mail Security Protocol-1
Privacy Enhanced Mail (PEM)”
By:
-Vishal Kumar
(CEH, CHFI, CISE, MCP)
info@prohackers.in
2
WWW.Prohackers.in
Table of content
1. Introduction
2. E-mail Attacks and Issues
3. Email Message Structure
3.1 Attachment Size Limitation
3.2 Spam
3.3 Malware
3.4 Email Spoofing
3.5 Email Bombing
3.6 Flaming
3.7 Email Bankruptcy
4. Email Security Protocols
3.1 Privacy Enhanced Mail
1. The working of PEM
i. Canonical Conversation
ii. Digital Signature
iii. Encryption
iv. Base-64 Encoding
3
WWW.Prohackers.in
Introduction
We had discussed about the fundamental structure of E-Mail in our previous document
β€œFundamental of Electronic Mail”. We had learned about its different part, flow of and e-
mail message from sender to recipient, the Header and response code etc. Now we are
moving towards the issues or threats related to the electronic mail (E-mail) and what are
the security protocols who provide the security to the E-mail message.
There are three main security protocols that play the most important role in providing the
security to the E-mail message: Privacy Enhanced Mail (PEM), Pretty Good Privacy (PGP)
and Secure MIME. Let’s discuss these security protocols in brief but before have a look
on some attacks related to the email.
E-Mail Attacks and Issues
Because of email contains the sensitive information hence the chances of attacks is more
possible on the email server and client. The attacker can steal the sensitive information
about the organization and can miss use it. Let’s discuss some popular E-mail attacks on E-
mail in brief.
Attachment size limitation
Email messages may have one or more attachments, which are additional files that are
appended to the email. Typical attachments include Microsoft Word documents, pdf
documents and scanned images of paper documents. In principle there is no technical
restriction on the size or number of attachments, but in practice email clients, servers
and Internet service providers implement various limitations on the size of files, or
complete email - typically to 25MB or less.
4
WWW.Prohackers.in
Spam
Email "spam" is the term used to describe unsolicited bulk email. The low cost of sending
such email meant that by 2003 up to 30% of total email traffic was already spam. and was
threatening the usefulness of email as a practical tool. The US CAN-SPAM Act of 2003
and similar laws elsewhere had some impact, and a number of effective anti-spam
techniques now largely mitigate the impact of spam by filtering or rejecting it for most
users, but the volume sent is still very highβ€”and increasingly consists not of
advertisements for products, but malicious content or links.
Malware
A range of malicious email types exist. These range from various types of email scams,
including "social engineering" scams such as advance-fee scam "Nigerian letters", to
phishing, email bombardment and email worms.
Email spoofing
Email spoofing occurs when the email message header is designed to make the message
appear to come from a known or trusted source. Email spam and phishing methods typically
use spoofing to mislead the recipient about the true message origin. Email spoofing may be
done as a prank, or as part of a criminal effort to defraud an individual or organization. An
example of a potentially fraudulent email spoofing is if an individual creates an email which
appears to be an invoice from a major company, and then sends it to one or more
recipients. In some cases, these fraudulent emails incorporate the logo of the purported
organization and even the email address may appear legitimate.
Email bombing
Email bombing is the intentional sending of large volumes of messages to a target address.
The overloading of the target email address can render it unusable and can even cause the
mail server to crash.
5
WWW.Prohackers.in
Flaming
Flaming occurs when a person sends a message (or many messages) with angry or
antagonistic content. The term is derived from the use of the word "incendiary" to
describe particularly heated email discussions. The ease and impersonality of email
communications mean that the social norms that encourage civility in person or via
telephone do not exist and civility may be forgotten.
Email bankruptcy
Also known as "email fatigue", email bankruptcy is when a user ignores a large number of
email messages after falling behind in reading and answering them. The reason for falling
behind is often due to information overload and a general sense there is so much
information that it is not possible to read it all. As a solution, people occasionally send a
"boilerplate" message explaining that their email inbox is full, and that they are in the
process of clearing out all the messages.
E-Mail Security Protocols
As we know there are mainly three e-mail security protocols which play the most
important role in securing the E-mail messages. Let’s discuss these protocols in brief
1. Privacy Enhanced Mail (PEM):
The privacy Enhanced Mail (EPM) is an email security standard adopted by the Internet
Architecture Board (IAB) to provide secures electronic mail communication over the
internet. PEM was initially developed by the Internet Research Task Force (IRTF) and
Privacy Security Research Group (PSRG). PEM is described in four specification
documents, which are RFC number 1421 to 1424. PEM support the three main
cryptographic functions of encryption, non-repudiation and message integrity.
6
WWW.Prohackers.in
1. Canonical
Conversion
2. Digital Signature
3. Encryption
4. Base-64 Encoding
Fig: PEM operation
1.2. The Working of PEM
The broad-level steps in PEM are shown in the below image, as
shown, PEM is started with canonical conversion, which is followed
by signature, then by encryption and finally, Base-64 encoding.
PEM allows for three security options when sending an e-mail
message. These options are:
ο‚· Signature only (step 1 and 2)
ο‚· Signature and Base-64 encoding (step 1,2 and 4)
ο‚· Signature, Encryption and Base-64 encoding (step 1 to 4)
Let us now discuss the four steps shown in the above figure. Note that these four steps
are performed by the receiver in reverse direction to retrieve the original plane text
message.
Step 1: Canonical Conversion
There a distinct possibility that the sender and the receiver of an e-mail message use
computers that have different architectures and operating systems. This is because the
internet works on any computer that has a TCP/IP stack, regardless of the architecture
or operating system. Therefore, it is quite possible that the same thing is represented
Privacy Enhance Mail (PEM)
Encryption Non-repudiation Message integrity
Fig: Security Features offered by PEM
7
WWW.Prohackers.in
differently in these different computers. This can create problems when creating
message digests, and therefore, digital signature.
Consequently, PEM transforms each e-mail message into an abstract, canonical
representation. This means that regardless of the architecture and the operating system
of the sending and receiving computers, the e-mail message always travel in uniform,
independent format.
Step 2: Digital Signature
This is typical process of digital signature that we had studied many times cryptography
technique. It is start by creating a message digest of the e-mail message using an
algorithm such as MD2 or MD5, as shown in the below image.
The message digest thus created and then encrypted with the senders private key to
form the sender’s digital signature. The process shown below:
E-mail message
To: visahlkumar@gmail.com
From: info@prohackers.in
Subject: Our Meetings
…………………………
1001010111
1011011101
0111011010
001010-------
---------
Message-digest
algorithm
(MD2 or MD5)
Message Digest
Fig: Message-digest creation of the original e-mail message
Original
E-mail Message
8
WWW.Prohackers.in
Step 3: Encryption
In this step the original e-mail and the digital signature are encrypted together with
symmetric key. For this, the DES or DES-3 algorithms in CBC (Cipher Block Chaining) mode
are used. This is shown I the below image:
DES or DES-3
in CBC Mode
Digital Signature
E-mail message
To:
visahlkumar@gmail.com
From: info@prohackers.in
Subject: Our Meetings
…………………………
Encryption
Encrypted
Result
Fig: Encryption in PEM
9
WWW.Prohackers.in
Step 4: Base-64 Encoding
This is the last step in PEM. The base-64 encoding (also called Radix-64 encoding or
ASCII armour) process transforms arbitrary binary input into printable character output.
In this technique, the binary input is processed in block of 3 octets, or 24 bits. These 24
bits are considered to be made up of 4 sets, each of 6 bits. Each such set of 6 bits is
mapped into an 8-bit output character inn this process. This concept is showing the below
image (note that the value in the figure is just for example purpose)
This seems to be a fairly straightforward process. However, one key question is what is
the logic used for mapping a 6-bit input block into an output 8-bit blocks? For this a
mapping table used which is explained in below example:
In our example of Base-64 encoding, let us consider a 24-bit raw stream
011001110100100110101000.
Input bit stream
Divided into 24-bit blocks
Each 24-bit divided into four 6-bit blocks
6-bit blocks mapped to 8-bit blocks
10100100100101101110110011010010100001110001…….
10100101 00101001 10110001
101001 010010 110001100110
10011010 00100101 0010101111000110
Fig: Base-64 encoding concept
10
WWW.Prohackers.in
24-bit Input
Divided into four 6-bit blocks
Write there decimal equivalents
Map to Base-64 table
011001110100100110101000
011001 110100 101000100110
01011010 00110000 0110111101101101
Fig: Base-64 encoding concept
25 52 4038
Z 0 om
Write ASCII equivalent binary
11
WWW.Prohackers.in
Char. Dec. Char. Dec. Char. Dec.
A 0 W 22 s 44
B 1 X 23 t 45
C 2 Y 24 u 46
D 3 Z 25 v 47
E 4 a 26 w 48
F 5 b 27 x 49
G 6 c 28 y 50
H 7 d 29 z 51
I 8 e 30 0 52
J 9 f 31 1 53
K 10 g 32 2 54
L 11 h 33 3 55
M 12 i 34 4 56
N 13 j 35 5 57
O 14 k 36 6 58
P 15 l 37 7 59
Q 16 m 38 8 60
R 17 n 39 9 61
S 18 o 40 + 62
T 19 p 41 / 63
U 20 q 42
V 21 r 43 = (Padding)
Fig: Base-64 encoding Table
12
WWW.Prohackers.in
Thanks for reading this presentation
Please give us your feedback at
info@prohackers.in
Your feedback is most valuable for us for improving the presentation
You can also suggest the topic on which you want the presentation
Website: www.prohackers.in
FB page: www.facebook.com/theprohackers2017
Join FB Group: www.facebook.com/groups/group.prohackers/
Watch us on: www.youtube.com//channel/UCcyYSi1sh1SmyMlGfB-Vq6A
***Thanks***

More Related Content

PDF
Privacy Enhanced Mail (PEM)
PPT
Group Communication (Distributed computing)
PDF
Distributed deadlock
PPTX
Message passing in Distributed Computing Systems
PDF
Lecture 03 - Synchronous and Asynchronous Communication - Concurrency - Fault...
PPT
Message authentication and hash function
PPTX
MD5 ALGORITHM.pptx
PDF
Web Security
Privacy Enhanced Mail (PEM)
Group Communication (Distributed computing)
Distributed deadlock
Message passing in Distributed Computing Systems
Lecture 03 - Synchronous and Asynchronous Communication - Concurrency - Fault...
Message authentication and hash function
MD5 ALGORITHM.pptx
Web Security

What's hot (20)

PPT
Sliding window protocol
PPTX
Vision of cloud computing
PPTX
Transposition Cipher
PDF
Mobile transportlayer
PPSX
Framing Protocols
PPT
Traditional symmetric-key cipher
PDF
Transposition cipher
PDF
Run time storage
PPTX
RPC: Remote procedure call
PPTX
PPTX
Data cube computation
PDF
8. mutual exclusion in Distributed Operating Systems
PPTX
Distributed Mutual Exclusion and Distributed Deadlock Detection
PPT
Message Authentication Code & HMAC
PPTX
Data Integration and Transformation in Data mining
PPT
Message authentication
Β 
PPTX
PPT
DOM and SAX
PDF
Spam Filtering
PPTX
Image steganography
Sliding window protocol
Vision of cloud computing
Transposition Cipher
Mobile transportlayer
Framing Protocols
Traditional symmetric-key cipher
Transposition cipher
Run time storage
RPC: Remote procedure call
Data cube computation
8. mutual exclusion in Distributed Operating Systems
Distributed Mutual Exclusion and Distributed Deadlock Detection
Message Authentication Code & HMAC
Data Integration and Transformation in Data mining
Message authentication
Β 
DOM and SAX
Spam Filtering
Image steganography
Ad

Similar to E-Mail Security Protocol - 1 Privacy Enhanced Mail (PEM) Protocol (20)

PDF
Email security
DOC
PPT
Email security
PDF
Email security presentation
PPTX
Email security
PDF
BAIT1103 Chapter 5
Β 
PDF
Electronic Mail Security (University of Jeddah, Saudi Arabia)
PDF
Electronic mail security
PPT
apsec SEPPmail Email Security Gateway
PPTX
Network security
PPTX
L5_Electronic communication.pptx
PDF
M.FLORENCE DAYANA/electronic mail security.pdf
PPT
Cyber security and emails presentation refined
PPT
Cyber security and emails presentation
PPTX
Email security
PPTX
CRYPT.pptx
PPT
Email Security : PGP & SMIME
PPTX
Encrypting E-mail Messages
Email security
Email security
Email security presentation
Email security
BAIT1103 Chapter 5
Β 
Electronic Mail Security (University of Jeddah, Saudi Arabia)
Electronic mail security
apsec SEPPmail Email Security Gateway
Network security
L5_Electronic communication.pptx
M.FLORENCE DAYANA/electronic mail security.pdf
Cyber security and emails presentation refined
Cyber security and emails presentation
Email security
CRYPT.pptx
Email Security : PGP & SMIME
Encrypting E-mail Messages
Ad

More from Vishal Kumar (20)

PDF
Threat Hunting Procedures and Measurement Matrice
PDF
The Complete Questionnaires About Firewall
PDF
E-mail Security Protocol - 2 Pretty Good Privacy (PGP)
PDF
Privileges Escalation by Exploiting Client-Side Vulnerabilities Using Metasploit
PDF
Exploiting Client-Side Vulnerabilities and Establishing a VNC Session
PPTX
Auditing System Password Using L0phtcrack
PPTX
Dumping and Cracking SAM Hashes to Extract Plaintext Passwords
PPTX
Fundamental of Secure Socket Layer (SSL) | Part - 2
PDF
The Fundamental of Electronic Mail (E-mail)
PPTX
Fundamental of Secure Socket Layer (SSl) | Part - 1
PPTX
The Fundamental of Secure Socket Layer (SSL)
PPTX
Hawkeye the Credential Theft Maalware
PPTX
Deep understanding on Cross-Site Scripting and SQL Injection
PPTX
Owasp top 10 security threats
PPTX
Exploiting parameter tempering attack in web application
PPTX
Mirroring web site using ht track
PPTX
Collecting email from the target domain using the harvester
PPTX
Information gathering using windows command line utility
PPTX
Introduction ethical hacking
PPTX
Social engineering
Threat Hunting Procedures and Measurement Matrice
The Complete Questionnaires About Firewall
E-mail Security Protocol - 2 Pretty Good Privacy (PGP)
Privileges Escalation by Exploiting Client-Side Vulnerabilities Using Metasploit
Exploiting Client-Side Vulnerabilities and Establishing a VNC Session
Auditing System Password Using L0phtcrack
Dumping and Cracking SAM Hashes to Extract Plaintext Passwords
Fundamental of Secure Socket Layer (SSL) | Part - 2
The Fundamental of Electronic Mail (E-mail)
Fundamental of Secure Socket Layer (SSl) | Part - 1
The Fundamental of Secure Socket Layer (SSL)
Hawkeye the Credential Theft Maalware
Deep understanding on Cross-Site Scripting and SQL Injection
Owasp top 10 security threats
Exploiting parameter tempering attack in web application
Mirroring web site using ht track
Collecting email from the target domain using the harvester
Information gathering using windows command line utility
Introduction ethical hacking
Social engineering

Recently uploaded (20)

PPTX
Module 1 - Cyber Law and Ethics 101.pptx
PDF
πŸ’° π”πŠπ“πˆ πŠπ„πŒπ„ππ€ππ†π€π πŠπˆππ„π‘πŸ’πƒ π‡π€π‘πˆ 𝐈𝐍𝐈 πŸπŸŽπŸπŸ“ πŸ’°
Β 
PPTX
Slides PPTX World Game (s) Eco Economic Epochs.pptx
PPTX
artificial intelligence overview of it and more
PPTX
Digital Literacy And Online Safety on internet
PDF
Cloud-Scale Log Monitoring _ Datadog.pdf
DOCX
Unit-3 cyber security network security of internet system
PPTX
Introuction about ICD -10 and ICD-11 PPT.pptx
PPTX
Funds Management Learning Material for Beg
PPTX
Introduction to Information and Communication Technology
PDF
An introduction to the IFRS (ISSB) Stndards.pdf
PPTX
SAP Ariba Sourcing PPT for learning material
PDF
RPKI Status Update, presented by Makito Lay at IDNOG 10
Β 
PDF
Tenda Login Guide: Access Your Router in 5 Easy Steps
PPTX
international classification of diseases ICD-10 review PPT.pptx
PPTX
Internet___Basics___Styled_ presentation
PPTX
PptxGenJS_Demo_Chart_20250317130215833.pptx
PPTX
Introuction about WHO-FIC in ICD-10.pptx
PPTX
522797556-Unit-2-Temperature-measurement-1-1.pptx
PDF
SASE Traffic Flow - ZTNA Connector-1.pdf
Module 1 - Cyber Law and Ethics 101.pptx
πŸ’° π”πŠπ“πˆ πŠπ„πŒπ„ππ€ππ†π€π πŠπˆππ„π‘πŸ’πƒ π‡π€π‘πˆ 𝐈𝐍𝐈 πŸπŸŽπŸπŸ“ πŸ’°
Β 
Slides PPTX World Game (s) Eco Economic Epochs.pptx
artificial intelligence overview of it and more
Digital Literacy And Online Safety on internet
Cloud-Scale Log Monitoring _ Datadog.pdf
Unit-3 cyber security network security of internet system
Introuction about ICD -10 and ICD-11 PPT.pptx
Funds Management Learning Material for Beg
Introduction to Information and Communication Technology
An introduction to the IFRS (ISSB) Stndards.pdf
SAP Ariba Sourcing PPT for learning material
RPKI Status Update, presented by Makito Lay at IDNOG 10
Β 
Tenda Login Guide: Access Your Router in 5 Easy Steps
international classification of diseases ICD-10 review PPT.pptx
Internet___Basics___Styled_ presentation
PptxGenJS_Demo_Chart_20250317130215833.pptx
Introuction about WHO-FIC in ICD-10.pptx
522797556-Unit-2-Temperature-measurement-1-1.pptx
SASE Traffic Flow - ZTNA Connector-1.pdf

E-Mail Security Protocol - 1 Privacy Enhanced Mail (PEM) Protocol

  • 1. 1 WWW.Prohackers.in E-mail Security Protocol-1 Privacy Enhanced Mail (PEM)” By: -Vishal Kumar (CEH, CHFI, CISE, MCP) info@prohackers.in
  • 2. 2 WWW.Prohackers.in Table of content 1. Introduction 2. E-mail Attacks and Issues 3. Email Message Structure 3.1 Attachment Size Limitation 3.2 Spam 3.3 Malware 3.4 Email Spoofing 3.5 Email Bombing 3.6 Flaming 3.7 Email Bankruptcy 4. Email Security Protocols 3.1 Privacy Enhanced Mail 1. The working of PEM i. Canonical Conversation ii. Digital Signature iii. Encryption iv. Base-64 Encoding
  • 3. 3 WWW.Prohackers.in Introduction We had discussed about the fundamental structure of E-Mail in our previous document β€œFundamental of Electronic Mail”. We had learned about its different part, flow of and e- mail message from sender to recipient, the Header and response code etc. Now we are moving towards the issues or threats related to the electronic mail (E-mail) and what are the security protocols who provide the security to the E-mail message. There are three main security protocols that play the most important role in providing the security to the E-mail message: Privacy Enhanced Mail (PEM), Pretty Good Privacy (PGP) and Secure MIME. Let’s discuss these security protocols in brief but before have a look on some attacks related to the email. E-Mail Attacks and Issues Because of email contains the sensitive information hence the chances of attacks is more possible on the email server and client. The attacker can steal the sensitive information about the organization and can miss use it. Let’s discuss some popular E-mail attacks on E- mail in brief. Attachment size limitation Email messages may have one or more attachments, which are additional files that are appended to the email. Typical attachments include Microsoft Word documents, pdf documents and scanned images of paper documents. In principle there is no technical restriction on the size or number of attachments, but in practice email clients, servers and Internet service providers implement various limitations on the size of files, or complete email - typically to 25MB or less.
  • 4. 4 WWW.Prohackers.in Spam Email "spam" is the term used to describe unsolicited bulk email. The low cost of sending such email meant that by 2003 up to 30% of total email traffic was already spam. and was threatening the usefulness of email as a practical tool. The US CAN-SPAM Act of 2003 and similar laws elsewhere had some impact, and a number of effective anti-spam techniques now largely mitigate the impact of spam by filtering or rejecting it for most users, but the volume sent is still very highβ€”and increasingly consists not of advertisements for products, but malicious content or links. Malware A range of malicious email types exist. These range from various types of email scams, including "social engineering" scams such as advance-fee scam "Nigerian letters", to phishing, email bombardment and email worms. Email spoofing Email spoofing occurs when the email message header is designed to make the message appear to come from a known or trusted source. Email spam and phishing methods typically use spoofing to mislead the recipient about the true message origin. Email spoofing may be done as a prank, or as part of a criminal effort to defraud an individual or organization. An example of a potentially fraudulent email spoofing is if an individual creates an email which appears to be an invoice from a major company, and then sends it to one or more recipients. In some cases, these fraudulent emails incorporate the logo of the purported organization and even the email address may appear legitimate. Email bombing Email bombing is the intentional sending of large volumes of messages to a target address. The overloading of the target email address can render it unusable and can even cause the mail server to crash.
  • 5. 5 WWW.Prohackers.in Flaming Flaming occurs when a person sends a message (or many messages) with angry or antagonistic content. The term is derived from the use of the word "incendiary" to describe particularly heated email discussions. The ease and impersonality of email communications mean that the social norms that encourage civility in person or via telephone do not exist and civility may be forgotten. Email bankruptcy Also known as "email fatigue", email bankruptcy is when a user ignores a large number of email messages after falling behind in reading and answering them. The reason for falling behind is often due to information overload and a general sense there is so much information that it is not possible to read it all. As a solution, people occasionally send a "boilerplate" message explaining that their email inbox is full, and that they are in the process of clearing out all the messages. E-Mail Security Protocols As we know there are mainly three e-mail security protocols which play the most important role in securing the E-mail messages. Let’s discuss these protocols in brief 1. Privacy Enhanced Mail (PEM): The privacy Enhanced Mail (EPM) is an email security standard adopted by the Internet Architecture Board (IAB) to provide secures electronic mail communication over the internet. PEM was initially developed by the Internet Research Task Force (IRTF) and Privacy Security Research Group (PSRG). PEM is described in four specification documents, which are RFC number 1421 to 1424. PEM support the three main cryptographic functions of encryption, non-repudiation and message integrity.
  • 6. 6 WWW.Prohackers.in 1. Canonical Conversion 2. Digital Signature 3. Encryption 4. Base-64 Encoding Fig: PEM operation 1.2. The Working of PEM The broad-level steps in PEM are shown in the below image, as shown, PEM is started with canonical conversion, which is followed by signature, then by encryption and finally, Base-64 encoding. PEM allows for three security options when sending an e-mail message. These options are: ο‚· Signature only (step 1 and 2) ο‚· Signature and Base-64 encoding (step 1,2 and 4) ο‚· Signature, Encryption and Base-64 encoding (step 1 to 4) Let us now discuss the four steps shown in the above figure. Note that these four steps are performed by the receiver in reverse direction to retrieve the original plane text message. Step 1: Canonical Conversion There a distinct possibility that the sender and the receiver of an e-mail message use computers that have different architectures and operating systems. This is because the internet works on any computer that has a TCP/IP stack, regardless of the architecture or operating system. Therefore, it is quite possible that the same thing is represented Privacy Enhance Mail (PEM) Encryption Non-repudiation Message integrity Fig: Security Features offered by PEM
  • 7. 7 WWW.Prohackers.in differently in these different computers. This can create problems when creating message digests, and therefore, digital signature. Consequently, PEM transforms each e-mail message into an abstract, canonical representation. This means that regardless of the architecture and the operating system of the sending and receiving computers, the e-mail message always travel in uniform, independent format. Step 2: Digital Signature This is typical process of digital signature that we had studied many times cryptography technique. It is start by creating a message digest of the e-mail message using an algorithm such as MD2 or MD5, as shown in the below image. The message digest thus created and then encrypted with the senders private key to form the sender’s digital signature. The process shown below: E-mail message To: visahlkumar@gmail.com From: info@prohackers.in Subject: Our Meetings ………………………… 1001010111 1011011101 0111011010 001010------- --------- Message-digest algorithm (MD2 or MD5) Message Digest Fig: Message-digest creation of the original e-mail message Original E-mail Message
  • 8. 8 WWW.Prohackers.in Step 3: Encryption In this step the original e-mail and the digital signature are encrypted together with symmetric key. For this, the DES or DES-3 algorithms in CBC (Cipher Block Chaining) mode are used. This is shown I the below image: DES or DES-3 in CBC Mode Digital Signature E-mail message To: visahlkumar@gmail.com From: info@prohackers.in Subject: Our Meetings ………………………… Encryption Encrypted Result Fig: Encryption in PEM
  • 9. 9 WWW.Prohackers.in Step 4: Base-64 Encoding This is the last step in PEM. The base-64 encoding (also called Radix-64 encoding or ASCII armour) process transforms arbitrary binary input into printable character output. In this technique, the binary input is processed in block of 3 octets, or 24 bits. These 24 bits are considered to be made up of 4 sets, each of 6 bits. Each such set of 6 bits is mapped into an 8-bit output character inn this process. This concept is showing the below image (note that the value in the figure is just for example purpose) This seems to be a fairly straightforward process. However, one key question is what is the logic used for mapping a 6-bit input block into an output 8-bit blocks? For this a mapping table used which is explained in below example: In our example of Base-64 encoding, let us consider a 24-bit raw stream 011001110100100110101000. Input bit stream Divided into 24-bit blocks Each 24-bit divided into four 6-bit blocks 6-bit blocks mapped to 8-bit blocks 10100100100101101110110011010010100001110001……. 10100101 00101001 10110001 101001 010010 110001100110 10011010 00100101 0010101111000110 Fig: Base-64 encoding concept
  • 10. 10 WWW.Prohackers.in 24-bit Input Divided into four 6-bit blocks Write there decimal equivalents Map to Base-64 table 011001110100100110101000 011001 110100 101000100110 01011010 00110000 0110111101101101 Fig: Base-64 encoding concept 25 52 4038 Z 0 om Write ASCII equivalent binary
  • 11. 11 WWW.Prohackers.in Char. Dec. Char. Dec. Char. Dec. A 0 W 22 s 44 B 1 X 23 t 45 C 2 Y 24 u 46 D 3 Z 25 v 47 E 4 a 26 w 48 F 5 b 27 x 49 G 6 c 28 y 50 H 7 d 29 z 51 I 8 e 30 0 52 J 9 f 31 1 53 K 10 g 32 2 54 L 11 h 33 3 55 M 12 i 34 4 56 N 13 j 35 5 57 O 14 k 36 6 58 P 15 l 37 7 59 Q 16 m 38 8 60 R 17 n 39 9 61 S 18 o 40 + 62 T 19 p 41 / 63 U 20 q 42 V 21 r 43 = (Padding) Fig: Base-64 encoding Table
  • 12. 12 WWW.Prohackers.in Thanks for reading this presentation Please give us your feedback at info@prohackers.in Your feedback is most valuable for us for improving the presentation You can also suggest the topic on which you want the presentation Website: www.prohackers.in FB page: www.facebook.com/theprohackers2017 Join FB Group: www.facebook.com/groups/group.prohackers/ Watch us on: www.youtube.com//channel/UCcyYSi1sh1SmyMlGfB-Vq6A ***Thanks***