I was bored, so I started to understand a little cryptography. I became interested in this Fair-Coin Flipping protocol. This protocol works with public key cryptography, but requires the algorithm to switch (something like RSA, I think). I thought it would be interesting to write this in C or C ++, and it was interesting how people usually do this public key cryptography in C or C ++. For example, the first few steps of the protocol:
- Alice and Bob generate a pair of public / private keys (which is a commutative secret)
- Alice generates two messages: one points to the heads, and the other points to the tails and encrypts them both with her key and sends them to Bob.
- ...
- ...
Now, for the message, I will probably use a string, but are there any good libraries for generating public / private keys and encrypting this string, etc.?
source share