ESP-IDF
ot::Crypto::Ecdsa::P256::PublicKey
is only used within ESP-IDF.
Symbol previews are coming soon...
Symbols
loading (4/5)...
Files
loading (4/5)...
Summary
Syntax
Methods
Related
Examples
References
Call Tree
Data Use
Class Tree
Override Tree
Implementations
Instances
Lifecycle
SourceVu
ESP-IDF Framework and Examples
ESP-IDF
ot::Crypto::Ecdsa::P256::PublicKey
ot::Crypto::Ecdsa::P256::PublicKey class
Syntax
Show:
Summary
Declaration
Definition
from
ecdsa.hpp:76
class
PublicKey
;
class
KeyPair
;
#if
OPENTHREAD_CONFIG_PLATFORM_KEY_REFERENCES_ENABLE
class
KeyPairAsRef
;
#endif
OT_TOOL_PACKED_BEGIN
class
Signature
:
public
otPlatCryptoEcdsaSignature
{
friend
class
KeyPair
;
friend
class
PublicKey
;
#if
OPENTHREAD_CONFIG_PLATFORM_KEY_REFERENCES_ENABLE
friend
class
KeyPairAsRef
;
#endif
public
:
static
constexpr
uint8_t
kSize
=
OT_CRYPTO_ECDSA_SIGNATURE_SIZE
;
const
uint8_t
*
GetBytes
(
void
)
const
{
return
m8
;
}
}
OT_TOOL_PACKED_END
;
class
KeyPair
:
public
otPlatCryptoEcdsaKeyPair
{
public
:
static
constexpr
uint8_t
kMaxDerSize
=
OT_CRYPTO_ECDSA_MAX_DER_SIZE
;
KeyPair
(
void
)
{
mDerLength
=
0
;
}
Error
Generate
(
void
)
{
return
otPlatCryptoEcdsaGenerateKey
(
this
)
;
}
Error
GetPublicKey
(
PublicKey
&
aPublicKey
)
const
{
return
otPlatCryptoEcdsaGetPublicKey
(
this
,
&
aPublicKey
)
;
}
const
uint8_t
*
GetDerBytes
(
void
)
const
{
return
mDerBytes
;
}
uint8_t
GetDerLength
(
void
)
const
{
return
mDerLength
;
}
uint8_t
*
GetDerBytes
(
void
)
{
return
mDerBytes
;
}
void
SetDerLength
(
uint8_t
aDerLength
)
{
mDerLength
=
aDerLength
;
}
Error
Sign
(
const
Sha256
::
Hash
&
aHash
,
Signature
&
aSignature
)
const
{
return
otPlatCryptoEcdsaSign
(
this
,
&
aHash
,
&
aSignature
)
;
}
}
;
#if
OPENTHREAD_CONFIG_PLATFORM_KEY_REFERENCES_ENABLE
class
KeyPairAsRef
{
public
:
explicit
KeyPairAsRef
(
otCryptoKeyRef
aKeyRef
=
0
)
{
mKeyRef
=
aKeyRef
;
}
Error
Generate
(
void
)
const
{
return
otPlatCryptoEcdsaGenerateAndImportKey
(
mKeyRef
)
;
}
Error
ImportKeyPair
(
const
KeyPair
&
aKeyPair
)
{
return
Crypto
::
Storage
::
ImportKey
(
mKeyRef
,
Storage
::
kKeyTypeEcdsa
,
Storage
::
kKeyAlgorithmEcdsa
,
(
Storage
::
kUsageSignHash
|
Storage
::
kUsageVerifyHash
)
,
Storage
::
kTypePersistent
,
aKeyPair
.
GetDerBytes
(
)
,
aKeyPair
.
GetDerLength
(
)
)
;
}
Error
GetPublicKey
(
PublicKey
&
aPublicKey
)
const
{
return
otPlatCryptoEcdsaExportPublicKey
(
mKeyRef
,
&
aPublicKey
)
;
}
Error
Sign
(
const
Sha256
::
Hash
&
aHash
,
Signature
&
aSignature
)
const
{
return
otPlatCryptoEcdsaSignUsingKeyRef
(
mKeyRef
,
&
aHash
,
&
aSignature
)
;
}
otCryptoKeyRef
GetKeyRef
(
void
)
const
{
return
mKeyRef
;
}
void
SetKeyRef
(
otCryptoKeyRef
aKeyRef
)
{
mKeyRef
=
aKeyRef
;
}
private
:
otCryptoKeyRef
mKeyRef
;
}
;
#endif
OT_TOOL_PACKED_BEGIN
class
PublicKey
:
public
otPlatCryptoEcdsaPublicKey
;
Implemented in
ecdsa.hpp:297
Fields
Field
ot::Crypto::Ecdsa::P256::PublicKey::kSize
Methods
GetBytes() const
Gets the pointer to the buffer containing the public key (as an uncompressed curve point).
Verify() const
Uses the `PublicKey` to verify the ECDSA signature of a hashed message.
Related Functions
Found 3 other functions taking a
PublicKey
argument:
Function
Description
ot::Crypto::Ecdsa::P256::KeyPair::GetPublicKey() const
Gets the associated public key from the `KeyPair`.
ot::Srp::Server::VerifySignature() const
ot::Dns::Ecdsa256KeyRecord::SetKey()
Sets the ECDSA P-256 public key.
Examples
References
from
examples
Code
Location
Scope
Referrer
class
PublicKey
:
public
otPlatCryptoEcdsaPublicKey
,
public
Equatable
<
PublicKey
>
ecdsa.hpp:297
typedef
Crypto
::
Ecdsa
::
P256
::
PublicKey
Key
;
///< Host key (public ECDSA P256 key).
srp_server.hpp:442
DefineCoreType
(
otCacheEntryIterator
,
AddressResolver
::
Iterator
)
;
address_resolver.hpp:400
DefineCoreType
(
otCacheEntryInfo
,
AddressResolver
::
EntryInfo
)
;
address_resolver.hpp:401
DefineCoreType
(
otBorderAgentId
,
MeshCoP
::
BorderAgent
::
Id
)
;
border_agent.hpp:353
DefineCoreType
(
otChildInfo
,
Child
::
Info
)
;
child.hpp:399
DefineCoreType
(
otCoapTxParameters
,
Coap
::
TxParameters
)
;
coap.hpp:941
DefineCoreType
(
otCoapResource
,
Coap
::
Resource
)
;
coap.hpp:942
DefineCoreType
(
otCoapOption
,
Coap
::
Option
)
;
coap_message.hpp:1175
DefineCoreType
(
otCoapOptionIterator
,
Coap
::
Option
::
Iterator
)
;
coap_message.hpp:1176
DefineCoreType
(
otOperationalDatasetComponents
,
MeshCoP
::
Dataset
::
Components
)
;
dataset.hpp:783
DefineCoreType
(
otOperationalDataset
,
MeshCoP
::
Dataset
::
Info
)
;
dataset.hpp:784
DefineCoreType
(
otDnsQueryConfig
,
Dns
::
Client
::
QueryConfig
)
;
dns_client.hpp:892
DefineCoreType
(
otDnsAddressResponse
,
Dns
::
Client
::
AddressResponse
)
;
dns_client.hpp:893
DefineCoreType
(
otDnsBrowseResponse
,
Dns
::
Client
::
BrowseResponse
)
;
dns_client.hpp:895
DefineCoreType
(
otDnsServiceResponse
,
Dns
::
Client
::
ServiceResponse
)
;
dns_client.hpp:896
DefineCoreType
(
otDnsServiceInfo
,
Dns
::
Client
::
ServiceInfo
)
;
dns_client.hpp:897
DefineCoreType
(
otDnsTxtEntry
,
Dns
::
TxtEntry
)
;
dns_types.hpp:2734
DefineCoreType
(
otDnsTxtEntryIterator
,
Dns
::
TxtEntry
::
Iterator
)
;
dns_types.hpp:2735
class
PublicKey
;
ecdsa.hpp:76
DefineCoreType
(
otPlatCryptoEcdsaSignature
,
Crypto
::
Ecdsa
::
P256
::
Signature
)
;
ecdsa.hpp:340
DefineCoreType
(
otPlatCryptoEcdsaKeyPair
,
Crypto
::
Ecdsa
::
P256
::
KeyPair
)
;
ecdsa.hpp:341
DefineCoreType
(
otPlatCryptoEcdsaPublicKey
,
Crypto
::
Ecdsa
::
P256
::
PublicKey
)
;
ecdsa.hpp:342
DefineCoreType
(
otExtendedPanId
,
MeshCoP
::
ExtendedPanId
)
;
extended_panid.hpp:106
DefineCoreType
(
otIcmp6Header
,
Ip6
::
Icmp
::
Header
)
;
icmp6.hpp:337
DefineCoreType
(
otIcmp6Handler
,
Ip6
::
Icmp
::
Handler
)
;
icmp6.hpp:338
DefineCoreType
(
otInstance
,
Instance
)
;
instance.hpp:741
DefineCoreType
(
otBufferInfo
,
Instance
::
BufferInfo
)
;
instance.hpp:742
DefineCoreType
(
otIp4Address
,
Ip4
::
Address
)
;
ip4_types.hpp:661
DefineCoreType
(
otIp4Cidr
,
Ip4
::
Cidr
)
;
ip4_types.hpp:662
DefineCoreType
(
otIp6NetworkPrefix
,
Ip6
::
NetworkPrefix
)
;
ip6_address.hpp:986
DefineCoreType
(
otIp6Prefix
,
Ip6
::
Prefix
)
;
ip6_address.hpp:987
DefineCoreType
(
otIp6InterfaceIdentifier
,
Ip6
::
InterfaceIdentifier
)
;
ip6_address.hpp:988
DefineCoreType
(
otIp6Address
,
Ip6
::
Address
)
;
ip6_address.hpp:989
DefineCoreType
(
otSecurityPolicy
,
SecurityPolicy
)
;
key_manager.hpp:646
DefineCoreType
(
otNetworkKey
,
NetworkKey
)
;
key_manager.hpp:647
DefineCoreType
(
otPskc
,
Pskc
)
;
key_manager.hpp:648
DefineCoreType
(
otExtAddress
,
Mac
::
ExtAddress
)
;
mac_types.hpp:923
DefineCoreType
(
otMacKey
,
Mac
::
Key
)
;
mac_types.hpp:924
DefineCoreType
(
otMeshDiagIp6AddrIterator
,
Utils
::
MeshDiag
::
Ip6AddrIterator
)
;
mesh_diag.hpp:314
DefineCoreType
(
otMeshDiagRouterInfo
,
Utils
::
MeshDiag
::
RouterInfo
)
;
mesh_diag.hpp:315
DefineCoreType
(
otMeshDiagChildInfo
,
Utils
::
MeshDiag
::
ChildInfo
)
;
mesh_diag.hpp:316
DefineCoreType
(
otMeshDiagChildIterator
,
Utils
::
MeshDiag
::
ChildIterator
)
;
mesh_diag.hpp:317
DefineCoreType
(
otThreadLinkInfo
,
ThreadLinkInfo
)
;
mesh_forwarder.hpp:662
DefineCoreType
(
otJoinerPskd
,
MeshCoP
::
JoinerPskd
)
;
meshcop.hpp:515
DefineCoreType
(
otJoinerDiscerner
,
MeshCoP
::
JoinerDiscerner
)
;
meshcop.hpp:516
DefineCoreType
(
otSteeringData
,
MeshCoP
::
SteeringData
)
;
meshcop.hpp:517
DefineCoreType
(
otCommissioningDataset
,
MeshCoP
::
CommissioningDataset
)
;
meshcop.hpp:518
DefineCoreType
(
otMessageBuffer
,
Buffer
)
;
message.hpp:1901
DefineCoreType
(
otMessageSettings
,
Message
::
Settings
)
;
message.hpp:1902
DefineCoreType
(
otMessage
,
Message
)
;
message.hpp:1903
DefineCoreType
(
otMessageQueue
,
MessageQueue
)
;
message.hpp:1904
DefineCoreType
(
otLeaderData
,
Mle
::
LeaderData
)
;
mle_types.hpp:699
DefineCoreType
(
otDeviceProperties
,
Mle
::
DeviceProperties
)
;
mle_types.hpp:702
DefineCoreType
(
otNeighborInfo
,
Neighbor
::
Info
)
;
neighbor.hpp:773
DefineCoreType
(
otNetifAddress
,
Ip6
::
Netif
::
UnicastAddress
)
;
netif.hpp:652
DefineCoreType
(
otNetifMulticastAddress
,
Ip6
::
Netif
::
MulticastAddress
)
;
netif.hpp:653
DefineCoreType
(
otBorderRouterConfig
,
NetworkData
::
OnMeshPrefixConfig
)
;
network_data_types.hpp:400
DefineCoreType
(
otExternalRouteConfig
,
NetworkData
::
ExternalRouteConfig
)
;
network_data_types.hpp:401
DefineCoreType
(
otLowpanContextInfo
,
NetworkData
::
LowpanContextInfo
)
;
network_data_types.hpp:402
DefineCoreType
(
otServiceConfig
,
NetworkData
::
ServiceConfig
)
;
network_data_types.hpp:403
DefineCoreType
(
otServerConfig
,
NetworkData
::
ServiceConfig
::
ServerConfig
)
;
network_data_types.hpp:404
DefineCoreType
(
otNetworkName
,
MeshCoP
::
NetworkName
)
;
network_name.hpp:262
DefineCoreType
(
otPingSenderReply
,
Utils
::
PingSender
::
Reply
)
;
ping_sender.hpp:179
DefineCoreType
(
otPingSenderConfig
,
Utils
::
PingSender
::
Config
)
;
ping_sender.hpp:180
DefineCoreType
(
otPingSenderStatistics
,
Utils
::
PingSender
::
Statistics
)
;
ping_sender.hpp:181
DefineCoreType
(
otRouterInfo
,
Router
::
Info
)
;
router.hpp:215
DefineCoreType
(
otCryptoSha256Hash
,
Crypto
::
Sha256
::
Hash
)
;
sha256.hpp:148
DefineCoreType
(
otMessageInfo
,
Ip6
::
MessageInfo
)
;
socket.hpp:326
DefineCoreType
(
otSockAddr
,
Ip6
::
SockAddr
)
;
socket.hpp:327
DefineCoreType
(
otSrpClientHostInfo
,
Srp
::
Client
::
HostInfo
)
;
srp_client.hpp:1116
DefineCoreType
(
otSrpClientService
,
Srp
::
Client
::
Service
)
;
srp_client.hpp:1117
DefineCoreType
(
otSrpClientBuffersServiceEntry
,
Utils
::
SrpClientBuffers
::
ServiceEntry
)
;
srp_client_buffers.hpp:248
DefineCoreType
(
otSrpServerTtlConfig
,
Srp
::
Server
::
TtlConfig
)
;
srp_server.hpp:1019
DefineCoreType
(
otSrpServerLeaseConfig
,
Srp
::
Server
::
LeaseConfig
)
;
srp_server.hpp:1020
DefineCoreType
(
otSrpServerHost
,
Srp
::
Server
::
Host
)
;
srp_server.hpp:1021
DefineCoreType
(
otSrpServerService
,
Srp
::
Server
::
Service
)
;
srp_server.hpp:1022
DefineCoreType
(
otCryptoKey
,
Crypto
::
Key
)
;
storage.hpp:323
DefineCoreType
(
otTcpEndpoint
,
Ip6
::
Tcp
::
Endpoint
)
;
tcp6.hpp:670
DefineCoreType
(
otTcpListener
,
Ip6
::
Tcp
::
Listener
)
;
tcp6.hpp:671
DefineCoreType
(
otTcpCircularSendBuffer
,
Ip6
::
TcpCircularSendBuffer
)
;
tcp6_ext.hpp:129
DefineCoreType
(
otUdpSocket
,
Ip6
::
Udp
::
SocketHandle
)
;
udp6.hpp:669
DefineCoreType
(
otUdpReceiver
,
Ip6
::
Udp
::
Receiver
)
;
udp6.hpp:670
const
Crypto
::
Ecdsa
::
P256
::
PublicKey
&
GetKey
(
void
)
const
{
return
mKey
;
}
dns_types.hpp:2127
ot::Dns::Ecdsa256KeyRecord
ot::Dns::Ecdsa256KeyRecord::GetKey() const
void
SetKey
(
const
Crypto
::
Ecdsa
::
P256
::
PublicKey
&
aKey
)
{
mKey
=
aKey
;
}
dns_types.hpp:2134
ot::Dns::Ecdsa256KeyRecord::SetKey()
ot::Dns::Ecdsa256KeyRecord::SetKey()::aKey
Crypto
::
Ecdsa
::
P256
::
PublicKey
mKey
;
dns_types.hpp:2137
ot::Dns::Ecdsa256KeyRecord
ot::Dns::Ecdsa256KeyRecord::mKey
friend
class
PublicKey
;
ecdsa.hpp:92
Error
GetPublicKey
(
PublicKey
&
aPublicKey
)
const
{
return
otPlatCryptoEcdsaGetPublicKey
(
this
,
&
aPublicKey
)
;
}
ecdsa.hpp:144
ot::Crypto::Ecdsa::P256::KeyPair::GetPublicKey() const
ot::Crypto::Ecdsa::P256::KeyPair::GetPublicKey() const::aPublicKey
DefineCoreType
(
otPlatCryptoEcdsaPublicKey
,
Crypto
::
Ecdsa
::
P256
::
PublicKey
)
;
ecdsa.hpp:342
ot::CoreType::Type
Crypto
::
Ecdsa
::
P256
::
PublicKey
publicKey
;
srp_client.cpp:1192
ot::Srp::Client::ReadOrGenerateKey()
Crypto
::
Ecdsa
::
P256
::
PublicKey
publicKey
;
srp_client.cpp:1574
ot::Srp::Client::AppendKeyRecord() const
key
.
SetLength
(
sizeof
(
Dns
::
KeyRecord
)
-
sizeof
(
Dns
::
ResourceRecord
)
+
sizeof
(
Crypto
::
Ecdsa
::
P256
::
PublicKey
)
)
;
srp_client.cpp:1582
ot::Srp::Client::AppendKeyRecord() const
Error
Server
::
VerifySignature
(
const
Host
::
Key
&
aKey
,
srp_server.cpp:1291
ot::Srp::Server::VerifySignature() const
ot::Srp::Server::VerifySignature() const::aKey
typedef
Crypto
::
Ecdsa
::
P256
::
PublicKey
Key
;
///< Host key (public ECDSA P256 key).
srp_server.hpp:442
ot::Srp::Server::Host
ot::Srp::Server::Host::Key
const
Key
&
GetKey
(
void
)
const
{
return
mKey
;
}
srp_server.hpp:509
ot::Srp::Server::Host
ot::Srp::Server::Host::GetKey() const
Key
mKey
;
srp_server.hpp:575
ot::Srp::Server::Host
ot::Srp::Server::Host::mKey
Error
VerifySignature
(
const
Host
::
Key
&
aKey
,
srp_server.hpp:941
ot::Srp::Server::VerifySignature() const
ot::Srp::Server::VerifySignature() const::aKey
Call Tree
from
examples
All items filtered out
All items filtered out
Data Use
from
examples
All items filtered out
All items filtered out
Class Tree
from
examples
ot::Crypto::Ecdsa::P256::PublicKey
is inherited by 1 classes:
All items filtered out
ot::Crypto::Ecdsa::P256::PublicKey
otPlatCryptoEcdsaPublicKey
All items filtered out
Override Tree
from
examples
All items filtered out
All items filtered out
Implementations
from
examples
All items filtered out
All items filtered out
Instances
from
examples
Instance
Scope
Location
Project
ot::Crypto::Ecdsa::P256::KeyPair::GetPublicKey() const::aPublicKey
ot::Crypto::Ecdsa::P256::KeyPair::GetPublicKey() const
ecdsa.hpp:144
ot::CoreType::Type
ecdsa.hpp:342
return
ot::Srp::Server::Host::GetKey() const
srp_server.hpp:509
ot::Srp::Server::Host::mKey
ot::Srp::Server::Host
srp_server.hpp:575
ot::Srp::Server::VerifySignature() const::aKey
ot::Srp::Server::VerifySignature() const
srp_server.hpp:941
return
ot::Dns::Ecdsa256KeyRecord::GetKey() const
dns_types.hpp:2127
ot::Dns::Ecdsa256KeyRecord::SetKey()::aKey
ot::Dns::Ecdsa256KeyRecord::SetKey()
dns_types.hpp:2134
ot::Dns::Ecdsa256KeyRecord::mKey
ot::Dns::Ecdsa256KeyRecord
dns_types.hpp:2137
ot::Srp::Server::VerifySignature() const::aKey
ot::Srp::Server::VerifySignature() const
srp_server.cpp:1291
Lifecycle
from
examples
All items filtered out
All items filtered out