hi, people, i'm a rookie here, if moderator doesn't think it fits in here, please advise me which forum I should post this. I'm doing a java based chatroom with security. my questions are: 1. assuming A, B, C, D login, then there are 6 possible pairs. if each pair has to get a pair of keys so that only that pair can read the msg (ie. C can't read msgs b/w A & B). how do I generate the keys? How can the keys be managed? i'm very confused on this 2. the problem gets more confusing to me when I don't make the above assumption--ie it's an open chatroom, anyone can register and login at any time generate keys every time when you login? what about when you talk to 3 people at same time? 3 different pair of keys? 3. every one has the option to send ciphered or plain text/files, when you send ciphered ones, only the one with key can read it, it should show up as messy codes to others attempt to read it. how should I implement this? Thank you all in advance for any suggestions.