Crate solitaire_cypher
source ·Expand description
§Solitaire Cypher
An implementation of the playing card based cypher created by Bruce Schneier and featured in Neal Stephenson’s “Cryptonomicon”. Includes crate solitaire_cypher_cli for command line usage. See: https://www.schneier.com/academic/solitaire/ and, of course, read Cryptonomicon!
Structs§
- Container for an ordered collection of UpperLetters intended for use as cyphertext
- Container for an ordered collection of UpperLetters for use as a KeyStream
- Container for an ordered collection of UpperLetters intended for use as a passphrase
- Container for an ordered collection of UpperLetters intended as plaintext
Functions§
- Decrypt CypherText into PlainText using the given KeyStream
- Encrypt PlainText into CypherText using the given KeyStream. Will panic if KeyStream length is less than PlainText length rounded up to the nearest multiple of 5.
- Create a KeyStream of the specified length from a Card deck
- Create a key deck from a Passphrase (aka key). This follows the basic algorithm in that it does not include the “Optional step”.
Type Aliases§
- Bounded type for ascii uppercase values A-Z