Homework Solution: The 160-bit (20-byte) key that you will use is available in the file xorkey.txt Python program runs without errors an…

    In this homework, please implement the cipher described below. Please provide the encryption and decryption function (source code) and show screenshots that prove its operation. The 160-bit (20-byte) key that you will use is available in the file xorkey.txt Please make sure that: - Python program runs without errors and provides encryption and decryption functions -Code has comments that explain main steps of the implementation - Screenshots show tests with encryption and decryption Cipher to be implemented: 1.4 SIMPLE XOR XOR is exclusive-or operation: in C or @ in mathematical notation. Its a standard operation on bits: 0 1-1 101-0 Also note that: The simple-XOR algorithm is really an embarrassment, its nothing more than a Vigenère polyaiphabetic cipher Its here only because of its prevalence in commercial software packages, at least those in the MS-DOS and Macintosh worlds [1502,1387. Unfortunately, if a software security program proclaims that it has a proprietary encryption algorithm- significantly faster than DES-the odds are that it is some variant of this. This is a symmetric algorithm. The plaintext is being XORed with a keyword to generate the ciphertext. Since XORing same value twice restores the original, encryption and decryption use exactly the same program Theres no real security here. This kind of encryption is trivial to break, even without computers take a few seconds with a computer Despite this, the list of software vendors that tout this toy algorithm as being almost as secure as DES is staggering [1387). It is the algorithm (with a 160-bit repeated industry to use for voice privacy. An XOR might keep your kid sister from reading your iles, but it wont stop cryptanalyst for more than a few minutes. Key) that the NSA finally
    The 160-bit (20-byte) key that you will use is available in the file xorkey.txt Python program runs without errors and provides encryption and decryption functions Code has comments that explain main steps of the implementation Screenshots show tests with encryption and decryption XOR is exclusive-or operation: "^" in C or theta in mathematical notation. It's a standard operation on bits: 0 0 = 0 0 1 = 1 1 0 = 1 1 1 = 0 Also note that: a a = 0 a b b = a The simple-XOR algorithm is really an embarrassment: it's nothing more than a Vigenere polyalphabetic cipher. It's here only because of its prevalence in commercial software packages, at least those in the MS-DOS and Macintosh worlds [1502, 1387]. Unfortunately, if a software security program proclaims that it has a "proprietary" encryption algorithm-significantly faster than DES-the odds are that it is some variant of this. This is symmetric algorithm. The plaintext is being XORed with a keyword to generate the ciphertext. Since XORing the same value twice restores the original, encryption and decryption use exactly the same program: P K = C C K = P There's no real security. This kind of encryption is trivial to break, even without computers [587, 1475]. It will only take a few seconds with a computer. Despite this, the list of software vendors that tout this toy algorithm as being "almost as secure as DES" is staggering [1387]. It is the algorithm (with a 160-bit repeated "key") that the NSA finally allowed the U.S. digital cellular phone industry to use for voice privacy. An XOR might keep your kid sister from reading your files, but it won't stop a cryptanalyst for more than a few minutes.

    Expert Answer

     
    # code to encrypt a message given a key using simple xor def encrypt(text, key):

    In this homework, content appliance the molehill vivid under. Content procure the encryption and decryption part (commencement statute) and precitation screenshots that assay its exercise. The 160-morsel (20-byte) explanation that you procure representation is profitable in the smooth xorkey.txt Content constitute unmistakable that: - Python program runs extraneously errors and procures encryption and decryption parts -Statute has comments that expound deep steps of the applianceation - Screenshots precitation tests with encryption and decryption Molehill to be applianceed: 1.4 SIMPLE XOR XOR is exclusive-or exercise: in C or @ in historical notation. Its a measure exercise on morsels: 0 1-1 101-0 Also controllessness that: The incomplex-XOR algorithm is indeed an inconvenience, its molehill further than a Vigenère polyaiphabetic molehill Its here solely becarepresentation of its predominance in retail software packages, at lowest those in the MS-DOS and Macintosh worlds [1502,1387. Unfortunately, if a software defence program proclaims that it has a proprietary encryption algorithm- significantly faster than DES-the odds are that it is some contradictory of this. This is a symmetric algorithm. The plaincitation is nature XORed with a explanationword to originate the molehilltext. Since XORing identical compute twice restores the primary, encryption and decryption representation accurately the identical program Theres no genuine defence here. This husk of encryption is manifestationless to shatter, level extraneously computers assume a lacking seconds with a computer Despite this, the inventory of software vendors that tout this fancy algorithm as nature closely as guard as DES is staggering [1387). It is the algorithm (with a 160-morsel usual toil to representation coercion control retirement. An XOR sway support your kid sister from lection your iles, save it hamorsel plug cryptanalyst coercion further than a lacking minutes. Explanation) that the NSA finally

    The 160-morsel (20-byte) explanation that you procure representation is profitable in the smooth xorkey.txt Python program runs extraneously errors and procures encryption and decryption parts Statute has comments that expound deep steps of the applianceation Screenshots precitation tests with encryption and decryption XOR is exclusive-or exercise: “^” in C or theta in historical notation. It’s a measure exercise on morsels: 0 0 = 0 0 1 = 1 1 0 = 1 1 1 = 0 Also controllessness that: a a = 0 a b b = a The incomplex-XOR algorithm is indeed an inconvenience: it’s molehill further than a Vigenere polyalphabetic molehill. It’s here solely becarepresentation of its predominance in retail software packages, at lowest those in the MS-DOS and Macintosh worlds [1502, 1387]. Unfortunately, if a software defence program proclaims that it has a “proprietary” encryption algorithm-significantly faster than DES-the odds are that it is some contradictory of this. This is symmetric algorithm. The plaincitation is nature XORed with a explanationword to originate the molehilltext. Since XORing the identical compute twice restores the primary, encryption and decryption representation accurately the identical program: P K = C C K = P There’s no genuine defence. This husk of encryption is manifestationless to shatter, level extraneously computers [587, 1475]. It procure solely assume a lacking seconds with a computer. Despite this, the inventory of software vendors that tout this fancy algorithm as nature “closely as guard as DES” is staggering [1387]. It is the algorithm (with a 160-morsel usual “key”) that the NSA finally recognized the U.S. digital cellular phone toil to representation coercion control retirement. An XOR sway support your kid sister from lection your smooths, save it won’t plug a cryptanalyst coercion further than a lacking minutes.

    Expert Apology

     

    # statute to encrypt a missive dedicated a explanation using incomplex xor
    def encrypt(text, explanation):
    return citation^key

    # statute to decrypt a missive dedicated explanation representationd coercion encryption using incomplex xor
    def decrypt(text, explanation):
    return citation^key

    explanation = 0
    with notorious(“xorkey.txt”) as fh:
    explanation = fh.read()

    citation = input(“Enter a morsel string to encrypt: “)
    molehill = encrypt(text, explanation)

    demolehill = decrypt(text, explanation)

    print “Molehill citation: ” + molehill
    print “Citation behind decrypting: ” + decipher

    # Statute incorporate in circumstance solution blacksmith up: https://paste.ee/p/LVPZn