Skip to content

Instantly share code, notes, and snippets.

Droidcon Notes

Day 1

Classy Shark

  • Really cool tool http://www.classyshark.com for opening up any android executable and analyzing its content.
  • Great for debugging and setting up proguard stuff
  • Good for handling multidex-related questions
  • Good for analyzing dependencies
  • Has an easy to use GUI with a good search feature
@jds375
jds375 / gist:8247318
Last active December 23, 2021 09:51
RSA Cryptosystem in Haskell

RSA Cryptosystem in Haskell

I first started functional programming a year ago using OCaml. I was learning a lot, but stopped once my schedule started to fill up. I decided that this winter I would take another shot at functional programming with Haskell. I made an end-goal of implementing the bare-bones RSA cryptosystem in Haskell and below is some commentary on what I came up with. Any comments/suggestions regarding my code and style with respect to Haskell would be greatly appreciated!

Random Number Generation

The first problem I had to tackle was random number generation. I decided to use Haskell's System.Random to generate the number. I knew that the generator wouldn't be cryptographically secure, but certainly sufficient for educational purposes. I used the simple randomRIO (m, n) method to generate a random number in the range m to n .

-- Uses System.Random to get a random Integer between m and n inclusive
randomInteger :: Integer -> Integer