Skip to content
/ yacl Public
forked from secretflow/yacl

YACL (Yet Another Common crypto library) is a C++ library that contains cryptgraphy, network and io modules which other SecretFlow code depends on.

License

Notifications You must be signed in to change notification settings

AnakinMac/yacl

 
 

Repository files navigation

YACL (Yet Another Common crypto Library)

CircleCI

A C++ library that contains common cryptgraphy, network and io modules which other SecretFlow code depends on.

Repo layout:

  • base: some basic types and utils in yacl.
  • crypto: a crypto library desigend for secure computation and so on.
    • base: basic/standarized crypto, i.e. AES, hashing.
    • primitives: crypto primitives, i.e. OT, DPF.
    • tools: theoretical crypto tools, i.e. Random Oracle (RO), PRG.
    • utils: easy-to-use crypto utilities.
  • io: a simple streaming-based io library.
  • link: a simple rpc-based MPI framework, providing the SPMD parallel programming capability.

Supported crypto algorithms

See Full List of supported algorithms in: ALGORITHMS.md

Selected algorithms:

Supported platforms

Linux x86_64 Linux aarch64 macOS x86_64 macOS Apple Silicon Windows x86_64 Windows WSL2 x86_64
CPU yes yes yes yes no yes

Build

Prerequisite

Linux

Install gcc>=10.3, cmake, ninja, nasm

macOS

# Install Xcode
https://apps.apple.com/us/app/xcode/id497799835?mt=12

# Select Xcode toolchain version
sudo xcode-select -s /Applications/Xcode.app/Contents/Developer

# Install homebrew
https://brew.sh/

# Install dependencies
brew install bazel cmake ninja nasm automake libtool libomp

Build & UnitTest

# build as debug
bazel build //... -c dbg

# build as release
bazel build //... -c opt

# test
bazel test //...

# [optional] build & test with ASAN if you're not on MacOS
bazel build //... -c dbg --config=asan
bazel test //... --config=asan -c dbg

# [optional] build & test with ASAN on MacOS
bazel build //... -c dbg --config=macos-asan
bazel test //... --config=macos-asan -c dbg

License

See LICENSE and NOTICE.md

About

YACL (Yet Another Common crypto library) is a C++ library that contains cryptgraphy, network and io modules which other SecretFlow code depends on.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 93.9%
  • Starlark 5.7%
  • C 0.4%