jdk/src/share/classes/sun/security/ec/SunECEntries.java
author valeriep
Tue, 08 May 2012 17:57:48 -0700
changeset 12685 8a448b5b9006
parent 5506 202f599c92aa
child 13661 7c894680910a
permissions -rw-r--r--
4963723: Implement SHA-224 Summary: Add support for SHA-224, SHA224withRSA, SHA224withECDSA, HmacSHA224 and OAEPwithSHA-224AndMGF1Padding. Reviewed-by: vinnie
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
3492
e549cea58864 6840752: Provide out-of-the-box support for ECC algorithms
vinnie
parents:
diff changeset
     1
/*
12685
8a448b5b9006 4963723: Implement SHA-224
valeriep
parents: 5506
diff changeset
     2
 * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved.
3492
e549cea58864 6840752: Provide out-of-the-box support for ECC algorithms
vinnie
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
e549cea58864 6840752: Provide out-of-the-box support for ECC algorithms
vinnie
parents:
diff changeset
     4
 *
e549cea58864 6840752: Provide out-of-the-box support for ECC algorithms
vinnie
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
e549cea58864 6840752: Provide out-of-the-box support for ECC algorithms
vinnie
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 3863
diff changeset
     7
 * published by the Free Software Foundation.  Oracle designates this
3492
e549cea58864 6840752: Provide out-of-the-box support for ECC algorithms
vinnie
parents:
diff changeset
     8
 * particular file as subject to the "Classpath" exception as provided
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 3863
diff changeset
     9
 * by Oracle in the LICENSE file that accompanied this code.
3492
e549cea58864 6840752: Provide out-of-the-box support for ECC algorithms
vinnie
parents:
diff changeset
    10
 *
e549cea58864 6840752: Provide out-of-the-box support for ECC algorithms
vinnie
parents:
diff changeset
    11
 * This code is distributed in the hope that it will be useful, but WITHOUT
e549cea58864 6840752: Provide out-of-the-box support for ECC algorithms
vinnie
parents:
diff changeset
    12
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
e549cea58864 6840752: Provide out-of-the-box support for ECC algorithms
vinnie
parents:
diff changeset
    13
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
e549cea58864 6840752: Provide out-of-the-box support for ECC algorithms
vinnie
parents:
diff changeset
    14
 * version 2 for more details (a copy is included in the LICENSE file that
e549cea58864 6840752: Provide out-of-the-box support for ECC algorithms
vinnie
parents:
diff changeset
    15
 * accompanied this code).
e549cea58864 6840752: Provide out-of-the-box support for ECC algorithms
vinnie
parents:
diff changeset
    16
 *
e549cea58864 6840752: Provide out-of-the-box support for ECC algorithms
vinnie
parents:
diff changeset
    17
 * You should have received a copy of the GNU General Public License version
e549cea58864 6840752: Provide out-of-the-box support for ECC algorithms
vinnie
parents:
diff changeset
    18
 * 2 along with this work; if not, write to the Free Software Foundation,
e549cea58864 6840752: Provide out-of-the-box support for ECC algorithms
vinnie
parents:
diff changeset
    19
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
e549cea58864 6840752: Provide out-of-the-box support for ECC algorithms
vinnie
parents:
diff changeset
    20
 *
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 3863
diff changeset
    21
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 3863
diff changeset
    22
 * or visit www.oracle.com if you need additional information or have any
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 3863
diff changeset
    23
 * questions.
3492
e549cea58864 6840752: Provide out-of-the-box support for ECC algorithms
vinnie
parents:
diff changeset
    24
 */
e549cea58864 6840752: Provide out-of-the-box support for ECC algorithms
vinnie
parents:
diff changeset
    25
e549cea58864 6840752: Provide out-of-the-box support for ECC algorithms
vinnie
parents:
diff changeset
    26
package sun.security.ec;
e549cea58864 6840752: Provide out-of-the-box support for ECC algorithms
vinnie
parents:
diff changeset
    27
e549cea58864 6840752: Provide out-of-the-box support for ECC algorithms
vinnie
parents:
diff changeset
    28
import java.util.Map;
e549cea58864 6840752: Provide out-of-the-box support for ECC algorithms
vinnie
parents:
diff changeset
    29
e549cea58864 6840752: Provide out-of-the-box support for ECC algorithms
vinnie
parents:
diff changeset
    30
/**
e549cea58864 6840752: Provide out-of-the-box support for ECC algorithms
vinnie
parents:
diff changeset
    31
 * Defines the entries of the SunEC provider.
e549cea58864 6840752: Provide out-of-the-box support for ECC algorithms
vinnie
parents:
diff changeset
    32
 *
e549cea58864 6840752: Provide out-of-the-box support for ECC algorithms
vinnie
parents:
diff changeset
    33
 * @since 1.7
e549cea58864 6840752: Provide out-of-the-box support for ECC algorithms
vinnie
parents:
diff changeset
    34
 */
