Giter Club home page Giter Club logo

ciphercalendar's Introduction

Cipher Calendar

We want to create a calendar which cannot be readable by people who would acces to google database or google account. Use Google as a way to backup data.


Threat model : I Google server does not see the plain data. Threat : Big Brother,

II May be use by other calendar using the calendar API. Threat : unknown security from other calendar.

III May protect against phone steal read data about calendars in the phone


Cipher Problem Current : AES/CBC/PKS5Padding

Problem : How to transmit IVs ? Current solution : simple but not the best : concat IV with ciphered bytes. P : plain text c() : cipher fonction S : cipher text M : message K : secret key IV : Initialisation vector (16 bytes)

coder : M = base64.code(c(P,K,IV)+IV)

decoder : Tmp = base64.decode(M) IV = Tmp[Tmp.length-16..Tmp.length] S = Tmp[0..Tmp.length-16] P = c^{-1}(S,K,IV)


Implementation Choice :

I Interface vs Sync Application

II Backup sync

To synchronize calendar and Google calendar, I use a database to store events ID What is the default policy when there are some modifications.

Modification rules :

Data on google, no data in calendar, no data in database : pull and decrypt Data on google, no data in calendar, data in database : suppress event on google and event in db Data on google, data in calendar, data in database : do nothing or push data in calendar Data on google, data in calendar, no data in database : error (impossible de verify btw)

no data on google, no data in calendar, no data in database : nothing no data on google, no data in calendar, data in database : suppress event no data on google, data in calendar, any : push data to google Synchronization algorithm:

listGoogleEvent = fetch(google calendar) if decrypt put else erase listCipherEvent = pull(cipher calendar) for event in listGoogleEvent: cipherId = getCipherId(event.id) cipherEvent = listCipherEvent[cipherId]


Architecture :

I Android Application Architecture

Authenticator folder regroup file use in authentication progress. These are use when an Account is created on the phone

CalendarChooser is an android activity to choose which calendar will be synchronized.

CalendarTools group every file to manager calendar.

Sync Adapter is a service in android to do the synchronization between google calendars and the applications calendars.

II How to Sync

The sync adapter is called by android's Account Manager. Trough CalendarProvider, read and write Events to Google Account's Calendar then in the same method to the Clone Account

ciphercalendar's People

Contributors

chroussel avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.