Take the 2-minute tour ×
Cryptography Stack Exchange is a question and answer site for software developers, mathematicians and others interested in cryptography. It's 100% free, no registration required.

Okay here are my requirements.

I need a solution that can do the following.

Lets say I have an encrypted piece of text with the value "20".

and I have UserA and UserB

I give UserA the Keys (/5 and /2), meaning divide by 5 and divide by 2. I give UserB the Key (/10 and /1) meaning divide by 10 and divide by 1.

using both operations, both UserA and UserB can arrive at the same result the un-encrypted text of "2".

The first operation could be their "SessionID, the second could be a corresponding key for the Session". Two different users, using two different "Keys" can decrypt the ciphertext using two different but equal operations.

Is there something similar in cryptography where you can provide different keys or functions and arrive at the same result and is cryptographically secure.

share|improve this question
    
Use TLS + server-side user authentication. –  dchest Jan 2 '13 at 13:24
    
TLS doesn't encrypt the plain in sight content, it encrypts it over the wire. The decryption needs to occur on the client side. i.e within a javascript function in a browser. I can use a server to provide a combination values that can be used in decryption but the constraint is that the page must be pre-encrypted and in plain sight. i.e publicly browse able. –  Andrew Jan 2 '13 at 16:29
1  
I guess one way of looking at this problem would be if there is a file that is encrypted once but can be decrypted using many different unique keys stackoverflow.com/questions/597188/… –  Andrew Jan 2 '13 at 17:35
2  
Encrypt content with a randomly generated key. Encrypt this key for each user with a user-specific key. –  dchest Jan 2 '13 at 23:01
1  
@Andrew User1 can give away decrypted plaintext without revealing any keys anyway. Perhaps, you can tell us what kind of problem you're trying to solve? –  dchest Jan 3 '13 at 11:43

1 Answer 1

The answer in the comments from dchest is probably the most standard. Encrypt the page with a single, random key. Then encrypt that key for each user using the shared secret that you hold with that user.

It is unclear whether this meets your needs as it is unclear exactly what your needs are.

With that in mind, a fairly advanced way you could get the functionality you require is with Ciphertext-Policy Attribute Based Encryption. It is very complex and would require a lot to describe in this answer (and I don't even know if it meets your needs as they seem to not be fully defined at this point).

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.