From 1cfdacde1eb184fbcb385a7d4131553b0d62b984 Mon Sep 17 00:00:00 2001 From: Bill Buchanan Date: Thu, 26 Jan 2023 20:21:41 +0000 Subject: [PATCH] Update README.md --- unit01_cipher_fundamentals/lab/README.md | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/unit01_cipher_fundamentals/lab/README.md b/unit01_cipher_fundamentals/lab/README.md index dac52f2..6d01760 100644 --- a/unit01_cipher_fundamentals/lab/README.md +++ b/unit01_cipher_fundamentals/lab/README.md @@ -227,16 +227,22 @@ Now prove the following: An outline of the Python 2.7 code is: ```python -message = raw_input('Enter message: ') -e = raw_input('Enter exponent: ') -p = raw_input('Enter prime ') +message = input('Enter message value: ') +e = input('Enter exponent: ') +p = input('Enter prime ') cipher = (int(message) ** int(e)) % int(p) -print (cipher) +print (f"Result is: {cipher}") ``` Note: In Python 3.x, we using input() instead of raw_input(). +# Setting up AWS +You should have an account for AWS. Access your AWS Lab, and + + + +# Additional Lab ## D Simple prime number test A prime number is a value which only has factors of 1 and itself. Prime numbers are used fairly extensively in cryptography, as computers struggle to factorize them when they are multiplied together. The simplest test for a prime number is to divide the value from all the integers from 2 to the value divided by 2. If any of the results leaves no remainder, the value is a prime, otherwise it is composite. We can obviously improve on this by getting rid of even numbers which are greater than 2, and also that the highest value to be tested is the square root of the value.