Dominion Strategy Forum

Please login or register.

Login with username, password and session length
Pages: 1 [2]  All

Author Topic: Cryptography in mafia games  (Read 7882 times)

0 Members and 1 Guest are viewing this topic.

faust

  • Board Moderator
  • *
  • Offline Offline
  • Posts: 3384
  • Shuffle iT Username: faust
    • View Profile
Re: Cryptography in mafia games
« Reply #25 on: July 27, 2017, 01:16:15 am »

To me, if a player uses code in thread to send full messages, it would be fairly obvious since it would look like nonsense to anyone who doesn't know the code, and they should be lynched as doing something secretive (and scummy).
Secretive doesn't equal scummy. If you have an IC, you could have everyone send them their role in code. That is good town play (assuming it's allowed).
Logged
You say the ocean's rising, like I give a shit
You say the whole world's ending, honey it already did

scott_pilgrim

  • Saboteur
  • *****
  • Offline Offline
  • Posts: 1102
    • View Profile
Re: Cryptography in mafia games
« Reply #26 on: July 27, 2017, 08:30:04 am »

To me, if a player uses code in thread to send full messages, it would be fairly obvious since it would look like nonsense to anyone who doesn't know the code, and they should be lynched as doing something secretive (and scummy).
Secretive doesn't equal scummy. If you have an IC, you could have everyone send them their role in code. That is good town play (assuming it's allowed).

In fact, the IC could then coordinate everyone's actions and then write back to them in code to tell them what to do.
Logged

ashersky

  • Board Moderator
  • *
  • Offline Offline
  • Posts: 2343
  • 2013/2014/2015 Mafia Mod of the Year
    • View Profile
Re: Cryptography in mafia games
« Reply #27 on: July 27, 2017, 04:20:23 pm »

To me, if a player uses code in thread to send full messages, it would be fairly obvious since it would look like nonsense to anyone who doesn't know the code, and they should be lynched as doing something secretive (and scummy).
Secretive doesn't equal scummy. If you have an IC, you could have everyone send them their role in code. That is good town play (assuming it's allowed).

In fact, the IC could then coordinate everyone's actions and then write back to them in code to tell them what to do.

But wouldn't it be public code that everyone could do, and then it wouldn't be code?  Like, the IC would have to explain the code somehow, and that would be public.  And then scum can see and fake along.
Logged
f.ds Mafia Board Moderator

2013, 2014, 2015 Mafia Mod of the Year
2015 f.ds Representative, World Forum Mafia Championships
2013, 2014 Mafia Player of the Year (Tie)

11x MVP: M30, M83, ZM16, M25, M38, M61, M76, RMM5, RMM41, RMM46, M51

gkrieg13

  • Board Moderator
  • *
  • Offline Offline
  • Posts: 509
  • Shuffle iT Username: gkrieg
    • View Profile
Re: Cryptography in mafia games
« Reply #28 on: July 27, 2017, 04:23:04 pm »

To me, if a player uses code in thread to send full messages, it would be fairly obvious since it would look like nonsense to anyone who doesn't know the code, and they should be lynched as doing something secretive (and scummy).
Secretive doesn't equal scummy. If you have an IC, you could have everyone send them their role in code. That is good town play (assuming it's allowed).

In fact, the IC could then coordinate everyone's actions and then write back to them in code to tell them what to do.

But wouldn't it be public code that everyone could do, and then it wouldn't be code?  Like, the IC would have to explain the code somehow, and that would be public.  And then scum can see and fake along.

You could use public key cryptography. Then no known-to-everyone message would have to be passed. You could literally talk in code to anyone this was in the thread, without anyone ever being able to decipher your message.
Logged

ashersky

  • Board Moderator
  • *
  • Offline Offline
  • Posts: 2343
  • 2013/2014/2015 Mafia Mod of the Year
    • View Profile
Re: Cryptography in mafia games
« Reply #29 on: July 27, 2017, 04:24:41 pm »

To me, if a player uses code in thread to send full messages, it would be fairly obvious since it would look like nonsense to anyone who doesn't know the code, and they should be lynched as doing something secretive (and scummy).
Secretive doesn't equal scummy. If you have an IC, you could have everyone send them their role in code. That is good town play (assuming it's allowed).

