iotaledger / mam Goto Github PK
View Code? Open in Web Editor NEWMasked Authentication Messaging
Masked Authentication Messaging
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:
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>
Update it for the method signature, and copy curl rate to signature at the end.
will Pyota come with MAM in the future and can we be able to use it separately if we want?
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.
The instructions to compile MAM in native form as static library are unclear which inhibits the MAM to be used with sensor nodes to encode messages to be inserted on Tangle.
Since the next merkle tree root is of fixed size 243 trits, there is no need to encode this in the message length, the program should infer it.
Note: The key should be root + index
.
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)`
This step the link doesn't work. Please fix it.
"To build javascript (asm or wasm), follow instructions from here, and then"
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) $
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.