/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is the Netscape security libraries.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1994-2000
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Dr Vipul Gupta <vipul.gupta@sun.com>, Sun Microsystems Laboratories
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
/*
* Copyright 2007 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*
* Sun elects to use this software under the MPL license.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
#ifdef _KERNEL
#else
#include <string.h>
#endif
#include "ec.h"
#include "ecl-curve.h"
#include "ecc_impl.h"
#include "secoidt.h"
#define CONST_OID static const unsigned char
/* ANSI X9.62 prime curve OIDs */
/* NOTE: prime192v1 is the same as secp192r1, prime256v1 is the
* same as secp256r1
*/
/* SECG prime curve OIDs */
/* SECG characterisitic two curve OIDs */
/* ANSI X9.62 characteristic two curve OIDs */
#ifndef SECOID_NO_STRINGS
#else
#endif
/* XXX this is incorrect */
"ANSI X9.62 elliptic curve prime192v1 (aka secp192r1, NIST P-192)",
"ANSI X9.62 elliptic curve prime192v2",
"ANSI X9.62 elliptic curve prime192v3",
"ANSI X9.62 elliptic curve prime239v1",
"ANSI X9.62 elliptic curve prime239v2",
"ANSI X9.62 elliptic curve prime239v3",
"ANSI X9.62 elliptic curve prime256v1 (aka secp256r1, NIST P-256)",
};
"SECG elliptic curve sect163k1 (aka NIST K-163)",
"SECG elliptic curve sect163r1",
"SECG elliptic curve sect239k1",
"SECG elliptic curve sect113r1",
"SECG elliptic curve sect113r2",
"SECG elliptic curve secp112r1",
"SECG elliptic curve secp112r2",
"SECG elliptic curve secp160r1",
"SECG elliptic curve secp160k1",
"SECG elliptic curve secp256k1",
"SECG elliptic curve sect163r2 (aka NIST B-163)",
"SECG elliptic curve sect283k1 (aka NIST K-283)",
"SECG elliptic curve sect283r1 (aka NIST B-283)",
"SECG elliptic curve sect131r1",
"SECG elliptic curve sect131r2",
"SECG elliptic curve sect193r1",
"SECG elliptic curve sect193r2",
"SECG elliptic curve sect233k1 (aka NIST K-233)",
"SECG elliptic curve sect233r1 (aka NIST B-233)",
"SECG elliptic curve secp128r1",
"SECG elliptic curve secp128r2",
"SECG elliptic curve secp160r2",
"SECG elliptic curve secp192k1",
"SECG elliptic curve secp224k1",
"SECG elliptic curve secp224r1 (aka NIST P-224)",
"SECG elliptic curve secp384r1 (aka NIST P-384)",
"SECG elliptic curve secp521r1 (aka NIST P-521)",
"SECG elliptic curve sect409k1 (aka NIST K-409)",
"SECG elliptic curve sect409r1 (aka NIST B-409)",
"SECG elliptic curve sect571k1 (aka NIST K-571)",
"SECG elliptic curve sect571r1 (aka NIST B-571)",
};
/* ANSI X9.62 named elliptic curves (characteristic two field) */
"ANSI X9.62 elliptic curve c2pnb163v1",
"ANSI X9.62 elliptic curve c2pnb163v2",
"ANSI X9.62 elliptic curve c2pnb163v3",
"ANSI X9.62 elliptic curve c2pnb176v1",
"ANSI X9.62 elliptic curve c2tnb191v1",
"ANSI X9.62 elliptic curve c2tnb191v2",
"ANSI X9.62 elliptic curve c2tnb191v3",
"ANSI X9.62 elliptic curve c2pnb208w1",
"ANSI X9.62 elliptic curve c2tnb239v1",
"ANSI X9.62 elliptic curve c2tnb239v2",
"ANSI X9.62 elliptic curve c2tnb239v3",
"ANSI X9.62 elliptic curve c2pnb272w1",
"ANSI X9.62 elliptic curve c2pnb304w1",
"ANSI X9.62 elliptic curve c2tnb359v1",
"ANSI X9.62 elliptic curve c2pnb368w1",
"ANSI X9.62 elliptic curve c2tnb431r1",
};
{
int i;
/* XXX bounds check */
}
/* XXX bounds check */
}
/* XXX bounds check */
} else {
}
return(ret);
}
{
return ECCurve_noName;
}