Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Secure cipher but now breakable

License

NotificationsYou must be signed in to change notification settings

CrypTools/VigenereCipher

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Secure cipher but now breakable

How it works

At its core, the vigenere cipher is several Caesar ciphers, with a different shift value depending on the key. It can be computed simply by hand, through the use of a vigenere table. In code, it can be done using modulo arithmetic.

Encoding

To encode, we first convert every letter to a number between 0 and 25, where A is 0, and Z is 25. If the key is shorter than the message, it is repeated until they are the same length, i.e. if the message iscryptography, and the key issecretkey:

msg = cryptographykey = secretkeysec

The ith character of the output O, can be computed from the message M, and key K using the follwing formula:

O[i] = (M[i] + K[i]) mod 26

Decoding

Decoding the output O, into the message M knowing the key K, is just as simple:

M[i] = (O[i] - K[i]) mod 26

Implementations

LanguageEncryptDecrypt
Javascriptencrypt.jsdecrypt.js
Pythonencrypt.pydecrypt.py
Cvigenere.cvigenere.c

Running the tests

Tests are automatically handled byTravis CI.

Contributing

Please readCONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.

Versioning

We useSemVer for versioning. For the versions available, see thetags on this repository.

Authors

See also the list ofcontributors who participated in this project.

License

This project is licensed under the MIT License - see theLICENSE.md file for details

About

Secure cipher but now breakable

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors3

  •  
  •  
  •  

[8]ページ先頭

©2009-2025 Movatter.jp