Security
Shared Key
do not use the shared key auth model for public applications shared key is not suitable for apps deployed to the public app store, because the key could be reverse engineered shared key is designed for enterprise applications run on centrally managed devices that do not connect to the internet if you need to synchronize data over the internet with the big peer or deploy to the app store, use onlinewithauthentication ditto offers an intermediate level of security for applications where all users and devices are trusted for example, this could be appropriate for an enterprise application run on centrally managed devices in this mode, every device knows the same secret key, and uses this to validate incoming connections the benefit of this approach is that distinct certificates do not have to be distributed to every device, simplifying the deployment however, the downside is that devices will always have access to data a compromised device can read and re distribute the key, and there is no method to unauthorize that key in the future small peers in this mode use a sharedkey identity type the secret key must be provided as a string when initializing the dittoidentity on each peer this key should be securely and randomly generated and ditto expects it to be in a particular format the recommended way to generate a shared key is to download ditto's open source, cross platform utility ditto authtool https //github com/getditto/authtool , which provides an easy command to generate new shared keys from a terminal or command prompt /ditto authtool generate shared key // or \ditto authtool exe generate shared key alternatively, if you have a linux machine running an up to date version of openssl then you can use the following command at time of writing this will not work on macs openssl genpkey algorithm ec pkeyopt ec paramgen curve\ p 256 outform pem | openssl pkcs8 topk8 nocrypt outform der | base64 w 0 the sharedkey identity requires an offline only license token, which can be requested by contacting mailto\ support\@ditto live how does shared key work? communication is encrypted using tls 1 3 and peer identities are verified using certificates this is the same state of the art technology used in web browsers it applies to every communication mode from bluetooth to wifi each device issues a self signed tls certificate using the supplied private key peers then only trust peers whose certificates are signed by the same key in other words, shared key uses regular tls security, except everybody is the ca