python-otr / pure-python-otr

Off-The-Record Protocol Implementation in Python
GNU Lesser General Public License v3.0
154 stars 25 forks source link

Import OTR key and fingerprints from Pidgin #30

Open micahflee opened 11 years ago

micahflee commented 11 years ago

This is a feature request. It would be great the Gajim plugin configure window could have an "Import From Pidgin" button next to "Generate". It would see if these files exist:

~/.purple/otr.private_key
~/.purple/otr.fingerprints

If they do, it would load these, parse them, and convert the keys to Gajim .key3 and .fpr formats.

micahflee commented 11 years ago

I wrote a script that converts Pidgin OTR keys to Gajim OTR keys: https://github.com/micahflee/pidgin2gajim

If you want to implement this feature, maybe this code will save you some time.

afflux commented 11 years ago

FYI, I'm pretty busy right now. Will work on this in a few weeks time.

micahflee commented 11 years ago

Thank you!

abeluck commented 11 years ago

FYI, we have an otrfileconverter project aiming to convert between all otr formats+apps. It mostly works, but is somewhat raw. Needs some usability polish before we publish it as a standalone tool.

https://github.com/guardianproject/otrfileconverter/

If you're interested, we could rework the module API a bit so it could be integrated into an app as a library.

micahflee commented 11 years ago

Hey Abel! Actually, I copied a bunch of code from otrfileconverter to make pidgin2gajim (https://github.com/micahflee/pidgin2gajim/blob/master/pidgin2gajim.py#L9). I think making it a library would be awesome, so that any OTR client can easily offer an import feature.

eighthave commented 11 years ago

I think it makes more sense to support key format conversion/importing outside of the IM apps. OTR File Converter handles format conversion, file syncing on the local system, and soon sync with Gibberbot over the network via OTR.

That said, I think a lot of the primitives for handling the different key formats should be pushed upstream as much as possible, and not in otrfileconverter. It currently uses a bunch of different python crypto libraries in order to support all of the required formats (x509, PKCS#8, etc.)