Beruflich Dokumente
Kultur Dokumente
Cryptography is the practice and study of hiding information .modern day cryptography includes disciplines of mathematics, computer science and engineering. Encryption is the science of changing data so that it is unrecognisable and useless to an unauthorized person. Decryption is changing it back to its original form. The most secure techniques use a mathematical algorithm and a variable value known as a key.
This is the basis of the protection.... if the key (sometimes called a password) is only known by authorized individual(s), the data cannot be exposed to other parties.
The three main fields of cryptography are CIPHERS, STEGNOGRAPHY, and VISUAL CRYPTOGRAPHY
CLASSICAL CRYPTOGRAPHY
MONOALPHABETIC CIPHERS:
The key is such that each alphabetic character of plaintext is mapped to a unique alphabetic character in the cipher text.
The examples include: a)SHIFT CIPHER : this is the most simplest form of encryption .the characters of plaintext are replaced by characters obtained after shifting by fixed number in the cipher text . Also referred to as Caesars cipher as Julius Caesar is supposed to have used this cipher for military dispatches he wished to keep secret!!!!! In mathematical terms it can be represented by
Ek(x) =(x+k) mod 26 Dk(x) =(y-k) mod 26 where (x, y belongs to Z26) It can be seen that x=D k (Ek(x)) For example shifting by 3: plaintext Cipher text A B C D....... D E F G........
So there can be only 25 possible shift ciphers as shifting by 26 will amount to same text and shifting by 27 will be same as shifting by 1 and so on. b) SUBSTITUTION CIPHERS: The key is any permutation of letters; need not be a shift, for example plaintext cipher text ABCDEFGH IJKLMNOPQRSTUVWXYZ CVBNMXZASDFGHJKLQWERTYUIOP
So that a b c>> c v b There can be 26! Different substitution ciphers!! Examples are Caesars cipher (mentioned above), at bash cipher in which alphabets are simply reversed a>>z, b >> y, c>> x and so on.... c) AFFINE CRYPTOSYSTEM Mathematically it can be represented as
0<=k<=25 and 0<=a<=25 Ek(x) =a*x + k mod 26 and Dk(x) =(y-k) /a mod 26 It can be observed that for a=1, it reduces to Caesars cipher Example
plaintext: A F F I
N E C I
P H E R
x:
0 5 5 8 13 4 2 8 15 7 4 17
5x + 8
8 33 33 48 73 28 18 48 83 43 28 93
This encryption can be injective if and only if GCD (a,26) =1, so a can take only 12 possible values {1, 3 , 5, 7 , 9 ,11, 15, 17, 19, 21,23, 25} and k can take any 26 values . Thus the total possible number of affine ciphers is 12*26 = 312.
POLYALBHABETIC CIPHERS:
The mono alphabetic ciphers are relatively easy to break .a polyalphabetic cipher is a vast improvement over this technique. a) VIGENERE CIPHER
The basic principal in all polyalphabetic cipher is the use of multiple but different mono alphabetic substitution techniques. In vigenere cipher, each letter key value will denote the shift to be done for that particular letter i.e. the n in the shift n cipher. It will be clearer by an example: let key = a b c Plaintext= x y z Cipher text = x z b (shift of 0, 1, 2 respectively) Another example: key =ad Plaintext= a b c d Cipher text = a e c g (shift of 0, 3, 0, 3)
The second example shows us an important technique, if the key is of a lesser length than the plaintext, then use the key repeatedly till whole length of the plaintext is traversed.
b) HILL CIPHER
Hill cipher is a polygraphic substitution cipher based on linear algebra invented by Lester .S.Hill in 1929.
Each letter is first encoded as a number. Often the simplest scheme is used: A = 0, B =1...Z=25, but this is not an essential feature of the cipher. A block of n letters is then considered as a vector of n dimensions, and multiplied by an n n matrix, modulo 26. For example
Consider the message 'ACT', and the key below (or GYBNQKURP in letters):
Since 'A' is 0, 'C' is 2 and 'T' is 19, the message is the vector:
In order to decrypt, we turn the cipher text back into a vector, then simply multiply by the inverse matrix of the key matrix (IFKVIVVMI in letters)
c) PERMUTATION CIPHER
The permutation cipher is a transposition cipher in which the key is a permutation. A random permutation of size e is generated. (The larger the value of e more secure is the cipher).the plaintext is then broken into segments of size e and the letters within the segment are permuted according to this key. Because the cipher doesnt changes any of the characters, the cipher text will have exactly the same letter frequency as the underlying plaintext .there is a limitation that the plaintext has to have a length which is in multiple of e. Example: Let e = 3. Key = 2 1 3 Plaintext: CRYPTOGRAPHY Breaking the text: CRY PTO GRA PHY Cipher text: RCY TPO RGA HPY i.e. RCYTPORGAHPY.
BLOCK CIPHER
The most important symmetric (meaning the same key is used for both encryption and decryption ) algorithms are block ciphers .the general operation of all the block ciphers is the same a given number of bits of plaintext (a block) is encrypted into a block of cipher text of the same size. This is in contrast to stream ciphers which encrypt one bit at a time. There are several modes for block encryption:
A) ELECTRONIC CODEBOOK (ECB) MODE It is the simplest mode of operation for a block cipher. The input data is padded out to a multiple of the block size, broken into a integer number of blocks, each of which is encrypted independently using the key. In addition to simplicity, ECB has the advantage of allowing any block to be decrypted independently of the others. Thus, lost data blocks do not affect the decryption of other blocks. The disadvantage of ECB is that it aids known-plaintext attacks. If the same block of plaintext is encrypted twice with ECB, the two resulting blocks of cipher text will be the same.
Cc BBB BLOCKBBBBB
to each encryption step. Since the cipher text is constantly changing, two identical blocks of plaintext will encrypt to two different blocks of cipher text. The disadvantage of CBC is that the encryption of a data block becomes dependent on all the blocks prior to it. A lost block of data will also prevent decoding of the next block of data.
[XOR is bitwise exclusive or operator. It takes two bit pattern of equal length and performs the logical XOR operation on each pair of corresponding bits. The result is each position is 1, if the two bits are different, and 0 if they are the same. ]
are encrypted ith the recipient' public ey and can onl be decrypted ith the corresponding priate ey. he eys are related athematically, but the pri ate ey cannot be easibly i.e., in actual or projected practice) deri ed rom the public ey. t as the discovery of such algorithms hich revolutioni ed the practice of cryptography beginning in the middle s.Public ey cryptography is a fundamental and idely used technology around the orld, and is the approach hich underlies such nternet standards as ransport ayer ecurity ) successor to ), PGP and GPG
n an asymmetric ey encryption scheme, anyone can encrypt messages using the public ey, but only the holder of the paired private ey can decrypt. ecurity depends on the secrecy of that private ey.
CRYPTOGRAPHIC ATTACKS
A cryptographic attack is a method for circumventing the security of a cryptographic system by finding a eakness in a code, cipher, cryptographic protocol or key management scheme. his process is also called "cryptanalysis .
Brute Force Attacks: A brute force attack systematically attempts every possible key. It is most often used in a known plaintext or cipher textonly attack.
STEGANOGRAPHY
Steganography is the science of hiding information. Whereas the goal of cryptography is to make the data unreadable by a third party, the role of steganography is to hide the data from a third party. in Greek it means covered writing .There are a large number of steganographic methods , ranging from invisible ink and microdots to secreting a hidden message in the second letter of each word of a large body of text and spread spectrum radio communication.
Genome steganography - encoding a hidden message in a strand of human DNA. Hiding in Text - information hidden in documents by manipulating the positions of lines and words, hiding the data in html files Hiding in Disk Space - hiding the data in unused or reserved space. Hiding the Data in Software and Circuitry - data can be hidden in the layout of the code distributed in a program or the layout of the electronic circuit on a board. Information Hiding in Images - ranges from least significant bit insertion to masking and filtering to applying more sophisticated image processing algorithms. Hiding in Network Packets - hidden in packets transmitted through the internet.