first bunch of changes for the domain specifc public/secret key support