uni2u / difs-cxx

DIFS ndn-cxx
Other
1 stars 3 forks source link

hc-key-chain #10

Closed uni2u closed 2 years ago

uni2u commented 3 years ago

HashChain ndn-cxx 라이브러리

내용

데이터 패킷 구성

+------------------------------------------+
|                   Name                   |
+------------------------------------------+
|                 MetaInfo                 |
|(ContentType,FreshnessPeriod,FinalBlockID)|
|(appMetaInfo, ...)                        |
+------------------------------------------+
|                  Content                 |
|      +---------------------------------+ |
|      | Next Hash                       | |
|      +---------------------------------+ |
+------------------------------------------+
|                 Signature                |
+------------------------------------------+
|SignatureInfo                             |
|            +----------------------------+|
|            | SignatureType              ||
|            +----------------------------+|
|            | KeyLocator                 ||
|            +----------------------------+|
+------------------------------------------+
|              SignatureValue              |
+------------------------------------------+

현재 코드 구성 (hc-key-chain.cpp)

namespace ndn {
namespace security {
inline namespace v2{
class HCKeyChain : protected KeyChain {
public:
  HCKeyChain() : KeyChain() {};

  void
  sign(std::vector<shared_ptr<Data>> m_store, const SigningInfo &params);

  void
  sign(Data &data, const ndn::Block &nextHash);

  void
  sign(Data &data, const ndn::Block &nextHash, const SigningInfo &params);
};
}
}
using security::v2::HCKeyChain;
}

difs 적용

producer, consumer 정의

흐름도