Added optional public_key attribute