the question is : encrypt and decrypt message with length 64 char by using matlab ... this code is an example of encrypt decrypt message of 12 char
Mostrar comentarios más antiguos
d=['z' 'i' 'a' 'd' '' 'a' 'l' 'q' 'a' 'd' 'i' '' ], d1=uint8(d); %inv d1 k=13; for i=1:12 c(k)=d1(i); k=k-1; end %add 3n-2 for i=1:12 c(i)=c(i)+3*i-2; end %subtract 3n-2 for i=1:12 m(i)=c(i)-3*i+2; end %iners n=12; for i=1:12 r(n)=m(i); n=n-1; end d char(r)
3 comentarios
Purushottama Rao
el 25 de Jun. de 2015
what is that you are looking for? An explanation on above code?
yazan hejjawe
el 25 de Jun. de 2015
Editada: yazan hejjawe
el 25 de Jun. de 2015
Walter Roberson
el 25 de Jun. de 2015
Which part is the "message"? Which part is the "encrypted message"? What information is being given to you to decrypt? For example are you given s and k ?
Respuestas (1)
James Tursa
el 25 de Jun. de 2015
Editada: James Tursa
el 25 de Jun. de 2015
0 votos
If you want to use the 5 x 5 code above, break the input into 25 character sets and process each set separately. If you have one set less than 25 pad with something (e.g., blanks with value 32).
Categorías
Más información sobre Encryption / Cryptography en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!