jueves, 1 de noviembre de 2012

Programs to encripting picture

Well, here is the code to encrypt the message:

Code:

Code:


and this is the code to desencript message:
Code:

The pictures to have a message is 2,5,6 of the before post


if we use the python program, this genereted the follow messege:

picture 5:


and the messege:


picture 6:

and the messege


thats all my folks

the images were uploaded to mediafire for blogger issues that can change the images
In the before post




miércoles, 31 de octubre de 2012

The beggening hacking

Hello my friends and other people. This time i post some pictures and your try to find the message in tree of six picture















link to dowload the image:
http://www.mediafire.com/download.php?950rob1nw0xgzbu

Good luck!!!

jueves, 25 de octubre de 2012

Rabbit Cipher Stream

Rabbit Cipher Stream



What is the Rabbit algorithm ?

The Rabbit stream cipher works in a synchronous manner (never ending, always is in iteration) and was featured in Fast Software Encryption workshop in 2003

This algorithm can be described as follows:

Rabbit needs a key of 128 bits and also can use a (iv) 64-bit input which is used in the iterations in the algorithm
Iv = It is a starting vector for different types of cryptographic systems. This can generate a randomly.

Both encryption and decryption use the substitution method to generate our XOR'ed ciphertext. Where the internal state of the algorithm is 512-bit and 8 states are divided by 32 bits each. Different states vectors are modified during the execution of the algorithm.



Diagram of the algorithm

Rabbit algorithm description:

First step:  The key of 128 bits is genereted randomly and is divided into eight subkeys of 16 bits each and also the vector  "IV" 64-bit is genereted

Second step: Initializing a vector "x" and a counter vector "c" with eight elemts



Third step: This step can be skipped but is recommended. Use the substitution method Xor vector for each counter using vector "IV"



Fourth step: This step is the most important of all, the endless cycle begins to generate different outputs "S" and use them to our substitution method Plaintext.
Variable g is used to cycle the different values ​​of both counters as the vector x, and to generate new values ​​for the vector x and iterating using  "g" of the previous two iterations


Here the equations: 


Some terms from here:
"<<" Means that there is a tour of some bit to the left
">>" Means that there is a tour of some bit to the right


Fifth step: Subsequently, to get the specific output for each output interaction, the following equations are performed:





The implementation code:

Here is a picture of a first round generating 8 blocks of "Si"

And at the end, encrypt the message by the substitution method Xor through  "Si"vector of current image is shown in the dimensioned vector 8 outputs each other by different iterations is performed

This algorithm has different strengths and weaknesses:



One of the biggest advantages of this algorithm is the use of a 128-bit key that grabs one of the best sytems about execution speed, different blocks also constantly change. The attacks is  more difficult to perform in against a random key.

The strength is the  division of the keys in 8 to modify the state variables, for different types of attacks such as statistical and brute force


http://www3.iam.metu.edu.tr/iam/images/6/6a/Tarkanolcuogluterm.pdf
http://cr.yp.to/streamciphers/rabbit/desc.pdf
https://tools.ietf.org/html/rfc4503
http://reference.kfupm.edu.sa/content/r/a/rabbit__a_new_high_performance_stream_ci_66630.pdf
http://en.wikipedia.org/wiki/Initialization_vector

miércoles, 17 de octubre de 2012

Block Cipher : Hierocrypt

Week 9



Greats, This week we will be talking about: Block Cipher,  spcifically Hierocrypt.



This Hierocrypt have two many different fomrs with small differences:

1-. Hierocrypt-L1 
2-. Hierocrypt-3

                                  and was created by Toshiba in 2000.



These encryption algorithms were presented to the NESSIE project but were not selected, but  it is still highly recommended by the Japanese government used by CRYPTREC.


The differences between these two algorithms are:

The size of blocks: 64 bits vs 128 bits
The PlainText has to be the same size of the block
The size of keys: 128 bits vs 128, 192, or 256 bits.
 The number of rounds of encryption: 6.5 vs 6.5,7.5 or 8.5

The Hierocrypt-3 is more complex.

This Hierocrypt use a  substitution-permutation network structure.
This algorithm starts by transforming a 64-bit plaintext a function of X (64) then substitution is performed using a key by dividing the 64 bits into 8 blocks, and repeating the process of replacing in each of them.
Here the Diagrama:

