Giter Site home page Giter Site logo

byhowe / oxicrypt Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 11.69 MB

Low level cryptography library written in Rust with bindings to C and Python.

License: MIT License

Rust 88.57% Meson 0.66% C 8.89% Python 0.12% C++ 1.76%
cryptography rust c aes sha encryption python

oxicrypt's Introduction

OxiCrypt

This is one of my abandoned projects. I started this when Rust didn't have the features I wanted in my library. However, it does seem to me that they added really coold features which I would like to try. I will get around to working on this library eventually. But please, DO NOT USE THIS LIBRARY FOR SERIOUS THINGS. It is just a hobby project.


A cryptography library that is mainly implemented in Rust. I aim to implement bindings to other languages such as C/C++ and Python. This project is just to learn more about cryptographic algorithms and experimenting with FFI. I don't know much about cryptography, so if you want to use a cryptography library you should use other libraries that are well-tested and written by people who know their stuff.

Structure of this library

This library contains the following crates:

  • oxicrypt includes the source files for the Rust API. It implements the high level API.
  • oxicrypt_c is the C/C++ API. The C API is built using meson, which enables the c feature during compilation to activate parts of the library that implement the C interface.
  • oxicrypt_core is the crate the implements the low level functions. Things like the compression functions for the digest algorithms or the raw AES functions for different kinds of architectures as well as generic implementations are handled by this library. You need not interface with this library directly unless you need low level access.
  • oxicrypt_python implements the FFI between Rust and Python. The crate exposes the FFI module with the help of PyO3. The Python module imports the FFI crate and implements a higher level API for Python.
  • oxicrypt_test includes test vectors for the algorithms. This crate is only used when in development mode.

Installation

Rust

Put the following in your Cargo.toml.

oxicrypt = { version = "0.1", git = "https://github.com/byhowe/oxicrypt.git" }

C/C++

Run the following commands to install the headers, a static library and a shared library.

$ meson --prefix /usr --buildtype release --default-library both target
$ meson install -C target

Python

Currently, the Python API does not expose much. That being said, much of the functionality of OxiCrypt will be included. The current Python module can be installed with the following command.

$ cd oxicrypt_python
$ maturin build
$ pip install ../target/wheels/oxicrypt-0.1.0-cp310-cp310-manylinux_2_34_x86_64.whl

Maturin will generate a wheel file that is usually located under the target directory. Based on the output of Maturin, change the path to the wheel file accordingly.

oxicrypt's People

Contributors

byhowe avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.