Академический Документы
Профессиональный Документы
Культура Документы
Topics of Discussion
Encoding and encryption What is base64 used for? Usage of base64 encoding The algorithm Drawbacks lternati!es
"eople often refer to base64 #and similar methods$ as a form of encryption% Encoding is the process of transforming information from one format into another%
Encryption is a type of encoding that obscures information to make it unreadable without special knowledge%
"ositional notation * a +uadrose,agesimal number system -umerals ./01 alphabetical characters a/2 and plus two special characters #all printable &455$ /3
What is base64?
31 47 : 63 @
6Binary to te,t7 encoding% "rimarily used in &8T" / transfer protocol allows only 9/bit &455 characters to be used% Base64 will encode any bit stream as a se+uence of 9/bit &455 characters #ie% Binary data to plainte,t$% 8ultipurpose 5nternet 8ail E,tensions UT'/9 nti/spam e!asion Binary data embedded in )8(
The Encoding
lgorithm
Binary data is split into groups of :4 bits #; bytes$1 then split into 6/bit chunks and con!erted to the corresponding &455 characters%
Original bit stream 6-bit chunks "11"1"11"11"1"1""11"1"11 "11"1"'11"11"'1"1""1'1"1"11
Decimal
%6'(4'41'43
Base64
a%)r
The Encoding
lgorithm
"11"""'1""11"'11"""1'11"1"1
%4'3*'4+'(3
Base64
Y,-1
The Encoding
Take remaining bits "11""1"1 Take first 24 bits, split into 6-bits ill incomplete bits with !eros Decimal
lgorithm
"11""1'"1----'------'------
"11""1'"1""""'------'------
%('%6
Z.&&
=ther -otes
;;> increase in si2e &455?@1 Auoted/printable1 ?B5T858E "ri!acy/Enhanced Electronic 8ail was the first place where base64 was used Beaders usually describe if a message is encoded in base641 it is up to the client to translate