Commit c133dd3a authored by Jaromil's avatar Jaromil
Browse files

release documentation and builds

parent 197116ad
......@@ -65,10 +65,22 @@ deploy:
- provider: releases
api_key:
secure: lHmD0cuCkAxWT4s4s7HX8Wz4qrpm8XBbz1GT/Ei56iZJAUTtTEQqAyqD22MnqnBAtpOlSHx/S92iok/VAWmW22H9PD58cob7oimfmkViJq/xLg1x7EW2xVQL2tDF+eB2Rv2iQQ9UBuIy9jSftnlZSs3RBiLzFQDrSLTZe2KDOLrGk4WAuHGpl568jWuHAGNVmSBLSekhw1ucQQhy77qSz/zLp7XH09/Qrk0iYqoVSqgx4wKoeNFHHgq2EB67t1/ar2PAAUHMkpYSxxqNog0wr4OVpOtxBj0f1HJ5gdsAZUXpFyownymZc3fC2UMMJwjgUTcOCnlDW7GUw/kEMneXaGKAlHoH5r7r5gXk4pDCGA4gsk4TMkXwu0rJ6mOKgyKc9XWjBJoCvp2+uFMkEiwQA/VUU9GdoyxH4uKc6VjZo9YajJ89DjV4djr7l6E+0AWHaIo1TvdD5LiaXwM836afzXegwHGEC6yxL4TqZYdyLetxLRweIHY9E9D3Lb9y8qkQU5ZmGxdNV5BK2PmmzupV8Va4wwk5ONnRTAwYWmpmTTBll7DwE98HvmW/yDqIPlyGWk0/pGsCJSnxTbAnu1uns0qQrljpTCms46cezCiWZhlKcFwBucQ0999LOULKPTffVHzRdc4HLWW5XUVQsnlE8kiWALhayiE+Y3wgiPvAgP8=
file: build/_zenroom.so
file: build/python2/_zenroom.so
skip_cleanup: true
draft: true
name: Zenroom $TRAVIS_TAG Python module (Apple/OSX build)
name: Zenroom $TRAVIS_TAG Python 2 module (Apple/OSX build)
on:
tags: true
repo: DECODEproject/zenroom
branch: "$RELEASE_BRANCH"
condition: $TRAVIS_OS_NAME = osx
- provider: releases
api_key:
secure: lHmD0cuCkAxWT4s4s7HX8Wz4qrpm8XBbz1GT/Ei56iZJAUTtTEQqAyqD22MnqnBAtpOlSHx/S92iok/VAWmW22H9PD58cob7oimfmkViJq/xLg1x7EW2xVQL2tDF+eB2Rv2iQQ9UBuIy9jSftnlZSs3RBiLzFQDrSLTZe2KDOLrGk4WAuHGpl568jWuHAGNVmSBLSekhw1ucQQhy77qSz/zLp7XH09/Qrk0iYqoVSqgx4wKoeNFHHgq2EB67t1/ar2PAAUHMkpYSxxqNog0wr4OVpOtxBj0f1HJ5gdsAZUXpFyownymZc3fC2UMMJwjgUTcOCnlDW7GUw/kEMneXaGKAlHoH5r7r5gXk4pDCGA4gsk4TMkXwu0rJ6mOKgyKc9XWjBJoCvp2+uFMkEiwQA/VUU9GdoyxH4uKc6VjZo9YajJ89DjV4djr7l6E+0AWHaIo1TvdD5LiaXwM836afzXegwHGEC6yxL4TqZYdyLetxLRweIHY9E9D3Lb9y8qkQU5ZmGxdNV5BK2PmmzupV8Va4wwk5ONnRTAwYWmpmTTBll7DwE98HvmW/yDqIPlyGWk0/pGsCJSnxTbAnu1uns0qQrljpTCms46cezCiWZhlKcFwBucQ0999LOULKPTffVHzRdc4HLWW5XUVQsnlE8kiWALhayiE+Y3wgiPvAgP8=
file: build/python3/_zenroom.so
skip_cleanup: true
draft: true
name: Zenroom $TRAVIS_TAG Python 3 module (Apple/OSX build)
on:
tags: true
repo: DECODEproject/zenroom
......
# Zenroom ChangeLog
## 0.8.0
### October 2019
New Elliptic Curve Arithmetics (ECP2) with Twisted Curve Pairings
(Miller-Loop). Hamming distance measurements on OCTET
(bitwise). Example of ECP based ElGamal implementation of omomorphic
encryption over integers for petition and tally, with
verifications. Default encryption now AES-GCM with AEAD authenticated
headers, examples using a public random IV. Support for Javascript's
React-Native. Language bindings for Go lang, Python version 2
and 3. Zenroom virtual machine language design improvements to build
and documentation, object introspection.
## 0.7.1
### August 2018
### September 2018
Fixes to all Javascript builds.
......
This diff is collapsed.
......@@ -73,6 +73,12 @@ zlib:
LDFLAGS="${ldflags}" AR="${ar}" RANLIB=${ranlib} \
pwd="${pwd}" make -C ${pwd}/build/zlib -f ZenMakefile
musl-lua53:
CC=${gcc} CFLAGS="${cflags} \
-DLUA_COMPAT_5_3 -DLUA_COMPAT_MODULE" \
LDFLAGS="${ldflags}" AR="${ar}" RANLIB=${ranlib} \
make -C ${pwd}/lib/lua53/src ${platform}
lua53:
CC=${gcc} CFLAGS="${cflags} \
-DLUA_COMPAT_5_3 -DLUA_COMPAT_MODULE" \
......@@ -81,7 +87,7 @@ lua53:
milagro:
@echo "-- Building milagro (${system})"
if ! [ -r ${pwd}/lib/milagro-crypto-c/CMakeCache.txt ]; then cd ${pwd}/lib/milagro-crypto-c && CC=${gcc} AR=${ar} RANLIB=${ranlib} LD=${ld} cmake . -DCMAKE_C_FLAGS="${cflags}" -DCMAKE_SYSTEM_NAME="${system}" ${milagro_cmake_flags}; fi
if ! [ -r ${pwd}/lib/milagro-crypto-c/CMakeCache.txt ]; then cd ${pwd}/lib/milagro-crypto-c && CC=${gcc} LD=${ld} cmake . -DCMAKE_C_FLAGS="${cflags}" -DCMAKE_SYSTEM_NAME="${system}" -DCMAKE_AR=/usr/bin/ar ${milagro_cmake_flags}; fi
if ! [ -r ${pwd}/lib/milagro-crypto-c/lib/libamcl_core.a ]; then CC=${gcc} CFLAGS="${cflags}" AR=${ar} RANLIB=${ranlib} LD=${ld} make -C ${pwd}/lib/milagro-crypto-c VERBOSE=1; fi
check-milagro: milagro
......
......@@ -6,18 +6,18 @@ Zenroom is a brand new virtual machine for fast cryptographic operations on Elli
Zencode is the name of the language executed by Zenroom: it is simple to understand and can process large data structures while operating cryptographic transformations on them. Zencode is a Domain Specific Language whose design is informed by pilot use-cases in DECODE.
## Latest stable release is 0.7.0:
## Latest stable release is 0.8.0:
<ul class="center">
<li class="fab fa-node-js"><a href="https://files.dyne.org/zenroom/releases/Zenroom-0.7.0-javascript.zip">Javscript (nodeJS and WASM)</a></li>
<li class="fab fa-node-js"><a href="https://files.dyne.org/zenroom/releases/Zenroom-0.8.0-javascript.zip">Javscript (nodeJS and WASM)</a></li>
<li class="fab fa-linux"><a href="https://files.dyne.org/zenroom/releases/Zenroom-0.7.0-linux.zip">Linux (ARM and x86)</a></li>
<li class="fab fa-linux"><a href="https://files.dyne.org/zenroom/releases/Zenroom-0.8.0-linux.zip">Linux (ARM and x86)</a></li>
<li class="fab fa-windows"><a href="https://files.dyne.org/zenroom/releases/Zenroom-0.7.0-windows.zip">Windows (EXE and DLL)</li>
<li class="fab fa-windows"><a href="https://files.dyne.org/zenroom/releases/Zenroom-0.8.0-windows.zip">Windows (EXE and DLL)</li>
<li class="fab fa-apple"><a href="https://files.dyne.org/zenroom/releases/Zenroom-0.7.0-apple.zip">Apple (OSX and iOS)</li>
<li class="fab fa-apple"><a href="https://files.dyne.org/zenroom/releases/Zenroom-0.8.0-apple.zip">Apple (OSX and iOS)</li>
<li class="far fa-file-archive"><a href="https://files.dyne.org/zenroom/releases/Zenroom-0.7.0.tar.gz">Source Code</a></li>
<li class="far fa-file-archive"><a href="https://files.dyne.org/zenroom/releases/Zenroom-0.8.0.tar.gz">Source Code</a></li>
<li class="fab fa-github"><a href="https://github.com/decodeproject/zenroom">Git repository</a></li>
......
......@@ -24,18 +24,10 @@ javascript-rn: apply-patches lua53 milagro lpeglabel
sed -i 's/;ENVIRONMENT_IS_WEB=[^;]*;/;ENVIRONMENT_IS_WEB=false;/g' src/zenroom.js
@cp -v src/zenroom.js build/rnjs/
javascript-wasm: cflags += -DARCH_WASM -D'ARCH=\"WASM\"' -D MAX_STRING=128000
javascript-wasm: ldflags += -s WASM=1 -s MODULARIZE=1
javascript-wasm: apply-patches lua53 milagro lpeglabel
CC=${gcc} CFLAGS="${cflags}" LDFLAGS="${ldflags}" LDADD="${ldadd}" \
make -C src js
@mkdir -p build/wasm
@cp -v src/zenroom.js build/wasm/
@cp -v src/zenroom.wasm build/wasm/
javascript-demo: cflags += -DARCH_WASM -D'ARCH=\"WASM\"'
javascript-demo: cflags += -DARCH_WASM -D'ARCH=\"WASM\"' -D MAX_STRING=128000
javascript-demo: ldflags += -s WASM=1 -s ASSERTIONS=1 --shell-file ${extras}/shell_minimal.html -s NO_EXIT_RUNTIME=1
javascript-demo: apply-patches lua53 milagro lpeglabel
CC=${gcc} CFLAGS="${cflags}" LDFLAGS="${ldflags}" LDADD="${ldadd}" \
make -C src js-demo
@mkdir -p build/wasm
@cp -v docs/demo/index.* build/wasm/
musl: ldadd += /usr/lib/${ARCH}-linux-musl/libc.a
musl: apply-patches lua53 milagro lpeglabel
CC=${gcc} CFLAGS="${cflags}" LDFLAGS="${ldflags}" LDADD="${ldadd}" \
CC=${gcc} AR="${ar}" CFLAGS="${cflags}" LDFLAGS="${ldflags}" LDADD="${ldadd}" \
make -C src musl
@cp -v src/zenroom-static build/zenroom.x86
musl-local: ldadd += /usr/local/musl/lib/libc.a
musl-local: apply-patches lua53 milagro lpeglabel
CC=${gcc} CFLAGS="${cflags}" LDFLAGS="${ldflags}" LDADD="${ldadd}" \
CC=${gcc} AR="${ar}" CFLAGS="${cflags}" LDFLAGS="${ldflags}" LDADD="${ldadd}" \
make -C src musl
musl-system: gcc := gcc
musl-system: ldadd += -lm
musl-system: apply-patches lua53 milagro lpeglabel
CC=${gcc} CFLAGS="${cflags}" LDFLAGS="${ldflags}" LDADD="${ldadd}" \
CC=${gcc} AR="${ar}" CFLAGS="${cflags}" LDFLAGS="${ldflags}" LDADD="${ldadd}" \
make -C src musl
linux: apply-patches lua53 milagro lpeglabel
CC=${gcc} CFLAGS="${cflags}" LDFLAGS="${ldflags}" LDADD="${ldadd}" \
CC=${gcc} AR="${ar}" CFLAGS="${cflags}" LDFLAGS="${ldflags}" LDADD="${ldadd}" \
make -C src linux
linux-debug:
......@@ -58,6 +59,7 @@ linux-go: apply-patches lua53 milagro lpeglabel
${gcc} ${cflags} -c ${pwd}/build/swig_wrap.c -o src/zen_go.o
CC=${gcc} CFLAGS="${cflags}" LDFLAGS="${ldflags}" LDADD="${ldadd}" \
make -C src go
@mkdir -p ${pwd}/build/go && cp -v ${pwd}/src/libzenroomgo.so ${pwd}/build/go
linux-java: cflags += -I /opt/jdk/include -I /opt/jdk/include/linux
linux-java: apply-patches lua53 milagro lpeglabel
......
......@@ -8,32 +8,26 @@ VERSION=`cat ../VERSION`
targets=(windows apple linux javascript)
function md2txt() {
pandoc -f gfm -t plain -o $2 $1
}
function checkbin() {
[[ -r $1 ]] && {
mkdir -p $2
cp -v $1 $2
cp -rv $1 $2
chmod +x $2/$1
cp ../LICENSE.txt $2
cp ../README.md $2
cp ../ChangeLog.md $2
md2txt ../README.md $2/README.txt
md2txt ../ChangeLog.md $2/ChangeLog.txt
return 0
}
print "file not found: $1"
print "file or dir not found: $1"
return 1
}
function checkdir() {
[[ -d $1 ]] && {
mkdir -p $2/$1
cp -v $1/* $2/$1/
cp ../LICENSE.txt $2
cp ../README.md $2
cp ../ChangeLog.md $2
rsync -raX ../examples $2/
return 0
}
print "directory not found: $1"
return 1
function copyexamples() {
rsync -raX ../examples $1/
}
for t in $targets; do
......@@ -44,23 +38,31 @@ for t in $targets; do
windows)
checkbin zenroom.exe $dir
checkbin zenroom.dll $dir
copyexamples $dir
continue ;;
apple)
checkbin zenroom.command $dir
checkbin zenroom-ios.a $dir
copyexamples $dir
continue ;;
linux)
checkbin zenroom.x86 $dir
checkbin zenroom.armhf $dir
checkbin _zenroom.so $dir
checkbin zenroom-wrapper.py $dir
checkbin python2 $dir
checkbin python3 $dir
checkbin go $dir
checkbin zenroom-wrapper.py $dir/python2
checkbin zenroom-wrapper.py $dir/python3
checkbin libzenroomgo.so $dir
copyexamples $dir
continue ;;
javascript)
checkdir nodejs $dir
checkdir wasm $dir
checkbin nodejs $dir
checkbin wasm $dir
checkbin rnjs $dir
checkbin nodejs/zenroom.js.mem $dir
checkbin zenroom_exec.js $dir
copyexamples $dir
continue ;;
esac
done
......
Subproject commit 9dda8e0df6ac906696dce4fb79b415cfedc6cfdd
Subproject commit 7b97cdb16568f02be623b42b3ba5cceba0615880
Subproject commit 1f6b096ab4acd3b94ced3d2b94ee712fd7854505
/home/jrml/devel/webnomad
\ No newline at end of file
Subproject commit 9be59fb8f4b176a16643e707c74051b243202296
Subproject commit 3cc98f216871411cdfa1fbc35232d3228126ef91
......@@ -12,12 +12,22 @@ void *zen_memalign(const size_t size, const size_t align) {
// preserve const values as they seem to be overwritten by calls
size_t vsize = size;
size_t valign = align;
// TODO: Round up to the next highest power of 2
// uint32_t v = valign; // compute the next highest power of 2 of 32-bit v
// v--;
// v |= v >> 1;
// v |= v >> 2;
// v |= v >> 4;
// v |= v >> 8;
// v |= v >> 16;
// v++;
// // from https://graphics.stanford.edu/~seander/bithacks.html#RoundUpPowerOf2
(void)valign;
# if defined(_WIN32)
mem = __mingw_aligned_malloc(vsize, valign);
if(!mem) {
error(0, "error in %u byte aligned memory allocation of %u bytes.",
align, size);
align, size);
return NULL; }
# elif defined(__EMSCRIPTEN__)
mem = malloc(vsize);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment