< prev index next >

test/sun/security/pkcs11/ec/TestECDSA.java

Print this page




  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  */
  23 
  24 /**
  25  * @test
  26  * @bug 6405536 8042967
  27  * @summary basic test of SHA1withECDSA and NONEwithECDSA signing/verifying
  28  * @author Andreas Sterbenz
  29  * @library ..
  30  * @library ../../../../java/security/testlibrary

  31  */
  32 
  33 import java.util.*;
  34 
  35 import java.security.*;
  36 import java.security.spec.*;
  37 import java.security.interfaces.*;
  38 
  39 public class TestECDSA extends PKCS11Test {
  40 
  41     // values of the keys we use for the tests
  42 
  43     // keypair using NIST P-192
  44     private final static String pub192 =
  45 "30:49:30:13:06:07:2a:86:48:ce:3d:02:01:06:08:2a:86:48:ce:3d:03:01:01:03:32:00:04:ee:b4:7f:60:3a:25:6a:0c:3c:86:d9:a0:62:be:f6:11:25:42:0e:19:fa:f3:1a:df:0c:98:b4:f8:b3:8f:f5:c1:82:74:e5:e7:71:d6:f9:d0:26:3b:2d:53:a6:37:fc:ab";
  46     private final static String priv192 =
  47 "30:39:02:01:00:30:13:06:07:2a:86:48:ce:3d:02:01:06:08:2a:86:48:ce:3d:03:01:01:04:1f:30:1d:02:01:01:04:18:2c:eb:c2:9e:96:de:df:70:d4:a6:33:43:9b:4c:59:4a:6e:a6:f4:5b:6b:a6:b7:6a";
  48 
  49     // keypair using NIST B-163
  50     private final static String pub163 =




  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  */
  23 
  24 /**
  25  * @test
  26  * @bug 6405536 8042967
  27  * @summary basic test of SHA1withECDSA and NONEwithECDSA signing/verifying
  28  * @author Andreas Sterbenz
  29  * @library ..
  30  * @library ../../../../java/security/testlibrary
  31  * @key randomness
  32  */
  33 
  34 import java.util.*;
  35 
  36 import java.security.*;
  37 import java.security.spec.*;
  38 import java.security.interfaces.*;
  39 
  40 public class TestECDSA extends PKCS11Test {
  41 
  42     // values of the keys we use for the tests
  43 
  44     // keypair using NIST P-192
  45     private final static String pub192 =
  46 "30:49:30:13:06:07:2a:86:48:ce:3d:02:01:06:08:2a:86:48:ce:3d:03:01:01:03:32:00:04:ee:b4:7f:60:3a:25:6a:0c:3c:86:d9:a0:62:be:f6:11:25:42:0e:19:fa:f3:1a:df:0c:98:b4:f8:b3:8f:f5:c1:82:74:e5:e7:71:d6:f9:d0:26:3b:2d:53:a6:37:fc:ab";
  47     private final static String priv192 =
  48 "30:39:02:01:00:30:13:06:07:2a:86:48:ce:3d:02:01:06:08:2a:86:48:ce:3d:03:01:01:04:1f:30:1d:02:01:01:04:18:2c:eb:c2:9e:96:de:df:70:d4:a6:33:43:9b:4c:59:4a:6e:a6:f4:5b:6b:a6:b7:6a";
  49 
  50     // keypair using NIST B-163
  51     private final static String pub163 =


< prev index next >