flag2 updates:

* protocol update
* doc update of properties and proof
* initial Java impl.