{"id":21361579,"url":"https://github.com/phillbush/vigenere","last_synced_at":"2025-03-16T06:44:10.579Z","repository":{"id":133378172,"uuid":"576440544","full_name":"phillbush/vigenere","owner":"phillbush","description":"C implementation of the Vigènere cipher and the attack on it using Kasiski examination and frequence analysis","archived":false,"fork":false,"pushed_at":"2022-12-09T21:48:26.000Z","size":25,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-22T19:16:15.204Z","etag":null,"topics":["cryptanalysis","kasiski-examination","kasiski-method","vigenere","vigenere-cipher"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/phillbush.png","metadata":{"files":{"readme":"README","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-12-09T21:45:29.000Z","updated_at":"2022-12-09T21:51:12.000Z","dependencies_parsed_at":null,"dependency_job_id":"4670538f-c91a-4560-9077-80f94002240c","html_url":"https://github.com/phillbush/vigenere","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phillbush%2Fvigenere","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phillbush%2Fvigenere/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phillbush%2Fvigenere/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phillbush%2Fvigenere/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/phillbush","download_url":"https://codeload.github.com/phillbush/vigenere/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243835937,"owners_count":20355611,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cryptanalysis","kasiski-examination","kasiski-method","vigenere","vigenere-cipher"],"created_at":"2024-11-22T06:10:25.092Z","updated_at":"2025-03-16T06:44:10.556Z","avatar_url":"https://github.com/phillbush.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"VIGENERE(1)                 General Commands Manual                VIGENERE(1)\n\nNAME\n     vigenere, kasiski – polyalphabetic cipher encryption and attack utilities\n\nSYNOPSIS\n     vigenere [-de] key\n     kasiski [-ep]\n\nDESCRIPTION\n     The vigenere utility implements encryption and decryption using the\n     Vigenere polyalphabetic shift cipher on a given alphabetic key.  The\n     kasiski utility implements a method of cryptanalysis of such cipher based\n     on Kasiski examination and frequence analysis.\n\n     vigenere uses the key given as argument to encrypt or decrypt the text\n     read from standard input.  The result is written into standard output.\n     Both the key argument and the standard input must contain plain\n     alphabetic characters (ie, uppercase or lowercase latin letters) encoded\n     in ASCII; any other character is ignored and is output as it is, without\n     being encrypted or decrypted.\n\n     The options for vigenere are as follows:\n\n     -d      Perform decryption\n\n     -e      Perform encryption (this is the default if no option is given).\n\n     kasiski reads a ciphertext from standard input and tries to guess the key\n     used to encrypt it with vigenere.  The guessed key is written into\n     standard output.  The read ciphertext must have been generated by\n     vigenere on either an English plaintext message or a Portuguese plaintext\n     message (only the frequency of letters in those languages are known).\n\n     The options for kasiski are as follows:\n\n     -e      Use letter frequency in the English language for the frequency\n             analysis.  (this is the default if no option is given).\n\n     -p      Use letter frequency in the Portuguese language for the frequency\n             analysis.\n\nEXAMPLES\n     Consider the following message text in the file sample.txt:\n\n           I'd just like to interject for a moment.  What you're referring to as\n           Linux, is in fact, GNU/Linux, or as I've recently taken to calling it,\n           GNU plus Linux.  Linux is not an operating system unto itself, but\n           rather another free component of a fully functioning GNU system made\n           useful by the GNU corelibs, shell utilities and vital system components\n           comprising a full OS as defined by POSIX.\n\n           Many computer users run a modified version of the GNU system every day,\n           without realizing it.  Through a peculiar turn of events, the version of\n           GNU which is widely used today is often called \"Linux\", and many of its\n           users are not aware that it is basically the GNU system, developed by\n           the GNU Project.\n\n           There really is a Linux, and these people are using it, but it is just a\n           part of the system they use.  Linux is the kernel: the program in the\n           system that allocates the machine's resources to the other programs that\n           you run.  The kernel is an essential part of an operating system, but\n           useless by itself; it can only function in the context of a complete\n           operating system.  Linux is normally used in combination with the GNU\n           operating system: the whole system is basically GNU with Linux added, or\n           GNU/Linux.  All the so-called \"Linux\" distributions are really\n           distributions of GNU/Linux.\n\n     The following example encrypts the message: using the string \"stallman\"\n     as key.\n\n           $ \u003csample.txt vigenere -e stallman\n           A'w jfdf lvcx tz tztrjcene roe s foxpzt.  [...]\n\n     The following example encrypts and then decrypts the same message using\n     the same key.\n\n           $ \u003csample.txt vigenere -e stallman | vigenere -d stallman\n           I'd just like to interject for a moment.  [...]\n\n     The following example encrypts the same message using the same key and\n     then tries to guess the key used to encrypt it.\n\n           $ \u003csample.txt vigenere -e stallman | kasiski -e\n           stallman\n\nHISTORY\n     The vigenere and kasiski utilities are the product of a project for 2022\n     2nd semester's course of Cyber Security of the Computer Science\n     department of the University of Brasilia, Brasil.\n\nBUGS\n     kasiski is not perfect.  It may not guess the key for relly short\n     messages, messages with more coincidental than accidental trigram\n     repetitions, messages with no trigram repetition at all, or messages with\n     a letter frequency very different from the ones common in the English or\n     Portuguese languages.\n\n     Short keys may be correctly guessed, but repeated a few number of times\n     (which are also valid. In the Vigenere cipher, a key is equivalent to its\n     repetition).\n\n           $ \u003csample.txt vigenere -e gnu | kasiski -e\n           gnugnugnugnu\n\n     Mid-size to long keys whose length is a prime number are probably guessed\n     wrong:\n\n           $ \u003csample.txt vigenere -e installgentoo | kasiski -e\n           inwtallgentooihstaalhpntooinstallkentdoinstallgenguo\n\n     Fiddling with the THRESHOLD value in the code can sometimes make kasiski\n     guess the right key.\n\n     kasiski also uses lots of memory.  Mostly because of its trigram\n     hashtable with no collision.\n\nAUTHORS\n     Lucas de Sena ⟨lucas at seninha dot org⟩\n\nOpenBSD 7.2                    December 9, 2022                    OpenBSD 7.2\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphillbush%2Fvigenere","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fphillbush%2Fvigenere","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphillbush%2Fvigenere/lists"}