Firefox Sync on Firefox OS
Everything is encrypted on the client
BrowserID assertion -> sync token + node assignment
onepw specification
Token server specification
services/fxaccounts/*
services/common/tokenserverclient.js
Starting from scratch
Basic Storage Objects (BSOs)
Collections
or maybe chrome datastores
iOS code and documentation as reference