class CMAC

Defined in:

cmac.cr

Constant Summary

CONSTANT_BLOCK = Bytes[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 135]
ZERO_BLOCK = Bytes.new(16)

Constructors

Instance Method Summary

Constructor Detail

def self.new(key) #

[View source]

Instance Method Detail

def _derive_key(key : Bytes) : Bytes #

[View source]
def _encrypt_block(key : Bytes, block : Bytes) : Bytes #

[View source]
def _generate_subkeys(key : Bytes) #

[View source]
def _leftshift(input : Bytes) : Bytes #

[View source]
def _needs_padding?(message : Bytes) : Bool #

[View source]
def _next_key(key : Bytes) : Bytes #

[View source]
def _pad_message(message : Bytes) : Bytes #

[View source]
def _secure_compare?(a : Bytes, b : Bytes) : Bool #

[View source]
def _xor(a : Bytes, b : Bytes) : Bytes #

[View source]
def sign(message, truncate = 16) : Bytes #

[View source]
def valid_message?(tag, message) : Bool #

[View source]