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 = '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?
2 10078
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
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
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: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
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: 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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
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: 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: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |