Bee2 – это криптографическая библиотека, которая реализует алгоритмы и протоколы, определённые в стандартах Республики Беларусь. http://apmi.bsu.by/resources/tools.html

agievich c24ccdf4df Suppress redundant linker flags hace 6 meses
.github acf7fa384f Update workflows/build hace 10 meses
RPM ee3204e41c Create libbee2.spec hace 3 años
cmd 20ea345b8c Update cmd/ver hace 10 meses
doc b0ec9e5f60 Fix doxygen settings hace 1 año
dockerfiles 6d10f9bb03 Add bee2cmd testing to Docker tests hace 1 año
img 01a1994ec9 update logo hace 4 años
include 94cf87f270 Fix cmake files hace 6 meses
src 94cf87f270 Fix cmake files hace 6 meses
test 62cbc9b77f Fix a typo in test/crypto/bpki hace 6 meses
win ed27386815 Update win/bee2.def hace 10 meses
.editorconfig 69685e1cae finish belt-che and fix botp-ocra hace 4 años
.gitignore cd3530a8d2 Ignore IDE-specific project settings hace 1 año
AUTHORS.md 4c3ea5dada Update AUTHORS hace 8 meses
CMakeLists.txt c24ccdf4df Suppress redundant linker flags hace 6 meses
Docker.md d3571e12ab Update Docker.md hace 1 año
LICENSE.txt da35c2d3aa Move to the Apache 2.0 license hace 1 año
README.md fc5a755dac Describe automated tools in README hace 1 año
docker-bake.json 1a4ea94521 Add Docker support for build and test (#6) hace 1 año

README.md

Bee2: a cryptographic library

Github Actions Build Status Coverity Static Analysis Coverage Analysis

What is Bee2?

Bee2 is a cryptographic library which implements cryptographic algorithm and protocols standardized in Belarus.

Bee2 fully supports the following standards (see apmi.bsu.by/resources/std.html):

  1. STB 34.101.31 (belt): data encryption and integrity algorithms.
  2. STB 34.101.45 (bign): digital signature and key transport algorithms over elliptic curves.
  3. STB 34.101.47 (brng): cryptographic algorithms of pseudorandom number generation + one-time passwords.
  4. STB 34.101.60 (bels): secret sharing algorithms.
  5. STB 34.101.66 (bake): key establishment protocols over elliptic curves.
  6. STB 34.101.77 (bash): sponge-based algorithms.

Bee2 partially supports cryptographic mechanisms and data formats defined in the following standards:

  1. STB 34.101.78 (bpki): a PKI profile.
  2. STB 34.101.79 (btok): cryptographic tokens.

Additionally, Bee2 implements digital signature algorithms standardized in Russia and Ukraine.

Build

mkdir build
cd build
cmake [-DCMAKE_BUILD_TYPE={Release|Debug|Coverage|ASan|ASanDbg|MemSan|MemSanDbg|Check}]\
      [-DBUILD_FAST=ON]\
      [-DBASH_PLATFORM={BASH_32|BASH_64|BASH_AVX2|BASH_AVX512|BASH_NEON}]\
      ..
make
[make test]
[make install]

Note. To build on Windows you need to specify compiler and use the compiler-specific make command. The following example is for the MinGW compiler:

mkdir build
cd build
cmake [-DCMAKE_BUILD_TYPE={Release|Debug|Coverage|ASan|ASanDbg|MemSan|MemSanDbg|Check}]\
      [-DBUILD_FAST=ON]\
      [-DBASH_PLATFORM={BASH_32|BASH_64|BASH_AVX2|BASH_AVX512|BASH_NEON}]\
      -G "MinGW Makefiles"\
      ..
mingw32-make
[mingw32-make test]
[mingw32-make install]

Build types (Release by default):

The BUILD_FAST option (OFF by default) switches from safe (constant-time) functions to fast (non-constant-time) ones.

The BASH_PLATFORM option (BASH_64 by default) requests to use a specific implementation of the STB 34.101.77 algorithms optimized for a given hardware platform. The request may be rejected if it conflicts with other options.

License

Bee2 is distributed under the Apache License version 2.0. See Apache 2.0 or LICENSE for details.

Automated tools

Platforms:

Static analysis:

Code coverage:

Related projects

  • Bee2evp: an OpenSSL engine over Bee2;
  • Bee2j: a Java wrapper over Bee2.

What is the logo?

The logo of Bee2 is taken from a self-portrait engraving by Francysk Skaryna, the famous Belarusian medieval printer, enlightener, translator and writer. The engraving is full of riddles, mysteries and cryptograms. One version is that a bee in the right-bottom corner, our logo, designates the constellation known as Apes (Latin for bees) in Skaryna's time. This constellation was later renamed in Musca Borelias (Latin for northern fly) and then absorbed by Aries.