Controlled Assesment 1




Specification Reference


4512/1 – Practical Programming Scenario 4: Traditional Application Text Encryption

For candidates entering for the 2016 examination 

To be issued to candidates on or after Tuesday 25 March 2014

This scenario is one of four available. Each of the four scenarios is available in a separate candidate booklet. You must complete two of the four scenarios.


 • You have approximately 25 hours in which to complete this scenario.
 • Before starting work on the problem, read the whole of this Candidate Booklet thoroughly. You can ask your teacher to explain anything in this booklet, except Computer Science specific terms, that you do not understand.
 • There are restrictions on when and where you can work on this problem. Your teacher will explain them to you. For example, you should only do work that you intend to hand in for marking when a teacher is present, so that he or she can confirm that the work is your own. The Candidate Booklet must not be taken outside your school/college. 
• You may need to use the Internet to research certain parts of the problem. This does not have to be within the 25 hours recommended time. 
• You will need to complete and sign a Candidate Record Form which your teacher will provide.

Information You will also be marked on your use of English. It is important to: 

• make sure that all your work is legible 
• use correct spelling, punctuation and grammar 
• use a style of writing which suits the person you are writing for 
• organise your information clearly, so that you make yourself understood 
• use Computer Science terms where they are needed.



Scenario 4: Text Encryption 

Encryption is the conversion of text into a form, called ciphertext, that cannot be easily understood by unauthorised people. Decryption is the process of converting encrypted text back into its original form, so it can be understood. 

Encryption uses a key to hide the meaning of a message from people who are trying to read it. The encrypted message can only be understood if the key is used to change the encrypted message back to the original. 

You have been asked to write a program that uses a randomly-generated key to encrypt the contents of a text file. The program should also allow the user to decrypt the contents of an encrypted text file if they provide the correct key. 

The encryption method uses character substitution to encrypt the text. This is where one character is substituted for another based on an offset factor. For example if the offset factor is 3 that would mean that the character A would be substituted by the character D and so on. 

Plaintext is the unencrypted text and ciphertext is the encrypted version. 


Click here for the full CA booklet

Click here for full mark scheme







Task 1