Go to the first, previous, next, last section, table of contents.


exponential and logarithmic functions

 exp      { # -> flt }
 expt     { # # -> flt } (C pow())
 exptmod  { i i i -> i }
 log      { # -> flt }
 log10    { # -> flt } (Nonlisp)
 sqrt     { # -> flt }
 abs      { # -> # }
 ffloor   { # -> # }
 fceiling { # -> # }

The exptmod function takes three integer operands b, p, m and computes b to the p power mod m -- an operation frequently used by various digital signature schemes and related public-key based authentication techniques.

The exptmod function is implemented using Montgomery exponentiation, meaning that results up to about 512 bits can be computed in seconds. (I've computed results up to about 9,000 bit this way, but that takes half an hour or more, and requires recompiling bnm.t with some constants set larger.)


Go to the first, previous, next, last section, table of contents.