adamwalker / mmul

Montgomery multiplication and modular exponentiation for crypto implementation

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Simple, unoptimised implementation of Montgomery multiplication and modular exponentiation intended for RSA encryption and Diffie Hellman key exchange schemes. 

Montgomery multiplication is an efficient modular multiplication algorithm. 

Based on: http://www.hackersdelight.org/hdcodetxt/mont64.c.txt

crypto.c  - Modular arithmetic functions
run.c     - A test program
consts.hs - Haskell program to precompute constants needed for Montgomery multiplication

About

Montgomery multiplication and modular exponentiation for crypto implementation

License:BSD 3-Clause "New" or "Revised" License


Languages

Language:C 87.3%Language:Haskell 12.7%