Items tagged with cryptography

Feed
I have to crypt and decrypt with vigenere.

(procedures need lists)

"In a Caesar cipher, each letter of the alphabet is shifted along some number of places; for example, in a Caesar cipher of shift 3, A would become D, B would become E, Y would become B and so on. The Vigenère cipher consists of several Caesar ciphers in sequence with different shift values.

To encrypt, a table of alphabets can be used, termed a tabula recta, Vigenère square, or Vigenère table. It consists of the alphabet written out 26 times in different rows, each alphabet shifted cyclically to the left compared to the previous alphabet, corresponding to the 26 possible Caesar ciphers. At different points in the encryption process, the cipher uses a different alphabet from one of the rows. The alphabet used at each point depends on a repeating keyword.[citation needed]

For example, suppose that the plaintext to be encrypted is:

ATTACKATDAWN
The person sending the message chooses a keyword and repeats it until it matches the length of the plaintext, for example, the keyword "LEMON":

LEMON
Each row starts with a key letter. The remainder of the row holds the letters A to Z (in shifted order). Although there are 26 key rows shown, you will only use as many keys (different alphabets) as there are unique letters in the key string, here just 5 keys, {L, E, M, O, N}. For successive letters of the message, we are going to take successive letters of the key string, and encipher each message letter using its corresponding key row. Choose the next letter of the key, go along that row to find the column heading that matches the message character; the letter at the intersection of [key-row, msg-col] is the enciphered letter.

For example, the first letter of the plaintext, A, is paired with L, the first letter of the key. So use row L and column A of the Vigenère square, namely L. Similarly, for the second letter of the plaintext, the second letter of the key is used; the letter at row E and column T is X. The rest of the plaintext is enciphered in a similar fashion:

Plaintext:	ATTACKATDAWN
Key:	LEMON
Ciphertext:	LXFOPVEFRNHR
Decryption is performed by going to the row in the table corresponding to the key, finding the position of the ciphertext letter in this row, and then using the column's label as the plaintext. For example, in row L (from LEMON), the ciphertext L appears in column A, which is the first plaintext letter. Next we go to row E (from LEMON), locate the ciphertext X which is found in column T, thus T is the second plaintext letter."

I think that it can be done with a for loop but I do not know where to start.

Thanks in advance!

Suppose i have a message X encrypted using RSA with public code (n,e) and ascii (Here we treat the message as an array so don't worry about block-length) how would one go about writing a procedure that given a public key (n,e) with small n and a ciphertext message x will decrypt x. I have been looking online to see how we can get maple to take ascii into consideration but to no avail any help would be appreciated

As a college project we have to implement the caesar cipher on maple but as beginners we haven't got a clue. 

Any advice even on how to begin please?

 

Hello,

 

I tried to write a code for CRT-RSA. The encryption is kinda easy and like the normal RSA:

Public key given: (e,N)=(5,851); private key: (d,dcp,dcq,p,q)=(317,29,9,37,23)

with the result:

                      [116, 101, 115, 116]
                       [676, 645, 144, 3]
                      [100, 70, 715, 243]

So, know i tried the following:

that also works pretty fine; dcp and dcq are the CRT-RSA-exponents, and gives:

                        [10, 16, 33, 3]
                          [9, 1, 6, 3]

So now my try for the next step:

but it doesnt work...

the results are:

 

Why does Maple take the whole vector for y? I dont get it....

 

Note: if d<sqrt(N), then d=dcq=dcp and the Decryption of normal RSA can be used:

therefore the line:

works as decipher1 already.

 

 

So thanks for any help!

Hello, could you give me ideas with such challenge? I have created my model in MapleSim and want to check correctness of the scheme. I need to get values of block variable. by default maplesim displays results as a graph and i do not see what is real value. How I can get these values? 

La aplicacion de las matrices en su más claro ejemplo, dirigido explicitamente a la criptografia; solo hay que tener conocimiento de algebra de matrices y calculo de matriz inversa. (versión español).

The application of the matrices in its most obvious example, explicitly directed to cryptography; just have to have knowledge of matrix algebra and inverse matrix calculation. (version english).

 

Criptografia.mw

 

Lenin Araujo Castillo

Physics Pure

Computer Science

I understand completely how the Playfair cipher works but I'm not sure how to begin to implement it into Maple. Does anyone know how to begin encrypting and decryptin a code using this cipher?

Page 1 of 1