Asymmetric sign in public enviroment I have RTS game, where all players run game and server just relays messages. Game can generate and store text file on player pc. I want to allow some players to be moderators, so I need to sign or encrypt their ids + number representing their permissions.

Problems:


everyone knows permissions and ids of other players.
player can see code that encrypts message (so goodbye symmetric cryptography)


What I have so far:


Textbook RSA 1024 bit + bignum library
I encrypt message with my private key and store in text file on player pc
Game got my public key and can verify if decrypted number is player id + permissions + checksum
Ids are authenticated by server


I read about RSA padding and my conclusion is - if everybody know message after it is decrypted there is no point in padding (because people got multiple copies of various messages, and they know what message will be decrypted to). Am I correct?

Maybe there is other cipher that I could use (preferred solution without need for bitwise  operations).
"if everybody know message after it is decrypted there is" still a point in padding,

since it would (hopefully) stop people from learning the message before it is decrypted.

It would probably be better to

sign the message with your private key, rather than encrypt the message with your private key.

RSA needs padding for signatures too, although that padding is different from RSA encryption padding.

Also, although you can probably still get away with 1024-bit RSA since it's just

for a game, but you should make it easy for you to move to longer public keys.