This we can check in the following pdf: LINK


As mentioned above this algorithm uses 6 permutations to encrypt the message. And in each of the permutations do exactly the same.

Here the process of each permutation:



1-. The X(64) if is the first permutation is the same of Plain text. After this, Use the substitution method Xor and divide those 64 bits into small blocks of 8 bits.

2-. Each S-box will be used and the 64 bits will be separated in two blocks of 32 bits.

3-. Then a function is perfomed tocause slight diffusion so that is harder to detect patterns of sequence.  

4-. We use two  32-bits keys for the Xor substitution method and also We merge the 64-bit.

5-. With this input. We repeat step 1

6-. After that,  we perform a function that cause strongest diffusion so that is harder to detect patterns in the sequence, and we created a matrix of 2x2. then marge the 64-bit. 

7-. This output X (64) is the new entry in the next permutation.

8-Do this  steps all 6 permutations.

9-. Finally encrypts X (64) with a  64-bits key  to get our ciphertext.

This algorithm is strong and weak compared to others in several ways.

Disadvantages:

1-. The design and structure are much larger than the Feistel structure and takes longer.

2-. The Diffusion´s widht is twice of the Feistel structure.

 Feisel encryption has a symmetrical structure that uses a block cipher, named for the German and cryptographer Horst Feistel

3-. Input size limits.

Advantage
 
1-. Fast execution
2-. Better security against statistical attacks

Special thanks to Esteban Sifuentes for checking my Orthography.


Reference:
http://en.wikipedia.org/wiki/Rijndael_S-box 
http://en.wikipedia.org/wiki/Hierocrypt
http://es.wikipedia.org/wiki/Criptograf%C3%ADa
link de pdf de las imagenes LINK
http://en.wikipedia.org/wiki/Feistel_cipher
http://en.wikipedia.org/wiki/Advanced_Encryption_Standard

jueves, 20 de septiembre de 2012

week number 6




In this week, we need to aplicated a serves web with rsa system


Some introdcuccin

In the web serves some peple for example alice generetd "X" and seend this a Bob.
Bob will dowload some script to put him privated keys and the x, before bob sends result "r", and alice put the result in the serves and user, finaly the serves says if bob is bob or not


Code1 :


Code2:

Code3:


Script of dowload:

Screen4:


 Ramón used my server some pictures:




and triana (in this case was not yet translated)



Link of servece: http://alejandroave.260mb.org/
Apologies for publicity :C but "ITS FREE"

Reference:
http://php.net/manual/es/control-structures.foreach.php
http://php.net/manual/es/function.explode.php
http://php.net/manual/es/tutorial.php
http://web.usal.es/~hernando/segi2012/11HerrMat.pdf

jueves, 13 de septiembre de 2012

#week number 5

This time, the homewoork is a simple server -  client with protocole rsa


Firsth the client try to conect to client
when the server detecte  the conexion of client start the protocole

1-. the server send x to client
2-. the client send messege encrupte
3-. the server desencripte and compere the y of server with the cliente
4-. if its the same the sounds is good
5-. if its different its to bad :C


We created two base data
one for user
one for the publi keys

The code of server:

The code of client:

The code of generet keys:



hire som image for some calcule of "d"

Some print screen
hire d = 3
N = 35
e = 23



The client sends a "d" and "n" and the server before it sends an x to use the function (x) and the client send its function, if  we are see where it says yyyy = 16 is the calculation server and Y is the calculation using the keys in this case, will leave the program.





In this image is about the code generet keys, this  generet value n,e,phie and verific if the numers are coprime, for used in ecuclides algoritm in paper :C


Links reference:



miércoles, 5 de septiembre de 2012

Diffie-Hellman

This time, we make a practice about: Diffie-Hellman
and change protocole.

My partners Carlos Eduardo and Pedro Miguel were the representation of Alice and Bob respectively.
And me am eve

p and g are the following numbers:



p = 11
g = 8


and "X", "Y" 

X = 2
Y = 2

Subsequently tested different numbers to get the value of "x" and "y" here below:



We already got the number we were looking
now need "Y"


then we need to found "K"


Here is a hand