EDI Integrator V9 - Online Help
Available for:
EDI Integrator V9
Questions / Feedback?

PGPProvider Property

The PGP provider provides an interface to the PGP cryptography software.

Syntax

[VB.NET]
Public Property PGPProvider As String

[C#]
public string PGPProvider {get; set;}

Remarks

The library that interfaces to the PGP cryptography software.

The PGP operations may be performed by an external implementation such as GnuPG or an internal implementation within the component. The PGPProviderType setting specifies which implementation is used. This property is only applicable when using an external implementation.

By default the external implementation is used, and component does not by itself implement PGP, instead it uses the provider pattern to interface with external cryptography libraries. A PGP provider is a simple module that allows the component to offload PGP operations to the PGP software of your choice. The interface is designed to be generic in its ability to include various PGP software and is limited to only the bare minimum capabilities required for a GISB message exchange. We include a PGP provider implementation for GnuPG which may be used as a reference to implement other providers.

A PGP provider is simply a class called "IPWorksGISBPGPProvider" that should have the following methods. The component uses reflection to access the methods of the provider.

    public void SetParam(string name, string value);
    public byte[] Encrypt(byte[] data);
    public byte[] Decrypt(byte[] data);
    public byte[] Sign(byte[] data);
    public byte[] SignAndEncrypt(byte[] data);
    public bool VerifySignature(byte[] signature, byte[] signedData);

The SetParam method is used to specify the parameters required by the PGP provider to perform the PGP operation. Although the parameters needed may vary in different providers, we expect the following set to be necessary. The reference GnuPG provider interprets the following parameters.

gpg-pathThe path to the OpenPGP executable for the desired implementation.
homedirThe directory containing the public keyring, secret keyring and trust database. Please note this defaults to the application preferences directory of the user, hence if the GNUPG provider is being used from a ASP.NET application, homedir should be specified.
passphraseThe passphrase to access the secret keys in the secret-keyring.
useridThe identifier used to identify a secret key within the secret-keyring.
recipient-useridThe identifier used to identify a public key within the public keyring.
timeoutThe timeout in milliseconds that the provider will wait for a response from the OpenPGP executable. The default is 5000 (5 seconds).
usetempfileIf set to "true" the provider will write data to be processed to a temporary file on disk. This is useful when working with large files or binary files.

The following parameters are only applicable when sending data and PGPProviderType is set to 1 (internal).

signingalgorithmThe signing algorithm to use when SignData is True. Possible values are:
  • SHA1 (default)
  • MD5
  • SHA256
  • SHA384
  • SHA512
  • SHA224
  • RIPEMD160
encryptingalgorithmThe encrypting algorithm to use when EncryptData is True. Possible values are:
  • CAST5
  • 3DES
  • AES256
  • AES192
  • AES128 (default)
  • BLOWFISH
  • TWOFISH
  • IDEA
compressionmethodThe compression method to use. Possible values are:
  • zip (default)
  • zlib
  • bzip2
  • none

The component expects the encryption to return an ASCII armored output and the signing to compute a detached signature.

Note: GnuPG is the Free Software Foundation's implementation of OpenPGP. It is free software and is recommended by NAESB (in version 1.6 of the EDM specification) for use in GISB/NAESB applications.

GnuPG is not included with this package, so you should download the latest version from http://www.gnupg.org. You might use GnuPG (or other software) to import your trading partners' public keys, and to import or generate a private key for yourself. These operations are outside the scope of this software, so please see the GnuPG documentation for details.

Default Value

""

 
 
Copyright (c) 2018 /n software inc. - All rights reserved.
Build 9.0.6635.0