Skip to Main Content

Java Security

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Encrypt/decrypt same file with two different passwords

802465Oct 1 2010 — edited Nov 11 2010
Hi everyone:

I'm quite new to Java and cryptography in general and have a theoretical question. Is the following scenario possible and how would it be implemented:
Two users with two passwords (say, a regular user and a superuser) encrypt, decrypt, read from and write to the same file. The secret key for encryption and decryption should be based on their passwords (generated from their passwords), i.e. not stored anywhere on the system.

I've been racking my brains but can't think of a way. Am I missing an obvious solution?

Can it be done?

Thanks,
Michael
This post has been answered by sabre150 on Oct 2 2010
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 9 2010
Added on Oct 1 2010
9 comments
969 views