Commit Graph

465 Commits (74f51e77f3eb69f34493402cac9bda83401aa292)

Author SHA1 Message Date
jMyles adf71c80c8 Seal now implements dunders instead of custom methods. 2017-10-16 18:17:53 -07:00
jMyles e276e86d52 Getting pretty close. Need a clean way to encrypt and decrypt. 2017-10-16 18:17:53 -07:00
jMyles 71669bfc49 Made working defaults for EncryptingKeypair 2017-10-16 18:17:29 -07:00
jMyles db364a20de Fixed up docstring and type hints on verify_from 2017-10-16 18:16:01 -07:00
jMyles 5390c8fce5 Fixed PolicyGroup to accept Bob, cleaned up tests and removed stale mock material. 2017-10-16 18:16:01 -07:00
jMyles 506f0f81cd Character encryption tests.
Note that CryptoPower.decrypt and Character.encrypt_for have fake logic until EncryptingPower is implemented.
2017-10-16 18:16:01 -07:00
jMyles 8cf64dfcc6 PolicyGroup now uses Bob instead of a public key. One test fails until we get EncryptingPower working. 2017-10-16 18:12:14 -07:00
tuxxy 84d183ba7c
Add tests and fix encrypt/decrypt issues 2017-10-16 14:10:56 -06:00
tuxxy 27234dce73
Fix import errors 2017-10-16 13:39:46 -06:00
tuxxy 28b865dff2
Undo the last thing 2017-10-16 13:21:19 -06:00
tuxxy 75b7e30e7a
Push priv/pub to be the first param in encrypt/decrypt functions 2017-10-16 13:17:40 -06:00
tuxxy 299e89105e
Accept tuple in param 2017-10-16 13:12:35 -06:00
tuxxy f83486636b
Decapsulate enc_key 2017-10-16 13:08:32 -06:00
tuxxy 2d52062581
Add PKE decrypt method [WIP]
Remove old encrypt method
2017-10-16 12:26:45 -06:00
tuxxy 426eedf706
Add some PKE and key encryption methods and comment out old encrypt method 2017-10-16 12:05:38 -06:00
tuxxy c8b7459e66
Add gen_path_keys function: 2017-10-13 15:18:52 -06:00
tuxxy 529c5aac85
Add PKE encryption method 2017-10-13 14:58:34 -06:00
tuxxy 98c0a45658
Fix up encrypt returns 2017-10-13 11:50:26 -06:00
tuxxy 9c8bc7eb6e
Add _decrypt_key 2017-10-12 14:58:03 -06:00
tuxxy 5a30ab0626
Add placeholder for decrypt method 2017-10-11 20:24:03 -06:00
tuxxy ed5a1a30a8
Fill out the encrypt method 2017-10-11 20:08:47 -06:00
tuxxy 228974001b
Add the encryption code so far 2017-10-11 16:51:27 -06:00
tuxxy dcbc6341fc
Implement _encrypt_key 2017-10-11 15:32:40 -06:00
tuxxy be78118254
Add _derive_path_key 2017-10-11 15:14:32 -06:00
tuxxy 4527f0f93a
Add placeholder method for encrypt and add _split_path 2017-10-11 14:47:55 -06:00
tuxxy a14f83fba5
Merge branch 'character-crypto' of github.com:jmyles/nucypher-kms into encrypting-power 2017-10-11 14:08:42 -06:00
tuxxy 8fb36b8b13
Add boolean switch to generate private key in gen_ecies_keypair and gen_ecdsa_keypair 2017-10-11 13:59:27 -06:00
tuxxy 263b21a84e
Add TestKeypairs TestCase with test_ecies_keypair_generation 2017-10-11 13:51:58 -06:00
tuxxy 8e29c079d0
Add placeholder methods for get_key, add_key, and del_key 2017-10-11 13:44:51 -06:00
tuxxy 1a328811bf
Implement gen_ecies_keypair and gen_ecdsa_keypair 2017-10-11 13:42:32 -06:00
tuxxy b88b86ab43
Add SigningKeypair to keypairs 2017-10-11 13:38:09 -06:00
tuxxy b10a896f49
Add minimal key generation for EncryptingKeypair 2017-10-11 13:33:56 -06:00
tuxxy ad129831c9
Add empty keypairs.py file 2017-10-11 13:21:48 -06:00
tuxxy 01fa0ce456
Add placeholders for gen_ecies_keypair and gen_ecdsa_keypair 2017-10-11 13:21:04 -06:00
tuxxy 51a20401e7
Create keystore module w/ empty keystore.py 2017-10-11 13:11:07 -06:00
tuxxy 04f167baf2
Move keystore.py to keyring.py (temporary) 2017-10-11 13:09:49 -06:00
jMyles bf0f83b6ea Moving EncryptingKeypair over to powers. 2017-10-10 22:39:25 -07:00
tuxxy 42ee8fc8c9 Remove unneeded hash.py file 2017-10-10 20:32:37 -06:00
tuxxy c699fd3e18 Use keccak_digest instead of signature_hash or content_hash
Really use keccak_hash

