# data[].attributes.body
* Cybersecurity help to protect user's personal info
* 6
* Idk
* There are many different ciphers

# data[].attributes.body
I learnt that the most powerful cryptography key is one with a random key. Ive also learnt the generation of cryptography and who used it before and learnt there are specific ways to bruteforce them and thus we do not use these anymore
6
Exploitation? and more cryptography
The bruteforce methods and ways to transform to all the bases

# data[].attributes.body
Cybersecurity prevents us from being hacked and it is useful when you need to understand in what ways are you being hacked
4/10
Cloud/Mobile
Cryptography is quite simple to decript

# data[].attributes.body
* Cybersecurity is changing as technology develops but there will always be a way to crack the code.
* 7
* Web, specifically cross-site scripting(XSS)
* I learnt many different kinds of cyphers but the coolest one is the XOR cypher because it uses the same key to encrypt and decrypt.

# data[].attributes.body
- I understand that its very tough, and quite complicated to do, but quite interesting.

- 2

- To be honest neither of them

- I learnt that it uses a lot of different codes and it's quite complicated, but also very important in our daily life.

# data[].attributes.body
* not much
*9
*cryptography
*a lot of cryptography stuff

# data[].attributes.body
*cybersecurity is contains cryptography
*7
*nil
*encryptions arnt that secure

# data[].attributes.body
- I understand that cybersecurity is very important these days as it protects us virtually and also prevents our information from being leaked.
- I do not have an interest in CTFs so my answer will be 1.
- I am more intreseted in Forensics
I learnt how to be a safe user online and also the importance of cybersecurity

# data[].attributes.body
* What do I understand about cybersecurity after this course?

* On a scale of 1-10, how interested am I to train for and join a CTF competition in the future?

* Besides cryptography, which cybersecurity domain am I most interested in? Binary Exploitation, Cloud, Cryptography, Forensics, IoT, Mobile, Open Source Intelligence (OSINT), Reverse Engineering (RE), Social Engineering (SE), Web

* What are the most profound things I've learnt in this course?

# data[].attributes.body
data = bytes.fromhex("1b37373331363f78151b7f2b783431333d78397828372d363c78373e783a393b3736")

printable_chars_array = [32] + list(range(48, 58)) + list(range(65, 91)) + list(range(97, 123))

def is_printable_string(data):

total = 0

printable = 0

for b in data:

total = total + 1

if b in printable_chars_array:

printable = printable + 1

return printable / total

for i in range(256):

i = i.to_bytes(1, "big")

output = fixed_xor(data, i * len(data))

if is_printable_string(output) > 0.95:

print(i)

print(output)

# data[].attributes.body
data1 = bytes.fromhex("1c0111001f010100061a024b53535009181c")

data2 = bytes.fromhex("686974207468652062756c6c277320657965")

def fixed_xor(data1, data2):

output = bytes([a ^ b for a, b in zip(data1, data2)])

return output

print(fixed_xor(data1, data2).hex())

# data[].attributes.body
data = bytes.fromhex("49276d206b696c6c696e6720796f757220627261696e206c696b65206120706f69736f6e6f7573206d757368726f6f6d")

print(data)

import base64

base64_data = base64.b64encode(data)

print(base64_data)

# data[].attributes.body
import string

def base10ToBase64(base10):
keys = string.ascii_uppercase + string.ascii_lowercase + string.digits + "+/"
base64 = ""
while base10 > 0:
base64 = keys[base10 % 64] + base64
base10 = base10 // 64

print(base64)

base10ToBase64(63)

# data[].attributes.body
base10 = input("")

base64 = ""

base64product = "ABCDEFGHIJKLMNOPQRSTUVWZYZabcdefghijklmnopqrstuvwxyz0123456789+/"

base10 = ord(base10)

while base10 > 0:

base64 += base64product[base10%64]

base10 //= 64

base64[::1]

print(base64)

# data[].attributes.body
def bruh69(binnums):
base69 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/" binnums = list(map(lambda y: base69
[y], map(lambda x: int(x, 2), binnums))) return "".join(binnums) print(bruh69(["111111"]))

# data[].attributes.body
#behold 0% readable
def bruh64(binnums): return "".join(list(map(lambda y: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[y], map(lambda x: int(x, 2), binnums)))) print(bruh64(["111111"]))

# data[].attributes.body
base10 = input("")

base64 = ""

base64out = "ABCDEFGHIJKLMNOPQRSTUVWZYZabcdefghijklmnopqrstuvwxyz0123456789+/"

base10 = int(base10)

while base10 > 0:

base64 += base64out[base10%64]

base10 //= 64

base64[::-1]

