Open BDD16 opened 6 years ago
This will be a little bit bigger than what I was thinking, but will encompass a concept that I'm calling as a PostOffice which is a thread that contains two JXTA Pipes. 1) Input, and 2) Output. Each Pipe will dump to their own ArrayBlockingQueue consisting of SecureEnvelopes. a Secure Envelope Class consists of a cipher text message that has been encrypted using AES-GCM, I chose AES-GCM for tagging purposes which upon decryption the Java class will automatically check the tag to make sure it is an authentic and untampered message.
What makes the Envelope Secure is that it contains an RSA encrypted Key, this Key is not plaintext and is RSA cipher text. upon decryption by the Peers Private Key, or Unsealing the Wax Dripped Envelope, since the key is encrypted with the peers public key it is possible to securely transfer the AES-GCM key so that the message can be decoded and read by the Peer. The PostOffice class will only transfer the messages and will not be responsible for encrypting or decrypting anything.
From this comment I'll generate two more Action Items, create SecureEnvelopeClass and message or DataBlob class.
Each user has one input pipe that many different messages can come through as. maybe shouldn't do a 1-1 pipe per chat else will be too computation intensive. instead have one input pipe for the User in which arbitrary messages come through or "Advertisements" as JXTA likes to call them. then place into a Queue and have the PostOffice class distribute to the right Default List Model for each peer chat/ recombination for a File Transfer
2/3 completed adding in a third one of displaying the decrypted messages into a read only field. Have the ability to send, receive messages, but need to display them.
this will be the field that the user will view and read from their chat buddy. should decrypt using a key (how to retrieve the key is still TBD)