473,388 Members | 1,390 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,388 software developers and data experts.

ISO/IEC 9797-1 CBC MAC using vb.net

Hi,

I need to calculate the Cryptographic checksum using ISO/IEC 9797-1 MAC
algorithm with cipher block chaining MAC. The resultant MAC length must be 8 bytes.
As a sample, the data I am working on now is:
Data = '72C29C2371CC9BDB65B779B8E8D37B29ECC154AA56A8799FA E2F498F76ED92F2'
Kmac = '7962D9ECE03D1ACD4C76089DCE131543'


Resultant MAC[Kmac](Data)='53265320' (I want to know how to get
to this value using vb.net).
I search this on google but no success for the last 1 week.
Any code?
May 29 '07 #1
2 10037
Hello

You can do it very easy

Divide the key with Key1[ first 64 bits] and key2 [last 64 bits]

use initial vector {0,0,0,0,0,0,0,0}
divide the message into 8 bytes blocks
pad the last block with "80" and "00","00","00" until it reaches 8 bytes
if the message already can be divided by 8, then add another block "80 00 00 00 00 00 00 00"
encrypt by DES CBC algorith with the first key KEY 1
Decrypt the result by DES ECB with the second key KEY2
Encrypt the result by DES ECB with the first key KEY1

take the first 4 bytes as the MAC

Thanks
Mohamed Moustafa
Nov 15 '08 #2
muncho
1
Hi Mohamed,

I need to calculate MAC according to the ISO/IEC 9797-1 Algorithm 1 using DES in CBC mode (the one you talk about is Algorithm 3). Could you tell me how to do that?

Thanks,
Muncho
Apr 28 '09 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: Skip Montanaro | last post by:
I'm getting somewhat painfully acquainted with xml.dom.minidom. What is the relationship between its documentElement attribute and its childNodes list? I thought XML documents consisted of a...
8
by: Anders Eriksson | last post by:
Hello! I want to extract some info from a some specific HTML pages, Microsofts International Word list (e.g. http://msdn.microsoft.com/library/en-us/dnwue/html/swe_word_list.htm). I want to...
3
by: Ismael Herrera | last post by:
Why does the htmllib has such simple parsers? i think that making something more complicated that printing 'i am inside post tag' is too hard with this library since the parsers doesnt help at all....
5
by: Andrew | last post by:
Hi, friends, I keep wondering if there is a better way to verify a user. Now, in my asp.net app, each time a user signed in, I saved his/her userID in Session object. In each following pages, I...
23
by: Luc Vaillant | last post by:
I need to initialise a typed parameter depending of its type in a generic class. I have tried to use the C++ template form as follow, but it doesn't work. It seems to be a limitation of generics...
67
by: Philippe Martin | last post by:
Hi, I'm looking for an algo that would convert a list such as: I'm using python to prototype the algo: this will move to C in an embedded system where an int has 16 bits - I do not wish to use...
5
by: giraph | last post by:
Okay, well what my query looks like is: SELECT id, title FROM myTable LIMIT 0, 500 This query is taking a long time and changes in time each time i run it, from 0-10 seconds. And I don't...
6
by: =?Utf-8?B?TWljaGFlbCBNaWxsZXI=?= | last post by:
How do I delete solutions? But not the same directions in VS help. I already followed the instruction for Removing project(s), I had only one. The instructions for the solution were to highlight...
2
by: =?Utf-8?B?VG9tIEFsbGVu?= | last post by:
Hi, TIA for any help. (Thanks, Mattias Sjögren for your help yesterday! ) I am developing a C# wrapper for a 3rd party API. It processes buffers from a video stream (file) and is structured...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.