#bindings #blowfish #api-bindings #encryption-decryption

no-std blowfish-mbed-c

Rusty interface for the deprecated mbedtls implementation of Blowfish cipher

2 releases

0.1.1 Feb 13, 2024
0.1.0 Jan 26, 2024

#1915 in Cryptography

Apache-2.0 OR GPL-2.0-or-later

57KB
939 lines

blowfish-mbed

Build status License: Apache-2.0 License: GPLv2+

This repository provides two crates for encryption and decryption of data using the Blowfish cipher. While it is no longer recommended for usage in modern software, this cipher can still be found in legacy code.

The crates in this repository are:

  • blowfish-mbed-sys - direct bindings to mbedtls's cipher implementation;

    • crates.io (sys) docs.rs (sys)
  • blowfish-mbed-c - idiomatic Rust interface over the C bindings above.

    • crates.io (c) docs.rs (c)

Backlog

The blowfish-mbed-c crate only wraps ECB and CBC modes of operation yet.

It would be a good idea to also provide a safe interface for the CFB and CTR modes for completeness' sake, since mbedtls already implements those.

License

The implementation found in this repository is lifted almost directly from the mbedtls suite. To be more specific, from its 2.28 branch, as Blowfish was removed from the library starting from 3.x versions.

Thus, licensing for this repository follows that of the original implementation. Both crates are dual-licensed under Apache-2.0 and GPL-2.0-or-later.

Dependencies

~0.4–1.1MB
~25K SLoC