GithubHelp home page GithubHelp logo

signalapp / securevaluerecovery Goto Github PK

View Code? Open in Web Editor NEW
274.0 274.0 38.0 3.69 MB

License: GNU Affero General Public License v3.0

Makefile 0.79% Python 3.11% Shell 0.26% Dockerfile 0.14% C 40.35% Rust 55.34% Awk 0.01%

securevaluerecovery's People

Contributors

amit-signal avatar cbrune-signal avatar eager-signal avatar ehrenkret-signal avatar geogriff-signal avatar gram-signal avatar jmhodges-signal avatar jon-signal avatar nolanl avatar ravi-signal avatar sergey-signal avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

securevaluerecovery's Issues

error while building enclave

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?

Failed to build service with Docker

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.

Is the source code up to date?

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!

Question regarding Argon2

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

docker build of llvm-bolt is busted

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.

Implement Raft PreVote and CheckQuorum or Leader stickiness to improve "liveness"

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.