DES (Data Encryption Standard)

Hello everybody! I have to apply the DES (Data Encryption Standard) algorithm (exactly the Triple-DES algorithm) on some data. Now i’m looking for a piece of navision-code or an executable that i can run by the shell-command to encrypt/decrypt my data with the DES. Is someone experienced with this problem or can sombody help me?

You’d need to write an automation object to wrap the Win32 Crypto API. You also need to manage (i.e. hide and persist) your key for DES, which is generally a huge headache. The Data Protection API (DPAPI) helps with this but there are some constraints with it. I’m afraid I dont know of a components that already does this. If you find one ensure that it is digitally signed because a third party crypto API could do anything but encrypt data safely.

Microsoft provides a redistributable COM automation wrapper called CAPICOM… http://msdn.microsoft.com/library/default.asp?url=/library/en-us/seccrypto/security/getting_ready_to_use_capicom.asp If you download/extract it and look in the .\samples\vbs folder, you will find a .vbs script that you can run from a command line that will encrypt/decrypt files, and 3DES is one of the encryption options… The command line will look something like this:CScript.exe CEncrypt.vbs Encrypt -alg 3DES MyTextFile.txt MyCryptText.txt MySuperSecretPassword

thx for your answers. i wrote a little executable in c# where i use the TripleDESCryptoServiceProvider to encrypt/decrypt my data…

Hi,

Is that encrypt the Nav codes?

Please let me know because i am struggliing with this.

Thanks.

Hello HaHa, sorry for the late response. Kirtan has what you are looking for…

http://mibuso.com/blogs/kirtangor/2010/03/23/implementing-encryption-in-microsoft-dynamics-nav/