[OTR-dev] Faster key generation

Ian Goldberg ian at cypherpunks.ca
Thu Jul 10 11:05:16 EDT 2008


Thanks to Simon Josefsson!

http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=489523#37

If you want your IM client to use /dev/urandom instead of /dev/random to
generate keys, stick this line just before the call to OTRL_INIT:

    gcry_control(GCRYCTL_ENABLE_QUICK_RANDOM, 0);

I've checked the change into pidgin-otr's cvs; the Debian/Ubuntu,
Fedora, BSD, etc. package maintainers may wish to manually apply the
patch until the next release:

--- otr-plugin.c	2 Jul 2008 18:33:09 -0000	1.21
+++ otr-plugin.c	10 Jul 2008 12:42:44 -0000	1.22
@@ -973,6 +973,11 @@
     otrg_dialog_set_ui_ops(otrg_gtk_dialog_get_ui_ops());
 #endif
 
+#ifndef WIN32
+    /* Make key generation use /dev/urandom instead of /dev/random */
+    gcry_control(GCRYCTL_ENABLE_QUICK_RANDOM, 0);
+#endif
+
     /* Initialize the OTR library */
     OTRL_INIT;


   - Ian



More information about the OTR-dev mailing list