Cryptography Invoker User Guide

kitlunchroomAI and Robotics

Nov 21, 2013 (3 years and 11 months ago)

187 views

Pervasive

Data Integrator























































































Cryptography Invoker

User

Guide












Pervasive Software Inc.

12365
Riata Trace Parkway

Building B

Austin, Texas 78727 USA


Telephone: (512) 231
-
6000 or (800) 287
-
4383

Fax: (512) 231
-
6010

Email:
info@pervasive.com

Web:
http://www.pervasive.c
om




ii


See copyrights.txt in the product installation directory for information on third
-
party and open software
components.

Cryptography Invoker

User Guide

May 2012


iii


Contents

Cryptography Invoker

................................
................................
................................
......

1

Overview

................................
................................
................................
.............................

1

Step Actions

................................
................................
................................
........................

2

Invoker Step Pro
perties

................................
................................
................................
......

2

Invoker Step Options

................................
................................
................................
..........

3

Usage Example:

................................
................................
................................
.........................

3




1


Cryptography Invoker


Overview

Cryptography I
nvoker can be used to encrypt or decrypt data passed as DJMessage or from a file.

Types of encryption/decryption supported are PGP (v6), AES (CBC mode, 128
-
bit key) and RSA (ECB
mode, no padding).



PGP encryption/decryption is compatible with PGP command

line tool, key versions supported are
1.0.0 and above
.

RSA encryption
/decryption is compatible with OpenSSL
command line tool. Absolute paths need to be
specified in private and public key properties.


The keys have to be PEM encoded.



AES encryption/decryption is compatible with
OpenSSL

command line tool (aes
-
128
-
cbc).
Hexadecimal
symmetric key and IV

values ne
ed to be specified in key and IV

properties.



Absolute paths have to be specified for all input and output files (optional). If

input or output file is
specified, the component will use them instea
d of source or target DJMessage objects
.

.















2


Step Actions

The following
actions are available from a

Cryptography Invoker

step.


Action

Description

Execute

Reads file from source DJMessage object or file specified, encrypts/decrypts outputs
the result to target DJmessage object or out file path specified in step option.








Invoker Step

Properties

When the
Execute

action is used
, the following properties
need to be set
.


Property

Description

Source Message

DJMessage object containing data to be decrypted or encrypted. If passing binary
data the message body must first be Base64 Encoded. See: B64Encode() function.

Note:
If input file path is specified in

the step option
, contents of the file will be used
instead of Source Message data.

Target Message

DJMessage object containing data that was decrypted or encrypted using the
component
.

Note: If outpute file path is specified in the step option, the
resulting decrypted or
encrypted data will be written to the output instead of Target Message object body.







3


Invoker Step

Options

Property

Description

Operation

Select Encrypt or Decrypt.

Encryption Type

Select PGP, AES or RSA

Input File Path

Absolute input file path, i.e. C:/somepath/filename.ext

Output File Path

Absolute input file path, i.e. C:/somepath/filename.ext

Public Key Path

Absolute path for PGP or RSA public key file

Private Key Path

Absolute path for RSA private key file

Secret

Key

Absolute path for PGP secret key

Passphrase

Passphrase value for PGP decryption

Symmetric Key

Hexadecimal 128 bit symmetric key value for AES encryption/decryption

IV

Hexadecimal 128 bit IV value for AES encryption/decryption





Usage Example
:

Reading a binary encrypted file to DJMessage object body that can be used as a source in a
Cryptography Invoker step.

sourceMsg.body

= b64encode(fileRead("C:
\
somepath
\
binary_pgp_encrypted_data
.xml.pgp"))