summaryrefslogtreecommitdiff
path: root/client/src/leap/soledad/client/_crypto.py
AgeCommit message (Collapse)Author
2017-06-24[pkg] unify client and server into a single python packagedrebs
We have been discussing about this merge for a while. Its main goal is to simplify things: code navigation, but also packaging. The rationale is that the code is more cohesive in this way, and there's only one source package to install. Dependencies that are only for the server or the client will not be installed by default, and they are expected to be provided by the environment. There are setuptools extras defined for the client and the server. Debianization is still expected to split the single source package into 3 binaries. Another avantage is that the documentation can now install a single package with a single step, and therefore include the docstrings into the generated docs. - Resolves: #8896
2017-05-31[bug] fix deprecated multibackend callKali Kaneko
2017-05-01[feat] add attachments apidrebs
2017-04-19[bug] adapt blob size to fake size from #8758Victor Shyba
Issue #8758 rounded doc size considering we would add some kind of padding to the document. Since we arent removing the pad, this commit makes the client discover the size from the decrypted amount. Proper padding and strip should be done in the future. - Related: #8758 - Related: #8814
2017-04-04[docs] add docstrings to _get_rounded_sizeVictor Shyba
2017-04-04[bug] use soledad_assert instead of assertVictor Shyba
2017-04-04[docs] improve docstrings and comments from reviewVictor Shyba
2017-04-04[feature] improve error messages on preamble checkVictor Shyba
2017-04-04[feature] incremental decrypterVictor Shyba
2017-04-04[feature] ascii armor disable optionVictor Shyba
2017-04-04[bug] fix loose ends on _crypto and testsVictor Shyba
2017-04-04[style] pep8 fixesVictor Shyba
2017-04-04[feature] close mvp loop with clientKali Kaneko
2017-04-04[feature] enable simple obfuscation of blob size in preambleKali Kaneko
use a powers of two ceiling for the reported size in the preamble. for this to be effective against a passive adversary, cover traffic should be used in the uploads too. This is just a first-stop measure; proper research should be done to determine a good tradeoff between avoiding information leakage and saving some storage and bandwidth.. - Documentation: #8759 - Related: #8759
2017-04-04[feature] save blob to db, incrementallyKali Kaneko
2017-04-04[feature] add attribute to keep blob cryptoKali Kaneko
2017-04-04[refactor] refactor crypto api to better allow streamingKali Kaneko
Motivation is that I need to pass partial data to the decryptor, mainly.
2017-03-17[refactor] Improve python3 compatibilityefkin
With this commit all tests on py34 tox environment are collected.
2017-02-16[style] add deprecation warning on legacy decoderVictor Shyba
2017-02-16[feature] add doc size to preambleVictor Shyba
That's necessary for blobs-io. Current code includes backwards compatibility branching and tests, which shall be removed on next releases.
2017-02-15[tests] add tests for preamble encodingVictor Shyba
2016-12-12[feature] Add retro compat on secrets.py ciphersVictor Shyba
Integrated the secrets's JSON key that specifies ciphers into _crypto and added optional GCM. Also added a test to check if both cipher types can be imported. Resolves: #8680 Signed-off-by: Victor Shyba <victor1984@riseup.net>
2016-12-12[feature] use GCM instead of CTR+HMACVictor Shyba
Resolves: #8668 - client: substitute usage of CTR mode + HMAC by GCM cipher mode Signed-off-by: Victor Shyba <victor1984@riseup.net>
2016-12-12[refactor] improve blob signature magic usageVictor Shyba
Our magic value wasn't being used and were represented as a string. Refactored it to a constant, increased it's size to 2 bytes and optimzed is_symmetrically_encrypted to look for the magic and symmetrically encrypted flag under base64 encoding. Most file types will use this feature to help identifying themselves, so it got refactored to serve the purpose it was created.
2016-12-12[style] fixes from code-reviewVictor Shyba
Naming, interfaces and other details.
2016-12-12[refactor] introduces a GenericWriterVictor Shyba
AESWriter and HMACWriter are just applying hmac or aes into a flow of data. Abstracted the application of those operations into a super class and highlighted just the difference on each implementation.
2016-12-12[refactor] adds PipeableWriter to pipe two streamsVictor Shyba
VerifiedEncryptor and VerifiedDecryptor are just a pipe and a fan-out. This class provides both behaviors to two distinct writeable things.
2016-12-12[refactor] simplify _cryptoVictor Shyba
After adding the streaming decrypt, some classes were doing almost the same thing. Unified them. Also fixed some module level variables to upper case and some class name to camel case.
2016-12-12[feature] make _crypto stream on decryptionVictor Shyba
We are already doing this on encryption, now we can stream also from decryption. This unblocks the reactor and will be valuable for blobs-io.
2016-12-12[feature] delimit preamble from ciphertextVictor Shyba
We now encode preamble and ciphertext+hmac in two distinct payloads separated by a space. This allows metadata to be extracted and used before decoding the whole document. It also introduces a single packer for packing and unpacking of data instead of reads and writes. Downside: doc_id and rev are limited to 255 chars now.
2016-12-12[refactor] Hide IV, simplify some callsVictor Shyba
IV was being set during tests and this required some defensive coding to avoid IV being set in production. This commits makes the test use the generated IV and "hides" it using a read-only property to let it clear this should never happen. Also refactored out some parameters that are generated automatically to reduce some lines of code and enhance readability.
2016-12-12[docs] add docstrings for _cryptoVictor Shyba
Also explaining how we are using Twisted's consumer interfaces.
2016-12-12[feature] Adds back support to deprecated cryptoVictor Shyba
Will be removed when we have the proper tool to migrate data.
2016-12-12[test] fix test and remove leftovers defer_encryptionVictor Shyba
2016-12-12[style] pep8Kali Kaneko
2016-12-12[tests] adapt testsKali Kaneko
2016-12-12[refactor] add SoledadCrypto interfaceKali Kaneko
2016-12-12[refactor] adapt fetcher to decryptorKali Kaneko
2016-12-12[feature] blob encryptor / decryptorKali Kaneko
2016-12-12[refactor] remove encryption poolKali Kaneko
2016-12-12[feature] streaming crypto implementationKali Kaneko