Don't Re-use Cipher Key For Mac

Posted by admin

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=87 12120. 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=87 12120. 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 don't know how to do it in VB but if C you would be looking for these functions: Hopefully that will put you on the right path to finding the right libraries for VB. 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 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? 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. 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 = 'CC9BDB65B779B8E8D37B29ECC154AA56A8799FA E2F498F76ED92F2' Kmac = '7962D9ECE03D1ACD4C76089DCE131543' Resultant MACKmac(Data)='53265320' (I want to know how to get to this value using vb.net).

Don

Don't Reuse Cipher Key For Mac Download

I search this on google but no success for the last 1 week. Any code on urgent basis? 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. Xg 760a driver for mac pro. As a sample, the data I am working on now is: Data = 'CC9BDB65B779B8E8D37B29ECC154AA56A8799FA E2F498F76ED92F2' Kmac = '7962D9ECE03D1ACD4C76089DCE131543' Resultant MACKmac(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 on urgent basis? This is the MSDN article about how to generate a cryptographic hash also known as a checksum. 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.

Don't Reuse Cipher Key For Mac

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. Basically i am developing a message interface document and send/receive data to server from my application using winsock TCP/IP.

Don't Reuse Cipher Key For Mac Pro

There is a MAC field in the document which apply CBC MAC encryption to plain text that i send to server and return 8 byte key in output.Then i send this 8 byte key with my plain text and the server check my message with their interface. At the server end their is a third party involved which developed server interface so they check my message and gives reply to me either transaction is OK/CANCEL. When i am using TripleDES it generate 8 byte MAC Key but i want to generate CBC MAC key using DES.The code for TripleDES key is: dim plaintext as string plainText = '65464 ' Dim data As Byte = ASCIIEncoding.ASCII.GetBytes(plainText) Dim mac3des As New MACTripleDES Dim result As Byte = mac3des.ComputeHash(data) output=(result=52637299) 8 byte Code for DES key is: 'Dim DES As New DESCryptoServiceProvider ' Set the cipher mode.