jdk/test/java/security/KeyRep/Serial.java
author amurillo
Wed, 15 Aug 2012 16:49:38 -0700
changeset 13465 d3fc5d192448
parent 5506 202f599c92aa
child 27260 8d82d0e9556b
permissions -rw-r--r--
7191765: make jdk8 the default jprt release for hs24 Reviewed-by: jcoomes
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     1
/*
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2
diff changeset
     2
 * Copyright (c) 2003, 2004, Oracle and/or its affiliates. All rights reserved.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
90ce3da70b43 Initial load
duke
parents:
diff changeset
     4
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
90ce3da70b43 Initial load
duke
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
90ce3da70b43 Initial load
duke
parents:
diff changeset
     7
 * published by the Free Software Foundation.
90ce3da70b43 Initial load
duke
parents:
diff changeset
     8
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
     9
 * This code is distributed in the hope that it will be useful, but WITHOUT
90ce3da70b43 Initial load
duke
parents:
diff changeset
    10
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
90ce3da70b43 Initial load
duke
parents:
diff changeset
    11
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
90ce3da70b43 Initial load
duke
parents:
diff changeset
    12
 * version 2 for more details (a copy is included in the LICENSE file that
90ce3da70b43 Initial load
duke
parents:
diff changeset
    13
 * accompanied this code).
90ce3da70b43 Initial load
duke
parents:
diff changeset
    14
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    15
 * You should have received a copy of the GNU General Public License version
90ce3da70b43 Initial load
duke
parents:
diff changeset
    16
 * 2 along with this work; if not, write to the Free Software Foundation,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    17
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    18
 *
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2
diff changeset
    19
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2
diff changeset
    20
 * or visit www.oracle.com if you need additional information or have any
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2
diff changeset
    21
 * questions.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    22
 */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    23
90ce3da70b43 Initial load
duke
parents:
diff changeset
    24
/*
90ce3da70b43 Initial load
duke
parents:
diff changeset
    25
 * @test
90ce3da70b43 Initial load
duke
parents:
diff changeset
    26
 * @bug 4532506 4999599
90ce3da70b43 Initial load
duke
parents:
diff changeset
    27
 * @summary Serializing KeyPair on one VM (Sun),
90ce3da70b43 Initial load
duke
parents:
diff changeset
    28
 *      and Deserializing on another (IBM) fails
90ce3da70b43 Initial load
duke
parents:
diff changeset
    29
 * @run main/othervm/policy=Serial.policy Serial
90ce3da70b43 Initial load
duke
parents:
diff changeset
    30
 */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    31
90ce3da70b43 Initial load
duke
parents:
diff changeset
    32
import java.io.*;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    33
import java.math.BigInteger;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    34
import java.security.*;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    35
import javax.crypto.*;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    36
import javax.crypto.spec.*;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    37
90ce3da70b43 Initial load
duke
parents:
diff changeset
    38