https://colab.research.google.com/drive/1PP1A98lm3mxRfEXuCiDuEAPv6fsaGe0o?usp=sharing

# data[].attributes.body
def toBase64(dec):
bases = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"
base64 = ""
while dec > 0:
base64 += bases[dec%64]
dec //= 64
base64 = base64[::-1]
while len(base64)%4:
base64 += "="
return base64

# data[].attributes.body
the cypher coding methods are different and similar atr the same time

# data[].attributes.body
I guess binary and stuff like this is kinda cool like the numbers and stuff but its not likely to be useful in the near future

# data[].attributes.body
I got to learn about the feistel cipher.

# data[].attributes.body
I learned about a new cipher

# data[].attributes.body
i learnt more ways of encryption

# data[].attributes.body
Logic gates can be used for encrpytion

# data[].attributes.body
I learnt there are so many number involved like huh, 0s and 1s o.o

# data[].attributes.body
all wil eventually become obselelte

# data[].attributes.body
I learned that logic gates can be used to encrypt data

# data[].attributes.body
I didnt know there was 2^56 possible solution for these cryptography
Also i didnt kn0w what was base 16 but now i know

# data[].attributes.body
I learnt what DES and Feistal are. At the same time, I also learnt how to convert to different bases easily

# data[].attributes.body
# Base 10 to Hexadecimal

base10 = 3735928559

base16 = ""

digits = "0123456789ABCDEF"

while base10 > 0:

digit = base10 % 16

base16 = digits[digit] + base16

base10 = base10 // 16

print(base16)

# data[].attributes.body
# Base 10 to Hexadecimal

base10 = 3735928559

base16 = ""

while base10 > 0:

digit = base10 % 16

if digit < 10:

base16 = str(digit) + base16

elif digit == 10:

base16 = "A" + base16

elif digit == 11:

base16 = "B" + base16

elif digit == 12:

base16 = "C" + base16

elif digit == 13:

base16 = "D" + base16

elif digit == 14:

base16 = "E" + base16

elif digit == 15:

base16 = "F" + base16

base10 = base10 // 16

print(base16)

# data[].attributes.body
base10 = 5674

base16 = " "

while base10 > 0:

baseint = base10%16

if baseint == 10:

base16 = "A" + base16

elif baseint == 11:

base16 = "B" + base16

elif baseint == 12:

base16 = "C" + base16

elif baseint == 13:

base16 = "D" + base16

elif baseint == 14:

base16 = "E" + base16

elif baseint == 15:

base16 = "F" + base16

else:

base16 = str(baseint) + base16

base10 = base10//16

print(base16)

https://colab.research.google.com/drive/1KSuUi3I3tylHqVJP_LI4WLdYSJQlEnT-?usp=sharing

# data[].attributes.body
def banana(base10):
brah = ""
nums = "0123456789ABCDEF" base10 = int(base10)
while base10 > 0:
brah += nums[base10%16]
base10 //= 16 return bruh[::-1] print(banana("15"))

# data[].attributes.body
https://colab.research.google.com/drive/1rVidhdZqOnZwgHxAew5gBc_m2W3O_YPS?usp=sharing

# data[].attributes.body
def dec2bin(dec):
binary = ""
while dec > 0:
binary += str(dec%2)
dec = dec//2
binary = binary[::-1]
return binary

# data[].attributes.body
def dec2hex(dec):
hexadecimal = ""
while dec > 0:
letter = dec%16
if letter == 10:
letter = "A"
elif letter == 11:
letter = "B"
elif letter == 12:
letter = "C"
elif letter == 13:
letter = "D"
elif letter == 14:
letter = "E"
elif letter == 15:
letter = "F"
hexadecimal += str(letter)
dec = dec//16
hexadecimal = hexadecimal[::-1]
return hexadecimal

# data[].attributes.body
x = 123
y = ""
while x > 0:
y = str(x % 2) + y
x = x // 2
print(y)

# data[].attributes.body
https://colab.research.google.com/drive/1A7u9qQXMWVDW7YJ_PMN0sgq5pmvsdLm2?usp=sharing

# data[].attributes.body
https://colab.research.google.com/drive/1YkJ9UOHv4DvNmt5BnQDWCjuRqsrXWBq5?usp=sharing

# data[].attributes.body
https://colab.research.google.com/drive/1DnOyxDnuFEi6-P_H0VPD8j4QNAuuCZJ4?usp=sharing

# data[].attributes.body
base10 = 140

base2 = ""

while base10 > 0:

base2 = str(base10 % 2) + base2

base10 = base10 // 2

print(base2)

https://colab.research.google.com/drive/18ZfVKS2_mKgjXgsD6hVE5CGV03UMr5EO?usp=sharing

