matlab text encryption and decryption code
#1

[size=large][/size]
Reply
#2
matlab text encryption and decryption code

Introduction Caeser Cipher

So this is Matlab code for Caesar Cipher Encryption and Decryption.There are many security techniques like Cryptography .The technique which was used in the past days is very simple and easily breakable in its method first a secret key is choosed after choosing key it added to every bit of data for example our data is Data = Attend meeting at noon and Encryption key = 3 so key is of single bit its mean its easily breable in 2.5ms So Now A = C , T = W , E=H , N=Q , D=G , M=P , I=L , O=R , G=j .Now apply this on data and then Ecrypted Data will be Cwwhqg phhwlqj cw qrrq . Now lets move towards how to develop Matlab code.

Algorithm

First Take Input Form user and then calculate Length of string then declare two dummy arrays named array and input.Now whats in the variable x ???? String ??? No actually x variable contains Ascii values of the string like ascii of ‘A’ is 65 and in the same way acsii of ‘B’ is 66 and the ascii of last alphabet ‘Z’ is 90. In the first loop to access single alphabet from the variable x and the result is saved i n input.
Now Select your Cipher Key which is also entered by user after then add the key value one by one in input1 variable and then save the result in array variable.
Now we have to handle both capital and small alphabets check if sum of ascii value and key is > than 122 (ascii of small z ) then its mean we have to shift our ascii values to start again from small z .To do this subtract array(i) for current alphabet from ascii of z (ascii =122) now add 96 to start from ‘a’ (ascii = 97) but we will add 96 becuase there will be an extra shift so upto now small alphabets are handles in the same way Capital letters are handled and in the decryption reverse process is done but if one has problem in understanding the handling of capital letters and in decryption then comment and ask about your problem.


Matlab Implementation

function ceaser

clc
x=input(‘Enter Input Text =’,’s’);

len=length(x);

array=[];
input1=[];
key = input( ‘Enter Key Value’);

for i=1:len
input1(i)=x(i);
end

for i=1:len
array(i)=input1(i)+key;

%handling small alphabets
if array(i)>122 && input1(i)>=97
array(i)=array(i)-122;
array(i)=array(i)+96;
end

%handling capital alphabets
if array(i)>90 && input1(i)<=90
array(i)=array(i)-90;
array(i)=array(i)+64;
end

end

disp(‘Ecryption Result’);
ENCRYPT = char(array)

for i=1:len
array(i)=array(i)-key;

%handling small alphabets in Decryption

if array(i)<=97 && input1(i)>=97
array(i)=97-array(i);
array(i)=123-array(i);
end

%handling capital alphabets

if array(i)<65 && input1(i)<=90
array(i)=65-array(i);
array(i)=91-array(i);
end
end

disp(‘Decryption Result’);

DECRYPT = char(array)
Reply

Important Note..!

If you are not satisfied with above reply ,..Please

ASK HERE

So that we will collect data for you and will made reply to the request....OR try below "QUICK REPLY" box to add a reply to this page
Popular Searches: matlab code for image encryption and decryption, matlab text encryption and decryption code, picture encryption and decryption using matlab code, writing your own string encryption decryption method in c code project, encryption and decryption algorithms using wavelet in matlab, text encryption and decryption project in java ppt, massge encryption matlab code,

[-]
Quick Reply
Message
Type your reply to this message here.

Image Verification
Please enter the text contained within the image into the text box below it. This process is used to prevent automated spam bots.
Image Verification
(case insensitive)

Possibly Related Threads...
Thread Author Replies Views Last Post
  authentication schemes for session passwords using color and images project source code 2 2,238 03-02-2018, 09:35 AM
Last Post: Nischithnash
  source code for rsa encryption and decryption in java 2 8,036 29-05-2017, 04:21 PM
Last Post: Meghna Jadhav
  image encryption and decryption using rsa algorithm in matlab 2 7,928 29-05-2017, 04:17 PM
Last Post: Priyanka Bidikar
  download liver tumor ct scan image in matlab with source code 4 8,084 21-05-2017, 09:54 PM
Last Post: abdulrahmanmashaal
Thumbs Up online catering management system on php with report and source code and ppt 4 8,821 29-04-2017, 10:59 AM
Last Post: jaseela123d
  MATLAB codes needed for powerline communication 1 8,096 12-04-2017, 05:00 PM
Last Post: jaseela123d
Thumbs Up source code of online payment system using steganography and visual cryptography 3 8,528 06-04-2017, 09:56 AM
Last Post: jaseela123d
  matlab code for wavelet based ofdm transmitter 1 924 24-02-2017, 11:18 AM
Last Post: ijasti
  code to extract brain tumor detection using matlab 2 1,070 17-10-2016, 04:32 PM
Last Post: girish123ak
  download engineering mathematics 4 vtu ksc text book 3 2,437 12-10-2016, 03:03 PM
Last Post: Guest

Forum Jump: