This is a simple (and insecure) implementation of RSA and Diffie-Hellman. Most algorithms are proven (in French) in a LaTeX document.
The Numbers.Make
functor allows using any Concrete
number representation:
Int
(31- or 63-bit OCaml integer, nice for testing purpose)Bigint
(values are tagged, not directly saved as strings)
Phantom types allow statically differentiating public
and private
keys.
numbers.ml
,rsa.ml
, anddiffie_hellman.ml
contain the librarytoy.ml
is a simple CLI toolrsa.tex
contains proofs in French
make toy.byte