Commit Graph

202 Commits (e6c455e8bb0eff460d262d3a4b235e84c7aad4da)

Author SHA1 Message Date
tuxxy 423c5bde16 Create keys package 2017-09-18 08:31:20 -07:00
tuxxy af9c93c6b6 Create keyring package 2017-09-18 08:30:47 -07:00
Michael Egorov 47e89a2245 Switch serialization format to Python bytes 2017-09-17 00:21:28 -07:00
tuxxy d91fefca13 Add working test_header_defaults test 2017-09-14 15:47:48 -07:00
tuxxy 0004532871 Add NONCE_RANDOM_PREFIX_SIZE to constants
Add test for NONCE_RANDOM_PREFIX_SIZE constant
2017-09-14 15:47:48 -07:00
tuxxy 8a740871fc Fix header import 2017-09-14 15:47:48 -07:00
tuxxy 9961e5a9dc Refactor read/write functions to perform with the new changes 2017-09-14 15:47:48 -07:00
tuxxy b325b38180 Update the header and close the file object 2017-09-14 15:47:48 -07:00
tuxxy 343ced9631 Add NONCE_COUNTER_BYTE_SIZE to constants 2017-09-14 15:47:42 -07:00
tuxxy fce2ff69c7 Add constants.py file 2017-09-14 13:43:38 -07:00
tuxxy 9ba61f220c Create the header file if it doesn't exist and write the updated header whenever updated 2017-09-14 13:42:31 -07:00
tuxxy 5d87c531fc Initialize a header object for the given header_path 2017-09-14 13:05:16 -07:00
tuxxy 526a7e33bc Check if header exists, if not build a header 2017-09-14 13:03:12 -07:00
tuxxy 1babb31cff Make default keys in the header to an empty list 2017-09-14 12:55:08 -07:00
tuxxy d8a8cea3a0 Add comments to the header.py file 2017-09-14 12:43:33 -07:00
tuxxy 2e5ddc2480 Add header property
Remove setter

