Latest 2.2
Homepage https://github.com/lm2343635/Grouper
License MIT
Platforms ios 9.0, requires ARC
Dependencies Sync, AFNetworking
Authors

Grouper Build Status Version License Platform

A framework for developing app using secret sharing and multiple untrusted servers.

Introduction

Conventional client-server mode applications require central servers for storing shared data. The users of such mobile applications must fully trust the central server and their application providers. If a central server is compromised by hackers, user information may be revealed because data is often stored on the server in cleartext. Users may lose their data when service providers shut down their services.

Grouper uses secret sharing and multiple untrusted servers to solve this problem. In Grouper, a device use Secret Sharing scheme to divide a message into several shares and upload them to multiple untrusted servers. Other devices download shares and recover shares to original message by Secret Sharing scheme. Thus, user data can be protected.

Features

  • A self-destruction system with data recovery.
  • Protected data synchronization using the extend secret sharing scheme.
  • Easy group management for the iOS platform.

Demo

We have developed an demo app called AccountBook using Grouper framework.

Installation

Grouper is available through CocoaPods. To install
it, simply add the following line to your Podfile:

pod 'Grouper', '~> 2.2'

Documentation

Grouper uses its own Web service. The Web service by Java EE is here Grouper-Server.

Grouper is developed with Objective-C. Import header file into your project.

#import <Grouper/Grouper.h>

Prepare

Grouper object inclueds 3 subobject, they are group(GroupManager), sender(SenderManager), receiver(ReceiverManager).

Grouper relys on Sync framework to syncrhonize data between devices. Thus, when you setup Core Data stack in AppDelegate, you should use DataStack provided in Sync framework.

_dataStack = [[DataStack alloc] initWithModelName:@"Model"];

Next, setup Grouper witg your appId, entities, data stack and main storyboard.

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
    grouper = [Grouper sharedInstance];
    [grouper setupWithAppId:@"test-app"
                   entities:[NSArray arrayWithObjects:@"Test", nil]
                  dataStack:[self dataStack]
             mainStoryboard:storyboard];
}

The attribue entities is an array which constains the names of all entities saved in Core Data.
If an entity A which is referenced by an entity B, you need to ensure that A should be in the front of B in the entities array.

Entity Design

All your Core Data entity should be subentity of SyncEntity, and all your NSManagedObjects should be subclass of SyncEntity. SyncEntity class has been provied in Grouper framework. Create SyncEntity in your Model.xcdatamodeld file and set parent entity as SyncEntity for your entity.

Attribute Type Explanation
createAt Date Create date of this entity
creator String Creator of this entity
remoteID String Remote ID for Sync framework
updator String Updater of this entity
updateAt String Update date of this entity

Group Management

Grouper provides group initialzation related function in Init.storyboard and member management in Members.storyboard. Use these 2 storyboards directly by grouper.ui.groupInit and grouper.ui.members.

Data Synchronization

Grouper use SenderManager to send data and ReceiverManager to receive data.

Use these methods to send data by grouper.sender.

// Send an update message for a sync entity.
- (void)update:(NSManagedObject *)entity;

// Delete a sync entity and send a delete message.
- (void)delete:(NSManagedObject *)entity;

// Send update messages for multiple sync entities.
- (void)updateAll:(NSArray *)entities;

// Delete multiple sync entities and send delete messages.
- (void)deleteAll:(NSArray *)entities;

// Send confirm message;
- (void)confirm;

// Send resend message which contains not existed sequences to receiver.
- (void)resend:(NSArray *)sequences to:(NSString *)receiver;

Use this method to receiver data by grouper.receiver.

// Receive message and do something in completion block.
- (void)receiveWithCompletion:(Completion)completion;

More information can be found in Demo app AccountBook.

Author

Meng Li, http://fczm.pw, [email protected]

License

Grouper is available under the MIT license. See the LICENSE file for more info.

Latest podspec

{
    "name": "Grouper",
    "version": "2.2",
    "summary": "A framework for Developing iOS app using a secret sharing scheme and untrusted servers.",
    "description": "# Featuresn- A self-destruction system with data recovery.n- Protected data synchronization using the extend secret sharing scheme.n- Easy group management for the iOS platform.",
    "homepage": "https://github.com/lm2343635/Grouper",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "Meng Li": "[email protected]"
    },
    "social_media_url": "http://fczm.pw",
    "platforms": {
        "ios": "9.0"
    },
    "source": {
        "git": "https://github.com/lm2343635/Grouper.git",
        "tag": "2.2"
    },
    "source_files": "Core/**/*.{h,m,c,swift}",
    "resource_bundles": {
        "Grouper": [
            "Core/**/*.{storyboard,xib,xcassets}"
        ]
    },
    "requires_arc": true,
    "dependencies": {
        "Sync": [
            "~> 4"
        ],
        "AFNetworking": [
            "~> 3"
        ]
    },
    "pushed_with_swift_version": "3.1"
}

Pin It on Pinterest

Share This