signalapp / securevaluerecovery Goto Github PK
View Code? Open in Web Editor NEWLicense: GNU Affero General Public License v3.0
License: GNU Affero General Public License v3.0
hello,
while building the enclave using docker for ContactDiscoveryService, I'm getting this error.
mv ../*.buildinfo debian/buildinfo
mv ../*.deb debian/
make: *** No rule to make target 'build/libkbupd_enclave.hardened.signed.so', needed by 'sign'. Stop.
make: Leaving directory '/home/rust/src'
I'm using SGX enabled device, and fulfilled all the prerequisites.
So I tried the option without docker and Debian, While building first I fulfilled all the prerequisites by installing the sgx sdk and sgxpsw. Then while building first it gave me an error i.e. error[E0554]: `#![feature]` may not be used on the stable release channel
I installed rustup and nightly toolchain and it gave me an another error regarding error: Cannot set `RUSTC_BOOTSTRAP=1` from build script of `cds_enclave v0.1.0 (~/signal/ContactDiscoveryService/enclave/cds_enclave)`. note: Crates cannot set `RUSTC_BOOTSTRAP` themselves, as doing so would subvert the stability guarantees of Rust for your project. help: If you're sure you want to do this in your project, set the environment variable `RUSTC_BOOTSTRAP=cds_enclave` before running cargo instead.
So as the note, I added RUSTC_BOOTSTRAP=cds_enclave
, and after that it gave me an error which seems a dead-end i.e ModuleNotFoundError: No module named 'pyxed'
I checked the enclave build folder it has pyxed but it is missing xed-interface.h in it., ie includes.h:11:10: fatal error: xed-interface.h: No such file or directory
I even tried to get the Pyxed seperately, and compile it but it shows some error which isn't fixed yet.
What could be the possible solution to this?
Any reason not to make this project license Apache and/or MIT?
Hi! I tried to build the service with Docker using: make -C <repository_root>/service docker. There were no any error during its work. I got Docker image and container. But I failed to run it. When I try to start the container, it immediately stops and exits without any errors. It looks very strange. I have macOS, Intel Core i7.
What is the status of this code? Is it being actively maintained out of GitHub or is this the latest version?
I am trying to look into the code but the last commit is from August 2021 and has references to old dependencies like the Intel SGX SDK 2.7.1 (commit d166ff0c808e2f78d37eebf1ab614d944437eea3 is hardcoded in enclave/sgx_enclave.mk ). The Intel SDK is in version 2.15.1 nowadays..
I'm happy to contribute but I guess you're developing out of GitHub and just did not update this repo in a while? Could you push the latest version please?
Thanks for all your work!
Hi everyone,
I just read your blog entry over at https://signal.org/blog/secure-value-recovery/ and one thing isn't exactly clear to me. Your write that with a user’s passphrase or PIN, clients use Argon2 to stretch it into a 32-byte key. But Argon2 needs a random salt (and other config parameters such as iterations, parallelism, etc.). If I uninstall the app the salt and those config parameters are deleted. So how do you reconstruct these values for the Argon2 stretching step once I reinstall the app and try to log in? Or do you always use the same salt and config parameters for this password stretching step?
Best regards
Marc
Running make -C ./enclave
is returning errors on master.
(I'm currently on macOS 10.15.3 with docker engine 19.03.5 but I suspect that's not supposed to matter.)
I'm seeing failures similar to this one:
[125/1589] Building CXX object utils/TableGen/CMakeFiles/llvm-tblgen.dir/AsmMatcherEmitter.cpp.o
FAILED: utils/TableGen/CMakeFiles/llvm-tblgen.dir/AsmMatcherEmitter.cpp.o
/usr/bin/c++ -DGTEST_HAS_RTTI=0 -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -Iutils/TableGen -I/home/rust/src/build/bolt/llvm-bolt-0655e9a71f43b3fc6a87e3c9be779dc76bc9efb9/utils/TableGen -Iinclude -I/home/rust/src/build/bolt/llvm-bolt-0655e9a71f43b3fc6a87e3c9be779dc76bc9efb9/include -g -O2 -specs=/usr/share/dpkg/no-pie-compile.specs -fPIC -fvisibility-inlines-hidden -Werror=date-time -std=c++11 -Wall -W -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wno-maybe-uninitialized -Wdelete-non-virtual-dtor -Wno-comment -ffunction-sections -fdata-sections -O3 -DNDEBUG -fno-exceptions -fno-rtti -MD -MT utils/TableGen/CMakeFiles/llvm-tblgen.dir/AsmMatcherEmitter.cpp.o -MF utils/TableGen/CMakeFiles/llvm-tblgen.dir/AsmMatcherEmitter.cpp.o.d -o utils/TableGen/CMakeFiles/llvm-tblgen.dir/AsmMatcherEmitter.cpp.o -c /home/rust/src/build/bolt/llvm-bolt-0655e9a71f43b3fc6a87e3c9be779dc76bc9efb9/utils/TableGen/AsmMatcherEmitter.cpp
In file included from /home/rust/src/build/bolt/llvm-bolt-0655e9a71f43b3fc6a87e3c9be779dc76bc9efb9/include/llvm/ADT/STLExtras.h:21,
from /home/rust/src/build/bolt/llvm-bolt-0655e9a71f43b3fc6a87e3c9be779dc76bc9efb9/include/llvm/ADT/StringRef.h:13,
from /home/rust/src/build/bolt/llvm-bolt-0655e9a71f43b3fc6a87e3c9be779dc76bc9efb9/include/llvm/ADT/StringMap.h:17,
from /home/rust/src/build/bolt/llvm-bolt-0655e9a71f43b3fc6a87e3c9be779dc76bc9efb9/utils/TableGen/CodeGenHwModes.h:15,
from /home/rust/src/build/bolt/llvm-bolt-0655e9a71f43b3fc6a87e3c9be779dc76bc9efb9/utils/TableGen/CodeGenTarget.h:20,
from /home/rust/src/build/bolt/llvm-bolt-0655e9a71f43b3fc6a87e3c9be779dc76bc9efb9/utils/TableGen/AsmMatcherEmitter.cpp:99:
/home/rust/src/build/bolt/llvm-bolt-0655e9a71f43b3fc6a87e3c9be779dc76bc9efb9/include/llvm/ADT/SmallVector.h: In instantiation of 'void llvm::SmallVectorTemplateBase<T, true>::push_back(const T&) [with T = std::pair<llvm::Record*, llvm::SMRange>]':
/home/rust/src/build/bolt/llvm-bolt-0655e9a71f43b3fc6a87e3c9be779dc76bc9efb9/include/llvm/TableGen/Record.h:1499:52: required from here
/home/rust/src/build/bolt/llvm-bolt-0655e9a71f43b3fc6a87e3c9be779dc76bc9efb9/include/llvm/ADT/SmallVector.h:312:11: warning: 'void* memcpy(void*, const void*, size_t)' writing to an object of type 'struct std::pair<llvm::Record*, llvm::SMRange>' with no trivial copy-assignment; use copy-assignment or copy-initialization instead [-Wclass-memaccess]
memcpy(this->end(), &Elt, sizeof(T));
~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/8/utility:70,
from /home/rust/src/build/bolt/llvm-bolt-0655e9a71f43b3fc6a87e3c9be779dc76bc9efb9/include/llvm/Support/type_traits.h:19,
from /home/rust/src/build/bolt/llvm-bolt-0655e9a71f43b3fc6a87e3c9be779dc76bc9efb9/include/llvm/ADT/Optional.h:22,
from /home/rust/src/build/bolt/llvm-bolt-0655e9a71f43b3fc6a87e3c9be779dc76bc9efb9/include/llvm/ADT/STLExtras.h:20,
from /home/rust/src/build/bolt/llvm-bolt-0655e9a71f43b3fc6a87e3c9be779dc76bc9efb9/include/llvm/ADT/StringRef.h:13,
from /home/rust/src/build/bolt/llvm-bolt-0655e9a71f43b3fc6a87e3c9be779dc76bc9efb9/include/llvm/ADT/StringMap.h:17,
from /home/rust/src/build/bolt/llvm-bolt-0655e9a71f43b3fc6a87e3c9be779dc76bc9efb9/utils/TableGen/CodeGenHwModes.h:15,
from /home/rust/src/build/bolt/llvm-bolt-0655e9a71f43b3fc6a87e3c9be779dc76bc9efb9/utils/TableGen/CodeGenTarget.h:20,
from /home/rust/src/build/bolt/llvm-bolt-0655e9a71f43b3fc6a87e3c9be779dc76bc9efb9/utils/TableGen/AsmMatcherEmitter.cpp:99:
/usr/include/c++/8/bits/stl_pair.h:208:12: note: 'struct std::pair<llvm::Record*, llvm::SMRange>' declared here
struct pair
^~~~
In file included from /home/rust/src/build/bolt/llvm-bolt-0655e9a71f43b3fc6a87e3c9be779dc76bc9efb9/include/llvm/ADT/STLExtras.h:21,
from /home/rust/src/build/bolt/llvm-bolt-0655e9a71f43b3fc6a87e3c9be779dc76bc9efb9/include/llvm/ADT/StringRef.h:13,
from /home/rust/src/build/bolt/llvm-bolt-0655e9a71f43b3fc6a87e3c9be779dc76bc9efb9/include/llvm/ADT/StringMap.h:17,
from /home/rust/src/build/bolt/llvm-bolt-0655e9a71f43b3fc6a87e3c9be779dc76bc9efb9/utils/TableGen/CodeGenHwModes.h:15,
from /home/rust/src/build/bolt/llvm-bolt-0655e9a71f43b3fc6a87e3c9be779dc76bc9efb9/utils/TableGen/CodeGenTarget.h:20,
from /home/rust/src/build/bolt/llvm-bolt-0655e9a71f43b3fc6a87e3c9be779dc76bc9efb9/utils/TableGen/AsmMatcherEmitter.cpp:99:
/home/rust/src/build/bolt/llvm-bolt-0655e9a71f43b3fc6a87e3c9be779dc76bc9efb9/include/llvm/ADT/SmallVector.h: In instantiation of 'void llvm::SmallVectorTemplateBase<T, true>::push_back(const T&) [with T = std::pair<bool, llvm::StringRef>]':
/home/rust/src/build/bolt/llvm-bolt-0655e9a71f43b3fc6a87e3c9be779dc76bc9efb9/include/llvm/TableGen/Record.h:1719:77: required from here
/home/rust/src/build/bolt/llvm-bolt-0655e9a71f43b3fc6a87e3c9be779dc76bc9efb9/include/llvm/ADT/SmallVector.h:312:11: warning: 'void* memcpy(void*, const void*, size_t)' writing to an object of type 'struct std::pair<bool, llvm::StringRef>' with no trivial copy-assignment; use copy-assignment or copy-initialization instead [-Wclass-memaccess]
memcpy(this->end(), &Elt, sizeof(T));
~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/8/utility:70,
from /home/rust/src/build/bolt/llvm-bolt-0655e9a71f43b3fc6a87e3c9be779dc76bc9efb9/include/llvm/Support/type_traits.h:19,
from /home/rust/src/build/bolt/llvm-bolt-0655e9a71f43b3fc6a87e3c9be779dc76bc9efb9/include/llvm/ADT/Optional.h:22,
from /home/rust/src/build/bolt/llvm-bolt-0655e9a71f43b3fc6a87e3c9be779dc76bc9efb9/include/llvm/ADT/STLExtras.h:20,
from /home/rust/src/build/bolt/llvm-bolt-0655e9a71f43b3fc6a87e3c9be779dc76bc9efb9/include/llvm/ADT/StringRef.h:13,
from /home/rust/src/build/bolt/llvm-bolt-0655e9a71f43b3fc6a87e3c9be779dc76bc9efb9/include/llvm/ADT/StringMap.h:17,
from /home/rust/src/build/bolt/llvm-bolt-0655e9a71f43b3fc6a87e3c9be779dc76bc9efb9/utils/TableGen/CodeGenHwModes.h:15,
from /home/rust/src/build/bolt/llvm-bolt-0655e9a71f43b3fc6a87e3c9be779dc76bc9efb9/utils/TableGen/CodeGenTarget.h:20,
from /home/rust/src/build/bolt/llvm-bolt-0655e9a71f43b3fc6a87e3c9be779dc76bc9efb9/utils/TableGen/AsmMatcherEmitter.cpp:99:
/usr/include/c++/8/bits/stl_pair.h:208:12: note: 'struct std::pair<bool, llvm::StringRef>' declared here
struct pair
^~~~
In file included from /home/rust/src/build/bolt/llvm-bolt-0655e9a71f43b3fc6a87e3c9be779dc76bc9efb9/include/llvm/ADT/STLExtras.h:21,
from /home/rust/src/build/bolt/llvm-bolt-0655e9a71f43b3fc6a87e3c9be779dc76bc9efb9/include/llvm/ADT/StringRef.h:13,
from /home/rust/src/build/bolt/llvm-bolt-0655e9a71f43b3fc6a87e3c9be779dc76bc9efb9/include/llvm/ADT/StringMap.h:17,
from /home/rust/src/build/bolt/llvm-bolt-0655e9a71f43b3fc6a87e3c9be779dc76bc9efb9/utils/TableGen/CodeGenHwModes.h:15,
from /home/rust/src/build/bolt/llvm-bolt-0655e9a71f43b3fc6a87e3c9be779dc76bc9efb9/utils/TableGen/CodeGenTarget.h:20,
from /home/rust/src/build/bolt/llvm-bolt-0655e9a71f43b3fc6a87e3c9be779dc76bc9efb9/utils/TableGen/AsmMatcherEmitter.cpp:99:
/home/rust/src/build/bolt/llvm-bolt-0655e9a71f43b3fc6a87e3c9be779dc76bc9efb9/include/llvm/ADT/SmallVector.h: In instantiation of 'static void llvm::SmallVectorTemplateBase<T, true>::uninitialized_copy(T1*, T1*, T2*, typename std::enable_if<std::is_same<typename std::remove_const<T1>::type, T2>::value>::type*) [with T1 = const std::pair<llvm::Record*, llvm::SMRange>; T2 = std::pair<llvm::Record*, llvm::SMRange>; T = std::pair<llvm::Record*, llvm::SMRange>; typename std::enable_if<std::is_same<typename std::remove_const<T1>::type, T2>::value>::type = void]':
/home/rust/src/build/bolt/llvm-bolt-0655e9a71f43b3fc6a87e3c9be779dc76bc9efb9/include/llvm/ADT/SmallVector.h:772:3: required from 'llvm::SmallVectorImpl<T>& llvm::SmallVectorImpl<T>::operator=(const llvm::SmallVectorImpl<T>&) [with T = std::pair<llvm::Record*, llvm::SMRange>]'
/home/rust/src/build/bolt/llvm-bolt-0655e9a71f43b3fc6a87e3c9be779dc76bc9efb9/include/llvm/ADT/SmallVector.h:899:36: required from 'llvm::SmallVector<T, N>::SmallVector(const llvm::SmallVector<T, N>&) [with T = std::pair<llvm::Record*, llvm::SMRange>; unsigned int N = 0]'
/home/rust/src/build/bolt/llvm-bolt-0655e9a71f43b3fc6a87e3c9be779dc76bc9efb9/include/llvm/TableGen/Record.h:1383:30: required from here
/home/rust/src/build/bolt/llvm-bolt-0655e9a71f43b3fc6a87e3c9be779dc76bc9efb9/include/llvm/ADT/SmallVector.h:299:13: warning: 'void* memcpy(void*, const void*, size_t)' writing to an object of type 'struct std::pair<llvm::Record*, llvm::SMRange>' with no trivial copy-assignment; use copy-assignment or copy-initialization instead [-Wclass-memaccess]
memcpy(Dest, I, (E - I) * sizeof(T));
~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/8/utility:70,
from /home/rust/src/build/bolt/llvm-bolt-0655e9a71f43b3fc6a87e3c9be779dc76bc9efb9/include/llvm/Support/type_traits.h:19,
from /home/rust/src/build/bolt/llvm-bolt-0655e9a71f43b3fc6a87e3c9be779dc76bc9efb9/include/llvm/ADT/Optional.h:22,
from /home/rust/src/build/bolt/llvm-bolt-0655e9a71f43b3fc6a87e3c9be779dc76bc9efb9/include/llvm/ADT/STLExtras.h:20,
from /home/rust/src/build/bolt/llvm-bolt-0655e9a71f43b3fc6a87e3c9be779dc76bc9efb9/include/llvm/ADT/StringRef.h:13,
from /home/rust/src/build/bolt/llvm-bolt-0655e9a71f43b3fc6a87e3c9be779dc76bc9efb9/include/llvm/ADT/StringMap.h:17,
from /home/rust/src/build/bolt/llvm-bolt-0655e9a71f43b3fc6a87e3c9be779dc76bc9efb9/utils/TableGen/CodeGenHwModes.h:15,
from /home/rust/src/build/bolt/llvm-bolt-0655e9a71f43b3fc6a87e3c9be779dc76bc9efb9/utils/TableGen/CodeGenTarget.h:20,
from /home/rust/src/build/bolt/llvm-bolt-0655e9a71f43b3fc6a87e3c9be779dc76bc9efb9/utils/TableGen/AsmMatcherEmitter.cpp:99:
/usr/include/c++/8/bits/stl_pair.h:208:12: note: 'struct std::pair<llvm::Record*, llvm::SMRange>' declared here
struct pair
^~~~
c++: fatal error: Killed signal terminated program cc1plus
compilation terminated.
I'm prepared to immediately contribute 😁
Hi Signal folks,
I noticed you are not using one of the available SGX SDKs for Rust, such as Fortanix EDP or Teaclave SGX SDK (formerly Baidu SGX SDK). I'm curious, could you explain your reasoning?
Thanks for tackling this problem!
See https://decentralizedthoughts.github.io/2020-12-12-raft-liveness-full-omission/ which is in response to the november 2020 postmortem of Cloudflare, which uses raft (etcd) internally and was caused by a partial switch failure, leading to infinite election cycles effectively making the system unavailable.
Also, https://www.openlife.cc/sites/default/files/4-modifications-for-Raft-consensus.pdf discusses the implementation of PreVote and leader stickiness (which is mentioned in the previous post as an alternative to PreVote) in the original Raft paper notation.
The change to add "leader stickiness" is intuitive: Followers should reject new leaders, if from
their point of view the existing leader is still functioning correctly meaning that they have
received an AppendEntries call less than an election timeout ago.
This will have the effect that a single "problematic" server (or even a minority of servers) with
connectivity issues will not be able to win new elections, if a majority of the cluster is still
connected to the current leader and functioning normally.
Leader stickiness could relatively easily be implemented by checking the election_ticks
is 0 in the handle_vote_request
method before granting. If it is not 0, the request is denied. Only once a majority see the leader is timed out, the last one of them will start a leader election that will probably succeed.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.