# data[].attributes.body
https://www.khanacademy.org/math/algebra-home/alg-intro-to-algebra/algebra-alternate-number-bases/v/number-systems-introduction

# data[].attributes.body
def dec2bin(dec):
binary = ""
while dec > 0:
binary += str(dec%2)
dec = dec//2

# data[].attributes.body
def dec2bin(dec):
binary = ""
while dec > 0:
binary += str(dec%2)
dec = dec//2
binary = binary[::-1]
return binary

# data[].attributes.body
base10 = 123

base2 = ""

base2 = str(base10 % 2) + base2

base10 = base10 // 2

print(base2)

# data[].attributes.body
Its very cool

# data[].attributes.body
Different encryption techniques are fun

# data[].attributes.body
it is interesting and we learned alot

# data[].attributes.body
There are many different ways of this code and quite interesting but also very hard and complicated.

# data[].attributes.body
The encryption techniques are very interesting.

# data[].attributes.body
The fact that it has so many ways to work

# data[].attributes.body
It's unusually complicated.

# data[].attributes.body
The best best best code is a random code that we cant break.
Also the cool part is that all the ciphers we went through so far have been hard to code but not the best.

# data[].attributes.body
The fact that there are many ways of hiding a message but there are also many was to decypher it.

# data[].attributes.body
ciphers are alot less secure nowadays

# data[].attributes.body
It is interesting to see how the different types of cryptography evolved as weaknesses were found as well as how these methods were broken

# data[].attributes.body
Here's the code up to the part where we split the plaintext into substrings of length of key:

plaintext = "MEETMEATDAWNTONIGHT"

key = [1, 7, 6, 2, 5, 4, 3]

len_of_key = len(key)

strings = []

starting_val=0

while len(plaintext) % len_of_key != 0:

plaintext = plaintext + "Z"

for x in range(0, len(plaintext), len(key)):

string = plaintext[x : x+len_of_key]

strings.append(string)

print(strings)

# data[].attributes.body
for i in range(0,len(plaintext),len(key)):
row = plaintext[i:i+len(key)]
table.append(row)

# data[].attributes.body
def permutecipher(key, text):

key = str(key)

table = []

columblen = len(text)//len(key)

text = list(text)

for i in range(len(key)):

row = []

for x in range(columblen):

row.append(text.pop(0))

table.append(row)

newtable = []

for i in range(len(table)):

newtable.append(table[int(key[i])-1])

finaltable = ""

for x in range(len(table[1])):

for y in newtable:

finaltable += y[x]

return finaltable

print(permutecipher(4312567, "EHETTENAETKSMTCEMCRLEHILAICZ"))

# data[].attributes.body
https://colab.research.google.com/drive/1FaYo-ZrVHetLHqhdRPtoBxgr2Nyxmqoo?usp=sharing

# data[].attributes.body
for i in range(0,len(plaintext),len(key)):
row = plaintext[i:i+len(key)]
table.append(row)

# data[].attributes.body
plaintext = input("Please input text")
key = "1234567"

for i in range(0,len(plaintext),len(key)):
row = plaintext[i:i+len(key)]
table.append(row)

