subject
Engineering, 28.02.2020 19:26 heyrosaphoto3159

This new cipher is a Caesar Cipher with a twist. This cryptosystem will operate on bytes (8-bits): for an alphabet of 256 values (0–255). Text will be represented as ASCII (A is represented by hex 0x41, etc.). Instead of shift, Exclusive OR (XOR) is used. Because of this, encryption and decryption are the same operation. Your agents have found that the following Python 3 encryption algorithm (C and Java given later): import base64 00 von AWNA def encode(text): return base64.b64encode(text) def decode(text): return base64.b64decode(text) def encrypt(cleartext, key): to return = bytearray(len(cleartext)) for i in range( len(cleartext)): to_return[i] = cleartext[i] * key return bytes (to_return) Analysis of the encryption function shows that it can output non-printable characters (confirm this for yourself), therefore all output is encoded using Base64 Encoding using the encode and decode functions. For example, the string "test" encrypted with the key 0x80 (128 decimal) is: 1 2 print(encode(encrypt(b"test", 0x80))) b'90Xz9A==" We can verify that encrypting 90X29A== with the key 0x80 results is "test": i 2 print(encrypt(decode("90Xz9A=="), 0x80)); b'test' Your spies have also converted this code to a Java class and C code.

ansver
Answers: 1

Another question on Engineering

question
Engineering, 03.07.2019 14:10
Amass of 1.5 kg of air at 120 kpa and 24°c is contained in a gas-tight, frictionless piston-cylinder device. the air is now compressed to a final pressure of 720 kpa. during the process, heat is transferred from the air such that the temperature inside the cylinder remains constant. calculate the boundary work input during this process.
Answers: 2
question
Engineering, 04.07.2019 18:10
Different types of steels contain different elements that alter the characteristics of the steel. for each of the following elements, explain what the element does when alloyed with steel.
Answers: 2
question
Engineering, 04.07.2019 18:10
Carbon dioxide gas expands isotherm a turbine from 1 mpa, 500 k at 200 kpa. assuming the ideal gas model and neglecting the kinetic and potential energies, determine the change in entropy, heat transfer and work for each kilogram of co2.
Answers: 2
question
Engineering, 04.07.2019 18:20
Have a greater impact on maintenance productivity than any other support group. (clo5) a)-the top management b)-inventory and purchasing c)-sub-contracting d)-cmms
Answers: 2
You know the right answer?
This new cipher is a Caesar Cipher with a twist. This cryptosystem will operate on bytes (8-bits): f...
Questions
question
Biology, 12.10.2019 09:00
question
Mathematics, 12.10.2019 09:01
Questions on the website: 13722360