Skip to content

ToyCrypto is a multi-platform crypto library. WIP. My own personal experiment :>

License

Notifications You must be signed in to change notification settings

cytesys/toycrypto

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ToyCrypto

C/C++ CI CodeQL Coverity

Introduction

ToyCrypto is a dynamically linked crypto library written in C++. It should work on both *nix-like systems, MacOSX and Windows.

Disclaimer

This library is the result of me toying with C++ and crypto (hence the name), and can not be relied upon to work correctly, obviously :]
This is for experimental use only! Use at your own risk!

What's currently implemented?

ToyCrypto is very much a work in progress, and so far only a few hashing functions has been implemented:

  • SHA2:
    • SHA224
    • SHA256
    • SHA384
    • SHA512
  • SHA3:
    • SHA3-224
    • SHA3-256
    • SHA3-384
    • SHA3-512
  • SHAKE:
    • SHAKE128
    • SHAKE256
  • BLAKE
    • BLAKE224
    • BLAKE256
    • BLAKE384
    • BLAKE512
  • BLAKE2
    • BLAKE2s
    • BLAKE2b

The following hash algorithms have also been implemented, but these have been deprecated by NIST.

  • MD2
  • MD4
  • MD5
  • SHA1

How to build and test

Dependencies

  • C++20
  • CMake 3.16 or higher
  • ninja-build

I use GTest for testing, and it should be downloaded automagically when you run cmake :]

Building

Building is pretty straight forward:

cmake -S . -B build
cmake --build build

# To run the tests
cd build
ctest

Note: CTest appears to only run one test, and that is because all the tests are built into one single executable named unittests. To see the actual tests you should run the unittests executable directly. It should be in ./build/tests/ somewhere.

About

ToyCrypto is a multi-platform crypto library. WIP. My own personal experiment :>

Topics

Resources

License

Stars

Watchers

Forks