(after that im lost

# data[].attributes.body
https://colab.research.google.com/drive/1jQn3B5HyAAZWw48kodRLGHkpI26VIi8n?usp=sharing

# data[].attributes.headline
Terrence (Can get answer but kinda not that good...)

# data[].attributes.subject
Terrence (Can get answer but kinda not that good...)

# data[].attributes.body
https://colab.research.google.com/drive/1mEb-1NEGtc4nKVQRaMUEJ0ONd1IdqgrN?usp=sharing

# data[].attributes.headline
Dominic (Still working out some problems)

# data[].attributes.subject
Dominic (Still working out some problems)

# data[].attributes.body
https://colab.research.google.com/drive/1Or371naHeAq3LY_GJVgTGU-o3eXA8dBN?usp=sharing

# data[].attributes.body
https://colab.research.google.com/drive/1SUDx16lrLLifsjHoxJ1kxCXYL6QI-CHX?usp=sharing

# data[].attributes.body
https://colab.research.google.com/drive/1EZTNj8D3IQr1P1ATGUMTZvWeg7eLlWXE?usp=sharing

# data[].attributes.body
https://colab.research.google.com/drive/1Z8KmhHCxl1KkKAn0D0Q6JH3UmPqLEvtz?usp=sharing

# data[].attributes.body
key = "PLAYFAIREXAMPLE"

square = ["PLAYF", "AIRCI", "PHERH", "KNOQS", "TUVWZ"]

plaintext = "TEST"

bigrams = []

bigram = ""

for i in range(len(plaintext)):

length = len(bigram)

if length == 0:

bigram = plaintext[i]

elif length == 1:

if bigram == plaintext[i]:

pass # FIX THIS

else:

bigram = bigram + plaintext[i]

bigrams.append(bigram)

# data[].attributes.body
key = "PLAYFAIREXAMPLE"

square = ["PLAYF", "IREMX", "BCDGH", "KNOQS", "TUVWZ"]

plaintext = "Helloworld"

# data[].attributes.body
I also I don't know how to do

# data[].attributes.body
Frequency Analysis?

# data[].attributes.body
key = "PLAYFAIREXAMPLE"

square = ["PLAYF", "IREXM", "BCDGH", "KNOQS", "TUVWZ"]

plaintext = "HELLOWORLD"

bigrams = []

bigram = ""

for i in range(len(plaintext)):

length = len(bigram)

if length == 0:

bigram = plaintext[i]

elif length == 1:

if bigram == plaintext[i]:
????

else:

bigram = bigram + plaintext[i]

bigrams.append(bigram)

bigram = ""

bigrams = ["HE", "LX", "LO", "WO", "RL", "DX"]

# Apply the rules

ciphertext = ""

x0 = -1

y0 = -1

x1 = -1

y1 = -1

for bigram in bigrams:

print("Processing bigram: ", bigram)

zero = bigram[0]

first = bigram[1]

print(zero)

print(first)

#row1i =

for row_index in range(len(square)):

for col_index in range(len(row)):

c = square[row_index][col_index]

if c == zero:

print("We found the first character at", row_index, col_index)

row1i = row_index

col1i = row_index

elif c == first:

print("We found the second character at", row_index, col_index)

row2i = row_index

col2i = row_index

#if row1i == row2i:

pass

#elif col2i == col2i:

print("ipad
")

# data[].attributes.body
Stuck
https://colab.research.google.com/drive/1pBiiFpcFQzP117Cy9buGDD8budDjE85v?usp=sharing

# data[].attributes.body
very stuck

# data[].attributes.body
key = "PLAYFAIREXAMPLE"

square = ["PLAYF", "IREXM", "BCDGH", "KNOQS", "TUVWZ"]

plaintext = "HELLOWORLD"

after that i am stuck

# data[].attributes.body
https://colab.research.google.com/drive/1NiaIPDlYrpTKL7S1j-oiGvynZmvFfTNT?usp=sharing

# data[].attributes.body
https://colab.research.google.com/drive/1o8Q1tK6LmT_54CmUe3m3NyYQKpqqlMJD?usp=sharing

# data[].attributes.body
https://colab.research.google.com/drive/18IJCf8FGijaPnfK-n56-zxiKg00sR3qB?usp=sharing

# data[].attributes.body
https://colab.research.google.com/drive/1gqVL4Ke7IAxzfpS7uYR3MHYND4kUI8z_?usp=sharing

# data[].attributes.body
Vigenere Cipher
https://trinket.io/python/82d92f252c

# data[].attributes.body
If using Trinket, Save and then you can Share your code. Copy the link and paste it in Padlet.

If using Google Colab, make sure you change the Share settings so Anyone with the Link can View your notebook.

Or as a last resort, use Github Gist

# data[].attributes.body
Darius

# data[].attributes.body
https://colab.research.google.com/drive/1XyQqNQ_RfKY3U-ZduWaihEQRrAXnLFHm

# data[].attributes.body
https://colab.research.google.com/drive/1vmxhPfWr9ysR4pnJD7eJEi25kXXJsUvc?authuser=1#scrollTo=iKGb1QtGFITk&line=21&uniqifier=1

# data[].attributes.body
https://colab.research.google.com/drive/1SUoj5-RkQdfqvi7rlMg7tXrAnSLRg-Wt?usp=sharing

# data[].attributes.body
key = int(input("Type in the key"))
key = key.upper()
text = input("Type in the text")
for x in key:
key

(after that i got stuck :c)

# data[].attributes.body
new link woohooo
https://colab.research.google.com/drive/1B1A51DK097qKawLdmC1xqxlMOajkx6Fk?usp=sharing

# data[].attributes.body
It did not work

# data[].attributes.body
Make sure your Colab notebook is accessible to anyone with the link (Adjust your Share settings)
https://colab.research.google.com/drive/1vmxhPfWr9ysR4pnJD7eJEi25kXXJsUvc?usp=sharing

# data[].attributes.body
Frequency Analysis

# data[].attributes.body
It is prone to frequency analysis and due to how frequent a letter is used in a language but in a playfair cipher, letters are repeated and it is harder even if we know the frequency of a language of letters.

# data[].attributes.body
Frequency analysis

# data[].attributes.body
people will be confused on the key