edu.vt.middleware.crypt.pbe
Class OpenSSLEncryptionScheme

java.lang.Object
  extended by edu.vt.middleware.crypt.pbe.AbstractEncryptionScheme
      extended by edu.vt.middleware.crypt.pbe.AbstractVariableKeySizeEncryptionScheme
          extended by edu.vt.middleware.crypt.pbe.OpenSSLEncryptionScheme
All Implemented Interfaces:
EncryptionScheme

public class OpenSSLEncryptionScheme
extends AbstractVariableKeySizeEncryptionScheme

Password-based encryption scheme used by OpenSSL for encrypting private keys.

Version:
$Revision: 2744 $
Author:
Middleware Services

Field Summary
 
Fields inherited from class edu.vt.middleware.crypt.pbe.AbstractEncryptionScheme
cipher
 
Constructor Summary
OpenSSLEncryptionScheme(String algId, byte[] iv)
          Creates a new instance from an algorithm identifier string and salt data.
OpenSSLEncryptionScheme(SymmetricAlgorithm alg, byte[] salt, int keyBitLength)
          Creates a new instance using the given parameters.
 
Method Summary
 
Methods inherited from class edu.vt.middleware.crypt.pbe.AbstractVariableKeySizeEncryptionScheme
initCipher, setGenerator, setKeyLength
 
Methods inherited from class edu.vt.middleware.crypt.pbe.AbstractEncryptionScheme
decrypt, decrypt, encrypt, encrypt, setCipher
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OpenSSLEncryptionScheme

public OpenSSLEncryptionScheme(SymmetricAlgorithm alg,
                               byte[] salt,
                               int keyBitLength)
Creates a new instance using the given parameters.

Parameters:
alg - Symmetric cipher algorithm used for encryption/decryption. The cipher is expected to be initialized with data required for use except, of course, the private key which will be generated from a password.
salt - Salt data for key generation function.
keyBitLength - Size of derived keys in bits.

OpenSSLEncryptionScheme

public OpenSSLEncryptionScheme(String algId,
                               byte[] iv)
Creates a new instance from an algorithm identifier string and salt data.

Parameters:
algId - Identifier describing the cipher used for key encryption. The form of the identifier follows the following convention:
$ALGORITHM-$MODE
iv - Cipher initialization vector data.


Copyright © 2003-2013 Virginia Tech. All Rights Reserved.