keccak_hash -> keccak_digest

Fix another thing
2017-10-10 20:32:35 -06:00
tuxxy 3b3f44038c Fix tests and update imports to reflect nkms.crypto.api 2017-10-10 20:18:24 -06:00
tuxxy 84ba50ddf6 Remove the use of msgpack 2017-10-10 19:05:20 -06:00
tuxxy 954d898aa2 Rename crypto.py to api.py 2017-10-10 17:24:43 -06:00
tuxxy be45b18258 Add tests for ecdsa_sign and ecdsa_verify 2017-10-10 17:20:48 -06:00
tuxxy 2b16609e85 Add ecdsa_pub2bytes and ecdsa_bytes2pub
Fix comment
2017-10-10 17:09:10 -06:00
tuxxy f697602390 Add ecdsa_gen_priv function and test 2017-10-10 16:30:19 -06:00
tuxxy 539f537067 Add ecdsa_sign 2017-10-10 15:58:32 -06:00
tuxxy dcfdf1b2d2 Rename vrs_msgpack_dump/load to ecdsa_gen/load_sig 2017-10-10 15:49:56 -06:00
tuxxy b55722f770 Move pub/priv_bytes2ec to logical place 2017-10-10 15:49:56 -06:00
tuxxy fb0d6fc676 Rename to keccak_digest 2017-10-10 15:27:45 -06:00
tuxxy ce8b222197 Merge jmyle's PR fixing stuff 2017-10-10 15:03:06 -06:00
jMyles 9e651af46b Import statements changed while we reorganize. 2017-10-10 13:02:45 -07:00
jMyles 123fa5e5ae Merge commit 'bcca3f8c365e486e4e930e3fdceaf308f1b13dd5' into character-crypto 2017-10-10 12:55:27 -07:00
tuxxy baef6b87a8 Use SystemRandom and add secure_random_range 2017-10-10 13:52:11 -06:00
tuxxy 12f00611b9 Add secure_random
Add comment on Error state
2017-10-10 13:24:38 -06:00
tuxxy bcca3f8c36 Remove Crypto class, use singleton pattern 2017-10-10 11:16:23 -06:00
jMyles 08a3910ce9 Yanked and out of - they're now only accessible in . 2017-10-09 15:58:38 -07:00
jMyles 7eae9c21b1 KeyRing -=> KeyStore and some other reorganization. 2017-10-09 14:03:16 -07:00
jMyles b28a937b05 Passing both crypto_power and crypto_powerup is now not allowed. 2017-10-06 20:49:59 -07:00
jMyles 418618d565 A fairly serious version of the high-level signing and verification system. 2017-10-06 19:32:49 -07:00
jMyles 76f8edae7b CryptoPower sign() and verify() now work properly. 2017-10-06 17:42:18 -07:00
jMyles 1b54f9dfb3 Refraining from hashing the message before signing fixes it. 2017-10-06 17:42:18 -07:00
jMyles 989f0193d7 Introducting CryptoPower and PowerUp. Signing powers have been pulled out of KeyRing and now use the PowerUp system. 2017-10-06 17:42:18 -07:00
jMyles ffb4eaa72e Moving interface functions to Character class; let's see how this looks. 2017-10-06 17:42:18 -07:00
jMyles e6c455e8bb A little more sketching. What will the values of _key_mapping be? 2017-10-06 17:42:18 -07:00
jMyles 05dad4b177 Beginning of new KeyRing model per my conversation with @tuxxy. 2017-10-06 17:42:18 -07:00
tuxxy ad74c6aad1 Add test_ecies_rekey 2017-10-05 19:38:44 -06:00
tuxxy 5bb6f037e2 Add test_ecies_encapsulate and ecies_test_decapsulate 2017-10-05 19:33:04 -06:00
tuxxy 484e4908a3 Use proper elliptic_curve element class 2017-10-05 19:02:07 -06:00
tuxxy 765640ca54 Add ecies_combine method 2017-10-05 18:40:06 -06:00
tuxxy 35176d950d Add ecies_split_rekey method 2017-10-05 18:35:05 -06:00
tuxxy cfa8ffaf84 Add ecies_reencrypt method 2017-10-05 18:27:39 -06:00
tuxxy 45c8ee8d2b Add ecies_rekey method w/ serialization 2017-10-05 18:03:53 -06:00
tuxxy 1c5b55b52f Handle serialization bytes <--> elliptic_curve.Element
Fix formatting
2017-10-05 17:42:02 -06:00
tuxxy a245dba04c Add pub_bytes2ec 2017-10-05 17:32:40 -06:00
tuxxy 58f632b7a3 Add priv_bytes2ec method: 2017-10-05 17:23:30 -06:00
tuxxy a5cd0759b1 Add priv2pub method 2017-10-05 17:03:23 -06:00
tuxxy eb74e98c90 Add ECIES de/encapsulate methods and gen_priv methods and format code better 2017-10-05 16:58:14 -06:00
tuxxy 82928a78a3 Add symm_encrypt and symm_decrypt to crypto 2017-10-05 16:36:20 -06:00
tuxxy 56baf587a1 Add empty crypto.py file 2017-10-05 16:00:59 -06:00
jMyles 208db55d4c Removed the awful list comp tuple pack in favor of @michwell's much better way. If anybody ever accuses me of writing that thing, I reserve the right to say I was hacked. 2017-10-04 13:08:41 -07:00
jMyles 004437e8f6 Policy models are now worked out such that the TreasureMap is stored on a 'free tier' k:v DHT. 2017-10-03 21:13:46 -07:00
jMyles 40171da964 Two-tier ID generation. 2017-10-03 17:52:28 -07:00
jMyles c9983482d3 A little more logic for Alice's initial activity to craft an Offer and find Ursula. 2017-10-03 17:52:28 -07:00
jMyles a76248361b First semblance of two-part negotiation Alice -=> Ursula. 2017-10-03 17:51:49 -07:00
tuxxy fc7c2dfd98 Use *args instead of an iterable for SigningKeypair.digest 2017-10-03 18:08:40 -06:00
tuxxy 71d8ed4eca Use SigningKeypair.digest in KeyRing.sign 2017-10-03 15:58:59 -06:00
tuxxy 0a5abfcd28 Add digest function to handle iterables in SigningKeypair 2017-10-03 15:49:22 -06:00
Michael Egorov 23720404cb Change comment about ekey[1] = None 2017-09-30 20:19:52 -07:00
Michael Egorov 5763615b6c Split-key re-encryption: tests pass 2017-09-30 20:01:11 -07:00
Michael Egorov 2c102ed384 Split-key (fails) 2017-09-30 19:55:16 -07:00
Michael Egorov 1ec8a788c4 Encrypt(Alice) -> re-encrypt(Ursula) -> decrypt(Bob). With tests 2017-09-30 15:41:03 -07:00
Michael Egorov 7062c6b186 Decrypt re-encrypted data 2017-09-30 15:13:47 -07:00
Michael Egorov 9c8746e370 Rekey 2017-09-30 13:59:37 -07:00
Michael Egorov 572442b8cb Encrypt/decrypt with a serializing keypair 2017-09-29 23:18:20 -07:00
Michael Egorov 78e88010b4 Lazy generation of pubkey 2017-09-29 19:44:26 -07:00
Michael Egorov ddc91bb556 Re-encryption works but convoluted 2017-09-29 17:27:11 -07:00
Michael Egorov f66577b9b8 Test encryption/decryption w/o re-encryption - works 2017-09-29 13:24:14 -07:00
tuxxy 63fdfcae29 Add code for decrypt w/ broken test_encrypt_decrypt 2017-09-28 16:10:50 -07:00
tuxxy 9f3c2547f3 Add decrypt method placeholder 2017-09-28 14:11:26 -07:00
tuxxy 53821e92da Add encrypt method code and update generate_key to accept pubkeys 2017-09-28 13:09:59 -07:00
tuxxy d4a4bd5066 Add encrypt method 2017-09-28 11:12:14 -07:00
tuxxy 983dd3c4d5 Update _derive_path_key and add test_derive_path_key 2017-09-28 11:11:21 -07:00
tuxxy 25ee602f13 Add _split_path method 2017-09-28 10:32:37 -07:00
tuxxy 6ec873f008 Create a KeyRing object on __init__ 2017-09-28 10:03:54 -07:00
jMyles 346f0a3d01 First draft of Character classes, along with a test of the moment that Alice finds Ursula. 2017-09-27 23:50:23 -07:00
jMyles c0d401c9ca Makes Policy.id a property to prepare for id building by Bob and Ursula. 2017-09-27 09:58:19 -07:00
tuxxy ef738d7cba Fix test_rekey_and_reencryption 2017-09-26 23:35:00 -07:00
tuxxy af0b298cbf Merge branch 'master' of github.com:tuxxy/nucypher-kms into umbral 2017-09-26 21:18:23 -07:00
tuxxy cbfea253b6 Add rekey test that isn't working 2017-09-26 21:04:39 -07:00
tuxxy b6e18ec085 Add symm_encrypt/decrypt methods in KeyRing w/ tests 2017-09-26 13:07:23 -07:00
tuxxy b3f0335679 Allow generate_key to have a pubkey param 2017-09-26 13:06:52 -07:00
jMyles ec01307dc9 PolicyManager for making PolicyGroups. 2017-09-26 12:59:06 -07:00
jMyles c55c0302e7 Using keccak-256 for hashing. Closes #45. 2017-09-26 12:59:06 -07:00
jMyles 9e314d8b81 Added more Policy and PolicyGroup logic. Now conforms to @tux's crypto APIs. 2017-09-26 12:59:06 -07:00
jMyles f6b9111b63 First swing at Policy and PolicyGroup. 2017-09-26 12:59:06 -07:00
tuxxy 82864f643d Add Umbral to Client 2017-09-26 10:25:42 -07:00
tuxxy 2670ae7605 Add test for test_split_key_sharing 2017-09-26 10:24:05 -07:00
tuxxy 48fa10d7cb Add test for rekey and re-encryption 2017-09-26 10:14:38 -07:00
tuxxy 56bf4381eb Add tests for key generation and key decryption; serialization is already handled with EncryptedKey 2017-09-26 10:03:37 -07:00
tuxxy b2924b6b41 Handle serialization from bytes->int on KeyRing.decrypt_key 2017-09-26 09:47:18 -07:00
tuxxy db152239f8 Add KEYSIZE constant in EncryptingKeypair 2017-09-26 09:46:49 -07:00
tuxxy 2117aa937b Add umbral methods to KeyRing without handling serialization 2017-09-26 09:40:34 -07:00
tuxxy bec435364c Rename EncryptingKeypair build_secret to combine 2017-09-26 09:38:54 -07:00
tuxxy c12b7462bf Remove old methods to replace with Umbral methods 2017-09-26 09:27:30 -07:00
tuxxy a43c587d0d Fix methods in EncryptingKeypair and fix split key reencryption tests 2017-09-25 16:28:53 -07:00
jMyles e8b62fbe09 Fixed ImportError in client.py. Updated Pipfile and travis config to use pytest-xdist. 2017-09-25 15:12:36 -07:00
tuxxy 338c6dd15f Add method build_rekey for EncryptingKeypair 2017-09-25 13:58:27 -07:00
tuxxy 84b5680377 Add split_rekey method to EncryptingKeypair 2017-09-25 13:54:09 -07:00
tuxxy 947a46f933 Add rekey and reencrypt methods to EncryptingKeypair 2017-09-25 13:27:03 -07:00
tuxxy 4f6ac0512f Add decrypt_key method and remove unneeded encrypt/decrypt methods 2017-09-25 13:17:03 -07:00
tuxxy fb3fd0281b Add generate_key method for umbral in EncryptingKeypair 2017-09-25 13:13:45 -07:00
tuxxy b63c6b0146 Remove deprecated methods that are being used elsewhere 2017-09-22 12:55:37 -07:00
tuxxy 41d70bef8d Add rekey method for KeyRing 2017-09-21 15:14:45 -07:00
tuxxy 8ef798675b Add rekey method in EncryptingKeypair 2017-09-21 15:13:01 -07:00
tuxxy 939371b700 Add methods encrypt_bulk, decrypt_bulk, and derive_path_key 2017-09-20 11:23:44 -07:00
tuxxy b848da27ea Add properties for each specific key in the KeyRing 2017-09-20 10:42:59 -07:00
tuxxy ca5dc95578 Read chunk_size + PADDING_LENGTH as ciphertext 2017-09-20 09:57:59 -07:00
tuxxy 845dcdd098 Add PADDING_LENGTH constant 2017-09-20 09:56:19 -07:00
tuxxy 1cde0b88e2 Enforce bytestring keys for msgpack
Use bytestring keys in test_header
2017-09-20 09:47:45 -07:00
tuxxy 393c699b5f Use correct object to call update_header and return the written chunks 2017-09-20 09:40:35 -07:00
tuxxy 003f28c944 Merge branch 'master' of github.com:nucypher/nucypher-kms into header-object 2017-09-20 09:00:56 -07:00
tuxxy 03353876c8 Expose KeyRing method for generating random numbers 2017-09-20 08:51:14 -07:00
tuxxy 76c4047803 Merge branch 'master' of github.com:nucypher/nucypher-kms into header-object 2017-09-20 08:32:23 -07:00
Tux 425ea246c3 Merge pull request #43 from tuxxy/keyring
[WIP] Add KeyRing object with sign/verify/encrypt/decrypt functionalities
2017-09-19 11:23:19 -06:00
tuxxy cd017c6e62 Add pubkey param to signing keypair's verify methods 2017-09-19 09:10:09 -07:00
tuxxy e2e63ad38b Add pubkey param to KeyRing 2017-09-19 08:52:13 -07:00
tuxxy 824cd0d883 Encrypt with a provided pubkey 2017-09-19 08:42:57 -07:00
tuxxy dbedb420d9 Move packages around and use namespace nkms.crypto.keypairs and nkms.crypto.keyring 2017-09-19 08:34:14 -07:00
tuxxy 10c3b25322 Fill out encrypt/decrypt methods for KeyRing 2017-09-18 11:36:45 -07:00
tuxxy ff49bfc70b Add EncryptingKeypair key generation and add encrypt/decrypt method placeholders 2017-09-18 11:34:14 -07:00
tuxxy d432d5f51d Add docstring comments 2017-09-18 11:30:24 -07:00
tuxxy b496480b3f Add decrypt method 2017-09-18 11:28:36 -07:00
tuxxy 825884ef0e Add encryption method 2017-09-18 11:28:03 -07:00
tuxxy 4058897d55 Add __init__ method for EncryptingKeypair w/ key generation 2017-09-18 11:26:46 -07:00
tuxxy b5d97a1a57 Add encrypting_keypair file w/ EncryptingKeypair object 2017-09-18 11:20:24 -07:00
Michael Egorov 28a7dda8bf Use default generator point (same as in Bitcoin and Ethereum) 2017-09-18 11:15:46 -07:00
tuxxy 2a2468edaa Actually digest the message 2017-09-18 11:06:15 -07:00
tuxxy 5c7bc5f219 Refactor the v, r, and s msgpack loading into their own methods 2017-09-18 10:54:59 -07:00
tuxxy 0b714fff5e Add sign/verify methods to KeyRing 2017-09-18 10:32:56 -07:00
tuxxy 76485f7b06 Add sign/verify functions 2017-09-18 10:25:36 -07:00
tuxxy bf08aa5b53 Add SigningKeypair object and add key generation capabilities 2017-09-18 09:59:34 -07:00
tuxxy 2a3b61f1ba Add boilerplate for KeyRing __init__ method 2017-09-18 09:33:23 -07:00
tuxxy bcbf7444e9 Create keyring.py with placeholder KeyRing object 2017-09-18 08:32:44 -07:00
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