{"id":16086040,"url":"https://github.com/outspace/vigdec","last_synced_at":"2025-10-25T03:11:40.122Z","repository":{"id":161250447,"uuid":"485463524","full_name":"outspace/vigdec","owner":"outspace","description":"vigdec aka heartbreaker – tool that breaks Vigenère cipher without knowing the key.","archived":false,"fork":false,"pushed_at":"2022-04-25T17:27:11.000Z","size":1644,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-11T10:04:56.107Z","etag":null,"topics":["breaker","cryptography","decryption","decryptor","substitution-cipher","vigenere","vigenere-cipher","vigenere-cipher-algorithm","vigenere-decoder"],"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/outspace.png","metadata":{"files":{"readme":"README.md","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-04-25T17:13:02.000Z","updated_at":"2022-07-14T15:42:28.000Z","dependencies_parsed_at":"2023-06-07T05:30:39.246Z","dependency_job_id":null,"html_url":"https://github.com/outspace/vigdec","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/outspace%2Fvigdec","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/outspace%2Fvigdec/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/outspace%2Fvigdec/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/outspace%2Fvigdec/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/outspace","download_url":"https://codeload.github.com/outspace/vigdec/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247345856,"owners_count":20924102,"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":["breaker","cryptography","decryption","decryptor","substitution-cipher","vigenere","vigenere-cipher","vigenere-cipher-algorithm","vigenere-decoder"],"created_at":"2024-10-09T13:10:17.921Z","updated_at":"2025-10-25T03:11:40.029Z","avatar_url":"https://github.com/outspace.png","language":"C++","readme":"# vigdec\n\n## vigdec – tool that breaks Vigenère cipher without knowing the key.\n\nproject consist of three parts:\n- cryptor – library that used for crypto operation (Vigenère cipher\nimplementation)\n- analyzer – class with decoder algorithm and console application.\n- test – testsuite based on gTest\n\n## Algorithm:\n\nDecryption algorithm based on local random search technique. Text “fitness” fitness\nmeasure based on quadgram statistics.\n\n## Detailed algorithm description:\nhttp://www.practicalcryptography.com/cryptanalysis/stochastic-searching/cryptanalysis-vigenere-cipher-part-2/\n\nThis technique gives much better results than other standard algorithms. Around 35\nletters is enough for stably decryption. Sometimes it works with less size of text but it\ndepends on text quality and it’s quadgram statistics.\n\n## Usage:\n```\n./vigdec cipher_text_file [heapsize]\n-cipher_text_file is a path to file that contains English text encrypted with Vigenere\ncipher.\n-heapsize is a digit. Optional parameter that varieties correctness and time/memory\ncomplexity.\nBy default it is 100. Increasing this parameter can give better results but will take\nmore time. You can decrease or increase this parameter to fit your time/memory\nlimits.\n```\n## Limitations:\n- The key length is limited by 12 symbols. It’s hard coded and can be\nincreased. In this project it’s limited by the task description.\n- Application require additional files with bigrams, trigrams and quadgrams\nstatistics. These files are included into the project and their names are hard\ncoded. That’s why you need to start application in directory that contains this\nfiles.\n- The language for text is English. Algorithm can be applied for any language\nbut it requires some changes (alphabet letter count and n-gram statistic files\nfor this language).\n\n## Building:\nrequires: C++11, cmake, pthread.\n```\nextract vigdec.zip\ncd vigdec\ncmake .\nmake\n```\nTested on Ubuntu 20.10, should work on other OS.\n\n## Examples:\n\nTest text taken from\nhttps://pages.mtu.edu/~shene/NSF-4/Tutorial/VIG/Vig-Examples.html (example 2. other text has larger key length than in limits).\n```\nosboxes@osboxes:~/test/vigdec$ ./vigdec testdata/testdata.txt\nKey: UNITEDSTATES\nPlaintext:\nWETHEREFORETHEREPRESENTATIVESOFTHEUNITEDSTATESOFAMERICAINGENERALCONGRESSASS\nEMBLEDAPPEALINGTOTHESUPREMEJUDGEOFTHEWORLDFORTHERECTITUDEOFOURINTENTIONSDOI\nNTHENAMEANDBYAUTHORITYOFTHEGOODPEOPLEOFTHESECOLONIESSOLEMNLYPUBLISHANDDECL\nARETHATTHESEUNITEDCOLONIESAREANDOFRIGHTOUGHTTOBEFREEANDINDEPENDENTSTATESTHAT\nTHEYAREABSOLVEDFROMALLALLEGIANCETOTHEBRITISHCROWNANDTHATALLPOLITICALCONNECTIO\nNBETWEENTHEMANDTHESTATEOFGREATBRITAINISANDOUGHTTOBETOTALLYDISSOLVEDANDTHATASF\nREEANDINDEPENDENTSTATESTHEYHAVEFULLPOWERTOLEVYWARCONCLUDEPEACECONTRACTALLIA\nNCESESTABLISHCOMMERCEANDTODOALLOTHERACTSANDTHINGSWHICHINDEPENDENTSTATESMAYO\nFRIGHTDOANDFORTHESUPPORTOFTHISDECLARATIONWITHAFIRMRELIANCEONTHEPROTECTIONOFDI\nVINEPROVIDENCEWEMUTUALLYPLEDGETOEACHOTHEROURLIVESOURFORTUNESANDOURSACREDH\nONOR\nSame text cutted into 44 letters\nosboxes@osboxes:~/test/vigdec$ ./vigdec testdata/testdata6.txt\nKey: UNITEDSTATES\nPlaintext:\nWETHEREFORETHEREPRESENTATIVESOFTHEUNITEDSTA\n```\n\nAlso it can be checked with https://www.guballa.de/vigenere-solver. Directory testdata contains some test ciphertexts.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foutspace%2Fvigdec","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Foutspace%2Fvigdec","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foutspace%2Fvigdec/lists"}