Commit Graph

55 Commits

Author SHA1 Message Date
Sebastian Messmer
efac089c76 - Add Clang 8 and GCC 9 to CI
- Switch clang-tidy to Clang 9
- Fix compiler and clang-tidy warnings produced by the previous points
2019-06-08 13:06:17 -07:00
Sebastian Messmer
8d09fb4c46 Set meaningful thread names for debugging purposes 2019-01-20 13:15:15 -08:00
Sebastian Messmer
d68247070f When an integrity violation occurs, gracefully unmount the file system and refuse to mount on future attempts 2018-12-10 21:20:18 -08:00
Sebastian Messmer
954d6662f6 Simplify: key size is only known at runtime, not a template parameter anymore 2018-10-21 22:53:53 +02:00
Sebastian Messmer
4b26c67146 Fix clang-tidy warnings 2018-10-14 22:26:30 +02:00
Sebastian Messmer
ff62fe9e84 Fix data race in test case 2018-09-26 20:10:43 -07:00
Sebastian Messmer
5ad55b1d58 - UnswappableAllocator
- EncryptionKey uses UnswappableAllocator
2018-09-11 21:51:31 -07:00
Sebastian Messmer
f29e398e51 Rename --no-integrity-checks to --allow-integrity-violations 2018-04-29 13:41:21 -07:00
Sebastian Messmer
fc71242e25 Fix Travis CI build 2018-02-17 18:54:22 -08:00
Sebastian Messmer
7287f1ca4d Fix some tsan warnings 2018-01-15 01:58:48 +00:00
Sebastian Messmer
f439bf9d0f Remove c style casts and unaligned memory accesses 2017-12-03 19:01:41 +00:00
Sebastian Messmer
cc7b38b3c1 - run-clang-tidy.sh also runs on test cases.
- fix clang-tidy warnings in test cases
2017-12-01 15:01:49 +00:00
Sebastian Messmer
9fdefaa4e0 Remove BlockStoreWithRandomKeys 2017-09-18 20:42:07 +01:00
Sebastian Messmer
5458af7c52 Rename blockstore::Key -> blockstore::BlockId 2017-09-17 02:07:27 +01:00
Sebastian Messmer
5299be5dda Wire through the missingBlockIsIntegrityViolation setting 2017-09-16 16:49:33 +01:00
Sebastian Messmer
b6ce7c3ae4 Allow disabling integrity checks on command line 2017-09-16 16:18:53 +01:00
Sebastian Messmer
f6b6875bb2 Rename VersionCountingBlockStore -> IntegrityBlockStore 2017-09-16 00:18:58 +01:00
Sebastian Messmer
00d098952b Storing block ID is job of VersionCountingBlockStore, not EncryptedBlockStore. 2017-09-16 00:09:15 +01:00
Sebastian Messmer
0ec081750e Fix test cases 2017-09-11 14:37:06 +01:00
Sebastian Messmer
ffc0b5195c - Fix CachingBlockStore2_Specific test cases to actually test CachingBlockStore2
- Remove old CachingBlockStore
2017-08-22 00:03:04 +01:00
Sebastian Messmer
4add7f3d80 Start implementing new cache 2017-08-21 22:44:35 +01:00
Sebastian Messmer
a45c0bf29a Fix merge conflict 2017-08-20 01:12:28 +01:00
Sebastian Messmer
ff34049787 Merge branch 'next' into newblockstore 2017-08-19 11:54:01 +01:00
Sebastian Messmer
ade23f9b86 Merge branch 'develop' into next 2017-08-19 11:53:22 +01:00
Mouse
7abed14d63 Make compatible with the current Crypto++ master (#163)
* Make compatible with the current Crypto++ master

* Add auto-config and build script. Not important, just a time-saver.

* Address compatibility with Crypto++ 6.0 release, while maintaining compatibility
with the older Crypto++ releases.

* Polish comments in cryptopp_byte.h. Forgot to include it to RandomGeneratorThread - fixed.

* Late at night - forgot to fix the .cpp files that used ::byte...

* Renamed auto-config-and-run script

* Added comments/description, and commented out "make check" that fails anyway

* Changed the include guard to match the rest of the .h files

* Delete build script

* Update ChangeLog.txt

* Update ChangeLog.txt
2017-08-16 03:00:46 +01:00
Sebastian Messmer
4a602ce7a5 Remove old blockstore implementations 2017-07-20 19:32:42 -07:00
Sebastian Messmer
428290fda5 Extend BlockStore2 and write a LowToHighLevelBlockStore as wrapper from BlockStore to BlockStore2 2017-07-07 16:18:09 -05:00
Sebastian Messmer
dbf54b9563 Add test cases for BlockStore2 and fix existing BlockStore2 implementations 2017-02-21 22:27:46 +00:00
Sebastian Messmer
eab7cb1df4 Implement BlockStore::overwrite(). This is the last step in ensuring that the write() call doen't have to load leaves if they're only overwritten anyhow. 2016-07-16 11:42:06 +02:00
Sebastian Messmer
6fc62a58fa Removed unneeded include 2016-07-15 12:51:29 +02:00
Sebastian Messmer
d626349802 Finish MockBlockStore to also collect other performance metrics, and implement the standard block store tests for it. 2016-07-15 10:23:09 +02:00
Sebastian Messmer
9e9369b9ed Performance optimization: When removing or shrinking a tree, we don't load/read leaves anymore. Loading inner nodes is enough to get all block IDs and then we can delete the leaves from their IDs without loading them. 2016-07-13 11:27:31 +02:00
Sebastian Messmer
2bc3b641aa Allow Data::FillWithZeroes on rvalue 2016-07-10 22:43:07 +02:00
Sebastian Messmer
514dbcb6c7 ClientId is not loaded/generated inside of KnownBlockVersions, but in CryDevice. This way, CryDevice also has access to the ClientID. This is later needed to recognize whether we're in a single-client or in a multi-client setting. 2016-06-26 22:15:52 -07:00
Sebastian Messmer
f066b45954 VersionCountingBlockStore::forEachBlock() has an integrity check checking that all expected blocks are still existing. 2016-06-26 22:15:52 -07:00
Sebastian Messmer
491b277cee In case of an integrity violation, tell the user how they can reset integrity data. 2016-06-26 22:15:52 -07:00
Sebastian Messmer
839a511c4d When an integrity violation is detected, any further access to the file system is blocked. This ensures that the user notices the integrity violation. 2016-06-26 22:15:52 -07:00
Sebastian Messmer
2284571127 Add test cases to KnownBlockVersionsTest 2016-06-26 22:15:52 -07:00
Sebastian Messmer
c84a230afd VersionCountingBlockStore is initialized with a flag, saying whether missing blocks are integrity errors. This flag is meant to be activated in a single-client scenario to have this additional integrity check. 2016-06-26 22:15:52 -07:00
Sebastian Messmer
e02021ecdc Throw an IntegrityViolationError exception instead of just logging integrity violations. This makes sure the user notices. 2016-06-26 22:15:52 -07:00
Sebastian Messmer
32001d0af3 Write another integrity test case 2016-06-26 22:15:52 -07:00
Sebastian Messmer
473e9cc8bb Fix compiler errors 2016-06-26 22:15:52 -07:00
Sebastian Messmer
1a72d3c226 Deleting a block doesn't set the version number to MAX_UINT64, but just increases it by one. This makes sure, that if (in case of a synchronization conflict) the block is reintroduced by another client, this is accepted. 2016-06-26 22:15:52 -07:00
Sebastian Messmer
5534b56ce3 When increasing the version number, don't only look at the version number in the block, but also at the last version number given to it by the current client. Ensure, the new version number is higher than both. 2016-06-26 22:15:52 -07:00
Sebastian Messmer
577c697856 When a client deletes a block, it will never again accept it as a valid block. 2016-06-26 22:15:52 -07:00
Sebastian Messmer
4d1f7a46b9 * Prevent rollback to the "newest" version of a client when this version was superseded by a version from a different client.
* Use mutex/locks to secure access to KnownBlockVersions
2016-06-26 22:15:52 -07:00
Sebastian Messmer
ea3de7360c * Block versions don't have to be globally nondecreasing, but only per client id. This solves potential synchronization conflicts in a multi-client setting.
* Use cpputils::Serializer and cpputils::Deserializer instead of std::ifstream for storing/loading the block version list
2016-06-26 22:15:52 -07:00
Sebastian Messmer
13411c4e59 Integrity data from KnownBlockVersions is persisted to a file 2016-06-26 22:15:52 -07:00
Sebastian Messmer
d7f547dd47 Implement a VersionCountingBlockStore that checks that version numbers are nondecreasing. Currently, the block store is not used yet and the state is not stored over different runs of CryFS. This comes with future commits. 2016-06-26 22:15:52 -07:00
Sebastian Messmer
9ed7bd0b41 Ciphertext blocks are split into subdirectories (before, all were on top level) to reduce number of files per directory. Some unix tools don't work well with directories with too many entries. 2016-04-29 12:21:02 -07:00