Course Solutions Uncategorized (Solved) : Fix Functions File Modesc Output Desired Output Plaintext Motherciphertext 0x2d2422090905p Q27985424 . . . .

(Solved) : Fix Functions File Modesc Output Desired Output Plaintext Motherciphertext 0x2d2422090905p Q27985424 . . . .

 

Fix the functions in the file modes.c so that the outputis the desired output:

plaintext: motherciphertext: 0x2D2422090905plaintext: soldierciphertext: 0xF9CDAC548B5FEEplaintext: riskciphertext: 0x24FD940Fplaintext: endlessciphertext: 0xEDA9D7110425BAplaintext: hairciphertext: 0x3EDB6F38

#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include “hex.h”
#include <assert.h>

/*The block cipher*/
char cipher(unsigned char block, char key)
{ //this is an affine cipher where “a” is fixed at 11 andb=key
return (key+11*block)%256;
}

/*The inverse of the block cipher*/
char inv_cipher(unsigned char block, char key)
{ // 163 is the inverse of 11 mod 256
return (163*(block-key+256))%256;
}

void ofb(char* pt, char key, char iv, int len)
{
/*fix me*/
}

void ecb(char* pt, char key, char iv, int len)
{
/*fix me*/
}

void ecb_dec(char* ct, char key, char iv, int len)
{
/*fix me*/
}

void cfb(char* pt, char key,

OR

PayPal Gateway not configured

OR

PayPal Gateway not configured

Leave a Reply

Your email address will not be published. Required fields are marked *

Related Post

(Solved) : 2 Sketch Root Locus Following Characteristic Equation K S S S 3 Find Angle Departure Compl Q33388934 . . . .(Solved) : 2 Sketch Root Locus Following Characteristic Equation K S S S 3 Find Angle Departure Compl Q33388934 . . . .

<br/><img src="https://media.cheggcdn.com/media%2Fe23%2Fe238bead-3793-4bc5-9d3a-30a1f5c0e71d%2Fimage.png" alt="2. You are to sketch the root locus of the following characteristic equation: K s(s+) - (s+3) a) Find angle of departure from the complex pols, if any.