Random Algorithm Letter & Number

The Algorithm Method is : First - Last Method

For Letter :
A   B   C   D   E   F   G   H   I   J   K   L   M   N   O   P   Q   R   S   T   U   V   W   X   Y   Z
Z   Y   X   W  V   U   T   S   R  Q  P   O   N   M   L   K   J  I    H   G   F   E    D   C    B   A

Example :
MEDAN
become
NVWZM

For Number :
26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10   9    8     7    6     5     4     3     2     1
  1   2   3   4   5   6   7   8   9 10 11 12 13 14 15 16 17 18  19   20  21   22   23   24   25   26

Example :
  1    2    3    4    5    6     7    8    9  10  11  12  13  
26  25   24  23  22   21   20  19  18  17  16  15  14 

So, number 1 will be partner with number 26, number 2 will be partner with number 25, and then number 3 will be partner with number 24, etc...

Permutation Based Cryptography

This permutation can be used to encrypt a sequence of five characters by moving each character from its original position to the position defined by the permutation.  For example, the sequence "APPLE" would be translated into the string "PLEAP":

Note that we number positions starting at zero just as in C++ arrays — that’s a hint of things to come.  What about decrypting the text above?  Well, each permutation has an inverse, another permutation that does the exact opposite of the original permutation.  For the permutation given above, the inverse permutation is:

Introduction of Encryption with DES


On 15 May 1973, the NBS (National Bureau of Standards, now called NIST  National Institute of Standards and Technology) published a request in the Federal Register for an encryption algorithm that would meet the following criteria:
  • Have a high security level related to a small key used for encryption and decryption
  • Be easily understood
  • Not depend on the algorithm’s confidentiality
  • Be adaptable and economical
  • Be efficient and exportable
In late 1974, IBM proposed “Lucifer”, which, thanks to the NSA (National Security Agency), was modified on 23 November 1976 to become the DES (Data Encryption Standard). The DES was approved by the NBS in 1978. The DES was standardized by the ANSI (American National Standard Institute) under the name of ANSI X3.92, better known as DEA (Data Encryption Algorithm).
The DES Algorithm
The main parts of the algorithm are as follows:
  • Fractioning of the text into 64-bit (8 octet) blocks;
  • Initial permutation of blocks;
  • Breakdown of the blocks into two parts: left and right, named L and R;
  • Permutation and substitution steps repeated 16 times (called rounds);
  • Re-joining of the left and right parts then inverse initial permutation.


Generation of Keys

Given that the DES algorithm presented above is public, security is based on the complexity of encryption keys. The algorithm below shows how to obtain, from a 64-bit key (made of any 64 alphanumeric characters), 8 different 48-bit keys each used in the DES algorithm :

Convention Cryptosystem


Illustrates the convention a encryption process. The original “plaintext” is converted into apparently random nonsense, called “ciphertext”. The encryption process consists of an algorithm and a key. The key is a value independent of the plaintext. The algorithm will produce a different output depending on the specific key being used at the time.Changing the key changes the output of the algorithm, i.e., the ciphertext. Once the ciphertext is produced, it may be transmitted. Upon reception, the ciphertext can be transformed back to the original plaintext by using a decryption algorithm and the same key that was used for encryption. In conventional cryptography, also called secret-key or symmetric-key encryption, one key is used both for encryption and decryption.

Caesar's Cipher
A substitution cipher is an extremely simple example of conventional cryptography. A substitution cipher substitutes one piece of information for another. This is most frequently done by offsetting letters of the alphabet. In Julius Caesar's cipher, the algorithm is to offset the alphabet and the key is the number of characters to offset it. 

For example, if we encode the word "SECRET" using Caesar's key value of 3, we offset the alphabet so that the 3rd letter down (D) begins the alphabet.

Plaintext         ABCDEFGHIJKLMNOPQRSTUVWXYZ
Ciphertext      
 DEFGHIJKLMNOPQRSTUVWXYZABC

where A=D (A encrypts as D) , B=E, C=F, and so on. 
Using this scheme, the plaintext, "SECRET" encrypts as "VHFUHW." To allow someone else to read the ciphertext, you tell them that the key is 3.
Obviously, it had two weaknesses. The first was that the algorithm was not particularly strong. If trial and error couldn't crack the algorithm, then some simple analysis would. If English text was being encrypted, then it would be relatively simple to compare the frequency of letters in the cipher text against the frequency of letters in standard English. Statistics would soon reveal patterns that pointed out the probable plain text letter associated with each cipher text letter. Once a single association was found the entire algorithm could be cracked. No message would be secure.

Permutations as integers by The Lehmer Code

A permutation of an array is an array that contains the same elements, but possibly in a different order.
For example, given the array :

[ a , b , c ]

All of its permutations are :

[ a , b , c ]
[ a , c , b ]
[ b , a , c ]
[ b , c , a ]
[ c , a , b ]
[ c , b , a ]
animasi  bergerak gif
animasi  bergerak gif
animasi  bergerak gif
animasi  bergerak gif
Flame Flame FlameFlameFlame X-Steel Pointer