module Goban::ECC::GF

Extended Modules

Defined in:

goban/ecc/gf.cr

Constant Summary

EXP_TABLE = begin a = uninitialized ::StaticArray(UInt8, 256) a[0] = 1 (1..255).each do |i| v = a[i - 1].to_i * 2 a[i] = (v >= 256 ? (v ^ 285) : v).to_u8 end a end
LOG_TABLE = begin a = uninitialized ::StaticArray(UInt8, 256) (0..255).each do |i| a[EXP_TABLE[i]] = i.to_u8 end a end

Instance Method Summary

Instance Method Detail

def add_or_sub(x : UInt8, y : UInt8) #

def div(x : UInt8, y : UInt8) #

def exp(x : UInt8) #

def inv(x : UInt8) #

def log(x : UInt8) #

def mul(x : UInt8, y : UInt8) #

def pow(x : UInt8, pow : UInt8) #