Giter Club home page Giter Club logo

mam's People

Contributors

paulhandy avatar th0br0 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

Watchers

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

mam's Issues

combine mask and hmac into one

Reduce the number of hash iterations required to create a message by using the same curl instance to mask and to hash the message.

It should duplex mask the following in sequence:

  1. The pascal-style length of the trytes
  2. The message (prepended with the next channel key)
  3. It should then compute the nonce given the curl instance (and mask it)
  4. the signature from the above authenticated cipher (hmac) and sibling hashes

Could not compile `iota-trytes`

I git cloned the repo then ran cargo build --all --release which returned the error Could not compile iota-trytes`. I am have not used cargo before so is this an issue with my system or an issue with iota-trytes?

Here is every command I used start to finish:

wil@taxi ~/D/cmam> git clone https://github.com/iotaledger/MAM.git
Cloning into 'MAM'...
remote: Enumerating objects: 20, done.
remote: Counting objects: 100% (20/20), done.
remote: Compressing objects: 100% (19/19), done.
remote: Total 502 (delta 4), reused 14 (delta 1), pack-reused 482
Receiving objects: 100% (502/502), 126.48 KiB | 575.00 KiB/s, done.
Resolving deltas: 100% (228/228), done.
wil@taxi ~/D/cmam> cd MAM/
wil@taxi ~/D/c/MAM> cargo build --all --release --verbose
    Updating git repository `https://github.com/iotaledger/iota.rs`
    Updating git repository `https://github.com/japaric/cty.git`
    Updating git repository `https://github.com/iotaledger/iota-bindings.git`
   Compiling iota-trytes v0.1.0 (https://github.com/iotaledger/iota.rs#caaf817d)
   Compiling cty v0.2.0 (https://github.com/japaric/cty.git#1779ddc6)
     Running `rustc --crate-name iota_trytes /home/wil/.cargo/git/checkouts/iota.rs-1792f679be51837c/caaf817/trytes/src/lib.rs --color always --crate-type lib --emit=dep-info,link -C opt-level=3 --cfg 'feature="alloc"' --cfg 'feature="default"' -C metadata=a344c9cdd433fd1d -C extra-filename=-a344c9cdd433fd1d --out-dir /home/wil/Desktop/cmam/MAM/target/release/deps -L dependency=/home/wil/Desktop/cmam/MAM/target/release/deps --cap-lints allow`
     Running `rustc --crate-name cty /home/wil/.cargo/git/checkouts/cty-6a131a3bcd023808/1779ddc/src/lib.rs --color always --crate-type lib --emit=dep-info,link -C opt-level=3 -C metadata=c01a72651a0b2c77 -C extra-filename=-c01a72651a0b2c77 --out-dir /home/wil/Desktop/cmam/MAM/target/release/deps -L dependency=/home/wil/Desktop/cmam/MAM/target/release/deps --cap-lints allow`
error[E0554]: #![feature] may not be used on the stable release channel
 --> /home/wil/.cargo/git/checkouts/iota.rs-1792f679be51837c/caaf817/trytes/src/lib.rs:2:43
  |
2 | #![cfg_attr(any(feature = "alloc", test), feature(alloc))]
  |                                           ^^^^^^^^^^^^^^

error: aborting due to previous error

For more information about this error, try `rustc --explain E0554`.
error: Could not compile `iota-trytes`.

Caused by:
  process didn't exit successfully: `rustc --crate-name iota_trytes /home/wil/.cargo/git/checkouts/iota.rs-1792f679be51837c/caaf817/trytes/src/lib.rs --color always --crate-type lib --emit=dep-info,link -C opt-level=3 --cfg 'feature="alloc"' --cfg 'feature="default"' -C metadata=a344c9cdd433fd1d -C extra-filename=-a344c9cdd433fd1d --out-dir /home/wil/Desktop/cmam/MAM/target/release/deps -L dependency=/home/wil/Desktop/cmam/MAM/target/release/deps --cap-lints allow` (exit code: 1)
wil@taxi ~/D/c/MAM>

MAM for python3

will Pyota come with MAM in the future and can we be able to use it separately if we want?

Note the end of a tree

When parsing a message, it would be useful to return whether it used the last key in the tree, so that the user knows to not look in that tree any longer.

This can be known if the hash is always last when calculating the root.

Could not build with cargo

ubuntu@devorg:~/MAM$ cargo build --all --release --verbose warning: unused manifest key: dependencies.iota-curl.iota-curl-cpu.path Updating git repository https://github.com/iotaledger/iota.rs`
Updating git repository https://github.com/japaric/cty.git
Fresh cty v0.1.5 (https://github.com/japaric/cty.git#40007c54)
Compiling iota-trytes v0.1.0 (https://github.com/iotaledger/iota.rs#9fcdfc1f)
Running rustc --crate-name iota_trytes /home/ubuntu/.cargo/git/checkouts/iota.rs-1792f679be51837c/9fcdfc1/trytes/src/lib.rs --crate-type lib --emit=dep-info,link -C opt-level=3 --cfg 'feature="default"' --cfg 'feature="alloc"' -C metadata=74bced331196adde -C extra-filename=-74bced331196adde --out-dir /home/ubuntu/MAM/target/release/deps -L dependency=/home/ubuntu/MAM/target/release/deps --cap-lints allow
error[E0432]: unresolved import alloc::string::String
--> /home/ubuntu/.cargo/git/checkouts/iota.rs-1792f679be51837c/9fcdfc1/trytes/src/string.rs:2:5
|
2 | use alloc::string::String;
| ^^^^^^^^^^^^^^^^^^^^^ Could not find string in alloc

error[E0554]: #[feature] may not be used on the stable release channel
--> /home/ubuntu/.cargo/git/checkouts/iota.rs-1792f679be51837c/9fcdfc1/trytes/src/lib.rs:2:43
|
2 | #![cfg_attr(any(feature = "alloc", test), feature(alloc))]
| ^^^^^^^^^^^^^^

error: aborting due to previous error

error: Could not compile iota-trytes.

Caused by:
process didn't exit successfully: rustc --crate-name iota_trytes /home/ubuntu/.cargo/git/checkouts/iota.rs-1792f679be51837c/9fcdfc1/trytes/src/lib.rs --crate-type lib --emit=dep-info,link -C opt-level=3 --cfg feature="default" --cfg feature="alloc" -C metadata=74bced331196adde -C extra-filename=-74bced331196adde --out-dir /home/ubuntu/MAM/target/release/deps -L dependency=/home/ubuntu/MAM/target/release/deps --cap-lints allow (exit code: 101)`

Link broken for installation.

This step the link doesn't work. Please fix it.

"To build javascript (asm or wasm), follow instructions from here, and then"

Javascript build

Hi,
I am trying to build the Javascript lib. Following the direction in the readme, I get an error:


00:34 bindings  (master) $ rustup default nightly
info: using existing install for 'nightly-x86_64-unknown-linux-gnu'
info: default toolchain set to 'nightly-x86_64-unknown-linux-gnu'

  nightly-x86_64-unknown-linux-gnu unchanged - rustc 1.22.0-nightly (539f2083d 2017-09-13)

00:36 bindings  (master) $ rustup target add asmjs-unknown-emscripten --toolchain nightly
info: component 'rust-std' for target 'asmjs-unknown-emscripten' is up to date
00:37 bindings  (master) $ cargo build --release --target asmjs-unknown-emscriptenw
error: failed to run `rustc` to learn about target-specific information

Caused by:
  process didn't exit successfully: `rustc - --crate-name ___ --print=file-names --target asmjs-unknown-emscriptenw --crate-type bin --crate-type rlib` (exit code: 101)
--- stderr
error: Error loading target specification: Could not find specification for target "asmjs-unknown-emscriptenw"
  |
  = help: Use `--print target-list` for a list of built-in targets

In case the asmjs-unknown-emscriptenw is a typo, I also tried this, which looked more successful, but there are no javascript files anywhere:

00:39 bindings  (master) $ cargo build --release --target asmjs-unknown-emscripten
   Compiling iota-trytes v0.1.0 (https://github.com/iotaledger/iota.rs#2f6840c4)
   Compiling cty v0.1.5 (https://github.com/japaric/cty.git#40007c54)
   Compiling iota-tmath v0.1.0 (https://github.com/iotaledger/iota.rs#2f6840c4)
   Compiling iota-curl v0.1.0 (https://github.com/iotaledger/iota.rs#2f6840c4)
   Compiling iota-kerl v0.1.0 (https://github.com/iotaledger/iota.rs#2f6840c4)
   Compiling iota-curl-cpu v0.1.0 (https://github.com/iotaledger/iota.rs#2f6840c4)
   Compiling iota-sign v0.1.0 (https://github.com/iotaledger/iota.rs#2f6840c4)
   Compiling iota-merkle v0.1.0 (file:///home/daemmon/projects/iota/github/MAM/merkle)
warning: unused `#[macro_use]` import
 --> /home/daemmon/projects/iota/github/MAM/merkle/src/lib.rs:6:1
  |
6 | #[macro_use]
  | ^^^^^^^^^^^^
  |
  = note: #[warn(unused_imports)] on by default

warning: unused extern crate
  --> /home/daemmon/projects/iota/github/MAM/merkle/src/lib.rs:14:1
   |
14 | extern crate iota_curl_cpu as curl_cpu;
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = note: #[warn(unused_extern_crates)] on by default

   Compiling iota-mam v0.1.0 (file:///home/daemmon/projects/iota/github/MAM/mam)
warning: unused extern crate
  --> /home/daemmon/projects/iota/github/MAM/mam/src/lib.rs:15:1
   |
15 | extern crate iota_curl_cpu as curl_cpu;
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = note: #[warn(unused_extern_crates)] on by default

   Compiling iota-mam-bindings v0.1.0 (file:///home/daemmon/projects/iota/github/MAM/bindings)
warning: unused extern crate
  --> src/lib.rs:13:1
   |
13 | extern crate iota_curl;
   | ^^^^^^^^^^^^^^^^^^^^^^^
   |
   = note: #[warn(unused_extern_crates)] on by default

warning: unused extern crate
 --> src/mam/mod.rs:1:1
  |
1 | extern crate iota_curl_cpu;
  | ^^^^^^^^^^^^^^^^^^^^^^^^^^^

warning: unused extern crate
 --> src/merkle/mod.rs:1:1
  |
1 | extern crate iota_curl_cpu;
  | ^^^^^^^^^^^^^^^^^^^^^^^^^^^

    Finished release [optimized] target(s) in 4.2 secs

00:39 bindings  (master) $ cd ../target/
00:48 target  (master) $ find . -iname *.js
00:48 target  (master) $ 

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.