|
1 /* |
|
2 * Copyright (c) 2007, 2011, Oracle and/or its affiliates. All rights reserved. |
|
3 * Use is subject to license terms. |
|
4 * |
|
5 * This library is free software; you can redistribute it and/or |
|
6 * modify it under the terms of the GNU Lesser General Public |
|
7 * License as published by the Free Software Foundation; either |
|
8 * version 2.1 of the License, or (at your option) any later version. |
|
9 * |
|
10 * This library is distributed in the hope that it will be useful, |
|
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
|
13 * Lesser General Public License for more details. |
|
14 * |
|
15 * You should have received a copy of the GNU Lesser General Public License |
|
16 * along with this library; if not, write to the Free Software Foundation, |
|
17 * Inc., 51 Franklin Street, 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 |
1 /* ********************************************************************* |
24 /* ********************************************************************* |
2 * |
|
3 * Sun elects to have this file available under and governed by the |
|
4 * Mozilla Public License Version 1.1 ("MPL") (see |
|
5 * http://www.mozilla.org/MPL/ for full license text). For the avoidance |
|
6 * of doubt and subject to the following, Sun also elects to allow |
|
7 * licensees to use this file under the MPL, the GNU General Public |
|
8 * License version 2 only or the Lesser General Public License version |
|
9 * 2.1 only. Any references to the "GNU General Public License version 2 |
|
10 * or later" or "GPL" in the following shall be construed to mean the |
|
11 * GNU General Public License version 2 only. Any references to the "GNU |
|
12 * Lesser General Public License version 2.1 or later" or "LGPL" in the |
|
13 * following shall be construed to mean the GNU Lesser General Public |
|
14 * License version 2.1 only. However, the following notice accompanied |
|
15 * the original version of this file: |
|
16 * |
|
17 * Version: MPL 1.1/GPL 2.0/LGPL 2.1 |
|
18 * |
|
19 * The contents of this file are subject to the Mozilla Public License Version |
|
20 * 1.1 (the "License"); you may not use this file except in compliance with |
|
21 * the License. You may obtain a copy of the License at |
|
22 * http://www.mozilla.org/MPL/ |
|
23 * |
|
24 * Software distributed under the License is distributed on an "AS IS" basis, |
|
25 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License |
|
26 * for the specific language governing rights and limitations under the |
|
27 * License. |
|
28 * |
25 * |
29 * The Original Code is the elliptic curve math library for prime field curves. |
26 * The Original Code is the elliptic curve math library for prime field curves. |
30 * |
27 * |
31 * The Initial Developer of the Original Code is |
28 * The Initial Developer of the Original Code is |
32 * Sun Microsystems, Inc. |
29 * Sun Microsystems, Inc. |
39 * Douglas Stebila <douglas@stebila.ca>, Sun Microsystems Laboratories. |
36 * Douglas Stebila <douglas@stebila.ca>, Sun Microsystems Laboratories. |
40 * Bodo Moeller <moeller@cdc.informatik.tu-darmstadt.de>, |
37 * Bodo Moeller <moeller@cdc.informatik.tu-darmstadt.de>, |
41 * Nils Larsch <nla@trustcenter.de>, and |
38 * Nils Larsch <nla@trustcenter.de>, and |
42 * Lenka Fibikova <fibikova@exp-math.uni-essen.de>, the OpenSSL Project |
39 * Lenka Fibikova <fibikova@exp-math.uni-essen.de>, the OpenSSL Project |
43 * |
40 * |
44 * Alternatively, the contents of this file may be used under the terms of |
|
45 * either the GNU General Public License Version 2 or later (the "GPL"), or |
|
46 * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), |
|
47 * in which case the provisions of the GPL or the LGPL are applicable instead |
|
48 * of those above. If you wish to allow use of your version of this file only |
|
49 * under the terms of either the GPL or the LGPL, and not to allow others to |
|
50 * use your version of this file under the terms of the MPL, indicate your |
|
51 * decision by deleting the provisions above and replace them with the notice |
|
52 * and other provisions required by the GPL or the LGPL. If you do not delete |
|
53 * the provisions above, a recipient may use your version of this file under |
|
54 * the terms of any one of the MPL, the GPL or the LGPL. |
|
55 * |
|
56 *********************************************************************** */ |
41 *********************************************************************** */ |
57 /* |
|
58 * Copyright (c) 2007, 2011, Oracle and/or its affiliates. All rights reserved. |
|
59 * Use is subject to license terms. |
|
60 */ |
|
61 |
42 |
62 #include "ecp.h" |
43 #include "ecp.h" |
63 #include "mplogic.h" |
44 #include "mplogic.h" |
64 #ifndef _KERNEL |
45 #ifndef _KERNEL |
65 #include <stdlib.h> |
46 #include <stdlib.h> |