Benedict Lau bf6ac6a85a Copied plans to build for ARM from OS X 10 gadi atpakaļ
..
cmake bf6ac6a85a Copied plans to build for ARM from OS X 9 gadi atpakaļ
commandline 896627850f oops wrong name 11 gadi atpakaļ
cpucycles 896627850f oops wrong name 11 gadi atpakaļ
cpuid 896627850f oops wrong name 11 gadi atpakaļ
crypto_auth 896627850f oops wrong name 11 gadi atpakaļ
crypto_box 896627850f oops wrong name 11 gadi atpakaļ
crypto_core 896627850f oops wrong name 11 gadi atpakaļ
crypto_hash 896627850f oops wrong name 11 gadi atpakaļ
crypto_hashblocks 896627850f oops wrong name 11 gadi atpakaļ
crypto_onetimeauth 896627850f oops wrong name 11 gadi atpakaļ
crypto_scalarmult 896627850f oops wrong name 11 gadi atpakaļ
crypto_secretbox 896627850f oops wrong name 11 gadi atpakaļ
crypto_sign 896627850f oops wrong name 11 gadi atpakaļ
crypto_stream 896627850f oops wrong name 11 gadi atpakaļ
crypto_verify 896627850f oops wrong name 11 gadi atpakaļ
curvecp 896627850f oops wrong name 11 gadi atpakaļ
inttypes 896627850f oops wrong name 11 gadi atpakaļ
node_build bf6ac6a85a Copied plans to build for ARM from OS X 9 gadi atpakaļ
okcompilers 896627850f oops wrong name 11 gadi atpakaļ
randombytes 8919badedb First new dev effort 10 gadi atpakaļ
tests b5923f700e Set return type in `main` to remove OS X warnings 10 gadi atpakaļ
.gitignore 896627850f oops wrong name 11 gadi atpakaļ
CMakeLists.txt 896627850f oops wrong name 11 gadi atpakaļ
CMakeWindows.txt 896627850f oops wrong name 11 gadi atpakaļ
MACROS 896627850f oops wrong name 11 gadi atpakaļ
OPERATIONS 896627850f oops wrong name 11 gadi atpakaļ
PROTOTYPES.c 896627850f oops wrong name 11 gadi atpakaļ
PROTOTYPES.cpp 896627850f oops wrong name 11 gadi atpakaļ
README.md 896627850f oops wrong name 11 gadi atpakaļ
do 896627850f oops wrong name 11 gadi atpakaļ
measure-anything.c 896627850f oops wrong name 11 gadi atpakaļ
try-anything.c 896627850f oops wrong name 11 gadi atpakaļ
version 896627850f oops wrong name 11 gadi atpakaļ

README.md

cNaCl

If you would like to be confusing, you could pronounce it sea-salt

This is a fork NaCl by Daniel J. Bernstein and Tanja Lange. The build has been ported to cmake so it can be cross compiled and build output is reliable. Since it uses cmake, it could theoretically be built on windows but this has not been tested. It does compile using mingw32.

How do I make this thing work?

mkdir cbuild
cd cbuild
cmake ..
make

Ok now how about cross compiling?

mkdir cbuildw32
cd cbuildw32
cmake -DCMAKE_TOOLCHAIN_FILE=../CMakeWindows.txt ..
make

Why fork?

NaCl builds using a shell script called ./do. This script does compiling, testing, measuring and selection of the best implementation of each algorithm for the given machine. It also generates the header files which will be used.

The problems with ./do are it's slow, it tries compiling with multiple different compiler profiles, it's very platform independent but it doesn't run on Windows and most importantly, with compiling, testing and measuring so tightly bound, it is impossible to cross compile for a different operating system.

How it works

The first time you build for a new ABI, it will trigger the traditional nacl ./do script. What cNaCl does is parse the resulting headers from the ./do build and create a plan so that it can repeat roughly the same build.

If there is already a plan for the given ABI, the build uses this plan and the build is very fast.

Plans are stored in ./cmake/plans/ and I will be adding plans as I find new ones.

What else is new?

There is a problem with the ./do build which prevents it from running on some ARM based machines, this was fixed by adding a more lax method for measuring CPU speed as a fall back.

#EOF#