ciphersaber2 alternatives and similar packages
Based on the "Data" category.
Alternatively, view ciphersaber2 alternatives based on common mentions on social networks and blogs.
lens10.0 3.8 ciphersaber2 VS lensLenses, Folds, and Traversals - Join us on web.libera.chat #haskell-lens
semantic-source10.0 8.0 ciphersaber2 VS semantic-sourceParsing, analyzing, and comparing source code across many languages
hnix9.9 4.5 ciphersaber2 VS hnixA Haskell re-implementation of the Nix expression language
text9.8 6.1 ciphersaber2 VS textHaskell library for space- and time-efficient operations over Unicode text.
code-builder9.8 0.0 ciphersaber2 VS code-builderPackages for defining APIs, running them, generating client code and documentation.
Frames9.7 0.0 ciphersaber2 VS FramesData frames for tabular data.
unordered-containersEfficient hashing-based container types
massiv9.7 0.0 ciphersaber2 VS massivEfficient Haskell Arrays featuring Parallel computation
compendium-clientMu (μ) is a purely functional framework for building micro services.
cassava9.7 0.0 ciphersaber2 VS cassavaA CSV parsing and encoding library optimized for ease of use and high performance
hashable9.6 2.1 ciphersaber2 VS hashableA class for types that can be converted to a hash value
holmes9.6 0.0 ciphersaber2 VS holmesA reference library for constraint-solving with propagators and CDCL.
critbit9.5 0.0 ciphersaber2 VS critbitA Haskell implementation of crit-bit trees.
primitive9.5 3.7 ciphersaber2 VS primitiveThis package provides various primitive memory-related operations.
refined9.5 0.0 ciphersaber2 VS refinedRefinement types with static checking
binary9.5 0.0 ciphersaber2 VS binaryEfficient, pure binary serialisation using ByteStrings in Haskell.
alfred-margaret9.5 6.5 ciphersaber2 VS alfred-margaretFast Aho-Corasick string searching
resource-pool9.5 0.0 ciphersaber2 VS resource-poolA high-performance striped resource pooling implementation for Haskell
caledon9.4 0.0 ciphersaber2 VS caledonhigher order dependently typed logic programing
higgledy9.4 0.0 ciphersaber2 VS higgledyHigher-kinded data via generics
aeson-qq9.4 0.0 ciphersaber2 VS aeson-qqJSON quasiquoter for Haskell
network-msgpack-rpcA MessagePack-RPC Implementation
diskhash9.4 0.0 ciphersaber2 VS diskhashDiskbased (persistent) hashtable
hashtables9.4 0.0 ciphersaber2 VS hashtablesMutable hash tables for Haskell, in the ST monad
data-msgpackA Haskell implementation of MessagePack
jump9.4 0.0 ciphersaber2 VS jumpJump start your Haskell development
discrimination9.4 2.6 ciphersaber2 VS discriminationFast linear time sorting and discrimination for a large class of data types
json-autotype9.4 0.0 ciphersaber2 VS json-autotypeAutomatic Haskell type inference from JSON input
certificate9.3 0.0 ciphersaber2 VS certificateCertificate and Key Reader/Writer in haskell
audiovisual9.3 0.0 ciphersaber2 VS audiovisualExtensible records, variants, structs, effects, tangles
dependent-sum9.3 0.0 ciphersaber2 VS dependent-sumDependent sums and supporting typeclasses for comparing and displaying them
IORefCAS9.3 0.0 ciphersaber2 VS IORefCASA collection of different packages for CAS based data structures.
cereal9.3 3.7 ciphersaber2 VS cerealA binary serialization library
dependent-map9.3 0.0 ciphersaber2 VS dependent-mapDependently-typed finite maps (partial dependent products)
reflection9.3 1.2 ciphersaber2 VS reflectionReifies arbitrary Haskell terms into types that can be reflected back into terms
orgmode-parse9.2 0.0 ciphersaber2 VS orgmode-parseAttoparsec parser combinators for parsing org-mode structured text!
streaming9.2 0.0 ciphersaber2 VS streamingAn optimized general monad transformer for streaming applications, with a simple prelude of functions
stdio9.2 1.1 ciphersaber2 VS stdioHaskell Standard Input and Output
rei9.2 0.0 ciphersaber2 VS reiProcess lists easily
protobuf9.2 1.6 ciphersaber2 VS protobufAn implementation of Google's Protocol Buffers in Haskell.
safecopy9.2 0.0 ciphersaber2 VS safecopyAn extension to Data.Serialize with built-in version control
bifunctors9.2 0.0 ciphersaber2 VS bifunctorsHaskell 98 bifunctors, bifoldables and bitraversables
avro9.2 0.0 ciphersaber2 VS avroHaskell Avro Encoding and Decoding Native Support (no RPC)
text-icu9.2 0.0 ciphersaber2 VS text-icuThis package provides the Haskell Data.Text.ICU library, for performing complex manipulation of Unicode text.
b-tree9.1 0.9 ciphersaber2 VS b-treeHaskell on-disk B* tree implementation
witherable9.1 3.1 ciphersaber2 VS witherableFilter with effects
tables9.1 0.0 ciphersaber2 VS tablesDeprecated because of
uuid9.1 0.0 ciphersaber2 VS uuidA Haskell library for creating, printing and parsing UUIDs
scientific9.1 0.0 ciphersaber2 VS scientificArbitrary-precision floating-point numbers represented using scientific notation
uuid-types9.1 0.0 ciphersaber2 VS uuid-typesA Haskell library for creating, printing and parsing UUIDs
ONLYOFFICE Docs — document collaboration in your environment
Do you think we are missing an alternative of ciphersaber2 or a related project?
Copyright © 2015 Bart Massey
This package provides a Haskell library and driver program implementing CipherSaber-2(CS2) stream encryption based on the RC4 stream encryption algorithm. This implementation has been tested against and is compatible with existing CipherSaber implementations.
The documentation for CS2 is a bit out-of-date and scattered.
CS2 is based on the RC4 stream cipher. Wikipedia has a nice history of RC4 as well as current reports on its cryptanalysis.
In 1999, Arnold Reinhold suggested using RC4 as the basis for citizens to learn to build their own encryption software, along the lines of Jedi Light Sabers. Reinhold proposed a stream protocol for RC4 ciphertext that he called CipherSaber (Note that the CipherSaber website is mostly abandoned and in some state of disrepair.)
In 2003, after cryptographic attacks were found against RC4 as used in CipherSaber, Reinhold modified the CipherSaber protocol to produce a new parameterized family of protocols known as CS2: the original CipherSaber is a special case of CS2, and is often referred to as CipherSaber-1.
Pseudocode for CS2 is available from a variety of places. The pseudocode given here attempts to be clear and normative.
CS2 encryption and decryption both require an RC4 implementation that has been modified to iterate the key schedule a given number of times.
<!-- This pseudocode translated from rc4.pseu by pseuf -->
-- Produce an RC4 keystream of length n with
-- r rounds of key scheduling given key k
rc4(n, r, k):
l ← length k
-- Initialize the array.
S ← zero-based array of 256 bytes
for i in 0..255
S[i] ← i
-- Do key scheduling.
j ← 0
repeat r times
for i in 0..255
j ← (j + S[i] + k[i mod l]) mod 256
S[i] ↔ S[j]
-- Finally, produce the stream.
keystream ← zero-based array of n bytes
j ← 0
for i in 0..n-1
i' ← (i + 1) mod 256
j ← (j + S[i']) mod 256
S[i'] ↔ S[j]
keystream[i] ← S[(S[i'] + S[j]) mod 256]
<!-- End of pseuf translation of rc4.pseu -->
CS2 encryption requires a plaintext message (treated as a bytestream), a key, and an "initial value" (IV) of 10 bytes. The key should be no more than 53 bytes, to ensure good mixing during key scheduling.
The IV is a nonce that must be different for each message sent: it should be chosen randomly if possible, but may be chosen pseudo-randomly or even just counted if necessary. CS2 appends the IV to the CS2 key to produce an RC4 key. RC4 uses only the first 256 RC4 key bytes. Thus, the CS2 key must be no more than 246 bytes: a longer CS2 key would cause some or all of the IV to not be used by RC4.
<!-- This pseudocode translated from encrypt.pseu by pseuf -->
-- Ciphersaber-2 encrypt message m with key k and
-- r rounds of key scheduling
encrypt(m, r, k):
n ← length m
iv ← appropriately-chosen 10-byte IV
k' ← prepend k to iv
keystream ← rc4(n, r, k')
ciphertext ← zero-based array of n + 10 bytes
for i in 0..9
ciphertext[i] ← iv[i]
for i in 0..n
ciphertext[i + 10] ← m[i] xor keystream[i]
<!-- End of pseuf translation of encrypt.pseu -->
CS2 decryption requires ciphertext and the encryption key used to produce the ciphertext.
<!-- This pseudocode translated from decrypt.pseu by pseuf -->
-- Ciphersaber-2 decrypt ciphertext m with key k and
-- r rounds of key scheduling
decrypt(m, r, k):
n ← length m
iv ← m[0..9]
delete the first 10 characters of m
k' ← prepend k to iv
keystream ← rc4(n - 10, r, k')
plaintext ← zero-based array of n - 10 bytes
for i in 0..n-10
plaintext[i] ← m[i] xor keystream[i]
<!-- End of pseuf translation of decrypt.pseu -->
CipherSaber2 library provides a relatively straightforward
ByteString interface. See the
cs2 uses the
CipherSaber2 library to encrypt
cs2 is written in Haskell, so you will need a Haskell
installation to run it. It depends on the package
from Hackage, as well as the
bytestring package that should probably have come with
your distribution but may need to be installed. Say "
install parseargs" and "
cabal install bytestring" to get
things set up. (This in turn may require a
package from your Linux distribution or thereabouts.)
runghc cs2.hs --help" for usage information.
runghc cs2.hs -e whee <f.txt >g.cs2" to encrypt the
f.txt with key
whee. An IV will be automatically
runghc cs2.hs -d whee <g.cs2 >ff.txt" to decrypt the
g.cs2 with key
test directory include a bunch of plaintext/ciphertext
pairs taken from the original CS2 materials. Please see
README.md in that directory for more information.
This work is licensed under the "MIT License". Please see the file LICENSE in the source distribution of this software for license terms.
*Note that all licence references and agreements mentioned in the ciphersaber2 README section above are relevant to that project's source code only.