CSI-5-ADP Advanced Programming – Coursework Assignment Advanced Programming Coursework Assignment Introduction You are provided with a working application that performs brute-force attacks against...

CSI-5-ADP Advanced Programming – Coursework Assignment Advanced Programming Coursework Assignment Introduction You are provided with a working application that performs brute-force attacks against encrypted files. The files are encrypted using a simple encryption that simply XORs the file data with a key value. The keys can be 1, 2, 3 or 4 bytes in length. If the key is 1 byte long there are only 256 possible permutations to try, if it is 2 bytes there are 65536, if it is 3 there are 16777216 and if it is 4 there are 4294967296. The program simply tries every possible key and prints out decryptions of the file data that “look like” they might be English language text. This is a trivial level of encryption and the program is able to try every key in a short period of time. The 4 byte key will take about an hour to complete. Provided files:  adpassignmentjar.jar – this is a Java archive that should be added to your project as a library (seek advice from your tutor if unable to do this). It contains classes that you will not need to modify, but you will need to extend classes and implement interfaces from within it. For your assistance, the source code of all files is contained in the jar for you to inspect.  encrypted1... encrypted5 – five encrypted files to be attacked by the application.  src/adp/crypt/Demo.java – a command line based attacker program to compile and run  src/adp/crypt/ui/AttackUI.java – a UI based attacker program to compile and run  docs – a set of HTML JavaDoc files for all provided classes Compile and run Demo and experiment with attacking files encrypted with 1, 2, 3 and 4 byte keys by editing the filename variable in the main method. Now run the provided AttackUI application, and again load and attack files encrypted with 1, 2, 3 and 4 byte keys. Report Deliverable 1: Comparative Analysis Give a written comparative analysis of the characteristics and behaviour of Demo and AttackUI, identifying the functional differences between them. In doing so, pay particular attention to the following:  The display of progress the program has achieved over time  The ability of the user to cancel the operation  The threads of execution involved in each program and how they determine the behaviour You should explain the characteristics of the programs in terms of the threads of execution being used, by explicit reference to the source code. Report Deliverable 2: AttackUIEnhancement and commentary Develop an application that looks like AttackUI but differs in the following ways: 1. It is called AttackUIEnhancement 2. It runs the attack on a dedicated worker thread so that the UI is not frozen 3. It displays output from the program in the text area as it is produced 4. The user can cancel the operation and quit the program by closing the window 5. The user can cancel the operation without quitting the program by means of an additional cancel button CSI-5-ADP Advanced Programming – Coursework Assignment 6. The UI has an additional progress bar that is updated once every second by a dedicated thread that monitors the progress of the Attacker object. Note that for full functionality and thread-correctness, you will need to implement a new subclass of AbstractAttacker. You should ensure that all code is written to be properly thread-safe, and document exactly what this means. Remember that non-thread-safe code does not necessarily exhibit any incorrect behaviour – just because it works doesn’t mean it is right! You may use as much or as little code from the existing AttackUI as you choose, but other than this your code must be your own. You are strongly advised not to share your code with other students as the full source code must be included in your report and will be checked via TurnItIn. You must present the full source code as text in the body of the report. It must be formatted in a fixed-width font and single line spacing, and should be presented with line numbers that can be referred to in the narrative of the report. A single screenshot of the UI is permitted if you feel it is necessary. Failure to follow these guidelines will result in marks being lost. You must accompany the source code with a full explanation of what you have done, the rationale for your design choices and paying particular attention to all issues of thread-safety and thread interactions. Where you are unsure about thread-safety, a logical discussion of your partial understanding is worth far more than ignoring it or bland assertions of its correctness. Report Deliverable 3: Parallelised Attacker and commentary Make a version of Attacker that subdivides the key search and runs it simultaneously on multiple threads using Java’s fork/join framework. To do this, you should consider first making a class that extends RecursiveAction and that  is given a Cryptor object, the encrypted data and a range of keys to attempt as parameters of its constructor  has a compute method that decides whether to create an Attacker object and use it to perform an attack on the range of keys, or to instead create two new instances of itself and give each half the range of keys it has been given You will also need to decide how best to assign AttackListener objects to the Attacker objects contained inside this RecursiveAction object, so that meaningful information can be fed back to the UI. (A listener that discards information messages but forwards found key information to a master listener that is the UI would be a reasonable solution for this). The RecursiveAction would be contained within an implementation of the Attacker interface so that it could be used within the existing AttackUIEnhancement class just by changing what kind of Attacker is instantiated and used by it. Ideally all methods of the Attacker interface would be implemented so that the parallelised job could be both cancelled and monitored by the progress bar (something that will require careful design to support it inside the RecursiveAction subclass). You must present the full source code as text in the body of the report. It must be formatted in a fixed-width font and single line spacing, and should be presented with line numbers that can be referred to in the narrative of the report. A single screenshot of the UI is permitted if you feel it is necessary. Failure to follow these guidelines will result in marks being lost. CSI-5-ADP Advanced Programming – Coursework Assignment You must accompany the source code with a full explanation of what you have done, the rationale for your design choices and paying particular attention to all issues of thread-safety and thread interactions. Where you are unsure about thread-safety, a logical discussion of your partial understanding is worth far more than ignoring it or bland assertions of its correctness. Deliverables 1. Written report as specified above. 2. Zip file containing AttackUIEnhancement source code with runnable demo. 3. Zip file containing Parallelised Attacker source code with runnable demo. The two sets of source code may be contained in a single zip file if you prefer. The submission deadline is as specified on the VLE. Marking Criteria This assignment will be marked using an adaptation of the University’s new standardised marking criteria. It is important that you pay attention to the criteria that will be applied and address them in the text of your report. Note that marks are awarded for the following main criteria: 1. Subject Knowledge (35%) Understanding and application of subject knowledge. Contribution to subject debate. Mainly assessed by your written explanation of your code. 2. Critical Analysis (15%) Assessed by the rationale you give for your design approaches and their contrast to alternative approaches. 3. Testing and Problem-Solving Skills (30%) Design, implementation, testing and analysis of product/process/system/idea/solution(s) to practical or theoretical questions or problems. Assessed on the basis of the software you develop. 4. Practical Competence (10%) Skills to apply theory to practice or to test theory. Assessed on documented evidence of your use of technical documentation (for example Oracle’s tutorials, Java documentation and course materials) in working out how to accomplish the assignment. 5. Personal and Professional Development Management of learning through self-direction, planning and reflection Assessed on the basis of the quality of your submitted report. CSI-5-ADP Advanced Programming – Coursework Assignment RUBRIC Please note the criteria weightings and general interpretation shown in bold capitals under each criteria. Criteria Outstanding 100-80% Excellent 79-70% Very good 69-60% Good 59-50% Satisfactory 49-40% Inadequate 39-30% Very poor 29-0% Subject Knowledge Understanding and application of subject knowledge. Contribution to subject debate. CODE EXPLANATION 35% Shows sustained breadth, accuracy and detail in understanding key aspects of subject. Contributes to subject debate. Awareness of ambiguities and limitations of knowledge. Shows breadth, accuracy and detail in understanding key aspects of subject. Contributes to subject debate. Some awareness of ambiguities and limitations of knowledge. Accurate and extensive understanding of key aspects of subject. Evidence of coherent knowledge. Accurate understanding of key aspects of subject. Evidence of coherent knowledge. Understanding of key aspects of subject. Some evidence of coherent knowledge. Some evidence of superficial understanding of subject. Inaccuracies. Little or no evidence of understanding of subject. Inaccuracies. Critical Analysis Analysis and interpretation of sources, literature and/or results. Structuring of issues/debates. RATIONALE FOR DESIGN APPROACHES 15% Outstanding demonstration of critical analysis of the possible design strategies that could be used to meet the software requirements, and evaluation of the approaches chosen. Excellent demonstration of critical analysis of the possible design strategies that could be used to meet the software requirements, and evaluation of the approaches chosen. Very good demonstration of critical analysis of the possible design strategies that could be used to meet the software requirements, and evaluation of the approaches chosen. Good demonstration of critical analysis of the possible design strategies that could be used to meet the software requirements, and evaluation of the approaches chosen. Demonstration of critical analysis of the key possible design strategies that could be used to meet the software requirements, and evaluation of the approaches chosen. Trivial demonstration of critical analysis of the possible design strategies that could be used to meet the software requirements, and evaluation of the approaches chosen. Little or no critical analysis has been demonstrated. Testing and ProblemSolving Skills Design, implementation, testing and analysis of product/process/syste m/idea/solution(s) to practical or theoretical questions or problems IMPLEMENTATION 30% Outstanding implementation of all required software, with near perfectly organised, formatted and documented source code, and documented demonstration of runtime behaviour. Excellent implementation of all required software, with well organised, formatted and documented source code provided Competent implementation of all required software, with well organised, formatted and documented source code, and documented demonstration of runtime behaviour. Implementation of all required software, with well organised, formatted and documented source code, and documented demonstration of runtime behaviour, with some missing/incorrect functionality or poor quality. Implementation of most of the required software, with well organised, formatted and documented source code, and documented demonstration of runtime behaviour, with some missing/incorrect functionality or poor quality. Implementation of only part of the required software, with well organised, formatted and documented source code, and documented demonstration of runtime behaviour, with some missing/incorrect functionality or poor quality. Little or no functionality has been implemented. Practical Competence Skills to apply theory to practice or to test theory USE OF REFERENCE MATERIAL 10% Outstanding descriptions of factual information, programming techniques or theoretical explanations being found in technical or theoretical reference material. Excellent explicit descriptions of all factual information, programming techniques or theoretical explanations that were found in technical or theoretical reference material. Good explicit descriptions of all factual information, programming techniques or theoretical explanations that were found in technical or theoretical reference material. Reasonable descriptions of most factual information, programming techniques or theoretical explanations that were found in technical or theoretical reference material. Basic examples of the main factual information, programming techniques or theoretical explanations that were found in technical or theoretical reference material. Some trivial examples of factual information, programming techniques or theoretical explanations being found in technical or theoretical reference material. Little or no evidence of factual information, programming techniques or theoretical explanations being found in technical or theoretical reference material. Personal and Professional Development Management of learning through self-direction, planning and reflection REPORT QUALITY 10% Outstanding report organisation, structure, presentation, narrative voice and language. Excellent report organisation, structure, presentation, narrative voice and language. Very good report organisation, structure, presentation, narrative voice and language. Good report organisation, structure, presentation, narrative voice and language. Satisfactory report organisation, structure, presentation, narrative voice and language. Poor report organisation, structure, presentation, narrative voice and language. Report does not constitute a serious attempt at the assignment.
Mar 18, 2021
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here