Solved

Problem while working on BlowFish Encryption using C++,VB

Posted on 2003-12-01
21
559 Views
Last Modified: 2010-04-17
I am new here.Can I know who is expert in C++ or Blowfish encryption??
I need their help.

I'm currently working on the Blowfish encryption project using
C++.I'm facing a problem.I wish to encrypt a file with unlimited
length.
For example,it encrypt first 5 character,send to a file.Then continue
encrypt the next 5 character and send to the same file as previous.
I try to use block cipher but fail to complete it.

And how do i do the interface for the program using VB
Anyone can help
me,please??
0
Comment
Question by:aldenneoh
  • 7
  • 6
  • 5
  • +1
21 Comments
 
LVL 45

Expert Comment

by:sunnycoder
ID: 9856388
I know a bit of C++ as well as cryptography but I am unable to make out what is the question !!!!
What is the problem ? You want help in debugging your encryption or building a GUI to your module or what ?
0
 
LVL 45

Expert Comment

by:sunnycoder
ID: 9856573
Here the source code for blowfish written by none other than Bruce Schneier
http://www.schneier.com/blowfish-download.html

If you still need some help, post here
0
 
LVL 15

Expert Comment

by:Raisor
ID: 9856735
Hi,

To get deeper into it -> also regarding vb interface <- check this address:
http://www.di-mgt.com.au/crypto.html

Another resource (VB.NET):
http://www.vbdotnetheaven.com/Code/Jun2003/2002.asp

Crypto Link Farms:
http://www.cs.fsu.edu/~yasinsac/links.htm

Best regards, Raisor
0
 
LVL 45

Expert Comment

by:sunnycoder
ID: 9856746
Raisor,
> http://www.di-mgt.com.au/crypto.html
Isn't this the download link for VB code on the page which I posted ?
0
 
LVL 15

Expert Comment

by:Raisor
ID: 9856888
Hi,

Why are you asking me that sunnycoder?

Anyone looking at http://www.di-mgt.com.au/crypto.html will see that there's common content but also other content than on http://www.schneier.com/blowfish-download.html ...

I think aldenneoh won't mind a little more information than Bruce Schneiers' Self Featuring Site ...

... by the way, I prefer http://www.di-mgt.com.au/crypto.html ... ;-))

Best regards, Raisor
0
 
LVL 45

Expert Comment

by:sunnycoder
ID: 9856925
No offence intended Raisor,

http://www.schneier.com/blowfish-download.html has links for downloading the source code in various languages ... The link (on the "Bruce Schneiers' Self Featuring Site" ) for downloading VB code is http://www.di-mgt.com.au/crypto.html ... hence I asked you.

Best regards,
Sunny
0
 
LVL 15

Expert Comment

by:Raisor
ID: 9856977
Hi,

OK -> I had a glance at it and I see what you mean -> most of the time there is more than just one way to reach the same point ;-)) ... I hope all this here can help aldenneoh to find the desired solution!

Best regards, Raisor
0
 
LVL 1

Expert Comment

by:SubodhKatiyar
ID: 9857821
hi aldenneoh

looks like there is a lot fight about the blockthings
here is the tip for vb and if you don't still have the block code i will send you one i wrote
you will need to insert a module in your vbproject and
declare the interface for you c public function there
like
Public Declare function DoBlockcypher Lib "Path.and.name.of.your.dll.in.case.it.is.not.in.system32.path" (byref inval as string, other parameters) as long.or.what.u.want.to.return
get the cypher from the dll function and write the returned byref string to the file using file write fuinction of vb.
once the dll is loaded in memory it is thundering fast,one more thing c expects the strings to be concatenated with \0 so pass string will vbnullcharacter attached.
points to remember ..
your c++ dll requires to have
Extern WINAPI functionname declaration.
and in def file you have to export these functions
.Exports
@1 DoBlockcypher

got some idea now?
0
 

Author Comment

by:aldenneoh
ID: 9858498
Regarding the Blowfish using C++,what I meant here is I need to build a GUI. So I need the source code about the encryption and decryption using block cipher.

Besides,I also need to use VB to build a interface for the GUI
0
Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 
LVL 15

Expert Comment

by:Raisor
ID: 9859084
Hi,

Here's a downloadable sample:
http://www.codeproject.com/cpp/filecryptapp.asp

Is that ok for you?

Best regards, Raisor
0
 

Author Comment

by:aldenneoh
ID: 9882284
Sorry everyone.I have to clarify that I already manage to encrypt/decrypt a file.Now I wish to use the block cipher method to make my program better.
So anyone is expert in C++ and Blowfish ?
0
 
LVL 15

Assisted Solution

by:Raisor
Raisor earned 250 total points
ID: 9882844
Hi,

>>I am new here.Can I know who is expert in C++ or Blowfish encryption?? I need their help. I'm currently working on the Blowfish encryption project using C++.I'm facing a problem.I wish to encrypt a file with unlimited length.<<

Well, it' good to know that you already manage encryption/decryption ... I suggest you have a look at this here: http://www.cryptosys.net/rijndael.html

Im sure you'll find a way to get in touch with Joan Daemen or Vincent Rijmen as this seems to me a little more than just doing someones' homework ;-))


Best regards, Raisor
0
 
LVL 45

Expert Comment

by:sunnycoder
ID: 9887881
>Now I wish to use the block cipher method to make my program better.

OK what is the error ... where are you stuck .. post some details
0
 

Author Comment

by:aldenneoh
ID: 10027185
Actually what i know need is the program code,not the source code for blowfish.Anyway thanks for all your help.have a nice day
0
 
LVL 45

Expert Comment

by:sunnycoder
ID: 10027680
aldenneoh,

>Actually what i know need is the program code,not the source code for blowfish.Anyway thanks for all your help.have a nice day

Do you want us to program blowfish in block cipher mode, build a GUI for it and post the code here ? If yes, you might get disappointed.
0
 

Author Comment

by:aldenneoh
ID: 10058265
Sorry i not mean that i can get the sull code here.My main objective is to know how to use block cipher in Blowfish programming.

Thanks for all your help
0
 
LVL 45

Accepted Solution

by:
sunnycoder earned 250 total points
ID: 10058559
>know how to use block cipher in Blowfish programming.

http://www.freesoft.org/CIE/Topics/143.htm
I would have copy pasted it here if pictures were allowed;o)

http://home.ecn.ab.ca/~jsavard/crypto/co040601.htm
Link gives a very good overview but with a DES example ... holds just as good for blowfish

code for block ciphered blowfish but in C
http://people.redhat.com/jbj/beecrypt/html/group__BC__blowfish__m.html

Take time to study these links, you would be able to code block ciphering easily once you know the concept ... infact block ciphering is easier than coding the algorithm itself
0
 

Author Comment

by:aldenneoh
ID: 10072023
Thanks for your help.Please give me some times.I will try to work it out.
I am sure i will give you a satisfied reply as soon as possible
0
 

Author Comment

by:aldenneoh
ID: 10302371
Sorry.I not sure what i supposed to do.Actually I didnt get the actual answer.But sunnycoder and raisor did give me some useful website for reference.So what should i do?Give half of the points?
0

Featured Post

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

This article will show, step by step, how to integrate R code into a R Sweave document
Although it can be difficult to imagine, someday your child will have a career of his or her own. He or she will likely start a family, buy a home and start having their own children. So, while being a kid is still extremely important, it’s also …
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now