nearly working doc signing and tests

next focus is key excahnge and registration.