Re: 128 bit blowfish algorithm - WeOnlyDo Discussion board

Re: 128 bit blowfish algorithm (General questions)

by sovan, Wednesday, August 02, 2006, 06:46 (6688 days ago) @ wodSupport

i have applied your coding

coding follows:
Dim c As New wodCryptCom

Dim intest As New MemBlob
intest.FromHex( FFFFFFFFFFFFFFFF )

Dim inkey As New MemBlob
inkey.FromHex( FFFFFFFFFFFFFFFF )
c.SecretKey = inkey
c.Type = CryptoTypes.Blowfish
c.Optimized = False

Dim outtest As New MemBlob
c.Encrypt(intest, outtest)
'Debug.Print(outtest.ToHex)
Response.Write(outtest.ToHex)

the result is :51866fd5b85ecb8a

why those alphabets are in lower case?
from chilkat i have found:51866FD5B85ECB8A proper result

sovan

Sovan,

I can't tell you about other tool(s) you use, but if I go to reference tests at http://www.schneier.com/code/vectors.txt and try them out with our code, they work correctly. For example, here's code for first test (key 16 zeros hex, data 16 zeros hex, result should be 4EF997456198DD78 hex):[code]Dim c As New wodCryptCom

Dim intest As New MemBlob
intest.FromHex ( 0000000000000000 )

Dim inkey As New MemBlob
inkey.FromHex ( 0000000000000000 )
c.SecretKey = inkey
c.Type = Blowfish
c.Optimized = False

Dim outtest As New MemBlob
c.Encrypt intest, outtest
Debug.Print outtest.ToHex[/code] Hope this helps!

Kreso


Complete thread: