thanks to @dallyshalla I just got motivated to play with the ‘basic_encryptor’ example myself: I encrypted a 176MB music file, got back 168 encrypted chunks and a 49KB datamap. After that I decrypted the datamap and got a restored copy of my music file. I am listening to it right now. To play around with it yourself:
install rust Nightly (the compiler) Install Rust - Rust Programming Language or on mac/linux curl -s https://static.rust-lang.org/rustup.sh | sudo sh -s -- --channel=nightly
install gcc (linux sudo apt-get install gcc / windows one example)
clone self_encryption (install git if you don’t have it sudo apt-get install git on linux) git clone http://github.com/maidsafe/self_encryption.git
go into the folder: cd self_encryption
encrypt a file with the example basic_encryptor by cargo run --example basic_encryptor -- -e <full_path_to_my_file>
You now have the executable in ../self_encryption/target/debug/examples/. Your data_map and folder with the encrypted chunks is written where you ran the example from.
to decrypt your file, run cargo run --example basic_encryptor -- -d <full_path_to>/data_map <full_destination_path_including_filename>
That will restore your file . Bear in mind that this example has not been optimized for multithreading, so it runs slower then it will after optimization.
I’m using fedora 21 as my distro. So what adaptations would I need to make to these instructions for that? Obviously I’d be using yum instead of apt-get but what else?
Also can you encrypt a whole folder full of data or just individual files? And this has me real excited because even the self encryption alone is awesome. We haven’t had a decent cross platform encryption protocol since Trucrypt was made obsolete and went out of business.
We currently don’t actively support Fedora as we want to move forward as fast as possible. But if you try and report back, we’ll be happy to help along. I think others have also already tried rust on Fedora. The commands should largely be identical (excepting yum for example).
if you had rust installed some time ago, first call of action should be to update the nightly again to a more recent version; but equally you might want to run cargo update to update all the dependencies to their latest versions.
please also share rustc --version
If you just now installed rustc, tell me what system you are running
just make sure you have basic gcc and git installed etc. and then type curl -s https://static.rust-lang.org/rustup.sh | sudo sh -s -- --channel=nightly to install rust and you should be good to go.
One Windows 7 64, I am getting the following error when I attempt to follow the instructions above. It appears to be unhappy with the time library. Any ideas?
Edit: My Rust version is cargo 0.2.0-nightly (dac600c 2015-04-22) (built 2015-04-27)
You also need a gcc or equivalent. If you look in our Appveyor config you will see how we have it set automatically. You can follow the same steps manually.
I have gcc. I builds a bunch of .rlib files in self_encryption/target/debug/deps. One for every “compiling” entry above. It’s just not happy when it gets to the time library.
Sorry everybody. I found my problem on StackOverflow.
I was using gcc which comes in a package called “MinGW-w64” However, when I installed it, I just clicked the defaults, and ended up with a 32 bit version of it. I reinstalled MinGW-w64, being careful to select the 64 bit version, and then changed my path to point to the new 64 bit directory. Now I’m in business!
Funny how it was happy for 9 libraries, until it got to the time library.