Results 1 to 4 of 4

Thread: How do I use VB6 to do Asymmetric Encryption?

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Oct 2008
    Posts
    1,238

    How do I use VB6 to do Asymmetric Encryption?

    RSA or other similar algorithm that has a different encryption key than the encryption key then the decryption key, is known as Asymmetric Encryption. Has anyone created an OCX or DLL or BAS or CLS for VB6 that would allow me to perform RSA (or other similar algorithm) encryption? I would like to add such a feature to my VB6 program.

  2. #2
    PowerPoster dilettante's Avatar
    Join Date
    Feb 2006
    Posts
    24,487

    Re: How do I use VB6 to do Asymmetric Encryption?

    Since VB6 does not ship with any libraries providing encryption you have several paths:

    • Roll your own code. Not advised: encryption logic can be complex and you want to be sure you get it right. Remember when that flaky WinZip product started leaving breadcrumbs in passworded ZIP files, making them trivial to crack compared to those created using any other tool?
    • Write Win32 API wrapper code to use Windows encryption facilities to do the heavy lifting.
    • The CAPICOM library is deprecated but still works fine and is less work than calling raw APIs. Quite VB-friendly. However it has limitations in several areas and Microsoft chose not to develop it further when .Net came along and killed off most VB work.
    • Buy a 3rd party encryption library.

  3. #3

    Thread Starter
    Frenzied Member
    Join Date
    Oct 2008
    Posts
    1,238

    Re: How do I use VB6 to do Asymmetric Encryption?

    Quote Originally Posted by dilettante View Post
    Since VB6 does not ship with any libraries providing encryption you have several paths:

    • Roll your own code. Not advised: encryption logic can be complex and you want to be sure you get it right. Remember when that flaky WinZip product started leaving breadcrumbs in passworded ZIP files, making them trivial to crack compared to those created using any other tool?
    • Write Win32 API wrapper code to use Windows encryption facilities to do the heavy lifting.
    • The CAPICOM library is deprecated but still works fine and is less work than calling raw APIs. Quite VB-friendly. However it has limitations in several areas and Microsoft chose not to develop it further when .Net came along and killed off most VB work.
    • Buy a 3rd party encryption library.

    I've looked at the RSA encryption algorithm, and some of it requires doing math on 1024 bit integers! VB6 is only capable of doing math on up to 32 bit integers. So a straight forward implementation is not possible in VB6.

    Also, I have Windows 7 Home Premium x64 with SP1 as my OS. But CAPICOM only comes on Windows XP. Is there a way to install CAPICOM on Windows 7 Home Premium x64 with SP1?

  4. #4
    PowerPoster dilettante's Avatar
    Join Date
    Feb 2006
    Posts
    24,487

    Re: How do I use VB6 to do Asymmetric Encryption?

    Go get https://www.microsoft.com/en-us/down....aspx?id=25281

    You'll want the SDK anyway.

    It should work fine on Windows 7, Microsoft just says scary things to try to get you to move to VB.Net, which of course is another option.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width