public class Serial {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    39
90ce3da70b43 Initial load
duke
parents:
diff changeset
    40
    // providers
90ce3da70b43 Initial load
duke
parents:
diff changeset
    41
    private static final String SUN = "SUN";
90ce3da70b43 Initial load
duke
parents:
diff changeset
    42
    private static final String RSA = "SunRsaSign";
90ce3da70b43 Initial load
duke
parents:
diff changeset
    43
    private static final String JCE = "SunJCE";
90ce3da70b43 Initial load
duke
parents:
diff changeset
    44
90ce3da70b43 Initial load
duke
parents:
diff changeset
    45
    public static void main(String[] args) throws Exception {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    46
90ce3da70b43 Initial load
duke
parents:
diff changeset
    47
        // generate DSA key pair
90ce3da70b43 Initial load
duke
parents:
diff changeset
    48
        KeyPairGenerator kpg = KeyPairGenerator.getInstance("DSA", SUN);
90ce3da70b43 Initial load
duke
parents:
diff changeset
    49
        kpg.initialize(512);
90ce3da70b43 Initial load
duke
parents:
diff changeset
    50
        KeyPair dsaKp = kpg.genKeyPair();
90ce3da70b43 Initial load
duke
parents:
diff changeset
    51
90ce3da70b43 Initial load
duke
parents:
diff changeset
    52
        // serialize DSA key pair
90ce3da70b43 Initial load
duke
parents:
diff changeset
    53
        ByteArrayOutputStream baos = new ByteArrayOutputStream();
90ce3da70b43 Initial load
duke
parents:
diff changeset
    54
        ObjectOutputStream oos = new ObjectOutputStream(baos);
90ce3da70b43 Initial load
duke
parents:
diff changeset
    55
        oos.writeObject(dsaKp);
90ce3da70b43 Initial load
duke
parents:
diff changeset
    56
        oos.close();
90ce3da70b43 Initial load
duke
parents:
diff changeset
    57
90ce3da70b43 Initial load
duke
parents:
diff changeset
    58
        // deserialize DSA key pair
90ce3da70b43 Initial load
duke
parents:
diff changeset
    59
        ObjectInputStream ois = new ObjectInputStream
90ce3da70b43 Initial load
duke
parents:
diff changeset
    60
                        (new ByteArrayInputStream(baos.toByteArray()));
90ce3da70b43 Initial load
duke
parents:
diff changeset
    61
        KeyPair dsaKp2 = (KeyPair)ois.readObject();
90ce3da70b43 Initial load
duke
parents:
diff changeset
    62
        ois.close();
90ce3da70b43 Initial load
duke
parents:
diff changeset
    63
90ce3da70b43 Initial load
duke
parents:
diff changeset
    64
        if (!dsaKp2.getPublic().equals(dsaKp.getPublic()) ||
90ce3da70b43 Initial load
duke
parents:
diff changeset
    65
            !dsaKp2.getPrivate().equals(dsaKp.getPrivate())) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    66
            throw new SecurityException("DSA test failed");
90ce3da70b43 Initial load
duke
parents:
diff changeset
    67
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
    68
90ce3da70b43 Initial load
duke
parents:
diff changeset
    69
        // generate RSA key pair
90ce3da70b43 Initial load
duke
parents:
diff changeset
    70
        kpg = KeyPairGenerator.getInstance("RSA", RSA);
90ce3da70b43 Initial load
duke
parents:
diff changeset
    71
        kpg.initialize(512);
90ce3da70b43 Initial load
duke
parents:
diff changeset
    72
        KeyPair rsaKp = kpg.genKeyPair();
90ce3da70b43 Initial load
duke
parents:
diff changeset
    73
90ce3da70b43 Initial load
duke
parents:
diff changeset
    74
        // serialize RSA key pair
90ce3da70b43 Initial load
duke
parents:
diff changeset
    75
        baos.reset();
90ce3da70b43 Initial load
duke
parents:
diff changeset
    76
        oos = new ObjectOutputStream(baos);
90ce3da70b43 Initial load
duke
parents:
diff changeset
    77
        oos.writeObject(rsaKp);
90ce3da70b43 Initial load
duke
parents:
diff changeset
    78
        oos.close();
90ce3da70b43 Initial load
duke
parents:
diff changeset
    79
90ce3da70b43 Initial load
duke
parents:
diff changeset
    80
        // deserialize RSA key pair
90ce3da70b43 Initial load
duke
parents:
diff changeset
    81
        ois = new ObjectInputStream
90ce3da70b43 Initial load
duke
parents:
diff changeset
    82
                        (new ByteArrayInputStream(baos.toByteArray()));
90ce3da70b43 Initial load
duke
parents:
diff changeset
    83
        KeyPair rsaKp2 = (KeyPair)ois.readObject();
90ce3da70b43 Initial load
duke
parents:
diff changeset
    84
        ois.close();
90ce3da70b43 Initial load
duke
parents:
diff changeset
    85
90ce3da70b43 Initial load
duke
parents:
diff changeset
    86
        if (!rsaKp2.getPublic().equals(rsaKp.getPublic()) ||
90ce3da70b43 Initial load
duke
parents:
diff changeset
    87
            !rsaKp2.getPrivate().equals(rsaKp.getPrivate())) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    88
            throw new SecurityException("RSA test failed");
90ce3da70b43 Initial load
duke
parents:
diff changeset
    89
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
    90
90ce3da70b43 Initial load
duke
parents:
diff changeset
    91
        // exclude test is ECF provider is installed, see 4923290
90ce3da70b43 Initial load
duke
parents:
diff changeset
    92
        if (Security.getProvider("SunPKCS11-Solaris") == null) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    93
            // generate DH key pair
90ce3da70b43 Initial load
duke
parents:
diff changeset
    94
            kpg = KeyPairGenerator.getInstance("DiffieHellman", JCE);
90ce3da70b43 Initial load
duke
parents:
diff changeset
    95
            kpg.initialize(new DHParameterSpec(skip1024Modulus, skip1024Base));
90ce3da70b43 Initial load
duke
parents:
diff changeset
    96
            KeyPair dhKp = kpg.genKeyPair();
90ce3da70b43 Initial load
duke
parents:
diff changeset
    97
90ce3da70b43 Initial load
duke
parents:
diff changeset
    98
            // serialize DH key pair
90ce3da70b43 Initial load
duke
parents:
diff changeset
    99
            baos.reset();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   100
            oos = new ObjectOutputStream(baos);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   101
            oos.writeObject(dhKp);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   102
            oos.close();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   103
90ce3da70b43 Initial load
duke
parents:
diff changeset
   104
            // deserialize DH key pair
90ce3da70b43 Initial load
duke
parents:
diff changeset
   105
            ois = new ObjectInputStream
90ce3da70b43 Initial load
duke
parents:
diff changeset
   106
                            (new ByteArrayInputStream(baos.toByteArray()));
90ce3da70b43 Initial load
duke
parents:
diff changeset
   107
            KeyPair dhKp2 = (KeyPair)ois.readObject();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   108
            ois.close();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   109
90ce3da70b43 Initial load
duke
parents:
diff changeset
   110
            if (!dhKp2.getPublic().equals(dhKp.getPublic()) ||
90ce3da70b43 Initial load
duke
parents:
diff changeset
   111
                !dhKp2.getPrivate().equals(dhKp.getPrivate())) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   112
                throw new SecurityException("DH test failed");
90ce3da70b43 Initial load
duke
parents:
diff changeset
   113
            }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   114
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   115
90ce3da70b43 Initial load
duke
parents:
diff changeset
   116
        // generate RC5 key
90ce3da70b43 Initial load
duke
parents:
diff changeset
   117
        SecretKeySpec rc5Key = new SecretKeySpec(new byte[128], "RC5");
90ce3da70b43 Initial load
duke
parents:
diff changeset
   118
90ce3da70b43 Initial load
duke
parents:
diff changeset
   119
        // serialize RC5 key
90ce3da70b43 Initial load
duke
parents:
diff changeset
   120
        baos.reset();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   121
        oos = new ObjectOutputStream(baos);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   122
        oos.writeObject(rc5Key);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   123
        oos.close();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   124
90ce3da70b43 Initial load
duke
parents:
diff changeset
   125
        // deserialize RC5 key
90ce3da70b43 Initial load
duke
parents:
diff changeset
   126
        ois = new ObjectInputStream
90ce3da70b43 Initial load
duke
parents:
diff changeset
   127
                        (new ByteArrayInputStream(baos.toByteArray()));
90ce3da70b43 Initial load
duke
parents:
diff changeset
   128
        SecretKey rc5Key2 = (SecretKey)ois.readObject();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   129
        ois.close();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   130
90ce3da70b43 Initial load
duke
parents:
diff changeset
   131
        if (!rc5Key.equals(rc5Key2)) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   132
            throw new SecurityException("RC5 test failed");
90ce3da70b43 Initial load
duke
parents:
diff changeset
   133
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   134
90ce3da70b43 Initial load
duke
parents:
diff changeset
   135
        // generate PBE key
90ce3da70b43 Initial load
duke
parents:
diff changeset
   136
90ce3da70b43 Initial load
duke
parents:
diff changeset
   137
        // Salt
90ce3da70b43 Initial load
duke
parents:
diff changeset
   138
        byte[] salt = {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   139
                (byte)0xc7, (byte)0x73, (byte)0x21, (byte)0x8c,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   140
                (byte)0x7e, (byte)0xc8, (byte)0xee, (byte)0x99
90ce3da70b43 Initial load
duke
parents:
diff changeset
   141
        };
90ce3da70b43 Initial load
duke
parents:
diff changeset
   142
90ce3da70b43 Initial load
duke
parents:
diff changeset
   143
        // Iteration count
90ce3da70b43 Initial load
duke
parents:
diff changeset
   144
        int count = 20;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   145
90ce3da70b43 Initial load
duke
parents:
diff changeset
   146
        // Create PBE parameter set
90ce3da70b43 Initial load
duke
parents:
diff changeset
   147
        PBEParameterSpec pbeParamSpec = new PBEParameterSpec(salt, count);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   148
90ce3da70b43 Initial load
duke
parents:
diff changeset
   149
        char[] password = new char[] {'f', 'o', 'o'};
90ce3da70b43 Initial load
duke
parents:
diff changeset
   150
        PBEKeySpec pbeKeySpec = new PBEKeySpec(password);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   151
        SecretKeyFactory keyFac =
90ce3da70b43 Initial load
duke
parents:
diff changeset
   152
                        SecretKeyFactory.getInstance("PBEWithMD5AndDES", JCE);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   153
        SecretKey pbeKey = keyFac.generateSecret(pbeKeySpec);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   154
90ce3da70b43 Initial load
duke
parents:
diff changeset
   155
        // serialize PBE key
90ce3da70b43 Initial load
duke
parents:
diff changeset
   156
        baos.reset();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   157
        oos = new ObjectOutputStream(baos);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   158
        oos.writeObject(pbeKey);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   159
        oos.close();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   160
90ce3da70b43 Initial load
duke
parents:
diff changeset
   161
        // deserialize PBE key
90ce3da70b43 Initial load
duke
parents:
diff changeset
   162
        ois = new ObjectInputStream
90ce3da70b43 Initial load
duke
parents:
diff changeset
   163
                        (new ByteArrayInputStream(baos.toByteArray()));
90ce3da70b43 Initial load
duke
parents:
diff changeset
   164
        SecretKey pbeKey2 = (SecretKey)ois.readObject();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   165
        ois.close();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   166
90ce3da70b43 Initial load
duke
parents:
diff changeset
   167
        if (!pbeKey.equals(pbeKey2)) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   168
            throw new SecurityException("PBE test failed");
90ce3da70b43 Initial load
duke
parents:
diff changeset
   169
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   170
90ce3da70b43 Initial load
duke
parents:
diff changeset
   171
        checkKey("AES", 128);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   172
        checkKey("Blowfish", -1);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   173
        checkKey("DES", 56);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   174
        checkKey("DESede", 168);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   175
        checkKey("HmacMD5", -1);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   176
        checkKey("HmacSHA1", -1);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   177
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   178
90ce3da70b43 Initial load
duke
parents:
diff changeset
   179
    private static void checkKey(String algorithm, int size) throws Exception {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   180
        // generate key
90ce3da70b43 Initial load
duke
parents:
diff changeset
   181
        KeyGenerator kg = KeyGenerator.getInstance(algorithm, JCE);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   182
        if (size > 0) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   183
            kg.init(size);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   184
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   185
        SecretKey key = kg.generateKey();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   186
90ce3da70b43 Initial load
duke
parents:
diff changeset
   187
        // serialize key
90ce3da70b43 Initial load
duke
parents:
diff changeset
   188
        ByteArrayOutputStream baos = new ByteArrayOutputStream();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   189
        ObjectOutputStream oos = new ObjectOutputStream(baos);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   190
        oos.writeObject(key);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   191
        oos.close();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   192
90ce3da70b43 Initial load
duke
parents:
diff changeset
   193
        // deserialize key
90ce3da70b43 Initial load
duke
parents:
diff changeset
   194
        ObjectInputStream ois = new ObjectInputStream
90ce3da70b43 Initial load
duke
parents:
diff changeset
   195
                                (new ByteArrayInputStream(baos.toByteArray()));
90ce3da70b43 Initial load
duke
parents:
diff changeset
   196
        SecretKey key2 = (SecretKey)ois.readObject();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   197
        ois.close();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   198
90ce3da70b43 Initial load
duke
parents:
diff changeset
   199
        if (!key.equals(key2)) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   200
            throw new SecurityException(algorithm + " test failed");
90ce3da70b43 Initial load
duke
parents:
diff changeset
   201
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   202
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   203
90ce3da70b43 Initial load
duke
parents:
diff changeset
   204
    // The 1024 bit Diffie-Hellman modulus values used by SKIP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   205
    private static final byte skip1024ModulusBytes[] = {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   206
        (byte)0xF4, (byte)0x88, (byte)0xFD, (byte)0x58,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   207
        (byte)0x4E, (byte)0x49, (byte)0xDB, (byte)0xCD,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   208
        (byte)0x20, (byte)0xB4, (byte)0x9D, (byte)0xE4,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   209
        (byte)0x91, (byte)0x07, (byte)0x36, (byte)0x6B,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   210
        (byte)0x33, (byte)0x6C, (byte)0x38, (byte)0x0D,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   211
        (byte)0x45, (byte)0x1D, (byte)0x0F, (byte)0x7C,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   212
        (byte)0x88, (byte)0xB3, (byte)0x1C, (byte)0x7C,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   213
        (byte)0x5B, (byte)0x2D, (byte)0x8E, (byte)0xF6,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   214
        (byte)0xF3, (byte)0xC9, (byte)0x23, (byte)0xC0,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   215
        (byte)0x43, (byte)0xF0, (byte)0xA5, (byte)0x5B,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   216
        (byte)0x18, (byte)0x8D, (byte)0x8E, (byte)0xBB,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   217
        (byte)0x55, (byte)0x8C, (byte)0xB8, (byte)0x5D,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   218
        (byte)0x38, (byte)0xD3, (byte)0x34, (byte)0xFD,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   219
        (byte)0x7C, (byte)0x17, (byte)0x57, (byte)0x43,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   220
        (byte)0xA3, (byte)0x1D, (byte)0x18, (byte)0x6C,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   221
        (byte)0xDE, (byte)0x33, (byte)0x21, (byte)0x2C,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   222
        (byte)0xB5, (byte)0x2A, (byte)0xFF, (byte)0x3C,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   223
        (byte)0xE1, (byte)0xB1, (byte)0x29, (byte)0x40,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   224
        (byte)0x18, (byte)0x11, (byte)0x8D, (byte)0x7C,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   225
        (byte)0x84, (byte)0xA7, (byte)0x0A, (byte)0x72,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   226
        (byte)0xD6, (byte)0x86, (byte)0xC4, (byte)0x03,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   227
        (byte)0x19, (byte)0xC8, (byte)0x07, (byte)0x29,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   228
        (byte)0x7A, (byte)0xCA, (byte)0x95, (byte)0x0C,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   229
        (byte)0xD9, (byte)0x96, (byte)0x9F, (byte)0xAB,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   230
        (byte)0xD0, (byte)0x0A, (byte)0x50, (byte)0x9B,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   231
        (byte)0x02, (byte)0x46, (byte)0xD3, (byte)0x08,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   232
        (byte)0x3D, (byte)0x66, (byte)0xA4, (byte)0x5D,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   233
        (byte)0x41, (byte)0x9F, (byte)0x9C, (byte)0x7C,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   234
        (byte)0xBD, (byte)0x89, (byte)0x4B, (byte)0x22,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   235
        (byte)0x19, (byte)0x26, (byte)0xBA, (byte)0xAB,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   236
        (byte)0xA2, (byte)0x5E, (byte)0xC3, (byte)0x55,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   237
        (byte)0xE9, (byte)0x2F, (byte)0x78, (byte)0xC7
90ce3da70b43 Initial load
duke
parents:
diff changeset
   238
    };
90ce3da70b43 Initial load
duke
parents:
diff changeset
   239
90ce3da70b43 Initial load
duke
parents:
diff changeset
   240
    // The SKIP 1024 bit modulus
90ce3da70b43 Initial load
duke
parents:
diff changeset
   241
    private static final BigInteger skip1024Modulus
90ce3da70b43 Initial load
duke
parents:
diff changeset
   242
    = new BigInteger(1, skip1024ModulusBytes);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   243
90ce3da70b43 Initial load
duke
parents:
diff changeset
   244
    // The base used with the SKIP 1024 bit modulus
90ce3da70b43 Initial load
duke
parents:
diff changeset
   245
    private static final BigInteger skip1024Base = BigInteger.valueOf(2);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   246
}