473,834 Members | 1,822 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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

31 New Member

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 = '72C29C2371CC9B DB65B779B8E8D37 B29ECC154AA56A8 799FAE2F498F76E D92F2'
Kmac = '7962D9ECE03D1A CD4C76089DCE131 543'

Resultant MAC[Kmac](Data)='5326532 0' (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 10080
Mohamed moustafa
1 New Member

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

Mohamed Moustafa
Nov 15 '08 #2
1 New Member
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?

Apr 28 '09 #3

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

Similar topics

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 single, possibly compound, node. Why is a list of childNodes needed? Thx, Skip
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 take all the words, both English and the other language and create a dictionary. so that I can look up About and get Om as the answer. How is the best way to do this?
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. So the htmllib is a regex search with empty methods? i can do that by myself, no need use a parser, i am a litle confused in this. Is there a python html parser that creates objects from html sources,like xml.dom?
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 check if this userID exist in Session. If yes, I consider it is a valid user, otherwise, I ask this to log in again. But, I wonder if there is a better, affordable, easy way to validate a uer? Any ideas, reference papers? Thanks.
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 vs C++ templates. Does anyone knows a workaround to do this ? Thx : public class C<T> { private T myValue;
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 any python library. l1 = #represents the decimal number 12345678 l2 = func (l1) # l2 = #represents 0x12D687
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 see any reason behind it. id is set as my PRIMARY index. The table has 132,000 rows, but I don't think it should be taking this long. Do you think the server is just slow? Or do you see a problem with my SQL query?
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 it in Solution Explorer, choose Edit and delete. Delete is grayed out. Background: I searched for and read the instructions in VS for removing a project and deleting a solution. Essentially, they are test projects/solutions that I tried, and...
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 where the initialization function passes in two callback methods (my code) that the API calls to successively read and write buffers. The C++ sample I am modeling this after works and processes thousands of buffers, but when interface to my C#...
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.