[Nfd-dev] Signature Verification on NFD for NDN-Packet
Monikrishna Roy
roy.monikrishna at gmail.com
Tue Nov 3 08:28:30 PST 2020
Hello Folks,
I want to use signature verification for data packet verification. I
used *#include
<ndn-cxx/security/verification-helpers.**hpp>* header file to do that.
The task I want to do is:
1. Set signature to data at Producer of NDN
2. Passing the data to NFD
3. Check the Signature at NFD-Forwarder on the onIncomingData method.
The problem I am facing is:
1. When I want to get the public key for data I could not able to get
the NDN public key.
2. It's always generating a new public key.
I used the Producer of NDN-CXX to publishing data.
Snippets of the codes:
For the Producer,
for (const auto& data : m_store) {
> m_keyChain.sign(*data, m_options.signingInfo);
> }
For NFD-Forwarder,
> ndn::KeyChain keyChain;
> auto pubkey = keyChain.getPib().getDefaultIdentity().getDefaultKey();
> bool res = ndn::security::verifySignature(data, pubkey);
>
Here, the public key for both keyChain is differents. I need to use the
same public key for both. How can I use the public key of Producer in
NFD-forwarder?
Any suggestions will be very helpful. Thanks in advance.
Best Regards,
Monikrishna Roy
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.lists.cs.ucla.edu/pipermail/nfd-dev/attachments/20201103/02ff01e7/attachment.html>
More information about the Nfd-dev
mailing list