Is there a encryption algorithm that allows more than one key to decrypt and encrypt?
A = Key one
B = Key two
Data exchange should be possible as follows
1. Clear Text == A ==> Encrypted == B ==> Clear Text
2. Clear Text == B ==> Encrypted == A ==> Clear Text
EDIT 1:
Algorithm should be available in Java.
EDIT 2: Broader picture
A database stores encrypted data. Most of the users have to read and write (decrypt and encrypt) a small portion of the data using their personal password. Some users need to access (decrypt and encrypt) all of the data, using their personal password.
Members of both user groups must not know another password than theirs.