Bee2
A cryptographic library
Bee2 is a cryptographic library which implements cryptographic algorithm and protocols standardized in Belarus. The project is written primarily in C, distributed under the Apache License 2.0 license, first published in 2015. Key topics include: cryptographic-library, elliptic-curve-diffie-hellman, encryption-algorithms, hashing-algorithms, message-authentication-code.
Bee2: a cryptographic library

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):
- STB 34.101.31 (belt): data encryption and integrity algorithms.
- STB 34.101.45 (bign): digital signature and key transport algorithms
over elliptic curves. - STB 34.101.47 (brng): cryptographic algorithms of pseudorandom number
generation + one-time passwords. - STB 34.101.60 (bels): secret sharing algorithms.
- STB 34.101.66 (bake): key establishment protocols over elliptic curves.
- STB 34.101.77 (bash): sponge-based algorithms.
Bee2 partially supports cryptographic mechanisms and data formats defined in
the following standards:
- STB 34.101.78 (bpki): a PKI profile.
- 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}]\
[-DBASH_PLATFORM={BASH_32|BASH_64|BASH_AVX2|BASH_AVX512|BASH_NEON}]\
..
make
[make test]
[make install]
Note. One can select a generator of makefiles with the
-Gflag in
cmakeand then use a build tool specific to this generator instead ofmake.
The following example shows how to build on Windows using MinGW:mkdir build && cd build cmake -G "MinGW Makefiles" .. mingw32-make
Build types (Release by default):
Coverage— test coverage;ASan,ASanDbg— address sanitizer;MemSan,MemSanDbg— memory sanitizer;Check— strict compile rules.
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.
Third-party code
Automated tools
Platforms:
- Github Actions;
- Travis CI (archived).
Static analysis:
Code coverage:
Related projects
- Bee2evp: an OpenSSL engine over Bee2;
- Bee2j: a Java wrapper;
- Bee2go: a Go wrapper;
- Bee2ports: wrappers for other
languages.
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.
Contributors
Showing top 8 contributors by commit count.
