Discuss this help topic in SecureBlackbox Forum

Create self-extracting (SFX) OpenPGP archives

OpenPGPBlackbox supports creation of self-extracting protected archives, which are basically Windows PE executable files with all the protected data embedded in them. The self-extracting option is useful where you need to send an encrypted or signed file to a system which has no OpenPGP software installed. SFX files contain all the OpenPGP functionality needed to process the protected data, and are capable of decrypting data themselves without using any third-party OpenPGP software.

Creating self-extracted archives is virtually no different to creation of generic protected OpenPGP files and is performed with the same TElPGPWriter class. In addition to settings you normally tune-up (algorithms, file name, timestamp), you will also need to adjust the following properties:

  1. Provide the decryption part ('the stub') via StubSource and StubName properties. The stub is essentially the compiled OpenPGP decryption code. Normally you provide a stub residing in a file (choose TSBPGPStubSource.ssFile as StubSource) or in a stream (TSBPGPStubSource.ssStream).
    pgpWriter.StubSource = SBPGP.TSBPGPStubSource.ssFile;
    pgpWriter.StubName = @"C:\pgp\sbconstb.exe"; // the default console stub provided with SecureBlackbox
    If you set StubSource to ssStream, you need to handle TElPGPWriter.OnGetStubStream event.
  2. Set SFXEnabled property to true:
    pgpWriter.SFXEnabled = true;
  3. Additionally, you can finish the appearance of your decrypting executable by providing title and copyright strings:
    pgpWriter.SFXCopyright = "(C) Doors and Witches, Inc.";
    pgpWriter.SFXTitle = "Doors and Witches";

    How To articles about file encryption and signing with OpenPGP

    Discuss this help topic in SecureBlackbox Forum