Key mgt improvement

Regenerate public key on empty value