Aloaha plain DES Encryption
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!
'if you set only secret1HEX simple DES is used
'if you set also secret2HEX double key 3DES (also called 2DES) is used
'if you set all secrets full 3DES is being used.
'encrypt defines if inputhex should be encrypted or decrypted
'defines chaining (0 - no chaining, 1 CBC chaining)
'startvect defines the startvector. If it is left empty the nullvector is being used.
set csp = createobject("aloahacsp.des")
'set secrets of full 3DES
'define startvect. If left empty the nullvector will be used.
'define the string to be encrypted/decrypted. Must be a multiple of 8 bytes
'encypt the input
'store the encrypted data in result
result=csp.TripleDES(cstr(inputstringHEX), cstr(secret1HEX),cstr(secret2HEX),cstr(secret3HEX), cbool(Encrypt), "",0,cbool(chaingin), cstr(startvect))
'store the decrypted data in result
result=csp.TripleDES(cstr(result), cstr(secret1HEX),cstr(secret2HEX),cstr(secret3HEX), cbool(Encrypt), "", 0,cbool(chaining), cstr(startvect))
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.