In fact, the IC could then coordinate everyone's actions and then write back to them in code to tell them what to do.

But wouldn't it be public code that everyone could do, and then it wouldn't be code?  Like, the IC would have to explain the code somehow, and that would be public.  And then scum can see and fake along.

You could use public key cryptography. Then no known-to-everyone message would have to be passed. You could literally talk in code to anyone this was in the thread, without anyone ever being able to decipher your message.

But the message would clearly be in code, and we could lynch that person(s).

Even if you agree on a public crypto, don't you need to somehow tell the other person which one, and that would be in thread, so available to all?
Logged
f.ds Mafia Board Moderator

2013, 2014, 2015 Mafia Mod of the Year
2015 f.ds Representative, World Forum Mafia Championships
2013, 2014 Mafia Player of the Year (Tie)

11x MVP: M30, M83, ZM16, M25, M38, M61, M76, RMM5, RMM41, RMM46, M51

liopoil

  • Margrave
  • *****
  • Offline Offline
  • Posts: 2587
    • View Profile
Re: Cryptography in mafia games
« Reply #30 on: July 27, 2017, 04:40:52 pm »

Say I was an IC. Here's how it would go, roughly. You're someone trying to send me a message. Secretly choose your own way of encrypting your message, and post a bunch of garbled nonsense in the thread. Nobody, not even me will understand it. Then I'll take your garbled nonsense and encrypt it again in my own secret way, and post the result in the thread. Now, you attempt to "de-crypt" the new gibberish as if it had just been encrypted by you, but the result will still be garbled nonsense because I encrypted it. But now when I decrypt it I'll see the original message you sent, while everyone else is still stuck seeing garbled nonsense.

All of the organizing happened in public, but everyone chose their own system of encrypting/decrypting their messages privately, so nobody else figure out how to read the messages.

This is just a rough description of how we could do it; from what I've heard actual encryption on the internet works slightly differently, but is similar in spirit.

Essentially we would be able to send PMs to each other, except everyone gets to know when a PM is sent.
Logged

gkrieg13

  • Board Moderator
  • *
  • Offline Offline
  • Posts: 509
  • Shuffle iT Username: gkrieg
    • View Profile
Re: Cryptography in mafia games
« Reply #31 on: July 27, 2017, 05:09:24 pm »

Even if you agree on the protocol in public, it would still be private. That is the beauty of public key cryptography.

Btw, this is what your browser does with the web server every time you establish an https connection.
Logged

gkrieg13

  • Board Moderator
  • *
  • Offline Offline
  • Posts: 509
  • Shuffle iT Username: gkrieg
    • View Profile
Re: Cryptography in mafia games
« Reply #32 on: July 27, 2017, 05:11:19 pm »

Basically I create a public/private key pair. You encrypt the message using my public key, then only I can decrypt it with my private key.

Anyone can encrypt any message to me, and I'm the only one who can read them.

Just do that for each person, and you have the PM communication thing liopoil is talking about.
Logged

ashersky

  • Board Moderator
  • *
  • Offline Offline
  • Posts: 2343
  • 2013/2014/2015 Mafia Mod of the Year
    • View Profile
Re: Cryptography in mafia games
« Reply #33 on: July 27, 2017, 05:15:09 pm »

Sounds like it would be outside the rule of no communication outside the game?  But then again, maybe not, since it is in the game.

Like, gkrieg and I could agree upon a secret language we both know and use it in all games, scum or not.  That would seem to violate the same rule without having to have a rule about cryptography.
Logged
f.ds Mafia Board Moderator

2013, 2014, 2015 Mafia Mod of the Year
2015 f.ds Representative, World Forum Mafia Championships
2013, 2014 Mafia Player of the Year (Tie)

11x MVP: M30, M83, ZM16, M25, M38, M61, M76, RMM5, RMM41, RMM46, M51

gkrieg13

  • Board Moderator
  • *
  • Offline Offline
  • Posts: 509
  • Shuffle iT Username: gkrieg
    • View Profile
