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


dim csp 

'inputString must be in HEX Format. The length must be a multiple of 8 bytes!
dim inputstringHEX 

dim result 

'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"
secret2HEX="1111111111111111"
secret3HEX="3333333333333333" 

'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.




Please ask...

Although we really tried hard, there are always questions left open. But perhaps somebody else had already put the same question?
Please check!
  • Hello,
    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.
    Answered 20.02.2009
If not, please do not hesitate to send us your question.
We would be glad to answer it.
PDF SDKPDF Form Saver SDKSmart Card APIAloaha CSP APIAPIs and samplesPin Pad Notifier Pluginp7m / p7s CreationCDO to S/MimeCreate S/Mime PKCS7Create / Validate PKCS #7Create CMS (PKCS #7)Show Card CertificatesADPU TesterSmart Card TesterTimestamp PKCS7 SignatureDES EncryptionHash DataXML HelperEnumerate Card ReaderMifareAloaha Web ServicesAloaha Print MonitorAloaha Remote ConfigurationWebDAVLDAP ClientProgramming Office MacrosIIS Event Sinks