Commit Graph

161 Commits (d63a6cb93d9b03d74f3b0d0fdac3bfea3075a072)

Author SHA1 Message Date
Kieran Prasch 5fd04472ab Support for nucypher-core Address and updates ReencryptionResponse function signature 2022-10-18 20:10:38 +02:00
Kieran Prasch aa05019a68 Handle rust-native conditions newtype just-in-time; Co-existing with ConditionsLingo 2022-10-18 20:09:26 +02:00
Kieran Prasch 0acfc7e381 Support for web3.py v6 2022-10-18 20:08:52 +02:00
Kieran Prasch 0608608460 Capsule filtration bugfixes 2022-10-18 20:08:52 +02:00
Kieran Prasch b7145c0ab4 Remove core shims; Refactor for mk-embedded conditions. 2022-10-18 20:08:51 +02:00
derekpierre 8a482d9389 Ensure delimiter is used as a single byte, and not a bunch of 0 bytes. Fixed test. 2022-10-18 20:07:58 +02:00
Kieran Prasch 72c6bd5295 Refactoring for interop with nucypher-ts 2022-10-18 20:07:58 +02:00
Kieran Prasch 74a0465cf3 Track lingos and capsules as packets; First working e2e flow. 2022-10-18 20:07:58 +02:00
Kieran Prasch 249c74eb31 Updates tests 2022-10-18 20:07:58 +02:00
Kieran Prasch d9f67f30ce Install nucypher core shims for conditions 2022-10-18 20:07:57 +02:00
Bogdan Opanchuk a276cfec25 Disband umbral_adapter 2022-01-08 15:29:22 -08:00
Bogdan Opanchuk e5620c3155 Changes to make the tests pass 2022-01-08 15:29:22 -08:00
Bogdan Opanchuk 02bb2e2f76 Import the standalone package instead of nucypher.core 2022-01-08 15:29:22 -08:00
Bogdan Opanchuk 944d3373e7 Normalize the usage of VariableLengthBytestrings
Allow for every Versioned type to be able to deserialize itself from the bytestring.
2021-11-01 13:31:31 -07:00
Bogdan Opanchuk 004aa312f3 Remove signing from MessageKit
Now it's the user's responsibility
2021-11-01 13:31:12 -07:00
Bogdan Opanchuk af404677c7 Make a separately versioned EncryptedKeyFrag instead of using a MessageKit 2021-11-01 13:31:11 -07:00
Bogdan Opanchuk 238a2cfd2a Remove `hrac` from `EncryptedTreasureMap` 2021-10-29 15:06:34 -07:00
Bogdan Opanchuk 4bb6c82014 Stop bundling `publisher_verifying_key` with `EncryptedTreasureMap`
Instead:
- Add it as a parameter to `retrieve_cfrags()`
- Add it to `ReencryptionRequest`
- Remove `EncryptedTreasureMap._public_signature` and `hrac`
2021-10-29 15:06:34 -07:00
Kieran R. Prasch 320eaa7de9 Reference issue #2813 2021-10-29 14:37:37 -07:00
Kieran R. Prasch 25425d55e5 Skip stale federated retrieval test. 2021-10-29 07:56:24 -07:00
Kieran Prasch 9d996ab965 Remove 'arrangement' language and naming (leaves onchain models). 2021-10-29 07:56:20 -07:00
Kieran Prasch 3b3ca65f9f Removes 'handpicked ursula' language. 2021-10-29 07:56:20 -07:00
Kieran Prasch 00a6a67b9a Deprecation of Arrangement datastore. 2021-10-29 07:56:20 -07:00
Bogdan Opanchuk 12f601c949 Add `Ursula._decrypt_kfrag()` and dissolve `decrypt_internal()` 2021-10-15 15:19:19 -07:00
Bogdan Opanchuk ca2ae89ba6 Get rid of passing a Callable to EncryptedTreasureMap.decrypt() 2021-10-15 15:19:19 -07:00
Bogdan Opanchuk ef0e619684 Bundle policy encrypting key with TreasureMap 2021-10-15 15:19:19 -07:00
Bogdan Opanchuk 98c78efbca Move RevocationOrder to core.py 2021-10-15 15:19:19 -07:00
Bogdan Opanchuk 01c2e9bd71 Move RetrievalKit to core.py 2021-10-15 15:19:19 -07:00
Bogdan Opanchuk 256c93db58 Move [Encrypted]TreasureMap to core.py 2021-10-15 15:19:19 -07:00
Bogdan Opanchuk a3410cadfb Move MessageKit to the temporary core module 2021-10-15 15:19:19 -07:00
Bogdan Opanchuk 18454c721e Use a single InvalidSignature exception instead of three different ones 2021-10-15 15:19:19 -07:00
Bogdan Opanchuk c0c2208826 Extend brands to 4 bytes 2021-09-30 12:13:46 -07:00
Kieran Prasch ba6a49e13c Implements enforced major.minor versioning scheme for serializable entities. 2021-09-24 15:29:20 -07:00
KPrasch 44b62da35a Update tests/integration/characters/test_specifications.py
Co-authored-by: Derek Pierre <derek.pierre@gmail.com>
2021-09-23 16:01:25 -07:00
Kieran Prasch c90eaa76a1 Renames Revocation to RevocationOrder. 2021-09-23 16:01:25 -07:00
Kieran Prasch f136696430 Implement versioning for message and policy kits. 2021-09-23 16:01:25 -07:00
Kieran Prasch 48cd97292e Implement versioning for treasure maps. 2021-09-23 16:01:25 -07:00
derekpierre adb8f17b99 Updated Bob's RetrieveAndDecrypt schema and associated CLI to accept a list of message kits since the respective Python API was modified to accept a list of message kits.
Cleaned up Bob's retrieve_and_decrypt CLI code to account for updated required options - there was code that was based on some options not being required
Adjusted associated tests.
2021-09-14 15:58:08 -04:00
derekpierre 90408c1768 Publisher verifying key is no longer an argument for RetrievalClient - remove usage from Porter. 2021-09-14 15:58:08 -04:00
derekpierre 27fe5daf7d Deserialization of MessageKit field now produces a MessageKit object instead of bytes.
Minor update to Porter docs for retrieval endpoint.
2021-09-14 15:58:08 -04:00
derekpierre dfa65a2976 Code cleanup after rebase over retrieval protocol work in #2730. 2021-09-14 15:58:08 -04:00
derekpierre 602f2b6d05 Modify EncryptedTreasureMap field so that deserialize produces a TreasureMap object and not bytes. 2021-09-14 15:58:08 -04:00
derekpierre aa1006ca16 Modify Key field so that deserialize produces a PublicKey object and not bytes. 2021-09-14 15:58:08 -04:00
Bogdan Opanchuk 66175a04da Rename Bob.retrieve_cfrags()/retrieve() to avoid confusion with RetrievalClient.retrieve_cfrags() 2021-09-08 08:21:04 -07:00
Bogdan Opanchuk 39dcab3aa1 Ensure enough Ursulas are available before retrieval 2021-09-08 08:21:04 -07:00
Bogdan Opanchuk a9cc13e825 Move retrieval machinery to network/retrieval and revocation to policy/revocation 2021-09-08 08:21:04 -07:00
Bogdan Opanchuk 1ad868bf41 Remove internal cfrag cache from Bob 2021-09-08 08:21:04 -07:00
Bogdan Opanchuk da816586fa Remove "enrico" as a parameter to Bob.retrieve(); make "policy_encrypting_key" mandatory. 2021-09-08 08:21:04 -07:00
Bogdan Opanchuk 0f85435ac7 Require encrypted_treasure_map in retrieve() 2021-09-08 08:21:04 -07:00
Bogdan Opanchuk 1d3642d960 Retrieval rework 2021-09-08 08:21:03 -07:00
Bogdan Opanchuk a338ff1a69 Don't return the signature along with the MessageKit from MessageKit.author() 2021-09-07 11:58:55 -07:00
Bogdan Opanchuk 41ae6dbcca Move message kits to policy submodule 2021-09-07 11:58:55 -07:00
Bogdan Opanchuk 161bb8f06d Use __bytes__ instead of to_bytes() in MessageKit 2021-09-07 11:58:55 -07:00
Bogdan Opanchuk 3ef534b812 Rename PolicyMessageKit to MessageKit 2021-09-07 11:58:55 -07:00
Bogdan Opanchuk 3b43eac717 Remove UmbralMessageKit alias 2021-09-07 11:58:55 -07:00
Kieran R. Prasch 024bcb1c5f Finish deprecation of map storage from tests. 2021-08-20 16:58:58 -07:00
Bogdan Opanchuk 6164137610 Rename m -> threshold, num_kfrags -> shares 2021-08-20 19:26:56 -04:00
Bogdan Opanchuk c595850952 RFCs, part 2 2021-08-19 17:06:45 -04:00
Bogdan Opanchuk caf32842b3 RFCs 2021-08-19 17:06:45 -04:00
Bogdan Opanchuk ad2ad8e3c0 Make HRAC a class and use it as a policy ID 2021-08-19 17:06:45 -04:00
Bogdan Opanchuk 509b8c1bfc Split treasure maps into decrypted and encrypted 2021-08-19 17:06:45 -04:00
Bogdan Opanchuk 5b5cd4bd84 Use HRAC as treasure map ID at all times instead of just in the blockchain case 2021-08-19 17:06:45 -04:00
Bogdan Opanchuk 2be3d727d5 Rename TreasureMap field and datastore model to EncryptedTreasureMap 2021-08-19 17:06:45 -04:00
Bogdan Opanchuk 8c628da9ea Extract kfrag authorization into a class 2021-08-12 16:34:05 -07:00
Bogdan Opanchuk e5c0bb079e Fix the remainders of Alice/Publisher separation 2021-08-12 16:32:02 -07:00
Bogdan Opanchuk cc156b28e3 Move retrieve() argument deserialization to `BobInterface` 2021-08-12 16:32:02 -07:00
derekpierre e83128fd91 One potential solution for contextualizing federated vs non-federated treasure maps provided as bytes in the `/publish_treasure_map` endpoint.
The context information is provided either at construction time of the TreasureMap field, or via the parent Schema context.
2021-07-26 15:14:42 -04:00
derekpierre 589ddff4de Initial refactoring of "character control"; abstract what is now "character control" into a general "base control" from which "character control" can sub-class. 2021-07-26 15:14:42 -04:00
Kieran R. Prasch 6192c34c3d Renames relayer -> publisher. 2021-07-06 14:43:35 -07:00
Kieran R. Prasch 8f8b79aa08 Responding to RFCs in PR #2687. 2021-07-06 14:43:31 -07:00
Kieran R. Prasch 3367ac5a50 Post-rebase cleanup for PR #2701 2021-07-03 19:05:24 -07:00
Kieran Prasch c915a1b1d3 Use umbral adapter everywhere. Fixes straggler uses of umbral 0.1.x 2021-07-03 18:51:07 -07:00
Kieran Prasch 81ca745bfa Fixes incorrect splitter in map versioning and grant test assertion. 2021-07-03 18:48:54 -07:00
Bogdan Opanchuk 7642300fe0 Rebase fixes for rebased-chili-limes (#28)
* Fix PRETask serialization

* Use a constant for encrypted kfrag length

* Fix argument order in Signature.verify()

* Remove a too brittle check in test_bob_handles_frags

What exactly are we ensuring here? If we want to check that the cfrag is fine,
we need to use it for decryption.

* Remove an unnecessary check

The result of `reencrypt()` is verified by default.

* Re-raise Umbral decryption errors as DecryptionFailed

* Fix an argument of _filter_work_orders_and_capsules()

* Fix an assertion in test_federated_grant_and_revoke

Assertion fails because now UmbralMessageKit has __len__,
so a bool() call is equivalent to len() == 0
(which it is, since there are no cfrags attached).
2021-07-03 18:48:26 -07:00
Kieran Prasch 4e7ea984f0 Post-rebase integration with PR #2612 and Umbral 0.2.x 2021-07-03 18:48:24 -07:00
Kieran Prasch e13fae0526 Combating freefriders and evil Bobs with a KFrag writ authorization. 2021-07-03 18:46:36 -07:00
Kieran Prasch a22b403a08 Partial tets update for modified map and order handling; Continue handling of publisher/authorizer keys. 2021-07-03 18:40:10 -07:00
Kieran Prasch 2b299cf993 Sing-along with david - use HRAC for workorders. 2021-07-03 17:50:43 -07:00
David Núñez fed1b4aba8 Let's go for the moment with TMaps with KFrags and Arrangement IDs 2021-07-03 17:50:43 -07:00
Kieran R. Prasch 6aef077172 bulk renaming of Keyring -> Keystore 2021-06-28 14:33:31 -07:00
Bogdan Opanchuk cd11909d4e Adjust for a slightly stricter API of Rust Umbral 2021-06-22 18:31:10 -07:00
Bogdan Opanchuk 15333ddca2 Dissolve umbral_adapter 2021-06-17 14:38:51 -07:00
Bogdan Opanchuk e6fcdbbff6 Minimal fixes to make CI pass, using an adapter for Umbral 2021-06-17 14:38:51 -07:00
Bogdan Opanchuk 4de9b91d2a Refactor FleetSensor 2021-02-16 22:45:55 -08:00
Bogdan Opanchuk a2b99daa1d Merge proposals and enactment into a single method, return EnactedPolicy 2021-01-14 11:19:35 -08:00
Bogdan Opanchuk de0f933118 Make Arrangement stateless and get rid of BlockchainArrangement 2021-01-14 11:19:35 -08:00
Bogdan Opanchuk 61253968fc Simplify the reencryption loop 2020-12-18 15:19:43 -08:00
Bogdan Opanchuk 08c7f83548 Remove an unnecessary alternative of passing a treasure map via map_id
Every time it happens the actual map object is also available.
2020-12-15 14:04:32 -08:00
Kieran R. Prasch 912e2b1c46
Revert signed treasure map changes for federated policies. 2020-12-09 00:13:38 -08:00
Kieran Prasch ba8cae96eb Respond to RFCs in PR #2389 2020-10-19 15:56:14 -07:00
tuxxy c965f72c2e Fix DoS vector on nodes through map storage 2020-10-13 10:01:37 +02:00
tuxxy 5962cd4c05 Prune expired treasure maps in __prune_datastore (formerly __prune_arrangements) 2020-10-13 10:01:37 +02:00
David Núñez 064972e800 Some unit tests reorganization 2020-09-24 20:27:13 +02:00
David Núñez 4cf7dcadc3 We're done with multiple domains, for the moment.
Closes #2144. Closes #1580.
2020-09-24 20:27:13 +02:00
jMyles 6498992f61 Deduplicating test; moving json validation utils to utils. 2020-08-24 09:42:15 -07:00
jMyles d7b8254b36 Since this doens't block, it's possible that Bob hasn't actually connected to *any* nodes yet. 2020-08-18 12:05:58 -07:00
jMyles 34a5ad910d Removing stale debugging tooling. 2020-08-18 12:05:55 -07:00
jMyles a448903bbb This makes more sense, because you might block the main thread in a test, and then the Ursula can't process the request. 2020-08-10 12:54:05 -07:00
jMyles 8cd182e26d Stopping Bob and Ursula at appropriate times. 2020-08-10 12:53:33 -07:00
jMyles 78eb904c10 Flagging test bob's origins for inspection on other threads. 2020-08-10 12:53:33 -07:00