Re: Cryptography in mafia games
« Reply #34 on: July 27, 2017, 05:19:07 pm »

Sounds like it would be outside the rule of no communication outside the game?  But then again, maybe not, since it is in the game.

Like, gkrieg and I could agree upon a secret language we both know and use it in all games, scum or not.  That would seem to violate the same rule without having to have a rule about cryptography.

I mean you could argue either way, which is why I have a no cryptography rule. I mean the communication rule just says that you are only supposed to post about the game in the thread right?  You could argue that using R in my first post to confer a result is the same thing as cryptography, because it is a very rudimentary form of cryptography
Logged

Robz888

  • Margrave
  • *****
  • Offline Offline
  • Posts: 2644
  • Shuffle iT Username: Robz888
    • View Profile
Re: Cryptography in mafia games
« Reply #35 on: July 27, 2017, 05:20:21 pm »

Basically I create a public/private key pair. You encrypt the message using my public key, then only I can decrypt it with my private key.

Anyone can encrypt any message to me, and I'm the only one who can read them.

Just do that for each person, and you have the PM communication thing liopoil is talking about.

I'm seriously confused. How does this not violate the "no outside communication" rule? How do I give you my decryption key privately so that no one else sees it?

(Keep in mind I am clueless about such things.)
Logged
I have been forced to accept that lackluster play is a town tell for you.

gkrieg13

  • Board Moderator
  • *
  • Offline Offline
  • Posts: 509
  • Shuffle iT Username: gkrieg
    • View Profile
Re: Cryptography in mafia games
« Reply #36 on: July 27, 2017, 05:22:11 pm »

Basically I create a public/private key pair. You encrypt the message using my public key, then only I can decrypt it with my private key.

Anyone can encrypt any message to me, and I'm the only one who can read them.

Just do that for each person, and you have the PM communication thing liopoil is talking about.

I'm seriously confused. How does this not violate the "no outside communication" rule? How do I give you my decryption key privately so that no one else sees it?

(Keep in mind I am clueless about such things.)

Hmmmm, maybe I will give an example. It is a pretty cool process, that involves nothing outside of the thread.
Logged

gkrieg13

  • Board Moderator
  • *
  • Offline Offline
  • Posts: 509
  • Shuffle iT Username: gkrieg
    • View Profile
Re: Cryptography in mafia games
« Reply #37 on: July 27, 2017, 05:26:46 pm »

https://medium.com/@vrypan/explaining-public-key-cryptography-to-non-geeks-f0994b3c2d5

This should hopefully make some kind of sense to the non-computer person.
Logged

scott_pilgrim

  • Saboteur
  • *****
  • Offline Offline
  • Posts: 1102
    • View Profile
Re: Cryptography in mafia games
« Reply #38 on: July 27, 2017, 07:38:17 pm »

The analogy for Diffie-Hellman (probably the simplest well-known cryptosystem) that I've always liked is imagine we could encrypt messages using paint.  Imagine that if we could get the exact same shade of a particular color of paint, then we could use that to encrypt messages.  Now to get there:

1. I come up with one color of paint (say red), you come up with another color of paint (blue), and together, we agree on a third, public color (yellow).  We keep our own colors secret (even from each other).

2. I mix my color (red) with yellow to get some particular shade of orange; you mix your blue with yellow to get some particular shade of green.

3. I send you the orange, you send me the green, and then I mix my own red with the green, and you mix your blue with the orange.  We never had to publicly post our private colors (red and blue), but now we have the same color, because when I mixed red and green, what I really did was red+(blue+yellow), and when you mixed blue and orange, you got blue+(red+yellow), which is the same.  Everyone can see the shades of green and orange we exchanged with each other, but if they try mixing those together, they end up with red+yellow+blue+yellow, which has too much yellow in it; and the assumption is that it would be hard to separate out the original colors in the colors seen publicly.  (Everyone can see that we traded orange and green with each other and that our public "base" color was yellow, but that's not enough information for them to actually recover the original shade of red and blue that we used, because there's no easy way to subtract paint colors.)

