DES (Data Encryption Standard) is a very "old" and common encryption standard from 1976.
Still so it is very hard to find to find a pure and plain implementation which does not silently pad the data or uses a startvector which is known to the user.
The Aloaha Card Connector includes a plain implentation of DES and triple DES (3DES) which does not PAD the DATA, does not add a seed and which uses a plain startvecor.
Furthrmore it adds 3DES to machines which do not have it per default. From CyptoAPI just reference the Aloaha Cryptographic Provider. Please note that Aloaha also adds SHA-2 capabilities to your system!
The DES API is a freeware API of Aloaha.
Usage of DES, 2DES and 3DES
'inputString must be in HEX Format. The length must be a multiple of 8 bytes! dim inputstringHEX
'if you set only secret1HEX simple DES is used dim secret1HEX
'if you set also secret2HEX double key 3DES (also called 2DES) is used dim secret2HEX
'if you set all secrets full 3DES is being used. dim secret3HEX
'encrypt defines if inputhex should be encrypted or decrypted dim encrypt
'defines chaining (0 - no chaining, 1 CBC chaining) dim chaining
'startvect defines the startvector. If it is left empty the nullvector is being used. dim startvect
'create object set csp = createobject("aloahacsp.des")
'set secrets of full 3DES secret1HEX="0000000000000000"
'define startvect. If left empty the nullvector will be used. startvect="4444444444444444"
'define the string to be encrypted/decrypted. Must be a multiple of 8 bytes inputstringHEX="AAAAAAAAAAAAAAAA"
'encypt the input encrypt=true
'store the encrypted data in result result=csp.TripleDES(cstr(inputstringHEX), cstr(secret1HEX),cstr(secret2HEX),cstr(secret3HEX), cbool(Encrypt), "",0,cbool(chaingin), cstr(startvect))
'decypt data encrypt=false
'store the decrypted data in result result=csp.TripleDES(cstr(result), cstr(secret1HEX),cstr(secret2HEX),cstr(secret3HEX), cbool(Encrypt), "", 0,cbool(chaining), cstr(startvect))
'display result msgbox result
'unload object set csp = nothing
This API is also able to do different types of DES and MAC calculation. If you need more information please do not hesitate to contact us.
Although we really tried hard, there are always questions left open. But perhaps somebody else had already put the same question? Please check!
I would like to evaluate the freeware DES API.
How can i get it? and if is it posible to get C++ example to use it?
thanks in advance.
Just install the Aloaha Cardconnector from http://www.aloaha.com/download/cardconnector.zip. If you want we publish your c sample on our website.
If not, please do not hesitate to send us your question. We would be glad to answer it.