Page 1 of 1

ISO/IEC 9797-1

Posted: Mon May 28, 2018 1:02 am
by vikas
Can anyone explain me ISO/IEC 9797-1 MAC Algorithm 1?
TIA.

Re: ISO/IEC 9797-1

Posted: Tue Jun 12, 2018 2:34 am
by AlexLiu
MAC Algorithm 1 works like the CBC mode of block cipher, with the IV equals to zero.
Step 1 (padding): there are three methods to choose, any one is okay.
Step 2 (splitting): split the padded data to q blocks D1,...,Dq.
Step 3 (initial transformation): using the block cipher key K to encrypt the first block D1.
Step 4 (iteration): this iteration process is same with the CBC mode of block cipher.
Step 5 (output transfromation): this output transformation is the identity function, do not need do anything.
Step 6 (truncation): taking leftmost bits your MAC length need.

Re: ISO/IEC 9797-1

Posted: Tue Jun 12, 2018 2:36 am
by AlexLiu
MAC Algorithm 1 works like the CBC mode of block cipher, with the IV equals to zero.
Step 1 (padding): there are three methods to choose, any one is okay.
Step 2 (splitting): split the padded data to q blocks D1,...,Dq.
Step 3 (initial transformation): using the block cipher key K to encrypt the first block D1.
Step 4 (iteration): this iteration process is same with the CBC mode of block cipher.
Step 5 (output transfromation): this output transformation is the identity function, do not need do anything.
Step 6 (truncation): taking leftmost bits your MAC length need.