Hi - looking for a bit of tech help
Pre-conditions:
1. Alice has encrypted the text "red" with her private key, and stores the ciphertext on a public ledger.
2. Her public key is known.
3. Bob knows that Alice has stored a ciphertext corresponding with either "red" or "white" on the ledger.
My Question:
Using the public key, the ciphertext, and knowing the possible cleartext values, is it possible for Bob to determine the value which has been stored?
To put the question another way: If required could Alice prove that the cleartext value is "Red" without using her private key?
What you're talking about is Asymmetric Key Crypto. The basic idea behind CA's and what-not.
Just to be clear. Public key is public, and can be distributed without fear of data theft/MiTM (Man in The Middle) attacks such as sniffing etc. Hence the word 'public' in the name!
The purpose of the public key is to allow others to use it, and encrypt the data that they wish to send you. Again, to prevent the data being read by a 3rd party. Your private key, is the only key in the whole wide world that can be used to decrypt the data your friend sends you.
Another interesting thing that knightdk mentioned is this:
http://travistidwell.com/jsencrypt/demo/Try typing in the same text and encrypt it multiple times. Each time, the encrypted version is different, even though the plaintext you fed it is the same!
The reason? They take in a couple of other factors along with your private key and plaintext to increase entropy. There was this website that would ask you to move your mouse-cursor around randomly on the page as the source of entropy. Wish I could link it to you!