From 327d75c2d47febe97fb08822dbe33b3d3c209f28 Mon Sep 17 00:00:00 2001 From: Kei Hibino Date: Wed, 6 Apr 2016 11:59:26 +0900 Subject: [PATCH] Add comments about irreducible binary polynomial. --- Crypto/MAC/CMAC.hs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Crypto/MAC/CMAC.hs b/Crypto/MAC/CMAC.hs index 23ee66e..86bf464 100644 --- a/Crypto/MAC/CMAC.hs +++ b/Crypto/MAC/CMAC.hs @@ -96,6 +96,13 @@ bxor = B.xor cipherIPT :: BlockCipher k => k -> [Word8] cipherIPT = expandIPT . blockSize where +-- Data type which represents the smallest irreducibule binary polynomial +-- against specified degree. +-- +-- Maximum degree bit and degree 0 bit are omitted. +-- For example, The value /Q 7 2 1/ corresponds to the degree /128/. +-- It represents that the smallest irreducible binary polynomial of degree 128 +-- is x^128 + x^7 + x^2 + x^1 + 1. data IPolynomial = Q Int Int Int --- | T Int