Class KJUR.crypto.ECParameterDB
static object for elliptic curve names and parameters
Defined in: ecparam-1.0.js.
Constructor Attributes | Constructor Name and Description |
---|---|
static object for elliptic curve names and parameters
This class provides parameters for named elliptic curves.
|
Method Attributes | Method Name and Description |
---|---|
<static> |
KJUR.crypto.ECParameterDB.getByName(nameOrAlias)
get curve inforamtion associative array for curve name or alias
|
<static> |
KJUR.crypto.ECParameterDB.regist(name, keylen, pHex, aHex, bHex, nHex, hHex, gxHex, gyHex, aliasList, oid, info)
register new curve
|
Class Detail
KJUR.crypto.ECParameterDB()
static object for elliptic curve names and parameters
This class provides parameters for named elliptic curves.
Currently it supoprts following curve names and aliases however
the name marked (*) are available for KJUR.crypto.ECDSA and
KJUR.crypto.Signature classes.
- secp128r1
- secp160r1
- secp160k1
- secp192r1
- secp192k1
- secp224r1
- secp256r1, NIST P-256, P-256, prime256v1 (*)
- secp256k1 (*)
- secp384r1, NIST P-384, P-384 (*)
- secp521r1, NIST P-521, P-521
Method Detail
<static>
{Array}
KJUR.crypto.ECParameterDB.getByName(nameOrAlias)
get curve inforamtion associative array for curve name or alias
var param = KJUR.crypto.ECParameterDB.getByName('prime256v1'); var keylen = param['keylen']; var n = param['n'];
- Parameters:
- {String} nameOrAlias
- curve name or alias name
- Returns:
- {Array} associative array of curve parameters
<static>
KJUR.crypto.ECParameterDB.regist(name, keylen, pHex, aHex, bHex, nHex, hHex, gxHex, gyHex, aliasList, oid, info)
register new curve
- Parameters:
- {String} name
- name of curve
- {Integer} keylen
- key length
- {String} pHex
- hexadecimal value of p
- {String} aHex
- hexadecimal value of a
- {String} bHex
- hexadecimal value of b
- {String} nHex
- hexadecimal value of n
- {String} hHex
- hexadecimal value of h
- {String} gxHex
- hexadecimal value of Gx
- {String} gyHex
- hexadecimal value of Gy
- {Array} aliasList
- array of string for curve names aliases
- {String} oid
- Object Identifier for the curve
- {String} info
- information string for the curve