Re: ASP Login with BasicCard

[ Follow Ups ] [ BasicCard User Forum ]

Posted by zeitcontrol ( on June 11, 2004 at 06:50:10:

In Reply to: ASP Login with BasicCard posted by webster on June 03, 2004 at 15:53:56:

We have an (unsupported) example for one time password (OTP) which does include BasicCard ZCBasic language code, but not BasicCard API code. Still this is a good starting point. You can download by use of this link:

Within this example the OTP is generated by building a 8 byte data block starting with 6 byte card serial number and ending with 2 byte running counter. Then this data is encrypted using DES (in ECB mode). ECB mode is no disadvantage since the block length is same as DES encryption block length.

With BasicCard API this encryption may be done like this (untested Visual Basic source code!!!):
Dim MyDes as new zcDES
Dim Data() as Byte
ReDim Data(1 to 8) as Byte
Dim Key() as Byte
ReDim Key(1 to 8) as Byte
Dim EncData() as Byte
ReDim EncData(1 to 8) as Byte
REM setup the data and key here

There are other parts which needs to be done, but for this please see the example source code.

Michael Petig
ZeitControl cardsystems GmbH

Follow Ups:

[ Follow Ups ] [ BasicCard User Forum ]