Full Question:
It's a kind of making you stupid. Some possible answers are here.
1. Check-sum
Since you are just "checking," you ask him to call you at a certain time. If he doesn't, he doesn't have your number. Too simple? A reader suggest: "In that case you need a check-sum. Have Bob add all the digits of your phone number together, write down the total, and pass that back to you."
2. Public key Cryptography
Here is my public key, please encrypt my phone number you have with it and send back to me.
key=num-reveres of num
e.g if my no is 9740852296
the key=2818271817 Eve can't read it as Eve doesn't have my number so she can't predict & she has to lot of computation which only possible she know my number or some its digits ..so she can't decode the my key.
(we can also extend the explanation so i write on the paper that bob i am sending you key to decode it reverse the key & then decode using logic you have so the same thing bob has to do in its side & same he write back to me..m not using this in this solution )
then bob decode it using computation he tries all the way +,-*,/, %,xor all possible way to decode if he has my correct phone number then suppose he try to subtract my key from my phone number he has so if has correct phone number then after subtracting the key from my number he will send 9740852296-2818271817=6922580476 & he also write that after decoding reverse it so i will get my original number e.g. 9740852296 so i can say bob has my correct phone number else it would have been some other value & after reversing it i wont get my exact no so i can say bob don't have my correct number..
You need to check that your friend, Bob, has your correct phone number, but you cannot ask him directly. You must write a the question on a card which and give it to Eve who will take the card to Bob and return the answer to you. What must you write on the card, besides the question, to ensure Bob can encode the message so that Eve cannot read your phone number?
It's a kind of making you stupid. Some possible answers are here.
1. Check-sum
Since you are just "checking," you ask him to call you at a certain time. If he doesn't, he doesn't have your number. Too simple? A reader suggest: "In that case you need a check-sum. Have Bob add all the digits of your phone number together, write down the total, and pass that back to you."
2. Public key Cryptography
Here is my public key, please encrypt my phone number you have with it and send back to me.
key=num-reveres of num
e.g if my no is 9740852296
the key=2818271817 Eve can't read it as Eve doesn't have my number so she can't predict & she has to lot of computation which only possible she know my number or some its digits ..so she can't decode the my key.
(we can also extend the explanation so i write on the paper that bob i am sending you key to decode it reverse the key & then decode using logic you have so the same thing bob has to do in its side & same he write back to me..m not using this in this solution )
then bob decode it using computation he tries all the way +,-*,/, %,xor all possible way to decode if he has my correct phone number then suppose he try to subtract my key from my phone number he has so if has correct phone number then after subtracting the key from my number he will send 9740852296-2818271817=6922580476 & he also write that after decoding reverse it so i will get my original number e.g. 9740852296 so i can say bob has my correct phone number else it would have been some other value & after reversing it i wont get my exact no so i can say bob don't have my correct number..
Google Interview Questions - Check-sum, Cryptography, or Stupid