The random package started exporting new instances in version 1.0.1.0. One solution would be to conditionally compile an instance of the RSA library only when the random package is a version or a later version; some variations like this should work:
{-# LANGUAGE CPP #-} #if MIN_VERSION_random(1,0,1) #else instance Random Word8 where ... #endif
Bonus points if you submit a patch for the RSA maintainer library.
Alternatively, you can ask cabal to use an older version of random .
source share