1# This file is being contributed to pyasn1-modules software. 2# 3# Created by Russ Housley with assistance from asn1ate v.0.6.0. 4# 5# Copyright (c) 2019, Vigil Security, LLC 6# License: http://snmplabs.com/pyasn1/license.html 7# 8# Elliptic Curve Private Key 9# 10# ASN.1 source from: 11# https://www.rfc-editor.org/rfc/rfc5915.txt 12 13from pyasn1.type import namedtype 14from pyasn1.type import namedval 15from pyasn1.type import tag 16from pyasn1.type import univ 17 18from pyasn1_modules import rfc5480 19 20 21class ECPrivateKey(univ.Sequence): 22 pass 23 24ECPrivateKey.componentType = namedtype.NamedTypes( 25 namedtype.NamedType('version', univ.Integer( 26 namedValues=namedval.NamedValues(('ecPrivkeyVer1', 1)))), 27 namedtype.NamedType('privateKey', univ.OctetString()), 28 namedtype.OptionalNamedType('parameters', rfc5480.ECParameters().subtype( 29 explicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatSimple, 0))), 30 namedtype.OptionalNamedType('publicKey', univ.BitString().subtype( 31 explicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatSimple, 1))) 32) 33