/*
 * jPOS Project [http://jpos.org]
 * Copyright (C) 2000-2019 jPOS Software SRL
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Affero General Public License as
 * published by the Free Software Foundation, either version 3 of the
 * License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Affero General Public License for more details.
 *
 * You should have received a copy of the GNU Affero General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */

package org.jpos.security;

/**
 * Key Encription Scheme.
 *
 * @author Robert Demski
 */
public enum KeyScheme {

    /**
     * Encryption of a single length DES key using X9.17 methods.
     * <p>
     * Used for encryption of keys under a variant LMK..
     */
    Z,

    /**
     * Encryption of a double length key using X9.17 methods.
     */
    X,

    /**
     * Encryption of a double length DES key using the variant method.
     * <p>
     * Used for encryption of keys under a variant LMK.
     */
    U,

    /**
     * Encryption of a triple length key using X9.17 methods.
     */
    Y,

    /**
     * Encryption of a triple length DES key using the variant method.
     * <p>
     * Used for encryption of keys under a variant LMK.
     */
    T
}


@@ -1516,12 +1516,776 @@
 */%0A    T
+,%0A%0A    /**%0A     * Encryption of single/double/triple-length DES & AES keys using the ANSI%0A     * X9 TR-31 Key Block methods.%0A     * %3Cp%3E%0A     * Only used for exporting keys %3Ci%3E(e.g. under a KEK)%3C/i%3E.%0A     * %3Cp%3E%0A     * The ANSI X9 Committee published Technical Report 31 (TR-31) on%0A     * %3Ci%3EInteroperable Secure Key ExcKey Block Specification for Symmetric%0A     * Algorithms%3C/i%3E in 2010 to describe a method for secure key exchange which%0A     * meets the needs of X9.24.%0A     */%0A    R,%0A%0A    /**%0A     * Encryption of all DES, AES, HMAC & RSA keys using proprietary Key Block%0A     * methods.%0A     * %3Cp%3E%0A     * Used for encrypting keys for local use %3Ci%3E(under a Key Block LMK)%3C/i%3E or%0A     * for importing/exporting keys %3Ci%3E(e.g. under a KEK or ZMK)%3C/i%3E.%0A     */%0A    S%0A
 %0A%7D%0A%0A

Add key block KeyScheme