Re: 128 bit blowfish algorithm - WeOnlyDo Discussion board

Re: 128 bit blowfish algorithm (General questions)

by wodSupport, Tuesday, August 01, 2006, 15:33 (6689 days ago) @ 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: