>        key = 1
>        word.each_byte {|s| key *= asc2prime[s]}
Hm,

isn't something like

key = 0
word.each_byte do |s|
    key << 5  # multiply by 32
    if  s < 97
          key+= s - 64
    else
          key+= s - 96
    end
end

much simpler (and  faster)?

Christoph