Skip to content
This repository


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

RSA Cryptography Problem from Programming Praxis in Clojure

branch: master
# RSA Crytography- Key generator and message encrypt/decrypt

## Introduction
   RSA Cryptography provides a RSA key generator and functions to use RSA keys 
   to encrypt and decrypt numeric messages.

   Problem from Programming Praxis:

## Usage 
   The first step is to make some keys. Import the project, then call 
   generate-keys. You need to specify your key's primes' bit-length.

   (ns repl (:use [rsa-cryptography.core]))
   (def my-keys (generate-keys 16))
   >>> {:d 790211681, :e 65537, :modulus 2213643079}

   Now that you have keys, you can use them to manipulate messages.

   (encrypt-message 100100100 (:e my-keys) (:modulus my-keys))
   >>> 124800500
   (decrypt-message 124800500 (:d my-keys) (:modulus my-keys))
   >>> 100100100 

## Changelog 
  v1.00: Initial release!

## Blog post
  A short blog post about this problem is available here:

  The source for this project is available on Github:

## License
  Copyright Topher Brown <>, 2011. Released under the MIT 
Something went wrong with that request. Please try again.