Botan Bindings Project Milestone: Halfway there with low-level bindings!

Hi all!

I wanted to make a fair bit of progress before announcing it, but a few weeks ago, I started working on lightweight bindings to the Botan cryptography library's C FFI. Initially, I was trying to revive the defunct Z-Botan bindings, but stripping it of its non-building dependencies proved to be infeasible, and the embedded version of Botan also proved to be out of date. Rather than give up, I decided to make a project of it, and start from scratch with fresh bindings to the latest version in modern Haskell.

This approach has been extremely rewarding, and today, I am proud to share that I have hit a wonderful milestone - I am halfway through implementing the low-level 1:1 bindings.

Right now, the bindings support:

  • Hashing
  • Message authentication codes
  • Symmetric ciphers
  • Block cipher modes
  • Public key signatures
  • Bcrypt and Password hashing
  • Random number generators
  • Base16 and Base64 encoding

Frankly, it is awkward to use, isn't versioned yet, and does not even have any algorithm constants (yet!), but as long as you can read the Botan C FFI docs, it works - and if everything keeps going as smoothly as it has, a friendlier high-level interface isn't too far away.

I don't have a project page yet, but if you want to follow this project, you can check out the repo, or you can follow the devlog on the Haskell Discourse where I've been more-or-less posting daily.

ApothecaLabs,
ApothecaLabs avatar

I have not heard of raaz, but I am an avid fan of libsodium / saltine which is similar. I was already considering implementing such an interface, and have added this to the todo list.

_I think kbin ate my first reply, ignore it if it resurfaces, _

jaror,
jaror avatar

By the way, have you heard of raaz? It uses backpack to define general interfaces of many cryptographic functions. I think it would be interesting to see if you can try implementing their interface with your bindings.

jaror,
jaror avatar

Congratulations with your fast progress! I think cryptographic hashes and random number generators are criminally underused. I hope this can make them more accessible.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • haskell
  • ethstaker
  • DreamBathrooms
  • ngwrru68w68
  • magazineikmin
  • InstantRegret
  • everett
  • thenastyranch
  • Youngstown
  • rosin
  • slotface
  • modclub
  • khanakhh
  • kavyap
  • Durango
  • JUstTest
  • osvaldo12
  • cubers
  • Leos
  • mdbf
  • tacticalgear
  • normalnudes
  • tester
  • GTA5RPClips
  • provamag3
  • cisconetworking
  • anitta
  • megavids
  • lostlight
  • All magazines