### Public Key Cryptography in PPO Games

Posted:

**09 May 2021, 00:39**This is a joke post, but TECHNICALLY there is no rule to stop you from sending encrypted messages to your ally in Public Press games with no prior communication.

A web version of the classic Diplomacy board game

https://www.playdiplomacy.com/forum/

https://www.playdiplomacy.com/forum/viewtopic.php?f=126&t=61810

Page **1** of **1**

Posted: **09 May 2021, 00:39**

This is a joke post, but TECHNICALLY there is no rule to stop you from sending encrypted messages to your ally in Public Press games with no prior communication.

Posted: **09 May 2021, 00:43**

This is a game site. The site rules were not written by a lawyer. Weasel-lawyer them at your own risk.

Posted: **09 May 2021, 00:46**

Lol

Posted: **09 May 2021, 01:58**

I'm not an aficionado of such things.... how would you inform your intended recipient of the key without informing everyone?

Posted: **09 May 2021, 02:25**

There is a way for you and your partner to create a shared key without anyone else figuring it out.

This is how it works, to my knowledge. You and your friend choose two large prime numbers, n and g - these are public and anyone can see them. You and your friend secretly choose large numbers a and b respectively - these are sent to nobody.

You calculate g^a mod n (raise g to the power a and take the remainder when divided by n) and your friend calculates g^b mod n. You send g^a and g^b to each other. There is no way to use g and g^a to solve for a in any reasonable amount of time.

Finally, you calculate (g^b)^a mod n and your friend calculates (g^a)^b mod n. But (g^b)^a = (g^a)^b = g^(ab), so g^(ab) is a shared secret between you two. This is the key used to encrypt messages.

a and b are called "private keys" since they are known only to their owners, and g^a and g^b are called "public keys" since they are known to everyone.

With the help of offline software used to encrypt / decrypt messages with keys, this is totally doable over PP.

This is how it works, to my knowledge. You and your friend choose two large prime numbers, n and g - these are public and anyone can see them. You and your friend secretly choose large numbers a and b respectively - these are sent to nobody.

You calculate g^a mod n (raise g to the power a and take the remainder when divided by n) and your friend calculates g^b mod n. You send g^a and g^b to each other. There is no way to use g and g^a to solve for a in any reasonable amount of time.

Finally, you calculate (g^b)^a mod n and your friend calculates (g^a)^b mod n. But (g^b)^a = (g^a)^b = g^(ab), so g^(ab) is a shared secret between you two. This is the key used to encrypt messages.

a and b are called "private keys" since they are known only to their owners, and g^a and g^b are called "public keys" since they are known to everyone.

With the help of offline software used to encrypt / decrypt messages with keys, this is totally doable over PP.

Posted: **09 May 2021, 04:01**

There's a really good video where they do it without the math https://www.youtube.com/watch?v=NmM9HA2MQGI

Posted: **09 May 2021, 14:19**

Does it work with stone tablets and chisels?

Custer

Custer

Posted: **10 May 2021, 05:03**

It would work in theory, but it would take a very, very long time, especially because there are large numbers and a lot of calculations involved. Pen and paper would be better but still very inefficient.