0% found this document useful (0 votes)
4 views3 pages

Programming Assignment: Encryption Task

Uploaded by

a.sowndhar3
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views3 pages

Programming Assignment: Encryption Task

Uploaded by

a.sowndhar3
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd

Programming Assignment

1. Purpose of the Programming Assignment:

The students are being asked to attempt the programming assignment as


this would give them the opportunity to demonstrate their overall
understanding of the software development, which does not come out
only with Multiple Choice Questions.

2. Evaluation Criteria:
1. Design Approach, including the ability to make right
assumptions and meaningful considerations.
2. Implementation which would include, but not limited to:
1. Functional Completeness
2. In Code Documentation
3. Optimization
3. Testing and Debugging approach
1. Unit Test Case considerations.
2. Approach towards Debugging
3. Documentation of results.

3. Problem Statement - Implementation of a private security


algorithm.

The objective of this assignment is to implement a encryption algorithm


for secure transfer of a file. The students are required to write a program
which would implement the following:

[Link] would 2 processes - an encryptor process and a decryptor


process,
[Link] encryptor process would be started with arguments Key and
Filename.
[Link] decryptor process would be started using the key as the
argument.
[Link] encryptor process would read the file and encrypt using the
following algorithm:
1. The letter at position of the key or a multiple of key is
interchanged with the next letter. Spaces and special characters
are to be ignored. If the letter is the last one in the file, then no
interchange is required.
2. All letters in the words which did not got changed as part of
step 1 above are subjected to replacement by mirroring letters, ie.
A replaced with Z, B with Y and so on.

5. The encryptor would print encrypted text to standard output, as well


as save the same to the current directory as enc<Filename> , where
Filename is the name of the original file that was encrypted.
6. The program would transfer the encrypted file to the decryptor
process using IPC mechanism.
7. The decryptor process waits to receive data from the encryptor
process and on receiving the same, dumps the encrypted data and
decrypted data.
8. It also writes the decrypted data as decFilename , where Filename
is the name of the original file that was encrypted.

Example of Encryption

Let us say that we supply a file called SecretOfTalaash, which contains


the text "The suspense of Talaash is that Kareena is a ghost who does all
the killings" and the key to be used is 4.

Here, the forth letter is “s”, which is replaced with next one, i.e. “u”, the
8th letter is “p”, which would be changed with next letter i.e. “e” and so
on. So after making this change the sentence would look like:

The suspense of Talaash is that Kareena is a ghost who does all the
killings

The usspnese fo Taalahs is taht Kraeean is g ahost whd ooea sll teh
kililngs.
Now while these changes were done, the words that did not get changed
are:

The, is, is

On Mirroring, the resultant text would be:

Gsv usspnese fo Taalahs rh taht Kraeean rh g ahost whd ooea sll teh
killings

4. Guidelines
 The problem statement would be made available to the students who would be appearing
for the selection process of Happiest Minds, 3 days in advance of the Happiest Minds
visit.
 The students are supposed to individually attempt the problem and have the solution
ready.
 This is an “Open Book” exam – i.e. students can refer books, net etc while doing the
assignment.
 Each student should have his / her distinct implementation available for review. The
college should have a system that would be available to panel members to review the
implementation and also do testing if needed.
 The selection process would include VIVA on the assignment for students shortlisted by
the written test that would be conducted on the day of the visit.

Common questions

Powered by AI

The encryption algorithm requires students to implement an encryptor and decryptor process. The encryptor process is initiated with a key and filename, and it reads the file to perform encryption using the following steps: (1) The letter at the position of the key or a multiple of the key is interchanged with the next letter, ignoring spaces and special characters. If the letter is the last one, no interchange is performed. (2) Letters in words not changed in step 1 are mirrored (A with Z, B with Y, etc.). The encrypted text is output to a standard and saved as encFilename. Transfer of the encrypted file to the decryptor process is done via IPC mechanism .

The decryptor process in the programming assignment receives data via Inter-Process Communication (IPC) from the encryptor process. Its purpose is to take this input of encrypted data, decrypt it to obtain the original content, and output both the received encrypted and decrypted data. Specifically, the decryptor uses the key to reverse the encryption procedure applied by the encryptor and outputs the decrypted data as decFilename .

The evaluation criteria ensure a comprehensive assessment by focusing on several critical aspects: (1) Design Approach - assessing the student's ability to make assumptions and meaningful considerations; (2) Implementation - includes functional completeness, in-code documentation, and optimization skills; (3) Testing and Debugging - evaluating the student's capability to create unit tests, approach debugging effectively, and document results comprehensively. This multi-faceted evaluation captures the depth and breadth of the student's software development and problem-solving abilities .

A mirrored letter encryption scheme simplifies cryptographic concepts by providing a straightforward example of substitution cipher—where each letter is replaced by its counterpart from the opposite end of the alphabet (A with Z, B with Y, etc.). This tangible and visual method allows students to understand how encryption obscures text, making it accessible to beginners who can easily grasp the basic principle of altering data to secure it against unauthorized access .

Students might face challenges related to understanding the encryption logic, implementing robust inter-process communication, and ensuring the functionality of their algorithm. To address these, they can utilize the open book nature of the assignment to reference books and online resources. The guidelines suggest that students prepare individually and have distinct implementations, providing ample room to solve problems and learn from any mistakes by cross-referencing and consulting external materials .

In-code documentation is a crucial part of the evaluation as it provides transparency and understanding of the code's functionality. It is important because it allows other developers (or evaluators) to follow the logic and reasoning behind the code easily. Good documentation articulates the purpose of code sections, explains complex logic, and illustrates how components interconnect, enhancing both collaborative efforts and long-term maintainability of the software .

The open book nature of the assignment is advantageous because it allows students to leverage external resources to bolster their understanding and explore examples or theories that reinforce their knowledge. However, it can also be challenging as it requires the ability to critically assess and synthesize information from various sources quickly and efficiently. Students must balance thorough research without becoming overwhelmed or relying too heavily on external aids, maintaining original thought and individual implementation .

Students should employ strategic approaches towards debugging as outlined in the evaluation criteria. This involves developing unit tests to isolate and test specific portions of code for defects, systematically examining and fixing issues revealed during program testing, and thoroughly documenting any issues encountered and their solutions. This comprehensive approach helps ensure that bugs do not propagate unnoticed and that the integrity of the encryption and decryption processes is maintained .

The primary objectives of the programming assignment are to provide students with an opportunity to demonstrate their understanding of software development skills that extend beyond Multiple Choice Questions. It specifically focuses on their ability to design an encryption algorithm for secure file transfer, evaluate programming skills through implementation, and testing and debugging of their solution. This holistic approach ensures that students are evaluated on their design approach, functional completeness, in-code documentation, and optimization, as well as how they test and debug their code .

Requiring individual implementation for the programming assignment significantly impacts learning outcomes by encouraging independent problem-solving and critical thinking. This requirement ensures that each student actively engages with the material and internalizes key concepts, fostering deeper understanding and ownership of their work. It also promotes fairness, as it prevents plagiarism and ensures that students are genuinely assessed on their own capabilities and grasp of software development principles .

You might also like