I want to encrypt the ASCII message using Cipher Block Chaining MAC and generate the 8 byte key.How can i achieve this?
Thanks:
Danish Majid
The document titled ISO/IEC 9797-2:2002 describes 3 algorithms you can use to create this. The document costs money but you can see if your local library or university library can get a copy for you.
Thanks for the reply but i implement CBC MAC using vb.net and generate 8 byte key through applying CBC MAC on the whole message. Do you know any website link/article where i can find source code for CBC MAC using vb.net because i can not find any code for CBC MAC in google.
Thanks:
Danish Majid
Thanks for the reply but i implement CBC MAC using vb.net and generate 8 byte key through applying CBC MAC on the whole message. Do you know any website link/article where i can find source code for CBC MAC using vb.net because i can not find any code for CBC MAC in google.
Thanks:
Danish Majid
The example described in this website used for encrypting data but i want to generate 8 byte key in output through applying CBC MAC to whole message.
suppose sample message is 642 ASCII characters
message=0005422 000002789454602 028020263020024 8898712120..... .
the key generate by applying CBC MAC through this message is
key=24598762
this is my requirement to generate 8 byte key by applying CBC MAC to whole message.
How can i implement this in vb.net ? because i can only find code for encrypting message.
Thanks:
Danish
The example described in this website used for encrypting data but i want to generate 8 byte key in output through applying CBC MAC to whole message.
suppose sample message is 642 ASCII characters
message=0005422 000002789454602 028020263020024 8898712120..... .
the key generate by applying CBC MAC through this message is
key=24598762
this is my requirement to generate 8 byte key by applying CBC MAC to whole message.
How can i implement this in vb.net ? because i can only find code for encrypting message.
Thanks:
Danish
I am still not sure what you are after, so I'll breakdown some parts
*You receive a message of 642ascii characters.
Is this the real message or an already encrypted message?
*You want to generate an 8byte DECRYPTION key for that message.
Now if the message was already encrypted, I don't think you can determine it's decrypting key just by looking at it, that kinda defeats the purpose don't you think? If the message is plain and you want the key that could be used to decrypt it once it's encrypted, then encrypt it and view the key that was used. Actually I think you can make up whatever key you want and use it to encrypt it.
I am still not sure what you are after, so I'll breakdown some parts
*You receive a message of 642ascii characters.
Is this the real message or an already encrypted message?
*You want to generate an 8byte DECRYPTION key for that message.
Now if the message was already encrypted, I don't think you can determine it's decrypting key just by looking at it, that kinda defeats the purpose don't you think? If the message is plain and you want the key that could be used to decrypt it once it's encrypted, then encrypt it and view the key that was used. Actually I think you can make up whatever key you want and use it to encrypt it.
But I always did bad at cryptology in school.
I took it to mean that the OP wants to create a signature key. A two way hash of the message to compare its authenticity. In any case, the links provided do show how to encrypt a message, decrypt a message, and create a hash of a message.
The 642 ASCII Characters are in Simple Plain Text and i want to generate 8 Byte key on applying CBC MAC to whole message. I dont know how to achieve this in vb.net?
The 642 ASCII Characters are in Simple Plain Text and i want to generate 8 Byte key on applying CBC MAC to whole message. I dont know how to achieve this in vb.net?
What do you mean "create key"? You want to make the ASCII characters your key to use to encrypt data? Or do you want to create some kind of message digest or crytographic signature against the 642 ASCII Characters?
If you want to do the latter the link I provided in my prevoius post links directly to an article on MSDN as to how to Generate Signatures. It provides the VB code right there for you to look at. If you want to encrypt or decrypt data given a 642 ASCII Character key then right above where that page is on MSDN lists other Cryptograpic Tasks on how to Encrypt and Decrypt Data.
When you say "generate an 8 byte key" that means you want to create an 8 byte message digest (hash) or an 8 byte digital signature.
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 799FA E2F498F76ED92F2 '
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 on urgent basis?
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 799FA E2F498F76ED92F2 '
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 on urgent basis?
This is the MSDN article about how to generate a cryptographic hash also known as a checksum.
PDF files that contain the Visual Studio 2005 documentation.
You will have to do some research to find out if Microsoft's implementation is equal to the ISO/IEC 9797-1 MAC algorithm. This will give you code samples on how to create something similar to what you need. Microsoft has implemented several cryptographic service providers for you to use. It is now up to you to read what is available on MSDN and try to use the crypto APIs to do what you need them to do or write your own custom crypto service provider.
Please be advised that it is never a good idea to create your own crypto service provider since there may be problems with the security of your algorithm. The CSPs provided by Microsoft have been throughly tested.
Comment