Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Computer Network & Security Expert

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.

Computer Network & Security, Computer Science

  • Category:- Computer Network & Security
  • Reference No.:- M9523045

Have any Question?


Related Questions in Computer Network & Security

Topic is impacts of data breaches the report will divide in

Topic is "Impacts of data breaches". the report will divide in to 5 section which is : "" 1-Abstract: comprehensive overview of the report in 150 to 200 words. 2- Introduction: Describe the topic and its issue in 250 to ...

The abstract should not be more than 250 words describe

The abstract should not be more than 250 words. Describe your project, focusing on research questions and research method for next stage of the project. 1. Introduction [The introduction should describe what the project ...

How would you explain the concept of a quality adjusted

How would you explain the concept of a quality adjusted life year? When is it appropriate to use "QALYs" instead of simply improved life expectancy as the outcome measure in an economic evaluation?

A develop a caesar cipher-type encryption algorithm with a

a. Develop a Caesar cipher-type encryption algorithm with a little more complexity in it. For example, the algorithm could alternatively shift the cleartext letters positive and negative by the amount of the key value. V ...

Network project management assignment -purpose of the

Network Project Management Assignment - Purpose of the assessment - The purpose of this assignment is to build a clear understanding of project management fundamentals and their application, specifically: demonstrate pro ...

Task1 in each of the following scenarios there is a

Task 1. In each of the following scenarios there is a relationship to work life in the IT industry. With each of the following question, ensure that your answer includes the explanation of how it would be applied to work ...

Question a small company is assigned the class c network

Question : A small company is assigned the class C network 205.67.35.0. You need to divide this network to provide subnets for three departments using fixed-length subnetting. The departments are approximately the same s ...

True or false1 tcp ensures error free transmission2 the

TRUE or FALSE 1. TCP ensures error free transmission. 2. The process that initiates the communication is the server. 3. A host can serve as both server and client in a P2P network. 4. Audio and video applications cannot ...

A run in a setting is a substring of length at least two as

A run in a setting is a substring of length at least two, as long as possible, and consisting entirely of the same symbol. For instance, the string abbbaab contains a run of b's of length three and a run of a's of length ...

Wireless networks and security assignment - design and

Wireless Networks and Security Assignment - Design and implementation of secure enterprise wireless network Purpose of the assessment - The purpose of this assignment is to design and implement a secure enterprise wirele ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As