EldoS | Feel safer!

Software components for data protection, secure storage and transfer

Unable to decrypt file after replacing PGP v 2.5.8 command line

Also by EldoS: MsgConnect
Cross-platform protocol-independent communication framework for building peer-to-peer and client-server applications and middleware components.
#2149
Posted: 02/01/2007 12:08:35
by Phillip Grant (Basic support level)
Joined: 07/21/2006
Posts: 10

We recently purchased PGP BlackBox, and have used it to replace command line PGP ( v 6.5.8). I am using the following code to set up the encryption:


Code
>--------------- code -------------------
    
    Set fso = New FileSystemObject
    LicenseManager.SetLicenseKey ("<OurLicKey>")
    
    EncryptingKeys.Clear
    SigningKeys.Clear
    
    GlobalKeyring.LoadFromFiles gsPubKeyFile, gsSecKeyFile, True
        
    Set PubKey = gfGetPublicKeyFromUserID(sKeyUserID)
    EncryptingKeys.AddPublicKey PubKey

    With PGPWriter
        .EncryptingKeys = EncryptingKeys
        .EncryptionType = etPublicKey
        .UseNewFeatures = False
        .UseOldPackets = True
        .Armor = False
        '.ArmorHeaders.Clear
        '.ArmorHeaders.Add "Version: EldoS PGPBlackbox (ActiveX edition)"
        '.ArmorBoundary = "PGP MESSAGE"
        .Compress = False
        .FileName = fso.GetFileName(sSourceFile)
        .TimeStamp = Now
        .SymmetricKeyAlgorithm = SB_PGP_ALGORITHM_SK_3DES
        .EncryptFile sSourceFile, sDestFile
    End With
>----------------------------------------



although this code works, when our client attmpts to deencrypt the file, they get a mismatch public key error.

If I use the old command line PGP like this:


Code
>--------------- code -------------------
   pgp -e <textfile name> "<Same Client PubKeyName>"
>----------------------------------------




Then it decrypts just fine. What are the options for PGPWriter that will match the
Quote
>-------------- quote -----------------
-e
>--------------------------------------
PGP command line option?

I am thinking it has to do with these lines:

Code
>--------------- code -------------------
        .UseNewFeatures = False
        .UseOldPackets = True

>----------------------------------------



or this:


Code
>--------------- code -------------------
          .SymmetricKeyAlgorithm = SB_PGP_ALGORITHM_SK_3DES
>----------------------------------------


Please get back to me ASAP, as I have clients that are hounding me!

Thank you

Reply

Statistics

Topic viewed 2037 times

Number of guests: 1, registered members: 0, in total hidden: 0




|

Back to top

As of July 15, 2016 EldoS Corporation will operate as a division of /n software inc. For more information, please read the announcement.

Got it!