Cifroteko: Kinda hakish crypto library for Ruby (WIP)
Cifroteko is a cryptographic library for people who want to tinker with cryptography or use it in cryptographic CTFs. Now, library is in fast and heavy development. Don't expect stable API. Also, it is not safe to use this library to protect anything - ex. provided code is not constant-time.
At the moment it supports:
- SHA0, SHA1
- SHA256, SHA224
- HMACs & CBC-MACs
- CBC mode (with any PRP)
- CTR mode (with any PRP)
- Raw heterogeneous balanced Feistel networks
- Merkle–Damgård construction with any compression function
There are some others primitives, but now, it's very much Work In Progress™
"Your code is neither stable nor safe nor fast, why would I use it?"
If You want to protect things, go and use OpenSSL or something. This gem, by exposing internals of algorithims, allows you to make ex. length extension attacks or experiment with different IVs for hash functions. It is fully written in ruby, so You can modify any part of it.
How to start
Add gem to your Gemfile
And then execute:
Or install it yourself as:
gem install cifroteko
Using Github repo
git clone https://github.com/LenaPiszczek/cifroteko # Clone repo cd cifroteko bundle install # Install dependencies bundle exec rake test # Run tests if You want bundle exec rake install # Install gem
Bug reports and pull requests are welcome on GitHub at https://github.com/LenaPiszczek/cifroteko
Please contact me or open an issue before writing code, so we can discuss it.