Fix signing
Revert "Fix signing"

This reverts commit cffea96c60b8f97306ee2e7a1a1e2112155c7a51.
Reapply ? fix
Re-apply validate fix
added key generation