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,
PayPal Gateway not configured
PayPal Gateway not configured