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) #

[View source]
def div(x : UInt8, y : UInt8) #

[View source]
def exp(x : UInt8) #

[View source]
def inv(x : UInt8) #

[View source]
def log(x : UInt8) #

[View source]
def mul(x : UInt8, y : UInt8) #

[View source]
def pow(x : UInt8, pow : UInt8) #

[View source]