secret key serialization