Base 64 encoding, Computer Networking

Base 64 Encoding

The Simple Mail Transfer Protocol (SMTP) is a protocol used on the Internet for sending email. When you send an email, your mail client establishes an SMTP connection to your outgoing mail server, and sends the email to the server. Mail servers also use SMTP to transfer email amongst themselves. Being a relatively old protocol, SMTP supports only 7-bit ASCII characters, meaning that only a total of 27 = 128 characters can be represented in our email (0 to 127). If you take a look at www.asciitable.com, you can see that this is only sufficient for representing the characters in the English language. What if we want to send text in other languages that use different characters. What if we want to attach a picture to an email? The pixels in that picture could be represented by values outside the range of 0 - 127, so how can we send the picture using an email protocol that only accepts characters between the ASCII values of 0 and 127? The answer is that we have to encode non-ASCII data into 7-bit ASCII. We can then send the encoded data in our email and it will be safely transmitted and received, since all the binary data within it will be encoded in 7-bit ASCII characters. When our email reaches its destination, any encoded data within it must then be decoded by the recipient's mail client. One common method of encoding data that falls outside the range of 7-bit ASCII is base 64 encoding. Just as we can take binary data and represent it in decimal (10 digits), hexadecimal (16 digits), or octal (8 digits), we can also take it and represent it in base 64, which represents data using 64 different characters: A through Z , a through z , 0 through 9 , and + and / . Taking a look at an ASCII table, one can see that all of these characters can be represented in 7 bits, meaning we can safely send base 64 encoded data via email. As an example, suppose that you receive an email. You can see that the email has an image attachment, but how was that image sent when SMTP only supports 7-bit ASCII characters. Most email clients allow you to view the raw source of an email. Observe that the attachment is encoded within what is called a MIME1 message part. This part contains information for the mail client, such as the name of the file attachment ( filename=DSC00625.JPG ), the type of file attached ( Content-Type: IMAGE/JPG; ), and the type of encoding used to encode the con- tents of the file ( Content-Transfer-Encoding: BASE64 ). As you can see, base 64 was used to encode the content of the image. Next comes the actual encoded content of the file: /9j/4VKCRXhp... . This is the content of the image, encoded in base 64 representation. When your mail client receives a message with a MIME message part such as this, it knows what type of attachment it is ( Content-Type ), how to decode it ( Content-Transfer-Encoding ), and what to name the attachment ( filename ). Since all 64 characters in base 64 can be represented in 7-bit ASCII, it is safe to send a message containing base 64 encoded data via SMTP.

In this assignment, you'll be developing a SPARC assembly language program to encode data (e.g. strings and the contents of binary files) into base 64 representation.

Task:

Your task for this assignment is to write a SPARC assembly language program that reads data from standard input and outputs the base 64-encoded representation of the data. To accomplish this task, you will write a main program and two functions, as described in the following sections. Note: this assignment has been designed to be performed in the order given below. That is, write the get_b64_char function first, then the get_b64_str function, and then the main program.

Posted Date: 2/20/2013 12:03:25 AM | Location : United States







Related Discussions:- Base 64 encoding, Assignment Help, Ask Question on Base 64 encoding, Get Answer, Expert's Help, Base 64 encoding Discussions

Write discussion on Base 64 encoding
Your posts are moderated
Related Questions
To monitor IP igrp traffic, we can use "debug IP igrp transaction" or "debug IP igrp events". How do we show information about IPX routing update packets? Ans) Bu using debug ip

Q. What is Cross over cable? - Cross the critical pair to properly transmit, align and receive signals on devices with like connections. - Pin 1 connected to pin 3 as well a

State the reason for Intranet system breaks down Care must be taken to ensure that proper spare parts are available even after about five years of commissioning. In addition t

TCP (Transmission Control Protocol) and UDP are used by TCP/IP. SPX (Sequenced Packet Exchange) is used with IPX. NBP (Name Binding Protocol) is used with Appletalk.

Normal 0 false false false EN-US X-NONE X-NONE MicrosoftInternetExplorer4

What is source route and OSPF? Source route It is a series of IP addresses identifying the route a datagram must follow. A source route might optionally be included in an

Synchronous Synchronous traffic is able to consume a portion of the 100 Mbps total bandwidth of an FDDI network while asynchronous traffic can consume the rest. Synchronous

Q. Show the Application Layer Responsibilities? - Make possible user access to the network - User interfaces as well as support for services such as E-Mail File

State about the Single Sign-On Intranet This Intranet, if managed efficiently, allows maximum security by firewalling anyone from inappropriate sites automatically. For exam

Question 1 Explain the TCP/IP protocol suite. List (Network Interface Layer, Internet Layer, Transport Layer, Application Layer) Question 2 Write short note on