Está en la página 1de 5

1. Calcule la frecuencia relativa de todas las letras A...Z del texto cifrado.

Puede usar el programa CrypTool para hacer este cálculo. Aunque, si lo


desea también podría hacerlo a mano.
2. Desencripte el texto cifrado a partir de la frecuencia relativa de las
letras en el idioma inglés (ver las diapositivas usadas en clase). Tenga en
cuenta que el texto al no ser muy largo, puede ocurrir que la frecuencia
relativa de las letras no sea exactamente la misma que la tabla usada para
todo el lenguaje inglés.

because the practice of the basic movements of kata is the focus and
mastery sf self is the essence of matsubayashi ryu karate do I shall try to
elucidate the movements of the kata according to my interpretation based
on forty years of study

it is not an easy task to explain each movement and its significance and
some must remain unexplained to give a complete explanation one could
have to be qualified and inspired to such an extent that he could reach
the state of enlightened mind capable of recognizing soundless sound
and shapeless shape i do not deem myself the final authority but my
experience with kata has left no doubt that the following is the proper
application and interpretation i offer my theories in the hope that the
essence of Okinawan karate will remain intact

3. Averigüé quien escribió este texto

El texto fue escrito por: Shoshin Nagamine


1. Haga el ataque para descubrir el texto usando como referencia la frecuencia relativa
de las letras

2. ¿Cuántas letras necesita identificar a partir del conteo de frecuencias para recuperar la
clave? ¿Cuántas necesito identificar en el cifrado por sustitución?

-Solo se necesita identificar 1 letra debido a que en el cifrado cesar todas las
letras recorren la misma cantidad de veces el alfabeto.

-Se podría decir que todas ya que todas, exceptuando la “d” que no tenía
recorrido, las letras tienen un recorrido distinto en el alfabeto, pero desde cierto
punto se puede deducir las letras que hacen falta para completar una palabra u
oración.

3. ¿Cuál es el texto y quién es el autor del mensaje?

El texto es: If we all unite we will cause the rivers to stain the great waters with their
blood.

Autores: ti-KUM-see, Tecumseh


#include <iostream>
using namespace std;

int main(){

int cod=5;
cout<<endl;
cout<<"El siguiente texto sera codificado: ";
string texto="Hello Peter, Spider-
Man is a superhero created by writer-editor Stan Lee and writer-
artist Steve Ditko. He first appeared in the anthology comic book Amazing
Fantasy #15 in the Silver Age of Comic Books.";
cout<<texto<<endl;
cout<<endl;

//Esta funcion se uso para saber el valor ascii incial de los caracte
res
/*
for(int i=0; i<texto.size(); i++){
valorcito=texto[i];
cout<<valorcito<<" ";

} */

cout<<"Texto codificado: ";


int valorcito;
for(int i=0; i<texto.size(); i++){
if(texto[i]>64 && texto[i]<91 || texto[i]>96 && texto[i]<123){
for(int j=0; j<cod; j++){
texto[i]=texto[i]+1;
if(texto[i]>=91 && texto[i]<=96){
texto[i]=65;
cout<<texto[i]<<endl;
}
else if(texto[i]>=123){
texto[i]=97;
}
}
valorcito=texto[i];
}
}
cout<<texto<<endl;
cout<<endl;

return 0;
}
#include <iostream>
#include <conio.h>
#include <string.h>
using namespace std;

int main(){
cout<<"Ingrese el texto a Decodificar: ";
char texto[500];
cin.getline(texto,500,'\n'); //cin.getline(nombre Variable, Espaci
o disponible, Cuando termina)

string resultado;
int deco=1;
int valorcito;

for(int l=1; l<25; l++){


for(int i=0; i<500; i++){
if(texto[i]>64 && texto[i]<91 || texto[i]>96 && texto[i]<123)
{
for(int j=0; j<1; j++){
texto[i]=texto[i]+1;
if(texto[i]>=91 && texto[i]<=96){
texto[i]=65;
}
else if(texto[i]>=123){
texto[i]=97;
}
}
valorcito=texto[i];
}
}
cout<<endl; cout<<endl;
cout<<"Resultado con clave "<<deco<<" es: "<<texto<<endl;
deco=deco+1; cout<<endl;
cout<<"Es correcta ? :";
cin>>resultado;
if(resultado=="true" || resultado=="si"){
cout<<"codigo resuelto: "<<texto;
break;
}
}

return 0;
}

También podría gustarte