Coder Social home page Coder Social logo

crayfish's People

Contributors

blackoverflow avatar jonnius avatar nanu-c avatar olof-nord avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

crayfish's Issues

Remove dependency on zkgroup

This library currently partially replaces the nanu-c zkgroup fork, a go library for the Signal Private Group System.

zkgroup is not yet replaced by crayfish but all the logic of zkgroup is also in libsignal-service-rs. So what we need to do is to re-write api-calls for that in crayfish.

Update dependencies

Many of the crayfish dependencies have new versions released.

  • aes
  • block-modes
  • dirs
  • prost
  • rand
  • serde-big-array
  • hmac
  • sha2
  • pbkdf2
  • sha-1

We should make sure to keep the dependencies up to date as to include recent work and avoid security issues.

Address cargo warnings

During build, there are a few cargo warnings about unused variables, functions and fields.

I suggest to either address the warnings by either deleting unused code, or by adding linter excludes.

  crayfish git:(main) cargo build
   Compiling crayfish v0.2.0 (/home/olof/git/crayfish)
warning: unused variable: `config`
  --> src/signal_service/sealedsender.rs:79:23
   |
79 | async fn open_storage(config: &crate::config::SignalConfig) -> anyhow::Result<Storage> {
   |                       ^^^^^^ help: if this is intentional, prefix it with an underscore: `_config`
   |
   = note: `#[warn(unused_variables)]` on by default

warning: unused variable: `keys`
   --> src/store/mod.rs:152:19
    |
152 | fn load_file_sync(keys: Option<[u8; 16 + 20]>, path: PathBuf) -> Result<Vec<u8>, anyhow::Error> {
    |                   ^^^^ help: if this is intentional, prefix it with an underscore: `_keys`

warning: associated function `read_from_file` is never used
  --> src/config/signalconfig.rs:44:12
   |
44 |     pub fn read_from_file() -> Result<Self, anyhow::Error> {
   |            ^^^^^^^^^^^^^^
   |
   = note: `#[warn(dead_code)]` on by default

warning: associated function `write_to_file` is never used
  --> src/config/signalconfig.rs:58:12
   |
58 |     pub fn write_to_file(&self) -> Result<(), anyhow::Error> {
   |            ^^^^^^^^^^^^^

warning: associated function `get_share_dir` is never used
  --> src/config/signalconfig.rs:81:12
   |
81 |     pub fn get_share_dir(&self) -> std::path::PathBuf {
   |            ^^^^^^^^^^^^^

warning: associated function `get_storage_dir` is never used
  --> src/config/signalconfig.rs:86:12
   |
86 |     pub fn get_storage_dir(&self) -> std::path::PathBuf {
   |            ^^^^^^^^^^^^^^^

warning: associated function `default_attachment_dir` is never used
  --> src/config/signalconfig.rs:90:12
   |
90 |     pub fn default_attachment_dir(&self) -> std::path::PathBuf {
   |            ^^^^^^^^^^^^^^^^^^^^^^

warning: associated function `get_identity_dir` is never used
  --> src/config/signalconfig.rs:94:12
   |
94 |     pub fn get_identity_dir(&self) -> std::path::PathBuf {
   |            ^^^^^^^^^^^^^^^^

warning: associated function `get_tel_clone` is never used
   --> src/config/signalconfig.rs:101:12
    |
101 |     pub fn get_tel_clone(&self) -> String {
    |            ^^^^^^^^^^^^^

warning: associated function `get_uuid_clone` is never used
   --> src/config/signalconfig.rs:105:12
    |
105 |     pub fn get_uuid_clone(&self) -> String {
    |            ^^^^^^^^^^^^^^

warning: associated function `set_tel` is never used
   --> src/config/signalconfig.rs:109:12
    |
109 |     pub fn set_tel(&self, tel: String) {
    |            ^^^^^^^

warning: associated function `set_uuid` is never used
   --> src/config/signalconfig.rs:113:12
    |
113 |     pub fn set_uuid(&self, uuid: String) {
    |            ^^^^^^^^

warning: field `credential_cache` is never read
  --> src/store/mod.rs:19:5
   |
15 | pub struct Storage {
   |            ------- field in this struct
...
19 |     credential_cache: Arc<Mutex<InMemoryCredentialsCache>>,
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = note: `Storage` has a derived impl for the trait `Clone`, but this is intentionally ignored during dead code analysis

warning: associated function `path` is never used
  --> src/store/mod.rs:24:12
   |
24 |     pub fn path(&self) -> &Path {
   |            ^^^^

warning: associated function `signal_password` is never used
  --> src/store/mod.rs:60:18
   |
60 |     pub async fn signal_password(&self) -> Result<String, anyhow::Error> {
   |                  ^^^^^^^^^^^^^^^

warning: function `load_file_sync_encrypted` is never used
   --> src/store/mod.rs:113:4
    |
113 | fn load_file_sync_encrypted(keys: [u8; 16 + 20], path: PathBuf) -> Result<Vec<u8>, anyhow::Error> {
    |    ^^^^^^^^^^^^^^^^^^^^^^^^

warning: associated function `store_with_key` is never used
  --> src/store/protocol_store.rs:30:18
   |
30 |     pub async fn store_with_key(
   |                  ^^^^^^^^^^^^^^

warning: associated function `next_pre_key_ids` is never used
   --> src/store/protocol_store.rs:100:18
    |
100 |     pub async fn next_pre_key_ids(&self) -> (u32, u32) {
    |                  ^^^^^^^^^^^^^^^^

warning: associated function `delete_identity` is never used
   --> src/store/protocol_store.rs:160:18
    |
160 |     pub async fn delete_identity(&self, addr: &ProtocolAddress) -> Result<(), SignalProtocolError> {
    |                  ^^^^^^^^^^^^^^^

warning: `crayfish` (bin "crayfish") generated 19 warnings

Specify license

This project does not specify a license.

Is the code licensed with a free license, including it with other projects can be possible.

Add readme

This project does not have a readme.

Suggestions for content would be project purpose, instructions of how to build and integrate with other projects.

error: failed to get `libsignal-protocol`

Trying to build the version mentioned in latest signal app release, i've got the following error:

root@487655ab2d33:/tmp/textsecure/cmd/textsecure/crayfish# cargo build
    Updating crates.io index
    Updating git repository `https://github.com/whisperfish/libsignal-service-rs.git`
    Updating git repository `https://github.com/signalapp/libsignal-client`
error: failed to get `libsignal-protocol` as a dependency of package `libsignal-service v0.1.0 (https://github.com/whisperfish/libsignal-service-rs.git?rev=34b9e43#34b9e43d)`
    ... which is depended on by `crayfish v0.1.0 (/tmp/textsecure/cmd/textsecure/crayfish)`

Caused by:
  failed to load source for dependency `libsignal-protocol`

Caused by:
  Unable to update https://github.com/signalapp/libsignal-client

Caused by:
  failed to find branch `master`

Caused by:
  cannot locate remote-tracking branch 'origin/master'; class=Reference (4); code=NotFound (-3)

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.