https://github.com/phillbush/vigenere
C implementation of the Vigènere cipher and the attack on it using Kasiski examination and frequence analysis
https://github.com/phillbush/vigenere
cryptanalysis kasiski-examination kasiski-method vigenere vigenere-cipher
Last synced: about 2 months ago
JSON representation
C implementation of the Vigènere cipher and the attack on it using Kasiski examination and frequence analysis
- Host: GitHub
- URL: https://github.com/phillbush/vigenere
- Owner: phillbush
- Created: 2022-12-09T21:45:29.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2022-12-09T21:48:26.000Z (over 2 years ago)
- Last Synced: 2025-01-22T19:16:15.204Z (3 months ago)
- Topics: cryptanalysis, kasiski-examination, kasiski-method, vigenere, vigenere-cipher
- Language: C
- Homepage:
- Size: 24.4 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README
Awesome Lists containing this project
README
VIGENERE(1) General Commands Manual VIGENERE(1)
NAME
vigenere, kasiski – polyalphabetic cipher encryption and attack utilitiesSYNOPSIS
vigenere [-de] key
kasiski [-ep]DESCRIPTION
The vigenere utility implements encryption and decryption using the
Vigenere polyalphabetic shift cipher on a given alphabetic key. The
kasiski utility implements a method of cryptanalysis of such cipher based
on Kasiski examination and frequence analysis.vigenere uses the key given as argument to encrypt or decrypt the text
read from standard input. The result is written into standard output.
Both the key argument and the standard input must contain plain
alphabetic characters (ie, uppercase or lowercase latin letters) encoded
in ASCII; any other character is ignored and is output as it is, without
being encrypted or decrypted.The options for vigenere are as follows:
-d Perform decryption
-e Perform encryption (this is the default if no option is given).
kasiski reads a ciphertext from standard input and tries to guess the key
used to encrypt it with vigenere. The guessed key is written into
standard output. The read ciphertext must have been generated by
vigenere on either an English plaintext message or a Portuguese plaintext
message (only the frequency of letters in those languages are known).The options for kasiski are as follows:
-e Use letter frequency in the English language for the frequency
analysis. (this is the default if no option is given).-p Use letter frequency in the Portuguese language for the frequency
analysis.EXAMPLES
Consider the following message text in the file sample.txt:I'd just like to interject for a moment. What you're referring to as
Linux, is in fact, GNU/Linux, or as I've recently taken to calling it,
GNU plus Linux. Linux is not an operating system unto itself, but
rather another free component of a fully functioning GNU system made
useful by the GNU corelibs, shell utilities and vital system components
comprising a full OS as defined by POSIX.Many computer users run a modified version of the GNU system every day,
without realizing it. Through a peculiar turn of events, the version of
GNU which is widely used today is often called "Linux", and many of its
users are not aware that it is basically the GNU system, developed by
the GNU Project.There really is a Linux, and these people are using it, but it is just a
part of the system they use. Linux is the kernel: the program in the
system that allocates the machine's resources to the other programs that
you run. The kernel is an essential part of an operating system, but
useless by itself; it can only function in the context of a complete
operating system. Linux is normally used in combination with the GNU
operating system: the whole system is basically GNU with Linux added, or
GNU/Linux. All the so-called "Linux" distributions are really
distributions of GNU/Linux.The following example encrypts the message: using the string "stallman"
as key.$