Our code relies on the following tools, which must be installed before building:
- Python (version 3.6+), used by SCons
- SCons (3.0+), the Python-based build system used by Vale
- On an Ubuntu system, including Windows Subsystem for Linux, you can install the Python/SCons dependencies with:
sudo apt install scons
- On Mac OS X (tested with El Capitan, 10.11.6), you can install the Python/SCons dependencies with:
brew install scons
- Note: if you run SCons under Cygwin, you might want to also install the Python
pywin32
module (viapip
), which our SCons file will detect and use to stop Cygwin child processes when SCons stops
- On an Ubuntu system, including Windows Subsystem for Linux, you can install the Python/SCons dependencies with:
- The Vale tool
- Download the latest Vale binary release zip file
- Set the
VALE_HOME
environment variable to the unzipped binaries directory (e.g.,VALE_HOME = vale-release-x.y.z
)
- F* (
master
branch), KaRaMeL (master
branch), and Z3 (version 4.5.1)- Set the
FSTAR_HOME
environment variable to the F* directory (e.g.,FSTAR_HOME = FStar
) - Set the
KRML_HOME
environment variable to the KaRaMeL directory (e.g.,KRML_HOME = karamel
) - (See the HACL* installation guide for directions on installing F*, KaRaMeL, and Z3 and setting environment variables)
- Set the
- An installed C/C++ compiler, used by SCons to compile C/C++ files
Once these tools are installed, running SCons in the vale
directory will
build and verify the Vale cryptographic library:
- To build all sources in the specs and code directory:
python.exe scons.py
- To build the AES-GCM assembly language files and test executable:
- On Windows, set the
PLATFORM
environment variable toX64
python.exe scons.py --FSTAR-EXTRACT obj/aesgcm.asm obj/aesgcm-gcc.S obj/aesgcm-linux.S obj/aesgcm-macos.S
python.exe scons.py --FSTAR-EXTRACT obj/TestAesGcm.exe
- On Windows, set the
- To build in parallel, add the
-j
option (e.g.,-j 4
for 4-way parallelism). Any warnings about needingpywin32
can be ignored. - To see additional generic and Vale-specific options,
including options to configure where to find Vale, KaRaMeL, F*, and Z3:
python.exe scons.py -h