Draw a flowchart that shows the basic steps of encrypting a message using a simple substitution cipher. Start with the original message, then show how each letter is replaced by another letter, and end with the encrypted message.
0
0
Encryption basics in Intro to Computing - Draw & Build Visually
Draw This - beginner
10 minutes
Hint 1
Hint 2
Hint 3
Hint 4
Hint 5
Hint 6
Grading Criteria
Start and End symbols present
Process box for reading the original message
Loop structure to process each letter
Process box for replacing letters
Output box for encrypted message
Flow direction is clear and logical
All letters of the message are processed
Solution
_______ ___________ ____________ ____________ _______
/ Start \ | Read Msg | | For each | | Replace | | Output |
\_______/ |__________| | letter in | | letter | | Encrypted|
| | | message | | with | | message |
v | |__________| | substitute| |_________|
___________ | | | |
| Initialize |<------------- |<-------------- |
| encrypted | | |
| message = | | |
| empty | | |
|____________| | |
| | |
v v v
___________ Yes? letter left? ---------> Replace letter ---------> Add to encrypted
| Loop start|------------------------------->| message string |
|__________| |_____________________________|
| No
v
_______
/ End \
\_______/
This flowchart starts with the Start symbol. Then it reads the original message. It initializes an empty string to hold the encrypted message. Next, it loops through each letter of the original message. For each letter, it replaces it with a substitute letter according to the cipher rules. The substituted letter is added to the encrypted message string. This loop continues until all letters are processed. Finally, the encrypted message is output, and the flowchart ends.
This shows the basic idea of encryption: transforming readable text into coded text by replacing letters.
Variations - 2 Challenges
[intermediate] Draw a flowchart for decrypting a message encrypted with a simple substitution cipher. Start with the encrypted message and end with the original message.
[advanced] Draw a flowchart for encrypting a message using a Caesar cipher with a shift of 3. Show how each letter is shifted by 3 positions in the alphabet.