The idea behind Diffie-Hellman is to do that, but with numbers instead of paint.  You want to find some hard-to-reverse process (like separating paint colors after they've been combined) so that each person can start with a secret number, combine it with a publicly known number, trade the result with someone who has done the same thing (with the assumption that it's really hard to recover the secret after it's been combined with another number), and then combine your original secret number with the number they gave you.  The takeaway is that you now have a shared secret even though all of your computations were either a. public to everyone, or b. private entirely to yourself (not even visible to the person who ends up with the shared secret with you).  Once you have a shared secret, you can use that to encrypt your messages, and only you and the other person will be able to read them.
Logged

chairs

  • Young Witch
  • ****
  • Offline Offline
  • Posts: 134
  • Why don't you have a seat over there...
    • View Profile
Re: Cryptography in mafia games
« Reply #39 on: July 30, 2017, 12:51:30 pm »

I'm okay with 1, 2, 4, 5, 7.

There's no point in playing in main threads instead of PMs if we're going to allow public key cryptography, otherwise it'd be really easy to start just using PGP encrypted chat.

chairs

  • Young Witch
  • ****
  • Offline Offline
  • Posts: 134
  • Why don't you have a seat over there...
    • View Profile
Re: Cryptography in mafia games
« Reply #40 on: July 30, 2017, 12:52:33 pm »

(That being said I now want to mod a game where I give everyone a keypair and watch you all post in the main thread - could do a Nightless game, with Mafia posting in the main thread...

gkrieg13

  • Board Moderator
  • *
  • Offline Offline
  • Posts: 509
  • Shuffle iT Username: gkrieg
    • View Profile
Re: Cryptography in mafia games
« Reply #41 on: July 30, 2017, 12:54:22 pm »

(That being said I now want to mod a game where I give everyone a keypair and watch you all post in the main thread - could do a Nightless game, with Mafia posting in the main thread...

Don't even send PMs, just post in thread all the roles.
Logged

Calamitas

  • Tactician
  • *****
  • Offline Offline
  • Posts: 407
  • Shuffle iT Username: Calamitas
    • View Profile
Re: Cryptography in mafia games
« Reply #42 on: July 30, 2017, 01:13:22 pm »

The best analogy for public/private key encryption goes as follows:

You want to send a message to me by mail that only I can read.
We have no secure mean of communication and every single thing you send me (or vice versa) can be watched/used by an intruder.

What we are going to do is the following:
 1. I am going to send you a lock (just I myself have the key)
 2. You are going to put the message in a box and lock it securely with that very lock
 3. You send me the box and just myself is able to open it with my private key

If we would want to establish a long-term communcation platform we would just send each other a bunch of identical locks while we are the only ones to have the respective keys.



That's basically how public/private key encryption works. Someone posts a public key on the internet and people encrypt their messages with that key.
Only the owner of the respective private key can decrypt the message and it's not possible to reverse engineer the private key from the public one.
So it would be possible to communicate inside the chat privately (but one would know that those two are communicating).


Another possible exploit for encryption would use a hash function.
A hash function is a one way function (that means: same input delivers same output but reverse engineering is not possible) that turns
any string into a bunch of gibberish. Even a slight change regarding the input changes the output completely.

What we could do now is hashing our role name to post the result in the thread on D1 (one might want to add a random string to the start of the rolename but that overcomplicates things now)
That has the following implications:
   - No one knows the actual roles because reverse engineer is not possible if the algorithm was properly designed
   - When claiming, one needs to give the string they put into the hash function. That means: Fakeclaims must be finalized D1; no changes are possible


There are probably dozens of other exploits but those two are already game-breaking.
Logged
Oh, i just don't like mafia games.

Town (5/9): M85, RMM35, M87, NM9, M90RMM38, M92, M91, M102,
Scum (3/3): M84, M88, M100

MVPs (1): M84

Calamitas

  • Tactician
  • *****
  • Offline Offline
  • Posts: 407
  • Shuffle iT Username: Calamitas
    • View Profile
Re: Cryptography in mafia games
« Reply #43 on: July 30, 2017, 01:22:39 pm »

(That being said I now want to mod a game where I give everyone a keypair and watch you all post in the main thread - could do a Nightless game, with Mafia posting in the main thread...
Policy:
Everyone who uses encryption as long as there is no IC is lynched.
(except role/information hashing of course; that stuff is pretty pro-town)
Logged
Oh, i just don't like mafia games.

Town (5/9): M85, RMM35, M87, NM9, M90RMM38, M92, M91, M102,
Scum (3/3): M84, M88, M100

MVPs (1): M84

chairs

  • Young Witch
  • ****
  • Offline Offline
  • Posts: 134
  • Why don't you have a seat over there...
    • View Profile
Re: Cryptography in mafia games
« Reply #44 on: July 30, 2017, 02:44:04 pm »

(That being said I now want to mod a game where I give everyone a keypair and watch you all post in the main thread - could do a Nightless game, with Mafia posting in the main thread...
Policy:
Everyone who uses encryption as long as there is no IC is lynched.
(except role/information hashing of course; that stuff is pretty pro-town)

No no, the idea would be encryption -enforced-.

silverspawn

  • Adventurer
  • ******
  • Offline Offline
  • Posts: 5326
  • Shuffle iT Username: sty.silver
    • View Profile
Re: Cryptography in mafia games
« Reply #45 on: July 31, 2017, 05:46:51 am »

Say I was an IC. Here's how it would go, roughly. You're someone trying to send me a message. Secretly choose your own way of encrypting your message, and post a bunch of garbled nonsense in the thread. Nobody, not even me will understand it. Then I'll take your garbled nonsense and encrypt it again in my own secret way, and post the result in the thread. Now, you attempt to "de-crypt" the new gibberish as if it had just been encrypted by you, but the result will still be garbled nonsense because I encrypted it. But now when I decrypt it I'll see the original message you sent, while everyone else is still stuck seeing garbled nonsense.

 Wait wait wait. Aren't you saying that if you have two encryption functions f and g, then

g^-1 ∘ f^-1 ∘ g ∘ f = id?

Is that really true?

liopoil

  • Margrave
  • *****
  • Offline Offline
  • Posts: 2587
    • View Profile
Re: Cryptography in mafia games
« Reply #46 on: July 31, 2017, 01:21:14 pm »

Say I was an IC. Here's how it would go, roughly. You're someone trying to send me a message. Secretly choose your own way of encrypting your message, and post a bunch of garbled nonsense in the thread. Nobody, not even me will understand it. Then I'll take your garbled nonsense and encrypt it again in my own secret way, and post the result in the thread. Now, you attempt to "de-crypt" the new gibberish as if it had just been encrypted by you, but the result will still be garbled nonsense because I encrypted it. But now when I decrypt it I'll see the original message you sent, while everyone else is still stuck seeing garbled nonsense.

 Wait wait wait. Aren't you saying that if you have two encryption functions f and g, then

g^-1 ∘ f^-1 ∘ g ∘ f = id?

Is that really true?
Yes, it's important to explicitly choose encryption function which have that property.
Logged

silverspawn

  • Adventurer
  • ******
  • Offline Offline
  • Posts: 5326
  • Shuffle iT Username: sty.silver
    • View Profile
Re: Cryptography in mafia games
« Reply #47 on: July 31, 2017, 04:45:50 pm »

That makes sense. So it only works both people involved know what they're doing.

Awaclus

  • Adventurer
  • ******
  • Offline Offline
  • Posts: 11817
  • Shuffle iT Username: Awaclus
  • (´。• ω •。`)
    • View Profile
    • Birds of Necama
Re: Cryptography in mafia games
« Reply #48 on: August 01, 2017, 02:31:37 am »

That makes sense. So it only works both people involved know what they're doing.

Well, yes, but as long as someone in the game knows, they can explain.
Logged
Bomb, Cannon, and many of the Gunpowder cards can strongly effect gameplay, particularly in a destructive way

The YouTube channel where I make musicDownload my band's Creative Commons albums for free
Pages: 1 [2]  All
 

Page created in 2.343 seconds with 20 queries.