e549cea58864 6840752: Provide out-of-the-box support for ECC algorithms
vinnie
parents:
diff changeset
    35
final class SunECEntries {
e549cea58864 6840752: Provide out-of-the-box support for ECC algorithms
vinnie
parents:
diff changeset
    36
e549cea58864 6840752: Provide out-of-the-box support for ECC algorithms
vinnie
parents:
diff changeset
    37
    private SunECEntries() {
e549cea58864 6840752: Provide out-of-the-box support for ECC algorithms
vinnie
parents:
diff changeset
    38
        // empty
e549cea58864 6840752: Provide out-of-the-box support for ECC algorithms
vinnie
parents:
diff changeset
    39
    }
e549cea58864 6840752: Provide out-of-the-box support for ECC algorithms
vinnie
parents:
diff changeset
    40
3863
8e0f58b1c072 6884175: CR cleanup for 6840752: Provide out-of-the-box support for ECC algorithms
vinnie
parents: 3492
diff changeset
    41
    static void putEntries(Map<Object, Object> map,
8e0f58b1c072 6884175: CR cleanup for 6840752: Provide out-of-the-box support for ECC algorithms
vinnie
parents: 3492
diff changeset
    42
        boolean useFullImplementation) {
8e0f58b1c072 6884175: CR cleanup for 6840752: Provide out-of-the-box support for ECC algorithms
vinnie
parents: 3492
diff changeset
    43
8e0f58b1c072 6884175: CR cleanup for 6840752: Provide out-of-the-box support for ECC algorithms
vinnie
parents: 3492
diff changeset
    44
        /*
8e0f58b1c072 6884175: CR cleanup for 6840752: Provide out-of-the-box support for ECC algorithms
vinnie
parents: 3492
diff changeset
    45
         *  Key Factory engine
8e0f58b1c072 6884175: CR cleanup for 6840752: Provide out-of-the-box support for ECC algorithms
vinnie
parents: 3492
diff changeset
    46
         */
8e0f58b1c072 6884175: CR cleanup for 6840752: Provide out-of-the-box support for ECC algorithms
vinnie
parents: 3492
diff changeset
    47
        map.put("KeyFactory.EC", "sun.security.ec.ECKeyFactory");
8e0f58b1c072 6884175: CR cleanup for 6840752: Provide out-of-the-box support for ECC algorithms
vinnie
parents: 3492
diff changeset
    48
        map.put("Alg.Alias.KeyFactory.EllipticCurve", "EC");
8e0f58b1c072 6884175: CR cleanup for 6840752: Provide out-of-the-box support for ECC algorithms
vinnie
parents: 3492
diff changeset
    49
8e0f58b1c072 6884175: CR cleanup for 6840752: Provide out-of-the-box support for ECC algorithms
vinnie
parents: 3492
diff changeset
    50
        map.put("KeyFactory.EC ImplementedIn", "Software");
8e0f58b1c072 6884175: CR cleanup for 6840752: Provide out-of-the-box support for ECC algorithms
vinnie
parents: 3492
diff changeset
    51
8e0f58b1c072 6884175: CR cleanup for 6840752: Provide out-of-the-box support for ECC algorithms
vinnie
parents: 3492
diff changeset
    52
        /*
8e0f58b1c072 6884175: CR cleanup for 6840752: Provide out-of-the-box support for ECC algorithms
vinnie
parents: 3492
diff changeset
    53
         * Algorithm Parameter engine
8e0f58b1c072 6884175: CR cleanup for 6840752: Provide out-of-the-box support for ECC algorithms
vinnie
parents: 3492
diff changeset
    54
         */
8e0f58b1c072 6884175: CR cleanup for 6840752: Provide out-of-the-box support for ECC algorithms
vinnie
parents: 3492
diff changeset
    55
        map.put("AlgorithmParameters.EC", "sun.security.ec.ECParameters");
8e0f58b1c072 6884175: CR cleanup for 6840752: Provide out-of-the-box support for ECC algorithms
vinnie
parents: 3492
diff changeset
    56
        map.put("Alg.Alias.AlgorithmParameters.EllipticCurve", "EC");
8e0f58b1c072 6884175: CR cleanup for 6840752: Provide out-of-the-box support for ECC algorithms
vinnie
parents: 3492
diff changeset
    57
8e0f58b1c072 6884175: CR cleanup for 6840752: Provide out-of-the-box support for ECC algorithms
vinnie
parents: 3492
diff changeset
    58
        map.put("AlgorithmParameters.EC KeySize", "256");
8e0f58b1c072 6884175: CR cleanup for 6840752: Provide out-of-the-box support for ECC algorithms
vinnie
parents: 3492
diff changeset
    59
8e0f58b1c072 6884175: CR cleanup for 6840752: Provide out-of-the-box support for ECC algorithms
vinnie
parents: 3492
diff changeset
    60
        map.put("AlgorithmParameters.EC ImplementedIn", "Software");
8e0f58b1c072 6884175: CR cleanup for 6840752: Provide out-of-the-box support for ECC algorithms
vinnie
parents: 3492
diff changeset
    61
8e0f58b1c072 6884175: CR cleanup for 6840752: Provide out-of-the-box support for ECC algorithms
vinnie
parents: 3492
diff changeset
    62
        map.put("AlgorithmParameters.EC SupportedCurves",
8e0f58b1c072 6884175: CR cleanup for 6840752: Provide out-of-the-box support for ECC algorithms
vinnie
parents: 3492
diff changeset
    63
8e0f58b1c072 6884175: CR cleanup for 6840752: Provide out-of-the-box support for ECC algorithms
vinnie
parents: 3492
diff changeset
    64
            // A list comprising lists of curve names and object identifiers.
8e0f58b1c072 6884175: CR cleanup for 6840752: Provide out-of-the-box support for ECC algorithms
vinnie
parents: 3492
diff changeset
    65
            // '[' ( <curve-name> ',' )+ <curve-object-identifier> ']' '|'
8e0f58b1c072 6884175: CR cleanup for 6840752: Provide out-of-the-box support for ECC algorithms
vinnie
parents: 3492
diff changeset
    66
8e0f58b1c072 6884175: CR cleanup for 6840752: Provide out-of-the-box support for ECC algorithms
vinnie
parents: 3492
diff changeset
    67
            // SEC 2 prime curves
8e0f58b1c072 6884175: CR cleanup for 6840752: Provide out-of-the-box support for ECC algorithms
vinnie
parents: 3492
diff changeset
    68
            "[secp112r1,1.3.132.0.6]|" +
8e0f58b1c072 6884175: CR cleanup for 6840752: Provide out-of-the-box support for ECC algorithms
vinnie
parents: 3492
diff changeset
    69
            "[secp112r2,1.3.132.0.7]|" +
8e0f58b1c072 6884175: CR cleanup for 6840752: Provide out-of-the-box support for ECC algorithms
vinnie
parents: 3492
diff changeset
    70
            "[secp128r1,1.3.132.0.28]|" +
8e0f58b1c072 6884175: CR cleanup for 6840752: Provide out-of-the-box support for ECC algorithms
vinnie
parents: 3492
diff changeset
    71
            "[secp128r2,1.3.132.0.29]|" +
8e0f58b1c072 6884175: CR cleanup for 6840752: Provide out-of-the-box support for ECC algorithms
vinnie
parents: 3492
diff changeset
    72
            "[secp160k1,1.3.132.0.9]|" +
8e0f58b1c072 6884175: CR cleanup for 6840752: Provide out-of-the-box support for ECC algorithms
vinnie
parents: 3492
diff changeset
    73
            "[secp160r1,1.3.132.0.8]|" +
8e0f58b1c072 6884175: CR cleanup for 6840752: Provide out-of-the-box support for ECC algorithms
vinnie
parents: 3492
diff changeset
    74
            "[secp160r2,1.3.132.0.30]|" +
8e0f58b1c072 6884175: CR cleanup for 6840752: Provide out-of-the-box support for ECC algorithms
vinnie
parents: 3492
diff changeset
    75
            "[secp192k1,1.3.132.0.31]|" +
8e0f58b1c072 6884175: CR cleanup for 6840752: Provide out-of-the-box support for ECC algorithms
vinnie
parents: 3492
diff changeset
    76
            "[secp192r1,NIST P-192,X9.62 prime192v1,1.2.840.10045.3.1.1]|" +
8e0f58b1c072 6884175: CR cleanup for 6840752: Provide out-of-the-box support for ECC algorithms
vinnie
parents: 3492
diff changeset
    77
            "[secp224k1,1.3.132.0.32]|" +
8e0f58b1c072 6884175: CR cleanup for 6840752: Provide out-of-the-box support for ECC algorithms
vinnie
parents: 3492
diff changeset
    78
            "[secp224r1,NIST P-224,1.3.132.0.33]|" +
8e0f58b1c072 6884175: CR cleanup for 6840752: Provide out-of-the-box support for ECC algorithms
vinnie
parents: 3492
diff changeset
    79
            "[secp256k1,1.3.132.0.10]|" +
8e0f58b1c072 6884175: CR cleanup for 6840752: Provide out-of-the-box support for ECC algorithms
vinnie
parents: 3492
diff changeset
    80
            "[secp256r1,NIST P-256,X9.62 prime256v1,1.2.840.10045.3.1.7]|" +
8e0f58b1c072 6884175: CR cleanup for 6840752: Provide out-of-the-box support for ECC algorithms
vinnie
parents: 3492
diff changeset
    81
            "[secp384r1,NIST P-384,1.3.132.0.34]|" +
8e0f58b1c072 6884175: CR cleanup for 6840752: Provide out-of-the-box support for ECC algorithms
vinnie
parents: 3492
diff changeset
    82
            "[secp521r1,NIST P-521,1.3.132.0.35]|" +
8e0f58b1c072 6884175: CR cleanup for 6840752: Provide out-of-the-box support for ECC algorithms
vinnie
parents: 3492
diff changeset
    83
8e0f58b1c072 6884175: CR cleanup for 6840752: Provide out-of-the-box support for ECC algorithms
vinnie
parents: 3492
diff changeset
    84
            // ANSI X9.62 prime curves
8e0f58b1c072 6884175: CR cleanup for 6840752: Provide out-of-the-box support for ECC algorithms
vinnie
parents: 3492
diff changeset
    85
            "[X9.62 prime192v2,1.2.840.10045.3.1.2]|" +
8e0f58b1c072 6884175: CR cleanup for 6840752: Provide out-of-the-box support for ECC algorithms
vinnie
parents: 3492
diff changeset
    86
            "[X9.62 prime192v3,1.2.840.10045.3.1.3]|" +
8e0f58b1c072 6884175: CR cleanup for 6840752: Provide out-of-the-box support for ECC algorithms
vinnie
parents: 3492
diff changeset
    87
            "[X9.62 prime239v1,1.2.840.10045.3.1.4]|" +
8e0f58b1c072 6884175: CR cleanup for 6840752: Provide out-of-the-box support for ECC algorithms
vinnie
parents: 3492
diff changeset
    88
            "[X9.62 prime239v2,1.2.840.10045.3.1.5]|" +
8e0f58b1c072 6884175: CR cleanup for 6840752: Provide out-of-the-box support for ECC algorithms
vinnie
parents: 3492
diff changeset
    89
            "[X9.62 prime239v3,1.2.840.10045.3.1.6]|" +
8e0f58b1c072 6884175: CR cleanup for 6840752: Provide out-of-the-box support for ECC algorithms
vinnie
parents: 3492
diff changeset
    90
8e0f58b1c072 6884175: CR cleanup for 6840752: Provide out-of-the-box support for ECC algorithms
vinnie
parents: 3492
diff changeset
    91
            // SEC 2 binary curves
8e0f58b1c072 6884175: CR cleanup for 6840752: Provide out-of-the-box support for ECC algorithms
vinnie
parents: 3492
diff changeset
    92
            "[sect113r1,1.3.132.0.4]|" +
8e0f58b1c072 6884175: CR cleanup for 6840752: Provide out-of-the-box support for ECC algorithms
vinnie
parents: 3492
diff changeset
    93
            "[sect113r2,1.3.132.0.5]|" +
8e0f58b1c072 6884175: CR cleanup for 6840752: Provide out-of-the-box support for ECC algorithms
vinnie
parents: 3492
diff changeset
    94
            "[sect131r1,1.3.132.0.22]|" +
8e0f58b1c072 6884175: CR cleanup for 6840752: Provide out-of-the-box support for ECC algorithms
vinnie
parents: 3492
diff changeset
    95
            "[sect131r2,1.3.132.0.23]|" +
8e0f58b1c072 6884175: CR cleanup for 6840752: Provide out-of-the-box support for ECC algorithms
vinnie
parents: 3492
diff changeset
    96
            "[sect163k1,NIST K-163,1.3.132.0.1]|" +
8e0f58b1c072 6884175: CR cleanup for 6840752: Provide out-of-the-box support for ECC algorithms
vinnie
parents: 3492
diff changeset
    97
            "[sect163r1,1.3.132.0.2]|" +
8e0f58b1c072 6884175: CR cleanup for 6840752: Provide out-of-the-box support for ECC algorithms
vinnie
parents: 3492
diff changeset
    98
            "[sect163r2,NIST B-163,1.3.132.0.15]|" +
8e0f58b1c072 6884175: CR cleanup for 6840752: Provide out-of-the-box support for ECC algorithms
vinnie
parents: 3492
diff changeset
    99
            "[sect193r1,1.3.132.0.24]|" +
8e0f58b1c072 6884175: CR cleanup for 6840752: Provide out-of-the-box support for ECC algorithms
vinnie
parents: 3492
diff changeset
   100
            "[sect193r2,1.3.132.0.25]|" +
8e0f58b1c072 6884175: CR cleanup for 6840752: Provide out-of-the-box support for ECC algorithms
vinnie
parents: 3492
diff changeset
   101
            "[sect233k1,NIST K-233,1.3.132.0.26]|" +
8e0f58b1c072 6884175: CR cleanup for 6840752: Provide out-of-the-box support for ECC algorithms
vinnie
parents: 3492
diff changeset
   102
            "[sect233r1,NIST B-233,1.3.132.0.27]|" +
8e0f58b1c072 6884175: CR cleanup for 6840752: Provide out-of-the-box support for ECC algorithms
vinnie
parents: 3492
diff changeset
   103
            "[sect239k1,1.3.132.0.3]|" +
8e0f58b1c072 6884175: CR cleanup for 6840752: Provide out-of-the-box support for ECC algorithms
vinnie
parents: 3492
diff changeset
   104
            "[sect283k1,NIST K-283,1.3.132.0.16]|" +
8e0f58b1c072 6884175: CR cleanup for 6840752: Provide out-of-the-box support for ECC algorithms
vinnie
parents: 3492
diff changeset
   105
            "[sect283r1,NIST B-283,1.3.132.0.17]|" +
8e0f58b1c072 6884175: CR cleanup for 6840752: Provide out-of-the-box support for ECC algorithms
vinnie
parents: 3492
diff changeset
   106
            "[sect409k1,NIST K-409,1.3.132.0.36]|" +
8e0f58b1c072 6884175: CR cleanup for 6840752: Provide out-of-the-box support for ECC algorithms
vinnie
parents: 3492
diff changeset
   107
            "[sect409r1,NIST B-409,1.3.132.0.37]|" +
8e0f58b1c072 6884175: CR cleanup for 6840752: Provide out-of-the-box support for ECC algorithms
vinnie
parents: 3492
diff changeset
   108
            "[sect571k1,NIST K-571,1.3.132.0.38]|" +
8e0f58b1c072 6884175: CR cleanup for 6840752: Provide out-of-the-box support for ECC algorithms
vinnie
parents: 3492
diff changeset
   109
            "[sect571r1,NIST B-571,1.3.132.0.39]|" +
8e0f58b1c072 6884175: CR cleanup for 6840752: Provide out-of-the-box support for ECC algorithms
vinnie
parents: 3492
diff changeset
   110
8e0f58b1c072 6884175: CR cleanup for 6840752: Provide out-of-the-box support for ECC algorithms
vinnie
parents: 3492
diff changeset
   111
            // ANSI X9.62 binary curves
8e0f58b1c072 6884175: CR cleanup for 6840752: Provide out-of-the-box support for ECC algorithms
vinnie
parents: 3492
diff changeset
   112
            "[X9.62 c2tnb191v1,1.2.840.10045.3.0.5]|" +
8e0f58b1c072 6884175: CR cleanup for 6840752: Provide out-of-the-box support for ECC algorithms
vinnie
parents: 3492
diff changeset
   113
            "[X9.62 c2tnb191v2,1.2.840.10045.3.0.6]|" +
8e0f58b1c072 6884175: CR cleanup for 6840752: Provide out-of-the-box support for ECC algorithms
vinnie
parents: 3492
diff changeset
   114
            "[X9.62 c2tnb191v3,1.2.840.10045.3.0.7]|" +
8e0f58b1c072 6884175: CR cleanup for 6840752: Provide out-of-the-box support for ECC algorithms
vinnie
parents: 3492
diff changeset
   115
            "[X9.62 c2tnb239v1,1.2.840.10045.3.0.11]|" +
8e0f58b1c072 6884175: CR cleanup for 6840752: Provide out-of-the-box support for ECC algorithms
vinnie
parents: 3492
diff changeset
   116
            "[X9.62 c2tnb239v2,1.2.840.10045.3.0.12]|" +
8e0f58b1c072 6884175: CR cleanup for 6840752: Provide out-of-the-box support for ECC algorithms
vinnie
parents: 3492
diff changeset
   117
            "[X9.62 c2tnb239v3,1.2.840.10045.3.0.13]|" +
8e0f58b1c072 6884175: CR cleanup for 6840752: Provide out-of-the-box support for ECC algorithms
vinnie
parents: 3492
diff changeset
   118
            "[X9.62 c2tnb359v1,1.2.840.10045.3.0.18]|" +
8e0f58b1c072 6884175: CR cleanup for 6840752: Provide out-of-the-box support for ECC algorithms
vinnie
parents: 3492
diff changeset
   119
            "[X9.62 c2tnb431r1,1.2.840.10045.3.0.20]");
8e0f58b1c072 6884175: CR cleanup for 6840752: Provide out-of-the-box support for ECC algorithms
vinnie
parents: 3492
diff changeset
   120
8e0f58b1c072 6884175: CR cleanup for 6840752: Provide out-of-the-box support for ECC algorithms
vinnie
parents: 3492
diff changeset
   121
        /*
8e0f58b1c072 6884175: CR cleanup for 6840752: Provide out-of-the-box support for ECC algorithms
vinnie
parents: 3492
diff changeset
   122
         * Register the algorithms below only when the full ECC implementation
8e0f58b1c072 6884175: CR cleanup for 6840752: Provide out-of-the-box support for ECC algorithms
vinnie
parents: 3492
diff changeset
   123
         * is available
8e0f58b1c072 6884175: CR cleanup for 6840752: Provide out-of-the-box support for ECC algorithms
vinnie
parents: 3492
diff changeset
   124
         */
8e0f58b1c072 6884175: CR cleanup for 6840752: Provide out-of-the-box support for ECC algorithms
vinnie
parents: 3492
diff changeset
   125
        if (!useFullImplementation) {
8e0f58b1c072 6884175: CR cleanup for 6840752: Provide out-of-the-box support for ECC algorithms
vinnie
parents: 3492
diff changeset
   126
            return;
8e0f58b1c072 6884175: CR cleanup for 6840752: Provide out-of-the-box support for ECC algorithms
vinnie
parents: 3492
diff changeset
   127
        }
3492
e549cea58864 6840752: Provide out-of-the-box support for ECC algorithms
vinnie
parents:
diff changeset
   128
e549cea58864 6840752: Provide out-of-the-box support for ECC algorithms
vinnie
parents:
diff changeset
   129
        /*
e549cea58864 6840752: Provide out-of-the-box support for ECC algorithms
vinnie
parents:
diff changeset
   130
         * Signature engines
e549cea58864 6840752: Provide out-of-the-box support for ECC algorithms
vinnie
parents:
diff changeset
   131
         */
e549cea58864 6840752: Provide out-of-the-box support for ECC algorithms
vinnie
parents:
diff changeset
   132
        map.put("Signature.NONEwithECDSA",
e549cea58864 6840752: Provide out-of-the-box support for ECC algorithms
vinnie
parents:
diff changeset
   133
            "sun.security.ec.ECDSASignature$Raw");
e549cea58864 6840752: Provide out-of-the-box support for ECC algorithms
vinnie
parents:
diff changeset
   134
        map.put("Signature.SHA1withECDSA",
e549cea58864 6840752: Provide out-of-the-box support for ECC algorithms
vinnie
parents:
diff changeset
   135
            "sun.security.ec.ECDSASignature$SHA1");
12685
8a448b5b9006 4963723: Implement SHA-224
valeriep
parents: 5506
diff changeset
   136
        map.put("Signature.SHA224withECDSA",
8a448b5b9006 4963723: Implement SHA-224
valeriep
parents: 5506
diff changeset
   137
            "sun.security.ec.ECDSASignature$SHA224");
8a448b5b9006 4963723: Implement SHA-224
valeriep
parents: 5506
diff changeset
   138
        map.put("Alg.Alias.Signature.OID.1.2.840.10045.4.3.1", "SHA224withECDSA");
8a448b5b9006 4963723: Implement SHA-224
valeriep
parents: 5506
diff changeset
   139
        map.put("Alg.Alias.Signature.1.2.840.10045.4.3.1", "SHA224withECDSA");
8a448b5b9006 4963723: Implement SHA-224
valeriep
parents: 5506
diff changeset
   140
3492
e549cea58864 6840752: Provide out-of-the-box support for ECC algorithms
vinnie
parents:
diff changeset
   141
        map.put("Signature.SHA256withECDSA",
e549cea58864 6840752: Provide out-of-the-box support for ECC algorithms
vinnie
parents:
diff changeset
   142
            "sun.security.ec.ECDSASignature$SHA256");
12685
8a448b5b9006 4963723: Implement SHA-224
valeriep
parents: 5506
diff changeset
   143
        map.put("Alg.Alias.Signature.OID.1.2.840.10045.4.3.2", "SHA256withECDSA");
8a448b5b9006 4963723: Implement SHA-224
valeriep
parents: 5506
diff changeset
   144
        map.put("Alg.Alias.Signature.1.2.840.10045.4.3.2", "SHA256withECDSA");
8a448b5b9006 4963723: Implement SHA-224
valeriep
parents: 5506
diff changeset
   145
3492
e549cea58864 6840752: Provide out-of-the-box support for ECC algorithms
vinnie
parents:
diff changeset
   146
        map.put("Signature.SHA384withECDSA",
e549cea58864 6840752: Provide out-of-the-box support for ECC algorithms
vinnie
parents:
diff changeset
   147
            "sun.security.ec.ECDSASignature$SHA384");
12685
8a448b5b9006 4963723: Implement SHA-224
valeriep
parents: 5506
diff changeset
   148
        map.put("Alg.Alias.Signature.OID.1.2.840.10045.4.3.3", "SHA384withECDSA");
8a448b5b9006 4963723: Implement SHA-224
valeriep
parents: 5506
diff changeset
   149
        map.put("Alg.Alias.Signature.1.2.840.10045.4.3.3", "SHA384withECDSA");
8a448b5b9006 4963723: Implement SHA-224
valeriep
parents: 5506
diff changeset
   150
3492
e549cea58864 6840752: Provide out-of-the-box support for ECC algorithms
vinnie
parents:
diff changeset
   151
        map.put("Signature.SHA512withECDSA",
e549cea58864 6840752: Provide out-of-the-box support for ECC algorithms
vinnie
parents:
diff changeset
   152
            "sun.security.ec.ECDSASignature$SHA512");
12685
8a448b5b9006 4963723: Implement SHA-224
valeriep
parents: 5506
diff changeset
   153
        map.put("Alg.Alias.Signature.OID.1.2.840.10045.4.3.4", "SHA512withECDSA");
8a448b5b9006 4963723: Implement SHA-224
valeriep
parents: 5506
diff changeset
   154
        map.put("Alg.Alias.Signature.1.2.840.10045.4.3.4", "SHA512withECDSA");
3492
e549cea58864 6840752: Provide out-of-the-box support for ECC algorithms
vinnie
parents:
diff changeset
   155
e549cea58864 6840752: Provide out-of-the-box support for ECC algorithms
vinnie
parents:
diff changeset
   156
        String ecKeyClasses = "java.security.interfaces.ECPublicKey" +
e549cea58864 6840752: Provide out-of-the-box support for ECC algorithms
vinnie
parents:
diff changeset
   157
                "|java.security.interfaces.ECPrivateKey";
e549cea58864 6840752: Provide out-of-the-box support for ECC algorithms
vinnie
parents:
diff changeset
   158
        map.put("Signature.NONEwithECDSA SupportedKeyClasses", ecKeyClasses);
e549cea58864 6840752: Provide out-of-the-box support for ECC algorithms
vinnie
parents:
diff changeset
   159
        map.put("Signature.SHA1withECDSA SupportedKeyClasses", ecKeyClasses);
12685
8a448b5b9006 4963723: Implement SHA-224
valeriep
parents: 5506
diff changeset
   160
        map.put("Signature.SHA224withECDSA SupportedKeyClasses", ecKeyClasses);
3492
e549cea58864 6840752: Provide out-of-the-box support for ECC algorithms
vinnie
parents:
diff changeset
   161
        map.put("Signature.SHA256withECDSA SupportedKeyClasses", ecKeyClasses);
e549cea58864 6840752: Provide out-of-the-box support for ECC algorithms
vinnie
parents:
diff changeset
   162
        map.put("Signature.SHA384withECDSA SupportedKeyClasses", ecKeyClasses);
e549cea58864 6840752: Provide out-of-the-box support for ECC algorithms
vinnie
parents:
diff changeset
   163
        map.put("Signature.SHA512withECDSA SupportedKeyClasses", ecKeyClasses);
e549cea58864 6840752: Provide out-of-the-box support for ECC algorithms
vinnie
parents:
diff changeset
   164
3863
8e0f58b1c072 6884175: CR cleanup for 6840752: Provide out-of-the-box support for ECC algorithms
vinnie
parents: 3492
diff changeset
   165
        map.put("Signature.SHA1withECDSA KeySize", "256");
8e0f58b1c072 6884175: CR cleanup for 6840752: Provide out-of-the-box support for ECC algorithms
vinnie
parents: 3492
diff changeset
   166
8e0f58b1c072 6884175: CR cleanup for 6840752: Provide out-of-the-box support for ECC algorithms
vinnie
parents: 3492
diff changeset
   167
        map.put("Signature.NONEwithECDSA ImplementedIn", "Software");
8e0f58b1c072 6884175: CR cleanup for 6840752: Provide out-of-the-box support for ECC algorithms
vinnie
parents: 3492
diff changeset
   168
        map.put("Signature.SHA1withECDSA ImplementedIn", "Software");
12685
8a448b5b9006 4963723: Implement SHA-224
valeriep
parents: 5506
diff changeset
   169
        map.put("Signature.SHA224withECDSA ImplementedIn", "Software");
3863
8e0f58b1c072 6884175: CR cleanup for 6840752: Provide out-of-the-box support for ECC algorithms
vinnie
parents: 3492
diff changeset
   170
        map.put("Signature.SHA256withECDSA ImplementedIn", "Software");
8e0f58b1c072 6884175: CR cleanup for 6840752: Provide out-of-the-box support for ECC algorithms
vinnie
parents: 3492
diff changeset
   171
        map.put("Signature.SHA384withECDSA ImplementedIn", "Software");
8e0f58b1c072 6884175: CR cleanup for 6840752: Provide out-of-the-box support for ECC algorithms
vinnie
parents: 3492
diff changeset
   172
        map.put("Signature.SHA512withECDSA ImplementedIn", "Software");
8e0f58b1c072 6884175: CR cleanup for 6840752: Provide out-of-the-box support for ECC algorithms
vinnie
parents: 3492
diff changeset
   173
3492
e549cea58864 6840752: Provide out-of-the-box support for ECC algorithms
vinnie
parents:
diff changeset
   174
        /*
e549cea58864 6840752: Provide out-of-the-box support for ECC algorithms
vinnie
parents:
diff changeset
   175
         *  Key Pair Generator engine
e549cea58864 6840752: Provide out-of-the-box support for ECC algorithms
vinnie
parents:
diff changeset
   176
         */
e549cea58864 6840752: Provide out-of-the-box support for ECC algorithms
vinnie
parents:
diff changeset
   177
        map.put("KeyPairGenerator.EC", "sun.security.ec.ECKeyPairGenerator");
e549cea58864 6840752: Provide out-of-the-box support for ECC algorithms
vinnie
parents:
diff changeset
   178
        map.put("Alg.Alias.KeyPairGenerator.EllipticCurve", "EC");
e549cea58864 6840752: Provide out-of-the-box support for ECC algorithms
vinnie
parents:
diff changeset
   179
3863
8e0f58b1c072 6884175: CR cleanup for 6840752: Provide out-of-the-box support for ECC algorithms
vinnie
parents: 3492
diff changeset
   180
        map.put("KeyPairGenerator.EC KeySize", "256");
3492
e549cea58864 6840752: Provide out-of-the-box support for ECC algorithms
vinnie
parents:
diff changeset
   181
3863
8e0f58b1c072 6884175: CR cleanup for 6840752: Provide out-of-the-box support for ECC algorithms
vinnie
parents: 3492
diff changeset
   182
        map.put("KeyPairGenerator.EC ImplementedIn", "Software");
3492
e549cea58864 6840752: Provide out-of-the-box support for ECC algorithms
vinnie
parents:
diff changeset
   183
e549cea58864 6840752: Provide out-of-the-box support for ECC algorithms
vinnie
parents:
diff changeset
   184
        /*
e549cea58864 6840752: Provide out-of-the-box support for ECC algorithms
vinnie
parents:
diff changeset
   185
         * Key Agreement engine
e549cea58864 6840752: Provide out-of-the-box support for ECC algorithms
vinnie
parents:
diff changeset
   186
         */
e549cea58864 6840752: Provide out-of-the-box support for ECC algorithms
vinnie
parents:
diff changeset
   187
        map.put("KeyAgreement.ECDH", "sun.security.ec.ECDHKeyAgreement");
3863
8e0f58b1c072 6884175: CR cleanup for 6840752: Provide out-of-the-box support for ECC algorithms
vinnie
parents: 3492
diff changeset
   188
3492
e549cea58864 6840752: Provide out-of-the-box support for ECC algorithms
vinnie
parents:
diff changeset
   189
        map.put("KeyAgreement.ECDH SupportedKeyClasses", ecKeyClasses);
e549cea58864 6840752: Provide out-of-the-box support for ECC algorithms
vinnie
parents:
diff changeset
   190
e549cea58864 6840752: Provide out-of-the-box support for ECC algorithms
vinnie
parents:
diff changeset
   191
        map.put("KeyAgreement.ECDH ImplementedIn", "Software");
e549cea58864 6840752: Provide out-of-the-box support for ECC algorithms
vinnie
parents:
diff changeset
   192
    }
e549cea58864 6840752: Provide out-of-the-box support for ECC algorithms
vinnie
parents:
diff changeset
   193
}