ECPublicKey

This class represents abstract ECC public keys. When encoding a key via an encoder that can be accessed via the corresponding member functions, the key will decide upon its internally stored encoding information whether to encode itself with or without domain parameters, or using the domain parameter oid. Furthermore, a public key without domain parameters can be decoded. In that case, it cannot be used for verification until its domain parameters are set by calling the corresponding member function.

Constructors

this
this(T options, ECGroup dom_par, PointGFp pub_point)
Undocumented in source.
this
this(T options, AlgorithmIdentifier alg_id, SecureVector!ubyte key_bits)
Undocumented in source.
this
this(T options, AlgorithmIdentifier alg_id)
Undocumented in source.

Members

Functions

DER_domain
Vector!ubyte DER_domain()

Return the DER encoding of this keys domain in whatever format is preset for this particular key

algorithmIdentifier
AlgorithmIdentifier algorithmIdentifier()
Undocumented in source. Be warned that the author may not have intended to support it.
checkKey
bool checkKey(RandomNumberGenerator rng, bool b)
Undocumented in source. Be warned that the author may not have intended to support it.
decodeOptions
void decodeOptions(T options)
Undocumented in source. Be warned that the author may not have intended to support it.
domain
const(ECGroup) domain()

Get the domain parameters of this key.

domainFormat
ECGroupEncoding domainFormat()

Get the domain parameter encoding to be used when encoding this key.

estimatedStrength
size_t estimatedStrength()
Undocumented in source. Be warned that the author may not have intended to support it.
maxInputBits
size_t maxInputBits()
Undocumented in source. Be warned that the author may not have intended to support it.
messagePartSize
size_t messagePartSize()
Undocumented in source. Be warned that the author may not have intended to support it.
messageParts
size_t messageParts()
Undocumented in source. Be warned that the author may not have intended to support it.
publicPoint
const(PointGFp) publicPoint()

Get the public point of this key.

publicValue
Vector!ubyte publicValue()
setParameterEncoding
void setParameterEncoding(ECGroupEncoding form)

Set the domain parameter encoding to be used when encoding this key.

x509SubjectPublicKey
Vector!ubyte x509SubjectPublicKey()
Undocumented in source. Be warned that the author may not have intended to support it.

Properties

algoName
string algoName [@property getter]

Used for object casting to the right type in the factory.

Variables

m_algo_name
string m_algo_name;
Undocumented in source.
m_algorithm_identifier
AlgorithmIdentifier function(in ECPublicKey) m_algorithm_identifier;
Undocumented in source.
m_check_key
bool function(in ECPrivateKey, RandomNumberGenerator, bool) m_check_key;
Undocumented in source.
m_domain_encoding
ECGroupEncoding m_domain_encoding;
Undocumented in source.
m_domain_params
ECGroup m_domain_params;
Undocumented in source.
m_msg_parts
short m_msg_parts;
Undocumented in source.
m_public_key
PointGFp m_public_key;
Undocumented in source.
m_subject_public_key
Vector!ubyte function(in ECPublicKey) m_subject_public_key;
Undocumented in source.

Inherited Members

From PublicKey

algoName
string algoName [@property getter]

Get the name of the underlying public key scheme.

estimatedStrength
size_t estimatedStrength()

Return the estimated strength of the underlying key against the best currently known attack. Note that this ignores anything but pure attacks against the key itself and do not take into account padding schemes, usage mistakes, etc which might reduce the strength. However it does suffice to provide an upper bound.

getOid
OID getOid()

Get the OID of the underlying public key scheme.

checkKey
bool checkKey(RandomNumberGenerator rng, bool strong)

Test the key values for consistency.

messageParts
size_t messageParts()

Find out the number of message parts supported by this scheme.

messagePartSize
size_t messagePartSize()

Find out the message part size supported by this scheme/key.

maxInputBits
size_t maxInputBits()

Get the maximum message size in bits supported by this public key.

algorithmIdentifier
AlgorithmIdentifier algorithmIdentifier()
x509SubjectPublicKey
Vector!ubyte x509SubjectPublicKey()
loadCheck
void loadCheck(RandomNumberGenerator rng)

Self-test after loading a key

Meta