maidsafe / self_encryption

file self encryptor
Other
118 stars 70 forks source link

Decryption fails on Ubuntu 15.04 #86

Closed southsideGLA closed 9 years ago

southsideGLA commented 9 years ago

I can apprently encrypt OK, Decrypting is less fun. Latest git pull from all libs and last nights rust reported ready to roll

First I check to ensure I have no "stale" files lying around from previous attempts, then I succesfully encrypt a file on my Desktop, then I fail to restore that file to a different name.

willie@gagarin:~/projects/MaidSafe/self_encryption$ locate chunk_store_test willie@gagarin:~/projects/MaidSafe/self_encryption$ cargo run --verbose --example basic_encryptor -- -e /home/willie/Desktop/WindsorDavies.jpg Fresh byteorder v0.3.10 Fresh regex-syntax v0.1.2 Fresh rustc-serialize v0.3.15 Fresh strsim v0.3.0 Fresh libc v0.1.8 Fresh regex v0.1.33 Fresh cbor v0.3.7 Fresh num_cpus v0.2.6 Fresh rand v0.3.8 Fresh libsodium-sys v0.0.5 Fresh docopt v0.6.66 Fresh asynchronous v0.4.5 Fresh tempdir v0.3.4 Fresh sodiumoxide v0.0.5 Fresh self_encryption v0.1.4 (file:///home/willie/projects/MaidSafe/self_encryption) Running target/debug/examples/basic_encryptor -e /home/willie/Desktop/WindsorDavies.jpg chunk written chunk written chunk written chunk written willie@gagarin:~/projects/MaidSafe/self_encryption$ cargo run --verbose --example basic_encryptor -- -d /home/willie/Desktop/WindsorDavies.jpg /home/willie/Desktop/OhDearHowSad.jpg Fresh strsim v0.3.0 Fresh rustc-serialize v0.3.15 Fresh regex-syntax v0.1.2 Fresh libc v0.1.8 Fresh byteorder v0.3.10 Fresh regex v0.1.33 Fresh num_cpus v0.2.6 Fresh rand v0.3.8 Fresh libsodium-sys v0.0.5 Fresh cbor v0.3.7 Fresh docopt v0.6.66 Fresh asynchronous v0.4.5 Fresh tempdir v0.3.4 Fresh sodiumoxide v0.0.5 Fresh self_encryption v0.1.4 (file:///home/willie/projects/MaidSafe/self_encryption) Running target/debug/examples/basic_encryptor -d /home/willie/Desktop/WindsorDavies.jpg /home/willie/Desktop/OhDearHowSad.jpg ! chunk_store_test AlreadyExists thread '' panicked at 'called Result::unwrap() on an Err value: Decode(Other("Expected Unicode string or variant map, but got Break"))', ../src/libcore/result.rs:731 Process didn't exit successfully: target/debug/examples/basic_encryptor -d /home/willie/Desktop/WindsorDavies.jpg /home/willie/Desktop/OhDearHowSad.jpg (exit code: 101) willie@gagarin:~/projects/MaidSafe/self_encryption$

southsideGLA commented 9 years ago

windsordavies

just in case you were interested.......

rossmuir commented 9 years ago

Thanks @southsideGLA for raising the issue - I have replicated it and can see you need to explicitly specify the data_map to decrypt successfully which the help does not make clear and needs resolved.

user@machine:~/MaidSafe-Testing/maidsafe_rust/self_encryption/target/debug/examples (master)$ ./basic_encryptor -d /home/user/MaidSafe-Testing/maidsafe_rust/self_encryption/target/debug/examples/ /home/user/Downloads/BraveNewWorld_2.pdf
! chunk_store_test AlreadyExists
thread '<main>' panicked at 'called `Result::unwrap()` on an `Err` value: Error { repr: Os(21) }', ../src/libcore/result.rs:731
user@machine:~/MaidSafe-Testing/maidsafe_rust/self_encryption/target/debug/examples (master)$ ./basic_encryptor -d /home/user/MaidSafe-Testing/maidsafe_rust/self_encryption/target/debug/examples /home/user/Downloads/BraveNewWorld_2.pdf
! chunk_store_test AlreadyExists
thread '<main>' panicked at 'called `Result::unwrap()` on an `Err` value: Error { repr: Os(21) }', ../src/libcore/result.rs:731
user@machine:~/MaidSafe-Testing/maidsafe_rust/self_encryption/target/debug/examples (master)$ ./basic_encryptor -d /home/user/MaidSafe-Testing/maidsafe_rust/self_encryption/target/debug/examples/data_map /home/user/Downloads/BraveNewWorld_2.pdf
! chunk_store_test AlreadyExists
chunk  written
user@machine:~/MaidSafe-Testing/maidsafe_rust/self_encryption/target/debug/examples (master)$ ./basic_encryptor -d data_map /home/user/Downloads/BraveNewWorld_3.pdf
! chunk_store_test AlreadyExists
chunk  written
southsideGLA commented 9 years ago

Yep - works fine now - thanks :-)