Data Stream Encryption: ciphr

ID N0WHERE:25518
Type n0where
Reporter N0where
Modified 2014-12-27T05:46:04


Data Stream Encryption

Ciphr is a CLI tool for performing and composing encoding, decoding, encryption, decryption, hashing, and other various operations on streams of data. It takes provided data, file data, or data from stdin, and executes a pipeline of functions on the data stream, writing the resulting data to stdout. It was designed primarily for use in the information security domain, mostly for quick or casual data manipulation for forensics, penetration testing, or capture-the-flag events; it likely could have other unforseen uses, but should be presumed to be an experimental toy as no effort was made to make included cryptographic functions robust against attacks (timing attacks, etc), and it is recommended not to use any included functions in any on-line security mechanisms.


Must be cloned and installed until it gets into after being cleaned up

Requires bundler to be installed ( gem install bundler )

git clone
cd ciphr
bundle install
bundle exec rake install


$ ciphr '"abc"'
$ ciphr '"abc"|hex'
$ ciphr '"abc"|hex|~hex'
$ ciphr '"616263"|~hex'
$ ciphr '0x616263'
$ ciphr '0x616263|hex'
$ ciphr '0b10101010|bin'
$ ciphr '0b10101010|hex'
$ ciphr '255|hex'
$ ciphr '65'
$ ciphr '""|md5|hex'
$ echo -n "" | ciphr 'md5|hex'
$ ciphr '"abc"|sha1|hex'
$ echo -n "abc" | ciphr 'sha1' | xxd -ps
$ echo -n "abc" | ciphr 'xor("abc")|hex'
$ echo -n "abc" | ciphr 'xor(0x01)|hex'
$ echo -n "abc" | ciphr 'xor(0x01)'
$ echo -n "abc" | ciphr 'xor(0x020304)'
$ echo -n "abc" | ciphr 'aes128cbc("super secret key")|hex'


$ ciphr -h -v
Usage: ciphr [options] [spec]
    -h, --help
    -v, --verbose
    -n, --no-newline
Available Functions: aliases ([args])
    cat, noop (input)
    b2, base2, bin, binary (input)
    b8, base8, oct, octal (input)
    b10, base10, dec, decimal (input)
    b16, base16, hex, hexidecimal (input)
    b64, base64 (input)
    and (input, input)
    or (input, input)
    xor (input, input)
    md2 (input)
    md4 (input)
    md5 (input)
    sha (input)
    sha1 (input)
    sha224 (input)
    sha256 (input)
    sha384 (input)
    sha512 (input)
    hmac-md2, hmacmd2 (input, key)
    hmac-md4, hmacmd4 (input, key)
    hmac-md5, hmacmd5 (input, key)
    hmac-sha, hmacsha (input, key)
    hmac-sha1, hmacsha1 (input, key)
    hmac-sha224, hmacsha224 (input, key)
    hmac-sha256, hmacsha256 (input, key)
    hmac-sha384, hmacsha384 (input, key)
    hmac-sha512, hmacsha512 (input, key)
    aes-128-cbc, aes128cbc (input, key)
    aes-128-cfb, aes128cfb (input, key)
    aes-128-cfb1, aes128cfb1 (input, key)
    aes-128-cfb8, aes128cfb8 (input, key)
    aes-128-ecb, aes128ecb (input, key)
    aes-128-ofb, aes128ofb (input, key)
    aes-192-cbc, aes192cbc (input, key)
    aes-192-cfb, aes192cfb (input, key)
    aes-192-cfb1, aes192cfb1 (input, key)
    aes-192-cfb8, aes192cfb8 (input, key)
    aes-192-ecb, aes192ecb (input, key)
    aes-192-ofb, aes192ofb (input, key)
    aes-256-cbc, aes256cbc (input, key)
    aes-256-cfb, aes256cfb (input, key)
    aes-256-cfb1, aes256cfb1 (input, key)
    aes-256-cfb8, aes256cfb8 (input, key)
    aes-256-ecb, aes256ecb (input, key)
    aes-256-ofb, aes256ofb (input, key)
    aes128 (input, key)
    aes192 (input, key)
    aes256 (input, key)
    bf (input, key)
    bf-cbc, bfcbc (input, key)
    bf-cfb, bfcfb (input, key)
    bf-ecb, bfecb (input, key)
    bf-ofb, bfofb (input, key)
    cast (input, key)
    cast-cbc, castcbc (input, key)
    cast5-cbc, cast5cbc (input, key)
    cast5-cfb, cast5cfb (input, key)
    cast5-ecb, cast5ecb (input, key)
    cast5-ofb, cast5ofb (input, key)
    des (input, key)
    des-cbc, descbc (input, key)
    des-cfb, descfb (input, key)
    des-cfb1, descfb1 (input, key)
    des-cfb8, descfb8 (input, key)
    des-ecb, desecb (input, key)
    des-ede, desede (input, key)
    des-ede-cbc, desedecbc (input, key)
    des-ede-cfb, desedecfb (input, key)
    des-ede-ofb, desedeofb (input, key)
    des-ede3, desede3 (input, key)
    des-ede3-cbc, desede3cbc (input, key)
    des-ede3-cfb, desede3cfb (input, key)
    des-ede3-cfb1, desede3cfb1 (input, key)
    des-ede3-cfb8, desede3cfb8 (input, key)
    des-ede3-ofb, desede3ofb (input, key)
    des-ofb, desofb (input, key)
    des3 (input, key)
    desx (input, key)
    desx-cbc, desxcbc (input, key)
    rc2 (input, key)
    rc2-40-cbc, rc240cbc (input, key)
    rc2-64-cbc, rc264cbc (input, key)
    rc2-cbc, rc2cbc (input, key)
    rc2-cfb, rc2cfb (input, key)
    rc2-ecb, rc2ecb (input, key)
    rc2-ofb, rc2ofb (input, key)
    rc4 (input, key)
    rc4-40, rc440 (input, key)
    rc5 (input, key)
    rc5-cbc, rc5cbc (input, key)
    rc5-cfb, rc5cfb (input, key)
    rc5-ecb, rc5ecb (input, key)
    rc5-ofb, rc5ofb (input, key)
    seed (input, key)
    seed-cbc, seedcbc (input, key)
    seed-cfb, seedcfb (input, key)
    seed-ecb, seedecb (input, key)
    seed-ofb, seedofb (input, key)
    blowfish (input, key)

Source && Download

Data Stream Encryption: ciphr download