Version 8 of Dossy Shiobara

Updated 2005-08-30 18:07:22

(aka Dossy)

Hi. I run several wikis using Wikit, especially the AOLserver Wiki [L1 ].

I can be reached at mailto:[email protected] .

I've got 4+ years of Tcl, specifically in Vignette StoryServer R4.x and V/5 through 5.6.

  • Web: Vignette, AOLserver, ColdFusion
  • E-commerce: Comergent, OpenMarket
  • Languages: Tcl, Ruby, Perl, C
  • DBMS: Oracle, Sybase, Informix, MySQL
  • OS: Linux, Solaris, AIX

Located in Northern New Jersey and looking for short term contract/consulting work, preferably telecommute. See http://panoptic.com/ ...

I'm willing to consider a full-time position given the right offer, though.


LV Are you the one who wrote http://panoptic.com/cfx_tcl/ ?

Dossy Yes, that would be me. Why, did you give it a whack? Think it might be useful if further developed?


In struggling with implementing DSA signature verification, I discovered that math::bignum::powm is slow. Using the algorithm found here [L2 ] for modular exponentiation (i.e., x = a^b mod y), it yielded a faster implementation:

    proc _modexp_bignum {m e n} {
        set p [fromstr 1]
        set zero [fromstr 0]
        set one [fromstr 1]
        set two [fromstr 2]
        while {[gt $e $zero]} {
            if {[eq [mod $e $two] $one]} {
                set p [mod [mul $p $m] $n]
            }
            set m [mod [mul $m $m] $n]
            set e [div $e $two]
        }
        return $p
    }

However, this is still quite slow for large values. So, I converted the inner-workings to use mpexpr and the speedup is tremendous:

    proc _modexp_mpexpr {m e n} {
        foreach v {m e n} {
            set $v [mpexpr [tostr [set $v]]]
        }
        set p [mpexpr 1]
        while {[mpexpr $e > 0]} {
            if {[mpexpr $e % 2 == 1]} {
                set p [mpexpr $p * $m % $n]
            }
            set m [mpexpr $m * $m % $n]
            set e [mpexpr $e / 2]
        }
        return [fromstr $p]
    }

[ Category Person | Category Home Page ]