The setter method is not needed because it turns out that caching
doesn't happen and `Header.update_header` can be called anyway.
2017-09-14 12:37:06 -07:00
tuxxy df2908817e Add update_header method 2017-09-14 12:30:48 -07:00
tuxxy 3ac60f35cd Remove old header methods in EncryptedFile 2017-09-14 12:17:28 -07:00
tuxxy c962de106c Add package import for Header 2017-09-14 12:16:06 -07:00
tuxxy 73e037288d Add _write_header method 2017-09-14 12:12:22 -07:00
tuxxy 4ee4a20a74 Add _build_header method and build the header in __init__ 2017-09-14 12:12:12 -07:00
tuxxy e107efda7f Add _read_header method 2017-09-14 11:44:13 -07:00
tuxxy 92401d739b Add Header object in header.py 2017-09-14 11:21:04 -07:00
tuxxy 051089c98c Create empty header.py file 2017-09-14 11:08:51 -07:00
tuxxy 0bd05e1336 Add open_new and write functions
Add comment and fix PEP8
2017-09-14 10:28:09 -07:00
tuxxy 6d9fdd1655 Add EncryptedFile.close method to write header info to the file_obj 2017-09-13 15:39:07 -07:00
tuxxy 4167ba690d Add _encode_header method to return header w/ metadata ready for writing 2017-09-13 15:35:28 -07:00
tuxxy 728cad790f Add docstring for EncryptedFile.__init__
Fix syntax error
2017-09-13 15:27:56 -07:00
tuxxy ec3b6903c1 Seek to the beginning of the file if reading the header fails 2017-09-13 15:18:38 -07:00
tuxxy 5ea05a0e0e Read header from the end of the file 2017-09-13 15:15:50 -07:00
tuxxy b8890997fe Add more data to the header, and add _update_header method 2017-09-13 15:15:11 -07:00
tuxxy 8c5d76a1de Move EncryptedFile object to storage 2017-09-13 14:14:29 -07:00
tuxxy ddbb6c2acd Add encryptedfile.py that contains a basic file-like object with read capabilities 2017-09-13 14:00:31 -07:00
jMyles b6ba561de7 bootstrap now creates a NuCypher node. 2017-09-13 13:35:22 -07:00
jMyles 83d6724f61 Nodes now share a Capability framework for determining how to interact. This includes the ability for a Node to announce itself as seed-only. Fixed #22. 2017-09-13 13:34:40 -07:00
jMyles a032a4ab05 Logic for a node to alert another node that it is seed-only. 2017-09-13 13:34:40 -07:00
jMyles ab6cbaead6 Seed-only Server now (at least seems) to actually refuse to store data. Fixes #23. 2017-09-13 13:34:40 -07:00
tuxxy e0418db4da Check dec_key length for symmetric key length (32 bytes) 2017-09-12 10:23:07 -07:00
tuxxy 8a35453a8f Refactor and move decrypting code to 'client.decrypt'
Fix syntax error
2017-09-12 10:20:32 -07:00
tuxxy a9eb406d8b Add code to 'Client.encrypt' to generate storage ready data 2017-09-11 15:33:14 -07:00
tuxxy 79d8ed989b Add version number checking in 'Client.open' 2017-09-11 13:43:34 -07:00
tuxxy 4dca27a31e Add code for reading and decrypting a file 2017-09-11 13:37:16 -07:00
tuxxy c60bc89c86 Set mode default in client.open to 'rb' for reading bytes 2017-09-11 13:36:55 -07:00
tuxxy 5b4db3ac94 Return length of msgpack encoded header instead of raw header 2017-09-11 13:14:47 -07:00
tuxxy bafb15fb61 Return header and header length in tuple 2017-09-11 13:03:48 -07:00
tuxxy 6c305d91d9 Check for version number in _build_header 2017-09-11 12:51:24 -07:00
tuxxy d026f3f893 Add _build_header and _read_header methods to Client 2017-09-11 12:10:04 -07:00
tuxxy d3e5158339 Check for None path in encrypt_key 2017-09-06 12:51:31 -06:00
tuxxy e9ce021283 Merge branch 'master' of github.com:nucypher/nucypher-kms 2017-09-05 18:54:29 -06:00
tuxxy dc1f26fa65 Check for non-None paths 2017-09-05 18:51:54 -06:00
tuxxy 4689c477d2 Force a path of '/' to be '' 2017-09-05 18:51:33 -06:00
Michael Egorov fe6faa0a13 Dummy client to use DB instead of dict 2017-09-05 16:56:29 -07:00
Michael Egorov 7f03612611 Msgpack to pack any objects in db 2017-09-05 16:53:18 -07:00
Michael Egorov abfbdc7c16 Del and contains for DB 2017-09-05 16:02:25 -07:00
tuxxy 48e4ccfe06 Remove KMAC code 2017-09-05 17:00:44 -06:00
tuxxy 4dcc4dc99f Use Keccak-256 instead of KMAC 2017-09-05 17:00:05 -06:00
Michael Egorov 1219734484 Using lmdb as a dict-like storage 2017-09-05 15:43:16 -07:00
Michael Egorov 1b84c53da0 No need for public key 2017-09-05 15:42:55 -07:00
tuxxy 54f4eeaa44 Use path as bytes and fix tests /so far/ 2017-09-04 23:30:05 -06:00
tuxxy 2d6c4327bb Add test for client._split_path method 2017-09-04 12:59:14 -06:00
Michael Egorov d33e678eca Merge branch 'client-wip' 2017-09-01 22:49:44 -07:00
tuxxy 54ec647cd1 Fix _split_path method (thanks @michwill) 2017-09-01 23:18:32 -06:00
tuxxy ea961b0cf3 Merge branch 'master' of github.com:tuxxy/nucypher-kms 2017-09-01 22:54:19 -06:00
tuxxy f04889ef06 Add _split_path function (incomplete) 2017-09-01 22:54:12 -06:00
Tux f7219fcf1f Remove some extraneous whitespace 2017-09-01 18:54:04 -06:00
jMyles c97e1290da Updated to reflect solution that we arrived at for PR 32 on kademlia. Also includes a test. 2017-09-01 17:15:50 -07:00
jMyles ae306d6bdd pysha3 monkey patch so that hashlib sha3 functions work on Python 3.5 2017-09-01 15:55:39 -07:00
tuxxy 209fa8f1e7 Fix bugs and whatnot 2017-09-01 15:42:00 -06:00
tuxxy 3d278fc640 Handle path key derivation for decrypt_key 2017-09-01 14:08:35 -06:00
tuxxy dde40b211b Add is_pub param to _derive_path_key and update tests 2017-09-01 13:54:10 -06:00
tuxxy e16d11ff32 Remove check for length of tuple in encrypt_key 2017-09-01 13:27:44 -06:00
tuxxy 041b81a6df Add _derive_path_key method and handle paths 2017-09-01 12:08:00 -06:00
tuxxy 87011f37c5 Append length in bits to new_X 2017-09-01 10:06:18 -06:00
tux 1acf1c3034 Use length in bytes... 2017-09-01 02:12:19 -06:00
tux ce5805a468 Add comment on format for padded_x 2017-09-01 01:37:43 -06:00
tux baca43a569 Add object for KMAC-256 2017-09-01 01:32:16 -06:00
tuxxy 3669eb8d94 Use our private key to decrypt key 2017-08-31 13:39:38 -06:00
tuxxy 50eed45835 Encrypt/Decrypt bulk data 2017-08-31 13:35:07 -06:00
tuxxy 8c2b3ecbbb Create reencryption key in method 2017-08-31 13:34:35 -06:00
tuxxy 0874c38bdb Encrypt/Decrypt symmetric key 2017-08-31 13:33:56 -06:00
tuxxy 0d17c203de Generate keypair on __init__ 2017-08-31 13:31:49 -06:00
tuxxy f4f61b6ac4 Add imports needed for encryption/decryption 2017-08-31 13:31:24 -06:00
tuxxy a90da9e274 Remove unneeded gen_priv method 2017-08-31 13:31:00 -06:00
tuxxy ca9aea1155 Add key generation method 2017-08-31 12:25:31 -06:00
jMyles 8f509533c5 First implementation of customized Server and Protocol classes for DHT. Pending PR 32 on kademlia. 2017-08-30 22:13:18 -07:00
Michael Egorov e0a6574905 No secret key 2 needed for rekey 2017-08-25 22:12:21 -07:00
Michael Egorov 943fad56ba File API update 2017-08-25 13:01:51 -07:00
Michael Egorov cb751f5821 Some API changes 2017-08-24 23:07:27 -07:00
Michael Egorov ddd91d1ea2 Dummy client for tests 2017-08-20 10:43:29 -07:00
Michael Egorov bcb849416c Dummy network client filled in 2017-08-19 23:00:57 -07:00
Michael Egorov 005fbcf0aa g parameter from Bitcoin block 0 hashMerkleRoot 2017-08-19 20:47:52 -07:00
Michael Egorov 9d25c7dbd1 pubkey bbs98 2017-08-19 20:12:47 -07:00
Michael Egorov e8c06b8349 Public key bbs98 2017-08-19 14:50:34 -07:00
Michael Egorov 8febc2798c PRE reencryption to pubkey 2017-08-19 13:17:54 -07:00
Michael Egorov a7e2f70ddb importmodule bugfix 2017-08-19 12:10:43 -07:00
Michael Egorov 55dbfdd8e0 test_default_crypto - symmetric crypto 2017-08-19 12:05:18 -07:00
Michael Egorov 60c939a021 nacl and bbs98 2017-08-19 11:27:55 -07:00
Michael Egorov e35ce6d366 Dummy client: close 2017-08-19 09:10:17 -07:00
Michael Egorov ef9e80ecf9 Documentation of the reencryption interface in docstrings 2017-08-18 22:43:06 -07:00
Michael Egorov 4f7f604ea2 API description updated 2017-08-18 10:47:35 -07:00
Michael Egorov 52a0351770 Algorithm params included 2017-08-18 07:00:54 -07:00
Michael Egorov d25aebb52b High level interface specified 2017-08-17 21:38:29 -07:00