[JDEV] Does Muse support encrypted messaging?
Chris Chen
ckchris at idream.net
Fri Jun 21 14:36:05 CDT 2002
Yes, Muse has support for "working" with encrypted messages. However, it
does not support the "encryption" of the message.
What does this mean? It means that you can call some method like:
It means that there is a message class you can use to attach the encrypted
data to the message you want to send and also a way to retrieve the
encrypted message. However, the message class itself will not do the
actually encryption of the data for you. The reasoning behind that is that
different people use different libraries to do encryption. Rather than try
to make everyone conform to a specific library that Muse uses, Muse lets
you, the developer, decide which encryption library to use. Once you have
encrypted the data, it's easy to add it as an XMessage to be sent to the
remote server and also easy to retrieve it.
Specifically, if you want to send PGP messages, you should instantiate an
object from PGPEncryptedXMessage. Once you create it, you can add it to
the main message (since all X Messages must be inside another message) ...
a sample code will look something like this.
Jabber jabber = new Jabber();
JabberSession session = jabber.createSession(...);
session.connect(...);
...
...
JabberChatMessage msg = new JabberChatMessage();
msg.setSubject("Test Subject");
msg.setBody("Test Body");
PGPEncryptedXMessage pgpmsg = new PGPEncryptedXMessage();
...
...do you data encryption here...
...
pgpmsg.setPGPMessage("JKLFWIERUOSJKX237492378965<PGP ENCRYPTED DATA>");
msg.addXMessage(JabberCode.XMLNS_X_PGP_ENCRYPTED, pgpmsg);
session.sendMessage(msg);
Hope that helps. I did put up a beginner's tutorial as well as a
intermediate user's tutorial for working with the Jabber API. So you
should take a look at it. Also, you should use alpha versions (ie. 0.73a1)
rather than the stable version. The alpha version is only there to
indicate that the Gnutella module is going through some API changes. The
Jabber module is not affected at all at this point, so it's safe to use the
newest version.
If you have any questions and problems regarding Muse, you should contact
me directly rather than go through JDEV in consideration of the other
people on this list.
Thanks,
Chris
ckchris at echomine.com
At 06:48 AM 06/21/2002, you wrote:
>Does Muse support encrypted messaging and, if so, is there a sample somewhere?
>
>-----Original Message-----
>From: mark at mjwilcox.com [mailto:mark at mjwilcox.com]
>Sent: Thursday, June 20, 2002 5:07 PM
>To: jdev at jabber.org
>Subject: Re: [JDEV] JabberBeans encryption sample
>
>
>I suggest jettisioning jabberbeans and going with Muse at
>echomine.org. Much easier and active development.
>
>Mark
>On 20 Jun 02, at 12:55, Richard Clippard wrote:
>
> > Anyone got a sample of how to encrypt Jabber messages using
> > JabberBeans. I looked in the "swagger" sample and they did not seem to
> > address this (or I just missed it). I am interested in encrypting all
> > the message/chat content (not just the password (although I am
> > interested in encrypting passwords too)).
> >
> > Thanx. RL Clippard
> >
>
>
>Mark Wilcox
>mark at mjwilcox.com
>Got LDAP?
>_______________________________________________
>jdev mailing list
>jdev at jabber.org
>http://mailman.jabber.org/listinfo/jdev
>_______________________________________________
>jdev mailing list
>jdev at jabber.org
>http://mailman.jabber.org/listinfo/jdev
PGP at ldap://pgpkeys.mit.edu/
More information about the JDev
mailing list