A full featured toolkit for ancient and classic cipher methods, and their analysis tools, implemented in .NET using high performance memory management and SIMD hardware intrinsics.
Use command-line interface:
crypto encrypt shift -k 13 "Hello world!"
crypto solve "Wkh txlfn eurzq ira mxpsv ryhu wkh odcb grj."
Use rich framework APIs:
dotnet add package Science.Cryptography.Ciphers --prerelease
dotnet add package Science.Cryptography.Ciphers.Specialized --prerelease
dotnet add package Science.Cryptography.Ciphers.Analysis --prerelease
- New CLI app for new way of usage
- Ciphers and tools rewritten to allocation free operation, take advantage of hardware intrinsics, and use specialized fast path for ASCII encoding. See Performance Improvements for details and benchmarks.
- Reworked analysis tools and
IAsyncEnumerable
interface for consuming analysis intermediate results - CryptogramSolver for automatic decryption of ciphertext
- Brute force key spaces with parallel partitioning support
- New ciphers (10+): Scytale, Morse Code with extended charset, Polybius, Columnar Transposition, Double Columnar Transposition, ADFGX, ADFGVX, Straddling Checkerboard, One-Time Pad, WolfenbĂĽtteler, Malespin
- More detailed documentation
Many of the library operations are published via CLI as well:
- Download
- List available assets
- Encrypt and decrypt text
- Analyze ciphertext
- Find key for a ciphertext
- Solve a cryptogram
You can unlock the full power of the library from code:
var cipher = new PlayfairCipher();
var key = PolybiusSquare.CreateFromKeyword("PLAYFAIR", WellKnownAlphabets.EnglishWithoutJ);
var ciphertext = cipher.Encrypt("Hello world!", key);
- Get started
- Basic tools
- Encrypt and decrypt text
- Implement a cipher
- Analyze ciphertext
- Find key for a ciphertext
- Solve a cryptogram
The full list of assets:
Contributions for the following areas are welcome:
- Ciphers
- Prefer performance in implementation (no heap allocations, SIMD operations, ...)
- Feel free to add any not listed
- Performance improvements
- Post benchmark and its results as evidence to show change in efficiency
- Unit tests